CMS 3D CMS Logo

L1TMuonOverlapParams.h
Go to the documentation of this file.
1 #ifndef L1TMTFOverlapParams_h
2 #define L1TMTFOverlapParams_h
3 
4 #include <memory>
5 #include <iostream>
6 #include <vector>
7 #include <cmath>
8 
11 
15 
16  public:
17 
18  class Node {
19  public:
21  unsigned version_;
23  std::vector<double> dparams_;
24  std::vector<unsigned> uparams_;
25  std::vector<int> iparams_;
26  std::vector<std::string> sparams_;
27  Node(){ type_="unspecified"; version_=0; }
29  };
30 
31  class LayerMapNode {
32  public:
34  unsigned int hwNumber;
35 
37  unsigned int logicNumber;
38 
41 
44  unsigned int connectedToLayer;
45 
46  LayerMapNode(void):hwNumber(0),logicNumber(0),bendingLayer(0),connectedToLayer(0){}
47 
49  };
50 
51 
53 
54  public:
55 
57  unsigned int refLayer;
58 
60  unsigned int logicNumber;
61 
62  RefLayerMapNode(void):refLayer(0),logicNumber(0){}
63 
65  };
66 
67 
68  class RefHitNode{
69 
70  public:
71 
72  unsigned int iInput;
73  int iPhiMin, iPhiMax;
74  unsigned int iRefHit;
75  unsigned int iRefLayer;
76  unsigned int iRegion;
77 
78  RefHitNode(void):iInput(0),iPhiMin(0),iPhiMax(0),iRefHit(0),iRefLayer(0),iRegion(0){}
79 
81  };
82 
84 
85  public:
86 
87  unsigned int iFirstInput;
88  unsigned int iLayer;
89  unsigned int nInputs;
90 
91  LayerInputNode(void):iFirstInput(0),iLayer(0),nInputs(0){}
92 
94  };
95 
96 
97 
98  enum { Version = 1 };
99 
100  // DO NOT ADD ENTRIES ANYWHERE BUT DIRECTLY BEFORE "NUM_OMTFPARAMNODES"
101  enum { CHARGE=0, ETA=1, PT=2, PDF=3, MEANDISTPHI=4,
104 
105  // General configuration parameters indexes
109  };
110 
111 
114 
115  // Firmware version
116  unsigned fwVersion() const { return fwVersion_; }
118 
120  const std::vector<int>* generalParams() const { return &pnodes_[GENERAL].iparams_; }
121  void setGeneralParams (const std::vector<int> & paramsVec) { pnodes_[GENERAL].type_ = "INT"; pnodes_[GENERAL].iparams_ = paramsVec;}
122 
124  int nPdfAddrBits() const { return pnodes_[GENERAL].iparams_[GENERAL_ADDRBITS];};
125 
126  int nPdfValBits() const { return pnodes_[GENERAL].iparams_[GENERAL_VALBITS];};
127 
128  int nHitsPerLayer() const { return pnodes_[GENERAL].iparams_[GENERAL_HITSPERLAYER];};
129 
130  int nPhiBits() const { return pnodes_[GENERAL].iparams_[GENERAL_PHIBITS];};
131 
132  int nPhiBins() const { return pnodes_[GENERAL].iparams_[GENERAL_PHIBINS];};
133 
134  int nRefHits() const { return pnodes_[GENERAL].iparams_[GENERAL_NREFHITS];};
135 
136  int nTestRefHits() const { return pnodes_[GENERAL].iparams_[GENERAL_NTESTREFHITS];};
137 
138  int nProcessors() const { return pnodes_[GENERAL].iparams_[GENERAL_NPROCESSORS];};
139 
140  int nLogicRegions() const { return pnodes_[GENERAL].iparams_[GENERAL_NLOGIC_REGIONS];};
141 
142  int nInputs() const { return pnodes_[GENERAL].iparams_[GENERAL_NINPUTS];};
143 
144  int nLayers() const { return pnodes_[GENERAL].iparams_[GENERAL_NLAYERS];};
145 
146  int nRefLayers() const { return pnodes_[GENERAL].iparams_[GENERAL_NREFLAYERS];};
147 
148  int nGoldenPatterns() const { return pnodes_[GENERAL].iparams_[GENERAL_NGOLDENPATTERNS];};
149 
151  void setLayerMap(const std::vector<LayerMapNode> &aVector) { layerMap_ = aVector;}
152 
153  void setRefLayerMap(const std::vector<RefLayerMapNode> &aVector) { refLayerMap_ = aVector;}
154 
155  void setRefHitMap(const std::vector<RefHitNode> &aVector) {refHitMap_ = aVector;};
156 
157  void setGlobalPhiStartMap(const std::vector<int> &aVector) {globalPhiStart_ = aVector;};
158 
159  void setLayerInputMap(const std::vector<LayerInputNode> &aVector) {layerInputMap_ = aVector;};
160 
161  void setConnectedSectorsStart(const std::vector<int> &aVector){pnodes_[SECTORS_START].type_ = "INT"; pnodes_[SECTORS_START].iparams_ = aVector;};
162 
163  void setConnectedSectorsEnd(const std::vector<int> &aVector){pnodes_[SECTORS_END].type_ = "INT"; pnodes_[SECTORS_END].iparams_ = aVector;};
164 
165  const std::vector<LayerMapNode> * layerMap() const { return &layerMap_;};
166 
167  const std::vector<RefLayerMapNode> * refLayerMap() const { return &refLayerMap_;};
168 
169  const std::vector<RefHitNode> * refHitMap() const {return &refHitMap_;};
170 
171  const std::vector<int> * globalPhiStartMap() const { return &globalPhiStart_;};
172 
173  const std::vector<LayerInputNode> * layerInputMap() const { return &layerInputMap_;};
174 
175  const std::vector<int> * connectedSectorsStart() const { return &pnodes_[SECTORS_START].iparams_;};
176 
177  const std::vector<int> * connectedSectorsEnd() const { return &pnodes_[SECTORS_END].iparams_;};
178 
179 
181  const l1t::LUT* chargeLUT() const { return &pnodes_[CHARGE].LUT_; }
182  const l1t::LUT* etaLUT() const { return &pnodes_[ETA].LUT_; }
183  const l1t::LUT* ptLUT() const { return &pnodes_[PT].LUT_; }
184  const l1t::LUT* pdfLUT() const { return &pnodes_[PDF].LUT_; }
185  const l1t::LUT* meanDistPhiLUT() const { return &pnodes_[MEANDISTPHI].LUT_; }
186 
187  void setChargeLUT (const l1t::LUT & lut) { pnodes_[CHARGE].type_ = "LUT"; pnodes_[CHARGE].LUT_ = lut; }
188  void setEtaLUT (const l1t::LUT & lut) { pnodes_[ETA].type_ = "LUT"; pnodes_[ETA].LUT_ = lut; }
189  void setPtLUT (const l1t::LUT & lut) { pnodes_[PT].type_ = "LUT"; pnodes_[PT].LUT_ = lut; }
190  void setPdfLUT (const l1t::LUT & lut) { pnodes_[PDF].type_ = "LUT"; pnodes_[PDF].LUT_ = lut; }
191  void setMeanDistPhiLUT (const l1t::LUT & lut) { pnodes_[MEANDISTPHI].type_ = "LUT"; pnodes_[MEANDISTPHI].LUT_ = lut; }
192 
193 
194  private:
195 
197  unsigned fwVersion_;
198 
200  std::vector<Node> pnodes_;
201 
203  std::vector<LayerMapNode> layerMap_;
204 
207  std::vector<RefLayerMapNode> refLayerMap_;
208 
212  std::vector<RefHitNode> refHitMap_;
213 
216  std::vector<int> globalPhiStart_;
217 
221  std::vector<LayerInputNode> layerInputMap_;
222 
224 };
225 #endif
std::vector< RefHitNode > refHitMap_
const std::vector< LayerMapNode > * layerMap() const
void setMeanDistPhiLUT(const l1t::LUT &lut)
void setLayerMap(const std::vector< LayerMapNode > &aVector)
Connections definitions.
void setConnectedSectorsEnd(const std::vector< int > &aVector)
unsigned int hwNumber
short layer number used within OMTF emulator
void setEtaLUT(const l1t::LUT &lut)
const std::vector< int > * connectedSectorsEnd() const
unsigned fwVersion() const
void setRefLayerMap(const std::vector< RefLayerMapNode > &aVector)
void setChargeLUT(const l1t::LUT &lut)
unsigned int logicNumber
logic numer of the layer
unsigned fwVersion_
Version of firmware configuration.
const l1t::LUT * chargeLUT() const
Golden Patterns definitions.
const std::vector< LayerInputNode > * layerInputMap() const
const std::vector< int > * generalParams() const
General definitions.
void setPtLUT(const l1t::LUT &lut)
void setGeneralParams(const std::vector< int > &paramsVec)
std::vector< unsigned > uparams_
std::vector< LayerInputNode > layerInputMap_
std::vector< Node > pnodes_
vector of LUT like parameters
bool bendingLayer
Is this a bending layers?
std::vector< double > dparams_
void setConnectedSectorsStart(const std::vector< int > &aVector)
std::vector< std::string > sparams_
const l1t::LUT * etaLUT() const
const l1t::LUT * pdfLUT() const
int nPdfAddrBits() const
Access to specific general settings.
Definition: LUT.h:29
std::vector< LayerMapNode > layerMap_
Vector of structs representing definitions of measurement layers.
unsigned int refLayer
Reference layer number.
void setGlobalPhiStartMap(const std::vector< int > &aVector)
const std::vector< int > * globalPhiStartMap() const
void setLayerInputMap(const std::vector< LayerInputNode > &aVector)
#define COND_SERIALIZABLE
Definition: Serializable.h:38
std::vector< int > globalPhiStart_
void setRefHitMap(const std::vector< RefHitNode > &aVector)
const l1t::LUT * ptLUT() const
unsigned int logicNumber
Corresponding logical layer number.
void setFwVersion(unsigned fwVersion)
const std::vector< RefLayerMapNode > * refLayerMap() const
std::vector< RefLayerMapNode > refLayerMap_
const l1t::LUT * meanDistPhiLUT() const
void setPdfLUT(const l1t::LUT &lut)
const std::vector< int > * connectedSectorsStart() const
const std::vector< RefHitNode > * refHitMap() const