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
const std::vector< std::vector< int > > & getProcessorPhiVsRefLayer() const
const std::vector< unsigned int > & getEndcap20DegMin() const
std::vector< std::pair< unsigned int, unsigned int > > vector1D_pair
std::vector< unsigned int > endcap20DegMax
const std::map< int, int > & getLogicToHwLayer() const
const std::vector< unsigned int > & getEndcap20DegMax() const
const std::vector< unsigned int > & getBarrelMin() const
const std::vector< unsigned int > & getBarrelMax() const
std::vector< unsigned int > endcap10DegMin
std::vector< unsigned int > barrelMax
unsigned int iInput
Hit input number within a cone.
vector4D measurements4D
4D matrices used during creation of the connections tables.
const std::vector< std::vector< RefHitDef > > & getRefHitsDefs() const
unsigned int nPdfValBits() const
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
unsigned int nGoldenPatterns() const
std::map< int, int > logicToLogic
unsigned int nRefHits() const
const vector3D_pair & getConnections() const
unsigned int nHitsPerLayer() const
friend std::ostream & operator<<(std::ostream &out, const OMTFConfiguration &aConfig)
std::vector< vector1D > vector2D
int nPdfAddrBits() const
Access to specific general settings.
unsigned int fwVersion() const
unsigned int nPhiBins() const
unsigned int patternsVersion() const
omtfParams
OMTF ESProducer.
unsigned int getRegionNumberFromMap(unsigned int iInput, unsigned int iRefLayer, int iPhi) const
std::vector< unsigned int > barrelMin
unsigned int nPdfAddrBits() const
bool isInRegionRange(int iPhiStart, unsigned int coneSize, int iPhi) const
bool fitsRange(int iPhi) const
const vector4D & getMeasurements4Dref() const
std::vector< std::vector< int > > processorPhiVsRefLayer
const std::vector< std::vector< std::vector< std::pair< int, int > > > > & getRegionPhisVsRefLayerVsInput() const
vector3D_pair connections
Map of connections.
std::vector< int > vector1D
unsigned int nLayers() const
unsigned fwVersion() const
RefHitDef(unsigned int aInput=15, int aPhiMin=5760, int aPhiMax=5760, unsigned int aRegion=99, unsigned int aRefLayer=99)
const std::vector< int > & getRefToLogicNumber() const
const std::map< int, int > & getLogicToLogic() const
std::vector< int > refToLogicNumber
int globalPhiStart(unsigned int iProcessor) const
std::vector< vector3D > vector4D
void configure(const L1TMuonOverlapParams *omtfParams)
unsigned int nRefLayers() const
unsigned int nTestRefHits() const
unsigned int nPhiBits() const
float minPdfVal() const
std::map< int, int > hwToLogicLayer
const std::set< int > & getBendingLayers() const
std::map< int, int > logicToHwLayer
std::vector< vector2D > vector3D
std::pair< int, int > range
unsigned int nInputs() const
std::set< int > bendingLayers
L1TMuonOverlapParams rawParams
const vector4D & getMeasurements4D() const
const std::vector< unsigned int > & getEndcap10DegMin() const
HLT enums.
const std::map< int, int > & getHwToLogicLayer() const
const std::vector< unsigned int > & getEndcap10DegMax() const
unsigned int iRefLayer
Reference layer logic number (0-7)
unsigned int iRegion
Region number assigned to this referecne hit.
unsigned int nProcessors() const
std::vector< vector2D_pair > vector3D_pair
vector4D & getMeasurements4Dref()
friend std::ostream & operator<<(std::ostream &out, const RefHitDef &aRefHitDef)
std::vector< unsigned int > endcap10DegMax
std::vector< unsigned int > endcap20DegMin
uint32_t getLayerNumber(uint32_t rawId) const
unsigned int nLogicRegions() const
std::vector< vector1D_pair > vector2D_pair
vector4D & getMeasurements4D()
const L1TMuonOverlapParams * getRawParams() const
std::vector< std::vector< RefHitDef > > refHitsDefs