CMS 3D CMS Logo

OMTFConfiguration.h
Go to the documentation of this file.
1 #ifndef OMTF_OMTFConfiguration_H
2 #define OMTF_OMTFConfiguration_H
3 
4 #include <map>
5 #include <set>
6 #include <vector>
7 #include <ostream>
8 #include <memory>
9 
11 
12 namespace edm {
13  class ParameterSet;
14 }
15 
16 class RefHitDef {
17 public:
18  //FIXME: default values should be sonnected to configuration values
19  RefHitDef(unsigned int aInput = 15,
20  int aPhiMin = 5760,
21  int aPhiMax = 5760,
22  unsigned int aRegion = 99,
23  unsigned int aRefLayer = 99);
24 
25 public:
26  bool fitsRange(int iPhi) const;
27 
29  unsigned int iInput;
30 
32  unsigned int iRegion;
33 
35  unsigned int iRefLayer;
36 
39  std::pair<int, int> range;
40 
41  friend std::ostream& operator<<(std::ostream& out, const RefHitDef& aRefHitDef);
42 };
43 
45 public:
46  typedef std::vector<std::pair<unsigned int, unsigned int> > vector1D_pair;
47  typedef std::vector<vector1D_pair> vector2D_pair;
48  typedef std::vector<vector2D_pair> vector3D_pair;
49 
50  typedef std::vector<int> vector1D;
51  typedef std::vector<vector1D> vector2D;
52  typedef std::vector<vector2D> vector3D;
53  typedef std::vector<vector3D> vector4D;
54 
56 
58 
59  void initCounterMatrices();
60 
64  unsigned int getRegionNumberFromMap(unsigned int iInput, unsigned int iRefLayer, int iPhi) const;
65 
69  bool isInRegionRange(int iPhiStart, unsigned int coneSize, int iPhi) const;
70 
73  int globalPhiStart(unsigned int iProcessor) const;
74 
79  uint32_t getLayerNumber(uint32_t rawId) const;
80 
81  unsigned int fwVersion() const { return (rawParams.fwVersion() >> 16) & 0xFFFF; };
82  unsigned int patternsVersion() const { return rawParams.fwVersion() & 0xFFFF; };
83 
84  const L1TMuonOverlapParams* getRawParams() const { return &rawParams; };
85 
86  float minPdfVal() const { return 0.001; };
87  unsigned int nLayers() const { return rawParams.nLayers(); };
88  unsigned int nHitsPerLayer() const { return rawParams.nHitsPerLayer(); };
89  unsigned int nRefLayers() const { return rawParams.nRefLayers(); };
90  unsigned int nPhiBits() const { return rawParams.nPhiBits(); };
91  unsigned int nPdfAddrBits() const { return rawParams.nPdfAddrBits(); };
92  unsigned int nPdfValBits() const { return rawParams.nPdfValBits(); };
93  unsigned int nPhiBins() const { return rawParams.nPhiBins(); };
94  unsigned int nRefHits() const { return rawParams.nRefHits(); };
95  unsigned int nTestRefHits() const { return rawParams.nTestRefHits(); };
96  unsigned int nProcessors() const { return rawParams.nProcessors(); };
97  unsigned int nLogicRegions() const { return rawParams.nLogicRegions(); };
98  unsigned int nInputs() const { return rawParams.nInputs(); };
99  unsigned int nGoldenPatterns() const { return rawParams.nGoldenPatterns(); };
100 
101  const std::map<int, int>& getHwToLogicLayer() const { return hwToLogicLayer; }
102  const std::map<int, int>& getLogicToHwLayer() const { return logicToHwLayer; }
103  const std::map<int, int>& getLogicToLogic() const { return logicToLogic; }
104  const std::set<int>& getBendingLayers() const { return bendingLayers; }
105  const std::vector<int>& getRefToLogicNumber() const { return refToLogicNumber; }
106 
107  const std::vector<unsigned int>& getBarrelMin() const { return barrelMin; }
108  const std::vector<unsigned int>& getBarrelMax() const { return barrelMax; }
109  const std::vector<unsigned int>& getEndcap10DegMin() const { return endcap10DegMin; }
110  const std::vector<unsigned int>& getEndcap10DegMax() const { return endcap10DegMax; }
111  const std::vector<unsigned int>& getEndcap20DegMin() const { return endcap20DegMin; }
112  const std::vector<unsigned int>& getEndcap20DegMax() const { return endcap20DegMax; }
113 
114  const std::vector<std::vector<int> >& getProcessorPhiVsRefLayer() const { return processorPhiVsRefLayer; }
115  const std::vector<std::vector<std::vector<std::pair<int, int> > > >& getRegionPhisVsRefLayerVsInput() const {
117  }
118  const std::vector<std::vector<RefHitDef> >& getRefHitsDefs() const { return refHitsDefs; }
119 
120  const vector3D_pair& getConnections() const { return connections; };
121 
124 
125  const vector4D& getMeasurements4D() const { return measurements4D; }
127 
128  friend std::ostream& operator<<(std::ostream& out, const OMTFConfiguration& aConfig);
129 
130 private:
132 
133  std::map<int, int> hwToLogicLayer;
134  std::map<int, int> logicToHwLayer;
135  std::map<int, int> logicToLogic;
136  std::set<int> bendingLayers;
137  std::vector<int> refToLogicNumber;
138 
142  std::vector<unsigned int> barrelMin;
143  std::vector<unsigned int> barrelMax;
144  std::vector<unsigned int> endcap10DegMin;
145  std::vector<unsigned int> endcap10DegMax;
146  std::vector<unsigned int> endcap20DegMin;
147  std::vector<unsigned int> endcap20DegMax;
148 
153  std::vector<std::vector<int> > processorPhiVsRefLayer;
154 
161  std::vector<std::vector<std::vector<std::pair<int, int> > > > regionPhisVsRefLayerVsInput;
162 
168  std::vector<std::vector<RefHitDef> > refHitsDefs;
169 
172 
176 };
177 
178 #endif
RefHitDef::RefHitDef
RefHitDef(unsigned int aInput=15, int aPhiMin=5760, int aPhiMax=5760, unsigned int aRegion=99, unsigned int aRefLayer=99)
Definition: OMTFConfiguration.cc:16
L1TMuonOverlapParams::nPhiBins
int nPhiBins() const
Definition: L1TMuonOverlapParams.h:148
fakeOmtfParams_cff.omtfParams
omtfParams
OMTF ESProducer.
Definition: fakeOmtfParams_cff.py:11
OMTFConfiguration::getEndcap20DegMin
const std::vector< unsigned int > & getEndcap20DegMin() const
Definition: OMTFConfiguration.h:111
OMTFConfiguration::getLogicToHwLayer
const std::map< int, int > & getLogicToHwLayer() const
Definition: OMTFConfiguration.h:102
OMTFConfiguration::getLayerNumber
uint32_t getLayerNumber(uint32_t rawId) const
Definition: OMTFConfiguration.cc:204
RefHitDef
Definition: OMTFConfiguration.h:16
OMTFConfiguration::getRefHitsDefs
const std::vector< std::vector< RefHitDef > > & getRefHitsDefs() const
Definition: OMTFConfiguration.h:118
OMTFConfiguration::endcap10DegMin
std::vector< unsigned int > endcap10DegMin
Definition: OMTFConfiguration.h:144
OMTFConfiguration::vector2D_pair
std::vector< vector1D_pair > vector2D_pair
Definition: OMTFConfiguration.h:47
OMTFConfiguration::getMeasurements4D
vector4D & getMeasurements4D()
Definition: OMTFConfiguration.h:122
edm
HLT enums.
Definition: AlignableModifier.h:19
OMTFConfiguration::nPdfValBits
unsigned int nPdfValBits() const
Definition: OMTFConfiguration.h:92
OMTFConfiguration::getBarrelMax
const std::vector< unsigned int > & getBarrelMax() const
Definition: OMTFConfiguration.h:108
OMTFConfiguration::getRawParams
const L1TMuonOverlapParams * getRawParams() const
Definition: OMTFConfiguration.h:84
RefHitDef::fitsRange
bool fitsRange(int iPhi) const
Definition: OMTFConfiguration.cc:20
OMTFConfiguration::vector1D_pair
std::vector< std::pair< unsigned int, unsigned int > > vector1D_pair
Definition: OMTFConfiguration.h:46
OMTFConfiguration::regionPhisVsRefLayerVsInput
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
Definition: OMTFConfiguration.h:161
L1TMuonOverlapParams::nTestRefHits
int nTestRefHits() const
Definition: L1TMuonOverlapParams.h:152
OMTFConfiguration::nRefHits
unsigned int nRefHits() const
Definition: OMTFConfiguration.h:94
OMTFConfiguration::refToLogicNumber
std::vector< int > refToLogicNumber
Definition: OMTFConfiguration.h:137
OMTFConfiguration::endcap10DegMax
std::vector< unsigned int > endcap10DegMax
Definition: OMTFConfiguration.h:145
OMTFConfiguration::getEndcap20DegMax
const std::vector< unsigned int > & getEndcap20DegMax() const
Definition: OMTFConfiguration.h:112
L1TMuonOverlapParams::fwVersion
unsigned fwVersion() const
Definition: L1TMuonOverlapParams.h:129
OMTFConfiguration::operator<<
friend std::ostream & operator<<(std::ostream &out, const OMTFConfiguration &aConfig)
Definition: OMTFConfiguration.cc:154
OMTFConfiguration
Definition: OMTFConfiguration.h:44
OMTFConfiguration::fwVersion
unsigned int fwVersion() const
Definition: OMTFConfiguration.h:81
OMTFConfiguration::nPhiBins
unsigned int nPhiBins() const
Definition: OMTFConfiguration.h:93
OMTFConfiguration::nGoldenPatterns
unsigned int nGoldenPatterns() const
Definition: OMTFConfiguration.h:99
OMTFConfiguration::getProcessorPhiVsRefLayer
const std::vector< std::vector< int > > & getProcessorPhiVsRefLayer() const
Definition: OMTFConfiguration.h:114
RefHitDef::iInput
unsigned int iInput
Hit input number within a cone.
Definition: OMTFConfiguration.h:29
L1TMuonOverlapParams::nPdfValBits
int nPdfValBits() const
Definition: L1TMuonOverlapParams.h:142
L1TMuonOverlapParams::nGoldenPatterns
int nGoldenPatterns() const
Definition: L1TMuonOverlapParams.h:164
OMTFConfiguration::getBarrelMin
const std::vector< unsigned int > & getBarrelMin() const
Definition: OMTFConfiguration.h:107
OMTFConfiguration::getConnections
const vector3D_pair & getConnections() const
Definition: OMTFConfiguration.h:120
OMTFConfiguration::initCounterMatrices
void initCounterMatrices()
Definition: OMTFConfiguration.cc:31
OMTFConfiguration::measurements4D
vector4D measurements4D
4D matrices used during creation of the connections tables.
Definition: OMTFConfiguration.h:174
RefHitDef::range
std::pair< int, int > range
Definition: OMTFConfiguration.h:39
OMTFConfiguration::vector2D
std::vector< vector1D > vector2D
Definition: OMTFConfiguration.h:51
OMTFConfiguration::patternsVersion
unsigned int patternsVersion() const
Definition: OMTFConfiguration.h:82
L1TMuonOverlapParams::nInputs
int nInputs() const
Definition: L1TMuonOverlapParams.h:158
OMTFConfiguration::nHitsPerLayer
unsigned int nHitsPerLayer() const
Definition: OMTFConfiguration.h:88
OMTFConfiguration::nPdfAddrBits
unsigned int nPdfAddrBits() const
Definition: OMTFConfiguration.h:91
OMTFConfiguration::processorPhiVsRefLayer
std::vector< std::vector< int > > processorPhiVsRefLayer
Definition: OMTFConfiguration.h:153
L1TMuonOverlapParams
Definition: L1TMuonOverlapParams.h:14
L1TMuonOverlapParams::nHitsPerLayer
int nHitsPerLayer() const
Definition: L1TMuonOverlapParams.h:144
OMTFConfiguration::getMeasurements4Dref
const vector4D & getMeasurements4Dref() const
Definition: OMTFConfiguration.h:126
OMTFConfiguration::globalPhiStart
int globalPhiStart(unsigned int iProcessor) const
Definition: OMTFConfiguration.cc:199
L1TMuonOverlapParams.h
OMTFConfiguration::endcap20DegMin
std::vector< unsigned int > endcap20DegMin
Definition: OMTFConfiguration.h:146
OMTFConfiguration::vector1D
std::vector< int > vector1D
Definition: OMTFConfiguration.h:50
OMTFConfiguration::minPdfVal
float minPdfVal() const
Definition: OMTFConfiguration.h:86
OMTFConfiguration::getRegionNumberFromMap
unsigned int getRegionNumberFromMap(unsigned int iInput, unsigned int iRefLayer, int iPhi) const
Definition: OMTFConfiguration.cc:188
OMTFConfiguration::getLogicToLogic
const std::map< int, int > & getLogicToLogic() const
Definition: OMTFConfiguration.h:103
RefHitDef::operator<<
friend std::ostream & operator<<(std::ostream &out, const RefHitDef &aRefHitDef)
Definition: OMTFConfiguration.cc:23
HLT_FULL_cff.coneSize
coneSize
Definition: HLT_FULL_cff.py:50853
ParameterSet
Definition: Functions.h:16
OMTFConfiguration::measurements4Dref
vector4D measurements4Dref
Definition: OMTFConfiguration.h:175
OMTFConfiguration::configure
void configure(const L1TMuonOverlapParams *omtfParams)
Definition: OMTFConfiguration.cc:49
OMTFConfiguration::getRegionPhisVsRefLayerVsInput
const std::vector< std::vector< std::vector< std::pair< int, int > > > > & getRegionPhisVsRefLayerVsInput() const
Definition: OMTFConfiguration.h:115
OMTFConfiguration::nLayers
unsigned int nLayers() const
Definition: OMTFConfiguration.h:87
OMTFConfiguration::nPhiBits
unsigned int nPhiBits() const
Definition: OMTFConfiguration.h:90
OMTFConfiguration::connections
vector3D_pair connections
Map of connections.
Definition: OMTFConfiguration.h:171
OMTFConfiguration::getRefToLogicNumber
const std::vector< int > & getRefToLogicNumber() const
Definition: OMTFConfiguration.h:105
L1TMuonOverlapParams::nRefLayers
int nRefLayers() const
Definition: L1TMuonOverlapParams.h:162
RefHitDef::iRefLayer
unsigned int iRefLayer
Reference layer logic number (0-7)
Definition: OMTFConfiguration.h:35
OMTFConfiguration::isInRegionRange
bool isInRegionRange(int iPhiStart, unsigned int coneSize, int iPhi) const
Definition: OMTFConfiguration.cc:171
OMTFConfiguration::vector4D
std::vector< vector3D > vector4D
Definition: OMTFConfiguration.h:53
OMTFConfiguration::refHitsDefs
std::vector< std::vector< RefHitDef > > refHitsDefs
Definition: OMTFConfiguration.h:168
OMTFConfiguration::nTestRefHits
unsigned int nTestRefHits() const
Definition: OMTFConfiguration.h:95
L1TMuonOverlapParams::nProcessors
int nProcessors() const
Definition: L1TMuonOverlapParams.h:154
OMTFConfiguration::logicToHwLayer
std::map< int, int > logicToHwLayer
Definition: OMTFConfiguration.h:134
OMTFConfiguration::barrelMin
std::vector< unsigned int > barrelMin
Definition: OMTFConfiguration.h:142
OMTFConfiguration::logicToLogic
std::map< int, int > logicToLogic
Definition: OMTFConfiguration.h:135
OMTFConfiguration::getMeasurements4D
const vector4D & getMeasurements4D() const
Definition: OMTFConfiguration.h:125
OMTFConfiguration::nProcessors
unsigned int nProcessors() const
Definition: OMTFConfiguration.h:96
OMTFConfiguration::getEndcap10DegMin
const std::vector< unsigned int > & getEndcap10DegMin() const
Definition: OMTFConfiguration.h:109
L1TMuonOverlapParams::nPhiBits
int nPhiBits() const
Definition: L1TMuonOverlapParams.h:146
OMTFConfiguration::vector3D_pair
std::vector< vector2D_pair > vector3D_pair
Definition: OMTFConfiguration.h:48
OMTFConfiguration::getEndcap10DegMax
const std::vector< unsigned int > & getEndcap10DegMax() const
Definition: OMTFConfiguration.h:110
L1TMuonOverlapParams::nPdfAddrBits
int nPdfAddrBits() const
Access to specific general settings.
Definition: L1TMuonOverlapParams.h:140
OMTFConfiguration::getMeasurements4Dref
vector4D & getMeasurements4Dref()
Definition: OMTFConfiguration.h:123
OMTFConfiguration::vector3D
std::vector< vector2D > vector3D
Definition: OMTFConfiguration.h:52
OMTFConfiguration::nRefLayers
unsigned int nRefLayers() const
Definition: OMTFConfiguration.h:89
OMTFConfiguration::hwToLogicLayer
std::map< int, int > hwToLogicLayer
Definition: OMTFConfiguration.h:133
L1TMuonOverlapParams::nLogicRegions
int nLogicRegions() const
Definition: L1TMuonOverlapParams.h:156
OMTFConfiguration::rawParams
L1TMuonOverlapParams rawParams
Definition: OMTFConfiguration.h:131
OMTFConfiguration::getBendingLayers
const std::set< int > & getBendingLayers() const
Definition: OMTFConfiguration.h:104
OMTFConfiguration::getHwToLogicLayer
const std::map< int, int > & getHwToLogicLayer() const
Definition: OMTFConfiguration.h:101
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
OMTFConfiguration::OMTFConfiguration
OMTFConfiguration()
Definition: OMTFConfiguration.h:55
OMTFConfiguration::bendingLayers
std::set< int > bendingLayers
Definition: OMTFConfiguration.h:136
OMTFConfiguration::nLogicRegions
unsigned int nLogicRegions() const
Definition: OMTFConfiguration.h:97
L1TMuonOverlapParams::nLayers
int nLayers() const
Definition: L1TMuonOverlapParams.h:160
OMTFConfiguration::nInputs
unsigned int nInputs() const
Definition: OMTFConfiguration.h:98
L1TMuonOverlapParams::nRefHits
int nRefHits() const
Definition: L1TMuonOverlapParams.h:150
OMTFConfiguration::barrelMax
std::vector< unsigned int > barrelMax
Definition: OMTFConfiguration.h:143
RefHitDef::iRegion
unsigned int iRegion
Region number assigned to this referecne hit.
Definition: OMTFConfiguration.h:32
OMTFConfiguration::endcap20DegMax
std::vector< unsigned int > endcap20DegMax
Definition: OMTFConfiguration.h:147