CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
18  public:
19 
20  //FIXME: default values should be sonnected to configuration values
21  RefHitDef(unsigned int aInput=15,
22  int aPhiMin=5760,
23  int aPhiMax=5760,
24  unsigned int aRegion=99,
25  unsigned int aRefLayer=99);
26 
27 
28  public:
29 
30  bool fitsRange(int iPhi) const;
31 
33  unsigned int iInput;
34 
36  unsigned int iRegion;
37 
39  unsigned int iRefLayer;
40 
43  std::pair<int, int> range;
44 
45  friend std::ostream & operator << (std::ostream &out, const RefHitDef & aRefHitDef);
46 
47 };
48 
50 
51  public:
52 
53  typedef std::vector< std::pair<unsigned int, unsigned int> > vector1D_pair;
54  typedef std::vector<vector1D_pair > vector2D_pair;
55  typedef std::vector<vector2D_pair > vector3D_pair;
56 
57  typedef std::vector<int> vector1D;
58  typedef std::vector<vector1D > vector2D;
59  typedef std::vector<vector2D > vector3D;
60  typedef std::vector<vector3D > vector4D;
61 
63 
65 
66  void initCounterMatrices();
67 
71  unsigned int getRegionNumberFromMap(unsigned int iInput,
72  unsigned int iRefLayer,
73  int iPhi) const;
74 
78  bool isInRegionRange(int iPhiStart,
79  unsigned int coneSize,
80  int iPhi) const;
81 
84  int globalPhiStart(unsigned int iProcessor) const;
85 
90  uint32_t getLayerNumber(uint32_t rawId) const;
91 
92  unsigned int fwVersion() const {return (rawParams.fwVersion()>>16) & 0xFFFF;};
93  unsigned int patternsVersion() const {return rawParams.fwVersion() & 0xFFFF;};
94 
95  const L1TMuonOverlapParams* getRawParams() const {return &rawParams;};
96 
97  float minPdfVal() const {return 0.001;};
98  unsigned int nLayers() const {return rawParams.nLayers();};
99  unsigned int nHitsPerLayer() const {return rawParams.nHitsPerLayer();};
100  unsigned int nRefLayers() const {return rawParams.nRefLayers();};
101  unsigned int nPhiBits() const {return rawParams.nPhiBits();};
102  unsigned int nPdfAddrBits() const {return rawParams.nPdfAddrBits();};
103  unsigned int nPdfValBits() const {return rawParams.nPdfValBits();};
104  unsigned int nPhiBins() const {return rawParams.nPhiBins();};
105  unsigned int nRefHits() const {return rawParams.nRefHits();};
106  unsigned int nTestRefHits() const {return rawParams.nTestRefHits();};
107  unsigned int nProcessors() const {return rawParams.nProcessors();};
108  unsigned int nLogicRegions() const {return rawParams.nLogicRegions();};
109  unsigned int nInputs() const {return rawParams.nInputs();};
110  unsigned int nGoldenPatterns() const {return rawParams.nGoldenPatterns();};
111 
112  const std::map<int,int>& getHwToLogicLayer() const {return hwToLogicLayer;}
113  const std::map<int,int>& getLogicToHwLayer() const {return logicToHwLayer;}
114  const std::map<int,int>& getLogicToLogic() const {return logicToLogic;}
115  const std::set<int>& getBendingLayers() const {return bendingLayers;}
116  const std::vector<int>& getRefToLogicNumber() const {return refToLogicNumber;}
117 
118  const std::vector<unsigned int>& getBarrelMin() const {return barrelMin;}
119  const std::vector<unsigned int>& getBarrelMax() const {return barrelMax;}
120  const std::vector<unsigned int>& getEndcap10DegMin() const {return endcap10DegMin;}
121  const std::vector<unsigned int>& getEndcap10DegMax() const {return endcap10DegMax;}
122  const std::vector<unsigned int>& getEndcap20DegMin() const {return endcap20DegMin;}
123  const std::vector<unsigned int>& getEndcap20DegMax() const {return endcap20DegMax;}
124 
125  const std::vector<std::vector<int> >& getProcessorPhiVsRefLayer() const {return processorPhiVsRefLayer;}
126  const std::vector<std::vector<std::vector<std::pair<int,int> > > >& getRegionPhisVsRefLayerVsInput() const {return regionPhisVsRefLayerVsInput;}
127  const std::vector<std::vector<RefHitDef> >& getRefHitsDefs() const {return refHitsDefs;}
128 
129  const vector3D_pair & getConnections() const {return connections;};
130 
133 
134  const vector4D & getMeasurements4D() const {return measurements4D;}
136 
137  friend std::ostream & operator << (std::ostream &out, const OMTFConfiguration & aConfig);
138 
139  private:
140 
142 
143  std::map<int,int> hwToLogicLayer;
144  std::map<int,int> logicToHwLayer;
145  std::map<int,int> logicToLogic;
146  std::set<int> bendingLayers;
147  std::vector<int> refToLogicNumber;
148 
152  std::vector<unsigned int> barrelMin;
153  std::vector<unsigned int> barrelMax;
154  std::vector<unsigned int> endcap10DegMin;
155  std::vector<unsigned int> endcap10DegMax;
156  std::vector<unsigned int> endcap20DegMin;
157  std::vector<unsigned int> endcap20DegMax;
158 
163  std::vector<std::vector<int> > processorPhiVsRefLayer;
164 
171  std::vector<std::vector<std::vector<std::pair<int,int> > > >regionPhisVsRefLayerVsInput;
172 
178  std::vector<std::vector<RefHitDef> > refHitsDefs;
179 
182 
186 
187 };
188 
189 
190 #endif
191 
bool fitsRange(int iPhi) const
std::vector< unsigned int > endcap20DegMax
const std::set< int > & getBendingLayers() const
std::vector< vector1D_pair > vector2D_pair
std::map< int, int > logicToLogic
std::vector< unsigned int > endcap10DegMin
std::vector< std::pair< unsigned int, unsigned int > > vector1D_pair
unsigned int nRefLayers() const
unsigned int nRefHits() const
const std::vector< unsigned int > & getBarrelMax() const
const std::map< int, int > & getHwToLogicLayer() const
unsigned int fwVersion() const
unsigned fwVersion() const
const vector4D & getMeasurements4Dref() const
bool isInRegionRange(int iPhiStart, unsigned int coneSize, int iPhi) const
const std::vector< unsigned int > & getEndcap10DegMin() const
unsigned int nLayers() const
unsigned int nPhiBins() const
unsigned int nProcessors() const
std::vector< std::vector< int > > processorPhiVsRefLayer
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< std::vector< std::pair< int, int > > > > & getRegionPhisVsRefLayerVsInput() const
std::map< int, int > logicToHwLayer
const std::map< int, int > & getLogicToHwLayer() const
std::vector< vector2D > vector3D
std::vector< unsigned int > endcap20DegMin
const vector4D & getMeasurements4D() const
std::vector< int > refToLogicNumber
std::vector< unsigned int > endcap10DegMax
friend std::ostream & operator<<(std::ostream &out, const OMTFConfiguration &aConfig)
unsigned int nPhiBits() const
unsigned int getRegionNumberFromMap(unsigned int iInput, unsigned int iRefLayer, int iPhi) const
const vector3D_pair & getConnections() const
unsigned int nPdfAddrBits() const
const std::vector< std::vector< RefHitDef > > & getRefHitsDefs() const
std::vector< vector1D > vector2D
const std::vector< unsigned int > & getEndcap20DegMax() const
const std::vector< std::vector< int > > & getProcessorPhiVsRefLayer() const
const L1TMuonOverlapParams * getRawParams() const
tuple omtfParams
OMTF ESProducer.
unsigned int nHitsPerLayer() const
std::vector< std::vector< RefHitDef > > refHitsDefs
std::vector< vector2D_pair > vector3D_pair
const std::vector< unsigned int > & getEndcap10DegMax() const
vector3D_pair connections
Map of connections.
unsigned int nInputs() const
std::vector< int > vector1D
const std::map< int, int > & getLogicToLogic() const
RefHitDef(unsigned int aInput=15, int aPhiMin=5760, int aPhiMax=5760, unsigned int aRegion=99, unsigned int aRefLayer=99)
void configure(const L1TMuonOverlapParams *omtfParams)
unsigned int nGoldenPatterns() const
float minPdfVal() const
int nPdfAddrBits() const
Access to specific general settings.
std::vector< unsigned int > barrelMin
uint32_t getLayerNumber(uint32_t rawId) const
const std::vector< unsigned int > & getBarrelMin() const
std::pair< int, int > range
int globalPhiStart(unsigned int iProcessor) const
std::set< int > bendingLayers
std::map< int, int > hwToLogicLayer
const std::vector< int > & getRefToLogicNumber() const
L1TMuonOverlapParams rawParams
unsigned int iRefLayer
Reference layer logic number (0-7)
unsigned int nLogicRegions() const
const std::vector< unsigned int > & getEndcap20DegMin() const
unsigned int iRegion
Region number assigned to this referecne hit.
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
unsigned int nPdfValBits() const
vector4D & getMeasurements4Dref()
friend std::ostream & operator<<(std::ostream &out, const RefHitDef &aRefHitDef)
std::vector< vector3D > vector4D
unsigned int nTestRefHits() const
unsigned int patternsVersion() const
std::vector< unsigned int > barrelMax
vector4D & getMeasurements4D()