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 class AlignableTracker;
27 class AlignableMuon;
28 class AlignableExtras;
29 
30 namespace edm {
31  class EventSetup;
32  class ParameterSet;
33 } // namespace edm
34 
36 public:
38  explicit TkModuleGroupSelector(AlignableTracker *aliTracker,
39  const edm::ParameterSet &cfg,
40  const std::vector<int> &sdets);
41 
44 
45  // Returns the number of parameters.
46  unsigned int getNumberOfParameters() const;
47 
49  unsigned int numIovs() const;
50 
52  edm::RunNumber_t firstRunOfIOV(unsigned int iovNum) const;
53 
56  int getParameterIndexFromDetId(unsigned int detId, edm::RunNumber_t run) const;
57 
58 private:
59  // Constructs the run-dependent module groups from configuration parameters.
60  void createModuleGroups(AlignableTracker *aliTracker,
61  const edm::VParameterSet &granularityConfig,
62  const std::vector<edm::RunNumber_t> &defaultRunRange,
63  edm::RunNumber_t defaultReferenceRun);
64 
65  // Method used to test the provided configuration for unknown parameters
66  void verifyParameterNames(const edm::ParameterSet &pset, unsigned int psetnr) const;
67 
68  // Method to test whether the split option has been turned on
69  const bool testSplitOption(const edm::ParameterSet &pset) const;
70 
71  // Add modules to a specific group which is also created in this function.
72  bool createGroup(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 #endif
int getParameterIndexFromDetId(unsigned int detId, edm::RunNumber_t run) const
bool createGroup(unsigned int &Id, const std::vector< edm::RunNumber_t > &range, const std::list< Alignable *> &selected_alis, const edm::RunNumber_t refrun)
unsigned int numIovs() const
Total number of IOVs.
void verifyParameterNames(const edm::ParameterSet &pset, unsigned int psetnr) const
std::vector< int > subdetids_
std::vector< edm::RunNumber_t > globalRunRange_
std::vector< edm::RunNumber_t > referenceRun_
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:35
void fillDetIdMap(const unsigned int detid, const unsigned int groupid)
unsigned int getNumberOfParameters() const
std::map< unsigned int, unsigned int > mapDetIdGroupId_
void createModuleGroups(AlignableTracker *aliTracker, const edm::VParameterSet &granularityConfig, const std::vector< edm::RunNumber_t > &defaultRunRange, edm::RunNumber_t defaultReferenceRun)
virtual ~TkModuleGroupSelector()
Destructor.
std::vector< std::vector< edm::RunNumber_t > > runRange_
TkModuleGroupSelector(AlignableTracker *aliTracker, const edm::ParameterSet &cfg, const std::vector< int > &sdets)
Constructor.
HLT enums.
unsigned int RunNumber_t
const bool testSplitOption(const edm::ParameterSet &pset) const
std::vector< unsigned int > firstId_
Constructor of the full muon geometry.
Definition: AlignableMuon.h:38
edm::RunNumber_t firstRunOfIOV(unsigned int iovNum) const
First run of iov (0 if iovNum not treated).