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