Revision: | 1.9 |
Committed: | Tue Sep 2 15:31:23 2008 UTC (16 years, 8 months ago) by flucke |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | CMSSW_3_8_7_patch1, CMSSW_3_8_7, CMSSW_3_8_6_patch1, CMSSW_3_8_6, CMSSW_3_8_5_patch3, CMSSW_3_8_5_patch2, CMSSW_3_8_5_patch1, CMSSW_3_8_4_patch4, CMSSW_3_8_5, CMSSW_3_8_4_patch3, CMSSW_3_8_4_patch2, CMSSW_3_8_4_patch1, CMSSW_3_9_0_pre4, CMSSW_3_8_4, CMSSW_3_8_3, CMSSW_3_8_2_patch1, CMSSW_3_6_3_SLHC1, CMSSW_3_9_0_pre3, CMSSW_3_8_1_patch4, CMSSW_3_8_2, CMSSW_3_8_1_patch3, CMSSW_3_6_1_patch7, CMSSW_3_9_0_pre2, CMSSW_3_6_3_hltpatch4, CMSSW_3_8_1_patch2, CMSSW_3_8_1_patch1, CMSSW_3_7_1, CMSSW_3_8_1, CMSSW_3_6_3_patch2, CMSSW_3_9_0_pre1, CMSSW_3_8_0_patch1, CMSSW_3_8_0, CMSSW_3_6_1_patch6, CMSSW_3_8_0_pre8, CMSSW_3_8_0_pre7, CMSSW_3_8_0_pre6, CMSSW_3_6_3_patch1, CMSSW_3_7_0_patch4, CMSSW_3_7_0_patch3, CMSSW_3_8_0_pre5, CMSSW_3_6_1_patch5, CMSSW_3_8_0_pre4, CMSSW_3_6_3, CMSSW_3_8_0_pre2, CMSSW_3_7_0_patch2, CMSSW_3_6_2, CMSSW_3_7_0_patch1, CMSSW_3_8_0_pre1, CMSSW_3_6_1_patch4, CMSSW_3_7_0, CMSSW_3_6_1_patch3, CMSSW_3_5_7_hltpatch4, CMSSW_3_7_0_pre5, CMSSW_3_6_1_patch1, CMSSW_3_5_8_patch4, CMSSW_3_7_0_pre4, CMSSW_3_6_1, CMSSW_3_7_0_pre3, CMSSW_3_6_0_patch2, CMSSW_3_6_0_patch1, CMSSW_3_5_8_patch3, CMSSW_3_5_8_patch2, CMSSW_3_5_8_patch1, CMSSW_3_7_0_pre2, CMSSW_3_5_8, CMSSW_3_7_0_pre1, CMSSW_3_5_7, CMSSW_3_6_0, V03-02-03, CMSSW_3_6_0_pre6, CMSSW_3_6_0_pre5, CMSSW_3_5_6_patch1, CMSSW_3_5_6, CMSSW_3_5_4_patch2, CMSSW_3_5_5, CMSSW_3_6_0_pre4, CMSSW_3_5_4_patch1, CMSSW_3_6_0_pre3, CMSSW_3_5_4, CMSSW_3_5_3, CMSSW_3_6_0_pre2, CMSSW_3_5_2_patch2, CMSSW_3_5_2_patch1, CMSSW_3_6_0_pre1, V03-02-02, CMSSW_3_5_2, CMSSW_3_5_1_patch1, CMSSW_3_3_6_patch4, CMSSW_3_3_6_patch6, CMSSW_3_5_0_patch1, CMSSW_3_4_2_patch1, CMSSW_3_5_1, CMSSW_3_4_2, CMSSW_3_5_0, CMSSW_3_3_6_patch5, CMSSW_3_5_0_pre5, CMSSW_3_3_6_patch3, CMSSW_3_3_3_TSG, CMSSW_3_5_0_pre3, CMSSW_3_5_0_pre2, CMSSW_3_4_1, CMSSW_3_4_0, CMSSW_3_3_6_patch2, CMSSW_3_3_6_patch1, CMSSW_3_5_0_pre1, CMSSW_3_3_6, CMSSW_3_4_0_pre7, CMSSW_3_3_5, CMSSW_3_4_0_pre6, CMSSW_3_3_4, CMSSW_3_3_3_patch1, CMSSW_3_3_3, V03-02-01, CMSSW_3_4_0_pre5, CMSSW_3_4_0_pre4, CMSSW_3_3_2, CMSSW_3_4_0_pre3, CMSSW_3_3_1, CMSSW_3_4_0_pre2, CMSSW_3_2_8, CMSSW_3_2_7, V03-02-00, CMSSW_3_3_0, CMSSW_3_4_0_pre1, CMSSW_3_1_4, V03-01-04, CMSSW_3_3_0_pre6, V03-01-03, CMSSW_3_3_0_pre5, CMSSW_3_1_3, CMSSW_3_3_0_pre4, CMSSW_3_3_0_pre3, CMSSW_3_3_0_pre2, CMSSW_3_2_6, CMSSW_3_3_0_pre1, CMSSW_3_2_5, CMSSW_3_2_4, CMSSW_3_2_3, V03-01-02, CMSSW_3_2_2_patch2, CMSSW_3_2_2_patch1, CMSSW_3_2_2, CMSSW_3_1_2, CMSSW_3_2_1, CMSSW_3_2_0, CMSSW_3_1_1, CMSSW_3_1_0_patch1, CMSSW_3_1_0, CMSSW_3_1_0_pre11, V03-01-01, CMSSW_3_1_0_pre10, CMSSW_3_1_0_pre9, CMSSW_3_1_0_pre8, CMSSW_3_1_0_pre7, V03-01-00, V03-00-05, V03-00-04, CMSSW_3_1_0_pre6, V03-00-03, CMSSW_3_1_0_pre5, V03-00-02, V03-00-00, V02-04-00, CMSSW_3_1_0_pre4, CMSSW_3_1_0_pre3, V02-03-05, CMSSW_3_1_0_pre2, V02-03-04, CMSSW_3_0_0_pre10, CMSSW_3_0_0_pre9, CMSSW_3_1_0_pre1, CMSSW_3_0_0_pre8, V02-03-03, CMSSW_3_0_0_pre7, V02-03-02, CMSSW_3_0_0_pre6, CMSSW_3_0_0_pre5, CMSSW_3_0_0_pre4, V02-03-01, CMSSW_3_0_0_pre3, V02-03-00 |
Changes since 1.8: | +16 -10 lines |
Log Message: | Make choice of AlignmentParameters configurable, it was hardcoded to RigidBody before. RigidBody will become default in configuration of AlignmentProducer. |
# | User | Rev | Content |
---|---|---|---|
1 | fronga | 1.1 | #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentParameterBuilder_h |
2 | #define Alignment_CommonAlignmentAlgorithm_AlignmentParameterBuilder_h | ||
3 | |||
4 | flucke | 1.3 | /** \class AlignmentParameterBuilder |
5 | * | ||
6 | * Build Alignment Parameter Structure | ||
7 | * | ||
8 | flucke | 1.9 | * $Date: 2007/10/08 14:38:15 $ |
9 | * $Revision: 1.8 $ | ||
10 | * (last update by $Author: cklae $) | ||
11 | flucke | 1.3 | */ |
12 | |||
13 | cklae | 1.8 | #include "Alignment/CommonAlignment/interface/Utilities.h" |
14 | flucke | 1.9 | #include "Alignment/CommonAlignmentParametrization/interface/AlignmentParametersFactory.h" |
15 | cklae | 1.8 | |
16 | flucke | 1.4 | namespace edm { |
17 | class ParameterSet; | ||
18 | } | ||
19 | flucke | 1.6 | class AlignableTracker; |
20 | fronga | 1.7 | class AlignableMuon; |
21 | flucke | 1.6 | class AlignmentParameters; |
22 | fronga | 1.1 | |
23 | class AlignmentParameterBuilder | ||
24 | { | ||
25 | public: | ||
26 | fronga | 1.7 | /// Constructor from tracker only |
27 | explicit AlignmentParameterBuilder( AlignableTracker *alignableTracker ); | ||
28 | |||
29 | /// Constructor from tracker and muon | ||
30 | AlignmentParameterBuilder( AlignableTracker *alignableTracker, AlignableMuon *alignableMuon ); | ||
31 | |||
32 | flucke | 1.5 | /// Constructor adding selections by passing the ParameterSet named 'AlignmentParameterSelector' |
33 | /// (expected in pSet) to addSelections(..) | ||
34 | fronga | 1.7 | AlignmentParameterBuilder( AlignableTracker *alignableTracker, const edm::ParameterSet &pSet ); |
35 | |||
36 | /// Constructor from tracker and muon, plus selection | ||
37 | AlignmentParameterBuilder( AlignableTracker *alignableTracker, AlignableMuon *alignableMuon, | ||
38 | const edm::ParameterSet &pSet); | ||
39 | |||
40 | fronga | 1.1 | |
41 | /// destructor | ||
42 | flucke | 1.4 | virtual ~AlignmentParameterBuilder() {}; |
43 | flucke | 1.9 | /// master initialisation method, PSet must have form as constructor wants it |
44 | void addAllSelections(const edm::ParameterSet &pSet); | ||
45 | fronga | 1.1 | |
46 | flucke | 1.5 | /// Add selections of Alignables, using AlignmenParameterSelector::addSelections. |
47 | flucke | 1.9 | /// For each Alignable, AlignmentParameters of type parType will be attached |
48 | flucke | 1.5 | /// using the selection of active parameters done in AlignmenParameterSelector, |
49 | flucke | 1.9 | /// e.g. for RigidBody a selection string '11100' selects the degrees of freedom in |
50 | /// (x,y,z), but not (alpha,beta,gamma). | ||
51 | flucke | 1.5 | /// Returns number of added selections |
52 | flucke | 1.9 | unsigned int addSelections(const edm::ParameterSet &pset, |
53 | AlignmentParametersFactory::ParametersType parType); | ||
54 | fronga | 1.1 | |
55 | flucke | 1.5 | /// Add arbitrary selection of Alignables, return number of higher level Alignables |
56 | flucke | 1.9 | unsigned int add(const align::Alignables &alignables, |
57 | AlignmentParametersFactory::ParametersType parType, | ||
58 | const std::vector<bool> &sel); | ||
59 | flucke | 1.5 | /// Add a single Alignable, true if it is higher level, false if it is an AlignableDet |
60 | flucke | 1.9 | bool add(Alignable *alignable, AlignmentParametersFactory::ParametersType parType, |
61 | const std::vector<bool> &sel); | ||
62 | fronga | 1.1 | |
63 | /// Get list of alignables for which AlignmentParameters are built | ||
64 | cklae | 1.8 | const align::Alignables& alignables() const { return theAlignables; }; |
65 | fronga | 1.1 | |
66 | /// Remove n Alignables from list | ||
67 | void fixAlignables( int n ); | ||
68 | |||
69 | private: | ||
70 | |||
71 | flucke | 1.6 | /// convert char selection (from ParameterSelector) to bool (for AlignmentParameters) |
72 | /// true if anything else than 0 and 1 is found in vector<char> | ||
73 | bool decodeParamSel(const std::vector<char> ¶mSelChar, std::vector<bool> &result) const; | ||
74 | /// add SelectionUserVariables corresponding to fullSel | ||
75 | bool addFullParamSel(AlignmentParameters *aliPar, const std::vector<char> &fullSel) const; | ||
76 | |||
77 | fronga | 1.1 | // data members |
78 | |||
79 | /// Vector of alignables | ||
80 | cklae | 1.8 | align::Alignables theAlignables; |
81 | fronga | 1.1 | |
82 | /// Alignable tracker | ||
83 | AlignableTracker* theAlignableTracker; | ||
84 | |||
85 | fronga | 1.7 | /// Alignable muon |
86 | AlignableMuon* theAlignableMuon; | ||
87 | |||
88 | fronga | 1.1 | }; |
89 | |||
90 | #endif |