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 public:
16  class Node {
17  public:
19  unsigned version_;
21  std::vector<double> dparams_;
22  std::vector<unsigned> uparams_;
23  std::vector<int> iparams_;
24  std::vector<std::string> sparams_;
25  Node() {
26  type_ = "unspecified";
27  version_ = 0;
28  }
30  };
31 
32  class LayerMapNode {
33  public:
35  unsigned int hwNumber;
36 
38  unsigned int logicNumber;
39 
42 
45  unsigned int connectedToLayer;
46 
48 
50  };
51 
53  public:
55  unsigned int refLayer;
56 
58  unsigned int logicNumber;
59 
61 
63  };
64 
65  class RefHitNode {
66  public:
67  unsigned int iInput;
69  unsigned int iRefHit;
70  unsigned int iRefLayer;
71  unsigned int iRegion;
72 
73  RefHitNode(void) : iInput(0), iPhiMin(0), iPhiMax(0), iRefHit(0), iRefLayer(0), iRegion(0) {}
74 
76  };
77 
79  public:
80  unsigned int iFirstInput;
81  unsigned int iLayer;
82  unsigned int nInputs;
83 
84  LayerInputNode(void) : iFirstInput(0), iLayer(0), nInputs(0) {}
85 
87  };
88 
89  enum { Version = 1 };
90 
91  // DO NOT ADD ENTRIES ANYWHERE BUT DIRECTLY BEFORE "NUM_OMTFPARAMNODES"
92  enum {
93  CHARGE = 0,
94  ETA = 1,
95  PT = 2,
96  PDF = 3,
98  GENERAL = 5,
102  };
103 
104  // General configuration parameters indexes
105  enum {
120  };
121 
124  pnodes_.resize(NUM_OMTFPARAMNODES);
125  }
127 
128  // Firmware version
129  unsigned fwVersion() const { return fwVersion_; }
131 
133  const std::vector<int> *generalParams() const { return &pnodes_[GENERAL].iparams_; }
134  void setGeneralParams(const std::vector<int> &paramsVec) {
135  pnodes_[GENERAL].type_ = "INT";
136  pnodes_[GENERAL].iparams_ = paramsVec;
137  }
138 
140  int nPdfAddrBits() const { return pnodes_[GENERAL].iparams_[GENERAL_ADDRBITS]; };
141 
142  int nPdfValBits() const { return pnodes_[GENERAL].iparams_[GENERAL_VALBITS]; };
143 
144  int nHitsPerLayer() const { return pnodes_[GENERAL].iparams_[GENERAL_HITSPERLAYER]; };
145 
146  int nPhiBits() const { return pnodes_[GENERAL].iparams_[GENERAL_PHIBITS]; };
147 
148  int nPhiBins() const { return pnodes_[GENERAL].iparams_[GENERAL_PHIBINS]; };
149 
150  int nRefHits() const { return pnodes_[GENERAL].iparams_[GENERAL_NREFHITS]; };
151 
152  int nTestRefHits() const { return pnodes_[GENERAL].iparams_[GENERAL_NTESTREFHITS]; };
153 
154  int nProcessors() const { return pnodes_[GENERAL].iparams_[GENERAL_NPROCESSORS]; };
155 
156  int nLogicRegions() const { return pnodes_[GENERAL].iparams_[GENERAL_NLOGIC_REGIONS]; };
157 
158  int nInputs() const { return pnodes_[GENERAL].iparams_[GENERAL_NINPUTS]; };
159 
160  int nLayers() const { return pnodes_[GENERAL].iparams_[GENERAL_NLAYERS]; };
161 
162  int nRefLayers() const { return pnodes_[GENERAL].iparams_[GENERAL_NREFLAYERS]; };
163 
164  int nGoldenPatterns() const { return pnodes_[GENERAL].iparams_[GENERAL_NGOLDENPATTERNS]; };
165 
167  void setLayerMap(const std::vector<LayerMapNode> &aVector) { layerMap_ = aVector; }
168 
169  void setRefLayerMap(const std::vector<RefLayerMapNode> &aVector) { refLayerMap_ = aVector; }
170 
171  void setRefHitMap(const std::vector<RefHitNode> &aVector) { refHitMap_ = aVector; };
172 
173  void setGlobalPhiStartMap(const std::vector<int> &aVector) { globalPhiStart_ = aVector; };
174 
175  void setLayerInputMap(const std::vector<LayerInputNode> &aVector) { layerInputMap_ = aVector; };
176 
177  void setConnectedSectorsStart(const std::vector<int> &aVector) {
178  pnodes_[SECTORS_START].type_ = "INT";
179  pnodes_[SECTORS_START].iparams_ = aVector;
180  };
181 
182  void setConnectedSectorsEnd(const std::vector<int> &aVector) {
183  pnodes_[SECTORS_END].type_ = "INT";
184  pnodes_[SECTORS_END].iparams_ = aVector;
185  };
186 
187  const std::vector<LayerMapNode> *layerMap() const { return &layerMap_; };
188 
189  const std::vector<RefLayerMapNode> *refLayerMap() const { return &refLayerMap_; };
190 
191  const std::vector<RefHitNode> *refHitMap() const { return &refHitMap_; };
192 
193  const std::vector<int> *globalPhiStartMap() const { return &globalPhiStart_; };
194 
195  const std::vector<LayerInputNode> *layerInputMap() const { return &layerInputMap_; };
196 
197  const std::vector<int> *connectedSectorsStart() const { return &pnodes_[SECTORS_START].iparams_; };
198 
199  const std::vector<int> *connectedSectorsEnd() const { return &pnodes_[SECTORS_END].iparams_; };
200 
202  const l1t::LUT *chargeLUT() const { return &pnodes_[CHARGE].LUT_; }
203  const l1t::LUT *etaLUT() const { return &pnodes_[ETA].LUT_; }
204  const l1t::LUT *ptLUT() const { return &pnodes_[PT].LUT_; }
205  const l1t::LUT *pdfLUT() const { return &pnodes_[PDF].LUT_; }
206  const l1t::LUT *meanDistPhiLUT() const { return &pnodes_[MEANDISTPHI].LUT_; }
207 
208  void setChargeLUT(const l1t::LUT &lut) {
209  pnodes_[CHARGE].type_ = "LUT";
210  pnodes_[CHARGE].LUT_ = lut;
211  }
212  void setEtaLUT(const l1t::LUT &lut) {
213  pnodes_[ETA].type_ = "LUT";
214  pnodes_[ETA].LUT_ = lut;
215  }
216  void setPtLUT(const l1t::LUT &lut) {
217  pnodes_[PT].type_ = "LUT";
218  pnodes_[PT].LUT_ = lut;
219  }
220  void setPdfLUT(const l1t::LUT &lut) {
221  pnodes_[PDF].type_ = "LUT";
222  pnodes_[PDF].LUT_ = lut;
223  }
224  void setMeanDistPhiLUT(const l1t::LUT &lut) {
225  pnodes_[MEANDISTPHI].type_ = "LUT";
226  pnodes_[MEANDISTPHI].LUT_ = lut;
227  }
228 
229 private:
231  unsigned fwVersion_;
232 
234  std::vector<Node> pnodes_;
235 
237  std::vector<LayerMapNode> layerMap_;
238 
241  std::vector<RefLayerMapNode> refLayerMap_;
242 
246  std::vector<RefHitNode> refHitMap_;
247 
250  std::vector<int> globalPhiStart_;
251 
255  std::vector<LayerInputNode> layerInputMap_;
256 
258 };
259 #endif
L1TMuonOverlapParams::LayerInputNode::iFirstInput
unsigned int iFirstInput
Definition: L1TMuonOverlapParams.h:80
L1TMuonOverlapParams::layerInputMap
const std::vector< LayerInputNode > * layerInputMap() const
Definition: L1TMuonOverlapParams.h:195
L1TMuonOverlapParams::LayerMapNode::connectedToLayer
unsigned int connectedToLayer
Definition: L1TMuonOverlapParams.h:45
L1TMuonOverlapParams::Node::uparams_
std::vector< unsigned > uparams_
Definition: L1TMuonOverlapParams.h:22
L1TMuonOverlapParams::nPhiBins
int nPhiBins() const
Definition: L1TMuonOverlapParams.h:148
L1TMuonOverlapParams::RefHitNode::iRegion
unsigned int iRegion
Definition: L1TMuonOverlapParams.h:71
LUT.h
funct::false
false
Definition: Factorize.h:29
L1TMuonOverlapParams::setRefHitMap
void setRefHitMap(const std::vector< RefHitNode > &aVector)
Definition: L1TMuonOverlapParams.h:171
L1TMuonOverlapParams::refHitMap_
std::vector< RefHitNode > refHitMap_
Definition: L1TMuonOverlapParams.h:246
L1TMuonOverlapParams::RefHitNode::iRefHit
unsigned int iRefHit
Definition: L1TMuonOverlapParams.h:69
L1TMuonOverlapParams::GENERAL_NINPUTS
Definition: L1TMuonOverlapParams.h:115
L1TMuonOverlapParams::GENERAL
Definition: L1TMuonOverlapParams.h:98
L1TMuonOverlapParams::LayerInputNode::iLayer
unsigned int iLayer
Definition: L1TMuonOverlapParams.h:81
L1TMuonOverlapParams::Node::sparams_
std::vector< std::string > sparams_
Definition: L1TMuonOverlapParams.h:24
L1TMuonOverlapParams::nTestRefHits
int nTestRefHits() const
Definition: L1TMuonOverlapParams.h:152
L1TMuonOverlapParams::RefHitNode::iPhiMax
int iPhiMax
Definition: L1TMuonOverlapParams.h:68
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
L1TMuonOverlapParams::ptLUT
const l1t::LUT * ptLUT() const
Definition: L1TMuonOverlapParams.h:204
L1TMuonOverlapParams::Version
Definition: L1TMuonOverlapParams.h:89
L1TMuonOverlapParams::globalPhiStartMap
const std::vector< int > * globalPhiStartMap() const
Definition: L1TMuonOverlapParams.h:193
L1TMuonOverlapParams::SECTORS_START
Definition: L1TMuonOverlapParams.h:99
L1TMuonOverlapParams::LayerMapNode::LayerMapNode
LayerMapNode(void)
Definition: L1TMuonOverlapParams.h:47
L1TMuonOverlapParams::fwVersion
unsigned fwVersion() const
Definition: L1TMuonOverlapParams.h:129
L1TMuonOverlapParams::LayerInputNode::LayerInputNode
LayerInputNode(void)
Definition: L1TMuonOverlapParams.h:84
L1TMuonOverlapParams::GENERAL_NLOGIC_REGIONS
Definition: L1TMuonOverlapParams.h:114
L1TMuonOverlapParams::GENERAL_NTESTREFHITS
Definition: L1TMuonOverlapParams.h:112
L1TMuonOverlapParams::GENERAL_HITSPERLAYER
Definition: L1TMuonOverlapParams.h:108
L1TMuonOverlapParams::fwVersion_
unsigned fwVersion_
Version of firmware configuration.
Definition: L1TMuonOverlapParams.h:231
L1TMuonOverlapParams::GENERAL_NREFLAYERS
Definition: L1TMuonOverlapParams.h:117
L1TMuonOverlapParams::setGeneralParams
void setGeneralParams(const std::vector< int > &paramsVec)
Definition: L1TMuonOverlapParams.h:134
L1TMuonOverlapParams::layerMap
const std::vector< LayerMapNode > * layerMap() const
Definition: L1TMuonOverlapParams.h:187
L1TMuonOverlapParams::nPdfValBits
int nPdfValBits() const
Definition: L1TMuonOverlapParams.h:142
L1TMuonOverlapParams::setChargeLUT
void setChargeLUT(const l1t::LUT &lut)
Definition: L1TMuonOverlapParams.h:208
L1TMuonOverlapParams::PDF
Definition: L1TMuonOverlapParams.h:96
L1TMuonOverlapParams::nGoldenPatterns
int nGoldenPatterns() const
Definition: L1TMuonOverlapParams.h:164
L1TMuonOverlapParams::setConnectedSectorsEnd
void setConnectedSectorsEnd(const std::vector< int > &aVector)
Definition: L1TMuonOverlapParams.h:182
L1TMuonOverlapParams::Node
Definition: L1TMuonOverlapParams.h:16
L1TMuonOverlapParams::RefLayerMapNode
Definition: L1TMuonOverlapParams.h:52
L1TMuonOverlapParams::GENERAL_NPROCESSORS
Definition: L1TMuonOverlapParams.h:113
L1TMuonOverlapParams::CHARGE
Definition: L1TMuonOverlapParams.h:93
L1TMuonOverlapParams::generalParams
const std::vector< int > * generalParams() const
General definitions.
Definition: L1TMuonOverlapParams.h:133
L1TMuonOverlapParams::GENERAL_NLAYERS
Definition: L1TMuonOverlapParams.h:116
L1TMuonOverlapParams::PT
Definition: L1TMuonOverlapParams.h:95
L1TMuonOverlapParams::meanDistPhiLUT
const l1t::LUT * meanDistPhiLUT() const
Definition: L1TMuonOverlapParams.h:206
L1TMuonOverlapParams::RefLayerMapNode::RefLayerMapNode
RefLayerMapNode(void)
Definition: L1TMuonOverlapParams.h:60
L1TMuonOverlapParams::nInputs
int nInputs() const
Definition: L1TMuonOverlapParams.h:158
L1TMuonOverlapParams::GENERAL_VALBITS
Definition: L1TMuonOverlapParams.h:107
L1TMuonOverlapParams::SECTORS_END
Definition: L1TMuonOverlapParams.h:100
L1TMuonOverlapParams
Definition: L1TMuonOverlapParams.h:14
L1TMuonOverlapParams::nHitsPerLayer
int nHitsPerLayer() const
Definition: L1TMuonOverlapParams.h:144
L1TMuonOverlapParams::L1TMuonOverlapParams
L1TMuonOverlapParams()
Definition: L1TMuonOverlapParams.h:122
L1TMuonOverlapParams::GENERAL_NREFHITS
Definition: L1TMuonOverlapParams.h:111
L1TMuonOverlapParams::setPdfLUT
void setPdfLUT(const l1t::LUT &lut)
Definition: L1TMuonOverlapParams.h:220
L1TMuonOverlapParams::Node::type_
std::string type_
Definition: L1TMuonOverlapParams.h:18
L1TMuonOverlapParams::MEANDISTPHI
Definition: L1TMuonOverlapParams.h:97
L1TMuonOverlapParams::~L1TMuonOverlapParams
~L1TMuonOverlapParams()
Definition: L1TMuonOverlapParams.h:126
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TMuonOverlapParams::pnodes_
std::vector< Node > pnodes_
vector of LUT like parameters
Definition: L1TMuonOverlapParams.h:234
L1TMuonOverlapParams::setFwVersion
void setFwVersion(unsigned fwVersion)
Definition: L1TMuonOverlapParams.h:130
L1TMuonOverlapParams::refLayerMap
const std::vector< RefLayerMapNode > * refLayerMap() const
Definition: L1TMuonOverlapParams.h:189
L1TMuonOverlapParams::setLayerMap
void setLayerMap(const std::vector< LayerMapNode > &aVector)
Connections definitions.
Definition: L1TMuonOverlapParams.h:167
L1TMuonOverlapParams::pdfLUT
const l1t::LUT * pdfLUT() const
Definition: L1TMuonOverlapParams.h:205
L1TMuonOverlapParams::Node::dparams_
std::vector< double > dparams_
Definition: L1TMuonOverlapParams.h:21
L1TMuonOverlapParams::setEtaLUT
void setEtaLUT(const l1t::LUT &lut)
Definition: L1TMuonOverlapParams.h:212
L1TMuonOverlapParams::globalPhiStart_
std::vector< int > globalPhiStart_
Definition: L1TMuonOverlapParams.h:250
L1TMuonOverlapParams::Node::LUT_
l1t::LUT LUT_
Definition: L1TMuonOverlapParams.h:20
L1TMuonOverlapParams::nRefLayers
int nRefLayers() const
Definition: L1TMuonOverlapParams.h:162
Serializable.h
L1TMuonOverlapParams::setPtLUT
void setPtLUT(const l1t::LUT &lut)
Definition: L1TMuonOverlapParams.h:216
L1TMuonOverlapParams::setGlobalPhiStartMap
void setGlobalPhiStartMap(const std::vector< int > &aVector)
Definition: L1TMuonOverlapParams.h:173
L1TMuonOverlapParams::RefHitNode::iPhiMin
int iPhiMin
Definition: L1TMuonOverlapParams.h:68
L1TMuonOverlapParams::setLayerInputMap
void setLayerInputMap(const std::vector< LayerInputNode > &aVector)
Definition: L1TMuonOverlapParams.h:175
L1TMuonOverlapParams::GENERAL_PHIBINS
Definition: L1TMuonOverlapParams.h:110
L1TMuonOverlapParams::setConnectedSectorsStart
void setConnectedSectorsStart(const std::vector< int > &aVector)
Definition: L1TMuonOverlapParams.h:177
L1TMuonOverlapParams::Node::iparams_
std::vector< int > iparams_
Definition: L1TMuonOverlapParams.h:23
L1TMuonOverlapParams::connectedSectorsStart
const std::vector< int > * connectedSectorsStart() const
Definition: L1TMuonOverlapParams.h:197
L1TMuonOverlapParams::nProcessors
int nProcessors() const
Definition: L1TMuonOverlapParams.h:154
L1TMuonOverlapParams::refHitMap
const std::vector< RefHitNode > * refHitMap() const
Definition: L1TMuonOverlapParams.h:191
L1TMuonOverlapParams::RefHitNode::iRefLayer
unsigned int iRefLayer
Definition: L1TMuonOverlapParams.h:70
L1TMuonOverlapParams::NUM_OMTFPARAMNODES
Definition: L1TMuonOverlapParams.h:101
L1TMuonOverlapParams::nPhiBits
int nPhiBits() const
Definition: L1TMuonOverlapParams.h:146
L1TMuonOverlapParams::layerInputMap_
std::vector< LayerInputNode > layerInputMap_
Definition: L1TMuonOverlapParams.h:255
L1TMuonOverlapParams::nPdfAddrBits
int nPdfAddrBits() const
Access to specific general settings.
Definition: L1TMuonOverlapParams.h:140
l1t::LUT
Definition: LUT.h:29
L1TMuonOverlapParams::setMeanDistPhiLUT
void setMeanDistPhiLUT(const l1t::LUT &lut)
Definition: L1TMuonOverlapParams.h:224
L1TMuonOverlapParams::LayerInputNode::nInputs
unsigned int nInputs
Definition: L1TMuonOverlapParams.h:82
L1TMuonOverlapParams::nLogicRegions
int nLogicRegions() const
Definition: L1TMuonOverlapParams.h:156
L1TMuonOverlapParams::connectedSectorsEnd
const std::vector< int > * connectedSectorsEnd() const
Definition: L1TMuonOverlapParams.h:199
L1TMuonOverlapParams::LayerMapNode::hwNumber
unsigned int hwNumber
short layer number used within OMTF emulator
Definition: L1TMuonOverlapParams.h:35
L1TMuonOverlapParams::ETA
Definition: L1TMuonOverlapParams.h:94
L1TMuonOverlapParams::LayerInputNode
Definition: L1TMuonOverlapParams.h:78
L1TMuonOverlapParams::RefLayerMapNode::refLayer
unsigned int refLayer
Reference layer number.
Definition: L1TMuonOverlapParams.h:55
L1TMuonOverlapParams::RefHitNode::RefHitNode
RefHitNode(void)
Definition: L1TMuonOverlapParams.h:73
L1TMuonOverlapParams::setRefLayerMap
void setRefLayerMap(const std::vector< RefLayerMapNode > &aVector)
Definition: L1TMuonOverlapParams.h:169
L1TMuonOverlapParams::Node::version_
unsigned version_
Definition: L1TMuonOverlapParams.h:19
L1TMuonOverlapParams::GENERAL_NCONFIG
Definition: L1TMuonOverlapParams.h:119
L1TMuonOverlapParams::RefHitNode
Definition: L1TMuonOverlapParams.h:65
L1TMuonOverlapParams::RefHitNode::iInput
unsigned int iInput
Definition: L1TMuonOverlapParams.h:67
L1TMuonOverlapParams::layerMap_
std::vector< LayerMapNode > layerMap_
Vector of structs representing definitions of measurement layers.
Definition: L1TMuonOverlapParams.h:237
L1TMuonOverlapParams::LayerMapNode::logicNumber
unsigned int logicNumber
logic numer of the layer
Definition: L1TMuonOverlapParams.h:38
L1TMuonOverlapParams::LayerMapNode
Definition: L1TMuonOverlapParams.h:32
L1TMuonOverlapParams::nLayers
int nLayers() const
Definition: L1TMuonOverlapParams.h:160
L1TMuonOverlapParams::chargeLUT
const l1t::LUT * chargeLUT() const
Golden Patterns definitions.
Definition: L1TMuonOverlapParams.h:202
L1TMuonOverlapParams::nRefHits
int nRefHits() const
Definition: L1TMuonOverlapParams.h:150
Version
Definition: InitMessage.h:39
L1TMuonOverlapParams::LayerMapNode::bendingLayer
bool bendingLayer
Is this a bending layers?
Definition: L1TMuonOverlapParams.h:41
L1TMuonOverlapParams::GENERAL_NGOLDENPATTERNS
Definition: L1TMuonOverlapParams.h:118
L1TMuonOverlapParams::Node::Node
Node()
Definition: L1TMuonOverlapParams.h:25
L1TMuonOverlapParams::etaLUT
const l1t::LUT * etaLUT() const
Definition: L1TMuonOverlapParams.h:203
L1TMuonOverlapParams::refLayerMap_
std::vector< RefLayerMapNode > refLayerMap_
Definition: L1TMuonOverlapParams.h:241
L1TMuonOverlapParams::GENERAL_ADDRBITS
Definition: L1TMuonOverlapParams.h:106
L1TMuonOverlapParams::GENERAL_PHIBITS
Definition: L1TMuonOverlapParams.h:109
L1TMuonOverlapParams::RefLayerMapNode::logicNumber
unsigned int logicNumber
Corresponding logical layer number.
Definition: L1TMuonOverlapParams.h:58