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 class XMLConfigReader;
12 
13 namespace edm{
14  class ParameterSet;
15 }
16 
17 class RefHitDef{
18 
19  public:
20 
21  //FIXME: default values should be sonnected to configuration values
22  RefHitDef(unsigned int aInput=15,
23  int aPhiMin=5760,
24  int aPhiMax=5760,
25  unsigned int aRegion=99,
26  unsigned int aRefLayer=99);
27 
28 
29  public:
30 
31  bool fitsRange(int iPhi) const;
32 
34  unsigned int iInput;
35 
37  unsigned int iRegion;
38 
40  unsigned int iRefLayer;
41 
44  std::pair<int, int> range;
45 
46  friend std::ostream & operator << (std::ostream &out, const RefHitDef & aRefHitDef);
47 
48 };
49 
51 
52  public:
53 
55 
56  void configure(XMLConfigReader *aReader);
57 
58  void configure(std::shared_ptr<L1TMuonOverlapParams> omtfParams);
59 
60  void initCounterMatrices();
61 
62  friend std::ostream & operator << (std::ostream &out, const OMTFConfiguration & aConfig);
63 
64  static float minPdfVal;
65  static unsigned int nLayers;
66  static unsigned int nHitsPerLayer;
67  static unsigned int nRefLayers;
68  static unsigned int nPhiBits;
69  static unsigned int nPdfAddrBits;
70  static unsigned int nPdfValBits;
71  static unsigned int nPhiBins;
72  static unsigned int nRefHits;
73  static unsigned int nTestRefHits;
74  static unsigned int nProcessors;
75  static unsigned int nLogicRegions;
76  static unsigned int nInputs;
77  static unsigned int nGoldenPatterns;
78 
79  static std::map<int,int> hwToLogicLayer;
80  static std::map<int,int> logicToHwLayer;
81  static std::map<int,int> logicToLogic;
82  static std::set<int> bendingLayers;
83  static std::vector<int> refToLogicNumber;
84 
88  static std::vector<unsigned int> barrelMin;
89  static std::vector<unsigned int> barrelMax;
90  static std::vector<unsigned int> endcap10DegMin;
91  static std::vector<unsigned int> endcap10DegMax;
92  static std::vector<unsigned int> endcap20DegMin;
93  static std::vector<unsigned int> endcap20DegMax;
94 
99  static std::vector<std::vector<int> > processorPhiVsRefLayer;
100 
107  static std::vector<std::vector<std::vector<std::pair<int,int> > > >regionPhisVsRefLayerVsProcessor;
108 
114  static std::vector<std::vector<RefHitDef> > refHitsDefs;
115 
117  typedef std::vector< std::pair<unsigned int, unsigned int> > vector1D_A;
118  typedef std::vector<vector1D_A > vector2D_A;
119  typedef std::vector<vector2D_A > vector3D_A;
121 
124  typedef std::vector<int> vector1D;
125  typedef std::vector<vector1D > vector2D;
126  typedef std::vector<vector2D > vector3D;
127  typedef std::vector<vector3D > vector4D;
130 
131 
135  static unsigned int getRegionNumber(unsigned int iProcessor,
136  unsigned int iRefLayer,
137  int iPhi);
138 
141  static unsigned int getRegionNumberFromMap(unsigned int iProcessor,
142  unsigned int iRefLayer,
143  int iPhi);
144 
148  static bool isInRegionRange(int iPhiStart,
149  unsigned int coneSize,
150  int iPhi);
151 
152 
155  static int globalPhiStart(unsigned int iProcessor);
156 
161  static uint32_t getLayerNumber(uint32_t rawId);
162 
163 };
164 
165 
166 #endif
167 
bool fitsRange(int iPhi) const
static unsigned int getRegionNumber(unsigned int iProcessor, unsigned int iRefLayer, int iPhi)
static unsigned int nLayers
tuple cfg
Definition: looper.py:293
OMTFConfiguration(const edm::ParameterSet &cfg)
static unsigned int nInputs
static vector4D measurements4D
static std::vector< unsigned int > endcap20DegMax
static vector3D_A connections
static bool isInRegionRange(int iPhiStart, unsigned int coneSize, int iPhi)
static float minPdfVal
std::vector< vector2D_A > vector3D_A
static int globalPhiStart(unsigned int iProcessor)
static std::vector< unsigned int > endcap10DegMin
static std::vector< unsigned int > barrelMax
unsigned int iInput
Hit input number within a cone.
static unsigned int nProcessors
static unsigned int nLogicRegions
static vector4D measurements4Dref
static std::map< int, int > logicToLogic
std::vector< vector2D > vector3D
friend std::ostream & operator<<(std::ostream &out, const OMTFConfiguration &aConfig)
static unsigned int nPdfAddrBits
std::vector< vector1D > vector2D
static std::vector< unsigned int > barrelMin
void configure(XMLConfigReader *aReader)
static unsigned int nTestRefHits
static unsigned int nHitsPerLayer
static std::vector< std::vector< int > > processorPhiVsRefLayer
std::vector< std::pair< unsigned int, unsigned int > > vector1D_A
Map of connections.
std::vector< int > vector1D
static unsigned int nPhiBins
RefHitDef(unsigned int aInput=15, int aPhiMin=5760, int aPhiMax=5760, unsigned int aRegion=99, unsigned int aRefLayer=99)
static std::vector< int > refToLogicNumber
static unsigned int nPhiBits
static std::map< int, int > hwToLogicLayer
static unsigned int nRefLayers
std::pair< int, int > range
static unsigned int getRegionNumberFromMap(unsigned int iProcessor, unsigned int iRefLayer, int iPhi)
static std::map< int, int > logicToHwLayer
static unsigned int nRefHits
static std::set< int > bendingLayers
unsigned int iRefLayer
Reference layer logic number (0-7)
unsigned int iRegion
Region number assigned to this referecne hit.
static unsigned int nGoldenPatterns
std::vector< vector1D_A > vector2D_A
friend std::ostream & operator<<(std::ostream &out, const RefHitDef &aRefHitDef)
static std::vector< unsigned int > endcap10DegMax
static std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsProcessor
static std::vector< unsigned int > endcap20DegMin
std::vector< vector3D > vector4D
static unsigned int nPdfValBits
static uint32_t getLayerNumber(uint32_t rawId)
static std::vector< std::vector< RefHitDef > > refHitsDefs