CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
47  };
48 
49 
51 
52  public:
53 
55  unsigned int refLayer;
56 
58  unsigned int logicNumber;
59 
61  };
62 
63 
64  class RefHitNode{
65 
66  public:
67 
68  unsigned int iInput;
70  unsigned int iRefHit;
71  unsigned int iRefLayer;
72  unsigned int iRegion;
73 
75  };
76 
78 
79  public:
80 
81  unsigned int iFirstInput;
82  unsigned int iLayer;
83  unsigned int nInputs;
84 
86  };
87 
88 
89 
90  enum { Version = 1 };
91 
92  // DO NOT ADD ENTRIES ANYWHERE BUT DIRECTLY BEFORE "NUM_OMTFPARAMNODES"
93  enum { CHARGE=0, ETA=1, PT=2, PDF=3, MEANDISTPHI=4,
96 
97  // General configuration parameters indexes
101  };
102 
103 
106 
107  // Firmware version
108  unsigned fwVersion() const { return fwVersion_; }
110 
112  const std::vector<int>* generalParams() const { return &pnodes_[GENERAL].iparams_; }
113  void setGeneralParams (const std::vector<int> & paramsVec) { pnodes_[GENERAL].type_ = "INT"; pnodes_[GENERAL].iparams_ = paramsVec;}
114 
116  int nPdfAddrBits() const { return pnodes_[GENERAL].iparams_[GENERAL_ADDRBITS];};
117 
118  int nPdfValBits() const { return pnodes_[GENERAL].iparams_[GENERAL_VALBITS];};
119 
120  int nHitsPerLayer() const { return pnodes_[GENERAL].iparams_[GENERAL_HITSPERLAYER];};
121 
122  int nPhiBits() const { return pnodes_[GENERAL].iparams_[GENERAL_PHIBITS];};
123 
124  int nPhiBins() const { return pnodes_[GENERAL].iparams_[GENERAL_PHIBINS];};
125 
126  int nRefHits() const { return pnodes_[GENERAL].iparams_[GENERAL_NREFHITS];};
127 
128  int nTestRefHits() const { return pnodes_[GENERAL].iparams_[GENERAL_NTESTREFHITS];};
129 
130  int nProcessors() const { return pnodes_[GENERAL].iparams_[GENERAL_NPROCESSORS];};
131 
132  int nLogicRegions() const { return pnodes_[GENERAL].iparams_[GENERAL_NLOGIC_REGIONS];};
133 
134  int nInputs() const { return pnodes_[GENERAL].iparams_[GENERAL_NINPUTS];};
135 
136  int nLayers() const { return pnodes_[GENERAL].iparams_[GENERAL_NLAYERS];};
137 
138  int nRefLayers() const { return pnodes_[GENERAL].iparams_[GENERAL_NREFLAYERS];};
139 
140  int nGoldenPatterns() const { return pnodes_[GENERAL].iparams_[GENERAL_NGOLDENPATTERNS];};
141 
143  void setLayerMap(const std::vector<LayerMapNode> &aVector) { layerMap_ = aVector;}
144 
145  void setRefLayerMap(const std::vector<RefLayerMapNode> &aVector) { refLayerMap_ = aVector;}
146 
147  void setRefHitMap(const std::vector<RefHitNode> &aVector) {refHitMap_ = aVector;};
148 
149  void setGlobalPhiStartMap(const std::vector<int> &aVector) {globalPhiStart_ = aVector;};
150 
151  void setLayerInputMap(const std::vector<LayerInputNode> &aVector) {layerInputMap_ = aVector;};
152 
153  void setConnectedSectorsStart(const std::vector<int> &aVector){pnodes_[SECTORS_START].type_ = "INT"; pnodes_[SECTORS_START].iparams_ = aVector;};
154 
155  void setConnectedSectorsEnd(const std::vector<int> &aVector){pnodes_[SECTORS_END].type_ = "INT"; pnodes_[SECTORS_END].iparams_ = aVector;};
156 
157  const std::vector<LayerMapNode> * layerMap() const { return &layerMap_;};
158 
159  const std::vector<RefLayerMapNode> * refLayerMap() const { return &refLayerMap_;};
160 
161  const std::vector<RefHitNode> * refHitMap() const {return &refHitMap_;};
162 
163  const std::vector<int> * globalPhiStartMap() const { return &globalPhiStart_;};
164 
165  const std::vector<LayerInputNode> * layerInputMap() const { return &layerInputMap_;};
166 
167  const std::vector<int> * connectedSectorsStart() const { return &pnodes_[SECTORS_START].iparams_;};
168 
169  const std::vector<int> * connectedSectorsEnd() const { return &pnodes_[SECTORS_END].iparams_;};
170 
171 
173  const l1t::LUT* chargeLUT() const { return &pnodes_[CHARGE].LUT_; }
174  const l1t::LUT* etaLUT() const { return &pnodes_[ETA].LUT_; }
175  const l1t::LUT* ptLUT() const { return &pnodes_[PT].LUT_; }
176  const l1t::LUT* pdfLUT() const { return &pnodes_[PDF].LUT_; }
177  const l1t::LUT* meanDistPhiLUT() const { return &pnodes_[MEANDISTPHI].LUT_; }
178 
179  void setChargeLUT (const l1t::LUT & lut) { pnodes_[CHARGE].type_ = "LUT"; pnodes_[CHARGE].LUT_ = lut; }
180  void setEtaLUT (const l1t::LUT & lut) { pnodes_[ETA].type_ = "LUT"; pnodes_[ETA].LUT_ = lut; }
181  void setPtLUT (const l1t::LUT & lut) { pnodes_[PT].type_ = "LUT"; pnodes_[PT].LUT_ = lut; }
182  void setPdfLUT (const l1t::LUT & lut) { pnodes_[PDF].type_ = "LUT"; pnodes_[PDF].LUT_ = lut; }
183  void setMeanDistPhiLUT (const l1t::LUT & lut) { pnodes_[MEANDISTPHI].type_ = "LUT"; pnodes_[MEANDISTPHI].LUT_ = lut; }
184 
185 
186  private:
187 
189  unsigned fwVersion_;
190 
192  std::vector<Node> pnodes_;
193 
195  std::vector<LayerMapNode> layerMap_;
196 
199  std::vector<RefLayerMapNode> refLayerMap_;
200 
204  std::vector<RefHitNode> refHitMap_;
205 
208  std::vector<int> globalPhiStart_;
209 
213  std::vector<LayerInputNode> layerInputMap_;
214 
216 };
217 #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_
tuple lut
Definition: lumiPlot.py:244
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:37
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