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 
54  static const OMTFConfiguration * instance(){ return latest_instance_; }
55 
57 
58  void configure(XMLConfigReader *aReader);
59 
61 
62  void initCounterMatrices();
63 
64  friend std::ostream & operator << (std::ostream &out, const OMTFConfiguration & aConfig);
65 
66  unsigned int fwVersion;
67  float minPdfVal;
68  unsigned int nLayers;
69  unsigned int nHitsPerLayer;
70  unsigned int nRefLayers;
71  unsigned int nPhiBits;
72  unsigned int nPdfAddrBits;
73  unsigned int nPdfValBits;
74  unsigned int nPhiBins;
75  unsigned int nRefHits;
76  unsigned int nTestRefHits;
77  unsigned int nProcessors;
78  unsigned int nLogicRegions;
79  unsigned int nInputs;
80  unsigned int nGoldenPatterns;
81 
82  std::map<int,int> hwToLogicLayer;
83  std::map<int,int> logicToHwLayer;
84  std::map<int,int> logicToLogic;
85  std::set<int> bendingLayers;
86  std::vector<int> refToLogicNumber;
87 
91  std::vector<unsigned int> barrelMin;
92  std::vector<unsigned int> barrelMax;
93  std::vector<unsigned int> endcap10DegMin;
94  std::vector<unsigned int> endcap10DegMax;
95  std::vector<unsigned int> endcap20DegMin;
96  std::vector<unsigned int> endcap20DegMax;
97 
102  std::vector<std::vector<int> > processorPhiVsRefLayer;
103 
110  std::vector<std::vector<std::vector<std::pair<int,int> > > >regionPhisVsRefLayerVsInput;
111 
117  std::vector<std::vector<RefHitDef> > refHitsDefs;
118 
120  typedef std::vector< std::pair<unsigned int, unsigned int> > vector1D_A;
121  typedef std::vector<vector1D_A > vector2D_A;
122  typedef std::vector<vector2D_A > vector3D_A;
124 
127  typedef std::vector<int> vector1D;
128  typedef std::vector<vector1D > vector2D;
129  typedef std::vector<vector2D > vector3D;
130  typedef std::vector<vector3D > vector4D;
133 
137  unsigned int getRegionNumberFromMap(unsigned int iInput,
138  unsigned int iRefLayer,
139  int iPhi) const;
140 
144  bool isInRegionRange(int iPhiStart,
145  unsigned int coneSize,
146  int iPhi) const;
147 
148 
151  int globalPhiStart(unsigned int iProcessor) const;
152 
157  uint32_t getLayerNumber(uint32_t rawId) const;
158 
160 };
161 
162 
163 #endif
164 
bool fitsRange(int iPhi) const
std::vector< unsigned int > endcap20DegMax
unsigned int nLayers
std::map< int, int > logicToLogic
tuple cfg
Definition: looper.py:293
std::vector< unsigned int > endcap10DegMin
OMTFConfiguration(const edm::ParameterSet &cfg)
unsigned int nInputs
bool isInRegionRange(int iPhiStart, unsigned int coneSize, int iPhi) const
std::vector< vector2D_A > vector3D_A
static OMTFConfiguration * latest_instance_
std::vector< std::vector< int > > processorPhiVsRefLayer
unsigned int iInput
Hit input number within a cone.
unsigned int nProcessors
unsigned int nLogicRegions
std::map< int, int > logicToHwLayer
std::vector< vector2D > vector3D
std::vector< unsigned int > endcap20DegMin
std::vector< int > refToLogicNumber
std::vector< unsigned int > endcap10DegMax
friend std::ostream & operator<<(std::ostream &out, const OMTFConfiguration &aConfig)
unsigned int nPdfAddrBits
unsigned int getRegionNumberFromMap(unsigned int iInput, unsigned int iRefLayer, int iPhi) const
std::vector< vector1D > vector2D
void configure(XMLConfigReader *aReader)
unsigned int fwVersion
unsigned int nTestRefHits
tuple omtfParams
OMTF ESProducer.
unsigned int nHitsPerLayer
std::vector< std::vector< RefHitDef > > refHitsDefs
std::vector< std::pair< unsigned int, unsigned int > > vector1D_A
Map of connections.
std::vector< int > vector1D
unsigned int nPhiBins
RefHitDef(unsigned int aInput=15, int aPhiMin=5760, int aPhiMax=5760, unsigned int aRegion=99, unsigned int aRefLayer=99)
unsigned int nPhiBits
std::vector< unsigned int > barrelMin
uint32_t getLayerNumber(uint32_t rawId) const
unsigned int nRefLayers
std::pair< int, int > range
int globalPhiStart(unsigned int iProcessor) const
std::set< int > bendingLayers
std::map< int, int > hwToLogicLayer
unsigned int nRefHits
unsigned int iRefLayer
Reference layer logic number (0-7)
unsigned int iRegion
Region number assigned to this referecne hit.
unsigned int nGoldenPatterns
std::vector< vector1D_A > vector2D_A
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
friend std::ostream & operator<<(std::ostream &out, const RefHitDef &aRefHitDef)
std::vector< vector3D > vector4D
static const OMTFConfiguration * instance()
std::vector< unsigned int > barrelMax
unsigned int nPdfValBits