CMS 3D CMS Logo

TkModuleGroupSelector.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignmentAlgorithm_TkModuleGroupSelector_h
2 #define Alignment_CommonAlignmentAlgorithm_TkModuleGroupSelector_h
3 
21 
22 #include <vector>
23 #include <map>
24 #include <list>
25 
26 
27 class AlignableTracker;
28 class AlignableMuon;
29 class AlignableExtras;
30 
31 namespace edm { class EventSetup; class ParameterSet; }
32 
34 {
35 public:
37  explicit TkModuleGroupSelector(AlignableTracker *aliTracker,
38  const edm::ParameterSet &cfg,
39  const std::vector<int> &sdets);
40 
42  virtual ~TkModuleGroupSelector() {};
43 
44  // Returns the number of parameters.
45  unsigned int getNumberOfParameters() const;
46 
48  unsigned int numIovs() const;
49 
51  edm::RunNumber_t firstRunOfIOV(unsigned int iovNum) const;
52 
55  int getParameterIndexFromDetId(unsigned int detId, edm::RunNumber_t run) const;
56 
57  private:
58  // Constructs the run-dependent module groups from configuration parameters.
59  void createModuleGroups(AlignableTracker *aliTracker,
60  const edm::VParameterSet &granularityConfig,
61  const std::vector<edm::RunNumber_t> &defaultRunRange,
62  edm::RunNumber_t defaultReferenceRun);
63 
64  // Method used to test the provided configuration for unknown parameters
65  void verifyParameterNames(const edm::ParameterSet &pset, unsigned int psetnr) const;
66 
67  // Method to test whether the split option has been turned on
68  const bool testSplitOption(const edm::ParameterSet &pset) const;
69 
70  // Add modules to a specific group which is also created in this function.
71  bool createGroup(
72  unsigned int &Id, //id of the first run
73  const std::vector<edm::RunNumber_t> &range, //run range
74  const std::list<Alignable*> &selected_alis, //list of alignables for which a group is created
75  const edm::RunNumber_t refrun //reference run number
76  );
77 
78  // Fill the container which is a map between the det id and the id of the group
79  // to which the module belongs.
80  void fillDetIdMap(const unsigned int detid, const unsigned int groupid);
81 
82  // Array with run boundaries which is a combination
83  // of all defined run ranges of all specified module groups.
84  std::vector<edm::RunNumber_t> globalRunRange_;
85 
86  // For a given module group the id of the first IOV.
87  std::vector<unsigned int> firstId_;
88 
89  // Run range per module group
90  std::vector<std::vector<edm::RunNumber_t> > runRange_;
91 
92  // Mapping between module id and module group id.
93  std::map<unsigned int, unsigned int> mapDetIdGroupId_;
94 
95  // Total number of parameters.
96  unsigned int nparameters_;
97 
98  // The ids of the subdetectors for which parameters are determined.
99  std::vector<int> subdetids_;
100 
101  // Reference run per module group
102  std::vector<edm::RunNumber_t> referenceRun_;
103 
104 };
105 
106 #endif
std::vector< int > subdetids_
std::vector< edm::RunNumber_t > globalRunRange_
std::vector< edm::RunNumber_t > referenceRun_
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
std::map< unsigned int, unsigned int > mapDetIdGroupId_
virtual ~TkModuleGroupSelector()
Destructor.
std::vector< std::vector< edm::RunNumber_t > > runRange_
HLT enums.
unsigned int RunNumber_t
std::vector< unsigned int > firstId_
Constructor of the full muon geometry.
Definition: AlignableMuon.h:37