test
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();};
93  float minPdfVal() const {return 0.001;};
94  unsigned int nLayers() const {return rawParams.nLayers();};
95  unsigned int nHitsPerLayer() const {return rawParams.nHitsPerLayer();};
96  unsigned int nRefLayers() const {return rawParams.nRefLayers();};
97  unsigned int nPhiBits() const {return rawParams.nPhiBits();};
98  unsigned int nPdfAddrBits() const {return rawParams.nPdfAddrBits();};
99  unsigned int nPdfValBits() const {return rawParams.nPdfValBits();};
100  unsigned int nPhiBins() const {return rawParams.nPhiBins();};
101  unsigned int nRefHits() const {return rawParams.nRefHits();};
102  unsigned int nTestRefHits() const {return rawParams.nTestRefHits();};
103  unsigned int nProcessors() const {return rawParams.nProcessors();};
104  unsigned int nLogicRegions() const {return rawParams.nLogicRegions();};
105  unsigned int nInputs() const {return rawParams.nInputs();};
106  unsigned int nGoldenPatterns() const {return rawParams.nGoldenPatterns();};
107 
108  const std::map<int,int>& getHwToLogicLayer() const {return hwToLogicLayer;}
109  const std::map<int,int>& getLogicToHwLayer() const {return logicToHwLayer;}
110  const std::map<int,int>& getLogicToLogic() const {return logicToLogic;}
111  const std::set<int>& getBendingLayers() const {return bendingLayers;}
112  const std::vector<int>& getRefToLogicNumber() const {return refToLogicNumber;}
113 
114  const std::vector<unsigned int>& getBarrelMin() const {return barrelMin;}
115  const std::vector<unsigned int>& getBarrelMax() const {return barrelMax;}
116  const std::vector<unsigned int>& getEndcap10DegMin() const {return endcap10DegMin;}
117  const std::vector<unsigned int>& getEndcap10DegMax() const {return endcap10DegMax;}
118  const std::vector<unsigned int>& getEndcap20DegMin() const {return endcap20DegMin;}
119  const std::vector<unsigned int>& getEndcap20DegMax() const {return endcap20DegMax;}
120 
121  const std::vector<std::vector<int> >& getProcessorPhiVsRefLayer() const {return processorPhiVsRefLayer;}
122  const std::vector<std::vector<std::vector<std::pair<int,int> > > >& getRegionPhisVsRefLayerVsInput() const {return regionPhisVsRefLayerVsInput;}
123  const std::vector<std::vector<RefHitDef> >& getRefHitsDefs() const {return refHitsDefs;}
124 
125  const vector3D_pair & getConnections() const {return connections;};
126 
129 
130  const vector4D & getMeasurements4D() const {return measurements4D;}
132 
133  friend std::ostream & operator << (std::ostream &out, const OMTFConfiguration & aConfig);
134 
135  private:
136 
138 
139  std::map<int,int> hwToLogicLayer;
140  std::map<int,int> logicToHwLayer;
141  std::map<int,int> logicToLogic;
142  std::set<int> bendingLayers;
143  std::vector<int> refToLogicNumber;
144 
148  std::vector<unsigned int> barrelMin;
149  std::vector<unsigned int> barrelMax;
150  std::vector<unsigned int> endcap10DegMin;
151  std::vector<unsigned int> endcap10DegMax;
152  std::vector<unsigned int> endcap20DegMin;
153  std::vector<unsigned int> endcap20DegMax;
154 
159  std::vector<std::vector<int> > processorPhiVsRefLayer;
160 
167  std::vector<std::vector<std::vector<std::pair<int,int> > > >regionPhisVsRefLayerVsInput;
168 
174  std::vector<std::vector<RefHitDef> > refHitsDefs;
175 
178 
182 
183 };
184 
185 
186 #endif
187 
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
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
std::vector< unsigned int > barrelMax
vector4D & getMeasurements4D()