CMS 3D CMS Logo

HGCalParameters.h
Go to the documentation of this file.
1 #ifndef Geometry_HGCalCommonData_HGCalParameters_h
2 #define Geometry_HGCalCommonData_HGCalParameters_h
3 
7 #include <CLHEP/Geometry/Transform3D.h>
8 #include <string>
9 #include <vector>
10 #include <iostream>
11 #include <cstdint>
12 #include <unordered_map>
13 
15 
16 public:
17 
18  typedef std::vector<std::unordered_map<int32_t,int32_t> > layer_map;
19  typedef std::unordered_map<int32_t, int32_t> wafer_map;
20  typedef std::unordered_map<int32_t,std::pair<int32_t,int32_t> > waferT_map;
21 
22  static constexpr double k_ScaleFromDDD = 0.1;
23  static constexpr double k_ScaleToDDD = 10.0;
24  static constexpr uint32_t k_CornerSize = 6;
25 
26  struct hgtrap {
27  int lay;
28  float bl, tl, h, dz, alpha, cellSize;
29  };
30 
31  struct hgtrform {
32  int zp, lay, sec, subsec;
33  CLHEP::Hep3Vector h3v;
34  CLHEP::HepRotation hr;
35  };
36 
37  HGCalParameters(const std::string& nam);
38  ~HGCalParameters( void );
39  void fillModule(const hgtrap& mytr, bool reco);
40  hgtrap getModule(unsigned int k, bool reco) const;
41  void fillTrForm(const hgtrform& mytr);
42  hgtrform getTrForm(unsigned int k) const;
43  void addTrForm(const CLHEP::Hep3Vector& h3v);
44  void scaleTrForm(double);
45  int scintCells(const int layer) const
46  { return nPhiBinBH_[scintType(layer)]; }
47  double scintCellSize(const int layer) const
48  { return cellSize_[scintType(layer)]; }
49  int scintType(const int layer) const
50  { return ((layer < layerFrontBH_[1]) ? 0 : 1); }
51  std::array<int,4> getID(unsigned int k) const;
52 
55  int nCells_;
56  int nSectors_;
57  std::vector<double> cellSize_;
58  std::vector<int> moduleLayS_;
59  std::vector<double> moduleBlS_;
60  std::vector<double> moduleTlS_;
61  std::vector<double> moduleHS_;
62  std::vector<double> moduleDzS_;
63  std::vector<double> moduleAlphaS_;
64  std::vector<double> moduleCellS_;
65  std::vector<int> moduleLayR_;
66  std::vector<double> moduleBlR_;
67  std::vector<double> moduleTlR_;
68  std::vector<double> moduleHR_;
69  std::vector<double> moduleDzR_;
70  std::vector<double> moduleAlphaR_;
71  std::vector<double> moduleCellR_;
72  std::vector<uint32_t> trformIndex_;
73  std::vector<double> trformTranX_;
74  std::vector<double> trformTranY_;
75  std::vector<double> trformTranZ_;
76  std::vector<double> trformRotXX_;
77  std::vector<double> trformRotYX_;
78  std::vector<double> trformRotZX_;
79  std::vector<double> trformRotXY_;
80  std::vector<double> trformRotYY_;
81  std::vector<double> trformRotZY_;
82  std::vector<double> trformRotXZ_;
83  std::vector<double> trformRotYZ_;
84  std::vector<double> trformRotZZ_;
85  std::vector<int> layer_;
86  std::vector<int> layerIndex_;
87  std::vector<int> layerGroup_;
88  std::vector<int> cellFactor_;
89  std::vector<int> depth_;
90  std::vector<int> depthIndex_;
91  std::vector<int> depthLayerF_;
92  std::vector<double> zLayerHex_;
93  std::vector<double> rMinLayHex_;
94  std::vector<double> rMaxLayHex_;
95  std::vector<int> waferCopy_;
96  std::vector<int> waferTypeL_;
97  std::vector<int> waferTypeT_;
98  std::vector<double> waferPosX_;
99  std::vector<double> waferPosY_;
100  std::vector<double> cellFineX_;
101  std::vector<double> cellFineY_;
102  wafer_map cellFineIndex_;
103  std::vector<bool> cellFineHalf_;
104  std::vector<double> cellCoarseX_;
105  std::vector<double> cellCoarseY_;
106  wafer_map cellCoarseIndex_;
107  std::vector<bool> cellCoarseHalf_;
108  std::vector<int> layerGroupM_;
109  std::vector<int> layerGroupO_;
110  std::vector<double> boundR_;
111  std::vector<double> rLimit_;
112  std::vector<int> cellFine_;
113  std::vector<int> cellCoarse_;
114  double waferR_;
115  std::vector<int> levelT_;
118  std::vector<double> slopeMin_;
119  std::vector<double> zFrontMin_;
120  std::vector<double> rMinFront_;
121  layer_map copiesInLayers_;
124  double waferSize_;
125  double waferThick_;
127  double mouseBite_;
129  std::vector<int> waferUVMaxLayer_;
131  std::vector<double> cellThickness_;
132  std::vector<double> radius100to200_;
133  std::vector<double> radius200to300_;
136  double fracAreaMin_;
137  double zMinForRad_;
138  std::vector<double> radiusMixBoundary_;
139  std::vector<int> nPhiBinBH_;
140  std::vector<int> layerFrontBH_;
141  std::vector<double> rMinLayerBH_;
142  std::vector<double> radiusLayer_[2];
143  std::vector<int> iradMinBH_;
144  std::vector<int> iradMaxBH_;
145  double minTileSize_;
146  std::vector<int> firstModule_;
147  std::vector<int> lastModule_;
148  std::vector<double> slopeTop_;
149  std::vector<double> zFrontTop_;
150  std::vector<double> rMaxFront_;
151  std::vector<double> zRanges_;
154  wafer_map wafersInLayers_;
155  wafer_map typesInLayers_;
156  waferT_map waferTypes_;
157 
159 
160 private:
161 
162  const int kMaskZside = 0x1;
163  const int kMaskLayer = 0x7F;
164  const int kMaskSector = 0x3FF;
165  const int kMaskSubSec = 0x1;
166  const int kShiftZside = 19;
167  const int kShiftLayer = 12;
168  const int kShiftSector = 1;
169  const int kShiftSubSec = 0;
170 
171 };
172 
173 #endif
std::vector< int > iradMaxBH_
std::vector< double > waferPosY_
std::vector< int > layer_
std::vector< double > moduleDzR_
std::vector< int > depthLayerF_
std::vector< int > depth_
std::vector< double > zFrontMin_
std::vector< double > moduleCellR_
std::vector< double > moduleHR_
wafer_map cellFineIndex_
layer_map copiesInLayers_
std::unordered_map< int32_t, std::pair< int32_t, int32_t > > waferT_map
std::vector< bool > cellCoarseHalf_
std::vector< bool > cellFineHalf_
int scintType(const int layer) const
std::vector< int > moduleLayR_
const int kMaskSubSec
std::vector< int > cellFine_
std::vector< double > moduleHS_
std::vector< double > trformTranY_
const int kMaskLayer
std::vector< double > cellFineY_
std::vector< double > trformRotZY_
std::vector< uint32_t > trformIndex_
std::vector< int > layerGroupM_
HGCalGeometryMode::GeometryMode mode_
double scintCellSize(const int layer) const
#define constexpr
std::vector< int > cellFactor_
std::vector< double > trformRotXX_
std::vector< int > nPhiBinBH_
void fillTrForm(const hgtrform &mytr)
wafer_map wafersInLayers_
HGCalParameters(const std::string &nam)
std::vector< double > rMinLayerBH_
std::vector< double > trformRotZX_
std::vector< double > cellCoarseX_
std::vector< int > firstModule_
std::vector< int > cellCoarse_
std::vector< double > trformRotYZ_
const int kMaskSector
std::vector< double > boundR_
std::array< int, 4 > getID(unsigned int k) const
std::vector< double > cellSize_
std::vector< int > waferUVMaxLayer_
std::vector< double > moduleDzS_
std::vector< int > layerIndex_
std::vector< double > moduleAlphaR_
hgtrform getTrForm(unsigned int k) const
static double k_ScaleFromDDD
std::vector< double > trformRotXY_
std::vector< double > rMaxFront_
std::vector< double > trformRotYX_
int scintCells(const int layer) const
hgtrap getModule(unsigned int k, bool reco) const
std::vector< std::unordered_map< int32_t, int32_t > > layer_map
std::vector< double > slopeTop_
std::vector< double > moduleBlR_
std::vector< double > rMinLayHex_
void fillModule(const hgtrap &mytr, bool reco)
std::vector< double > moduleTlS_
std::vector< double > zLayerHex_
waferT_map waferTypes_
int k[5][pyjets_maxn]
std::vector< double > rMaxLayHex_
static uint32_t k_CornerSize
std::vector< double > trformTranX_
std::vector< double > zRanges_
std::vector< double > slopeMin_
std::vector< int > lastModule_
std::vector< double > radiusMixBoundary_
std::vector< double > cellThickness_
std::vector< double > trformRotXZ_
void scaleTrForm(double)
std::vector< int > layerGroup_
std::unordered_map< int32_t, int32_t > wafer_map
std::vector< double > moduleCellS_
static double k_ScaleToDDD
std::vector< double > radius200to300_
std::vector< double > radius100to200_
wafer_map cellCoarseIndex_
std::vector< double > rMinFront_
#define COND_SERIALIZABLE
Definition: Serializable.h:38
std::vector< int > iradMinBH_
std::vector< double > trformRotYY_
std::vector< double > cellFineX_
wafer_map typesInLayers_
const int kShiftSector
std::vector< double > trformRotZZ_
std::vector< double > moduleAlphaS_
std::vector< int > layerGroupO_
const int kShiftZside
fixed size matrix
std::vector< double > moduleBlS_
std::vector< int > waferCopy_
std::vector< int > depthIndex_
std::vector< int > layerFrontBH_
std::vector< double > rLimit_
std::vector< double > zFrontTop_
std::vector< double > radiusLayer_[2]
std::vector< int > waferTypeT_
std::vector< int > levelT_
std::vector< double > cellCoarseY_
std::vector< int > moduleLayS_
std::vector< double > trformTranZ_
const int kMaskZside
CLHEP::HepRotation hr
std::vector< double > waferPosX_
void addTrForm(const CLHEP::Hep3Vector &h3v)
std::vector< double > moduleTlR_
std::vector< int > waferTypeL_
std::string name_
const int kShiftSubSec
const int kShiftLayer