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