CMS 3D CMS Logo

HGCalGeomParameters.h
Go to the documentation of this file.
1 #ifndef HGCalCommonData_HGCalGeomParameters_h
2 #define HGCalCommonData_HGCalGeomParameters_h
3 
15 #include <string>
16 #include <utility>
17 #include <vector>
18 
28 
30 public:
32  ~HGCalGeomParameters() = default;
33 
34  void loadGeometryHexagon(const DDFilteredView& _fv,
35  HGCalParameters& php,
36  const std::string& sdTag1,
37  const DDCompactView* cpv,
38  const std::string& sdTag2,
39  const std::string& sdTag3,
42  HGCalParameters& php,
43  const std::string& sdTag1,
44  const std::string& sdTag2,
45  const std::string& sdTag3,
47  void loadGeometryHexagon8(const DDFilteredView& _fv, HGCalParameters& php, int firstLayer);
49  HGCalParameters& php,
50  const std::string& sdTag1,
51  int firstLayer);
53  HGCalParameters& php,
54  const std::string& sdTag1,
55  const std::string& sdTag2,
56  int firstLayer);
58  HGCalParameters& php,
59  const std::string& sdTag1,
60  const std::string& sdTag2,
61  int firstLayer);
62  void loadSpecParsHexagon(const DDFilteredView& fv,
63  HGCalParameters& php,
64  const DDCompactView* cpv,
65  const std::string& sdTag1,
66  const std::string& sdTag2);
68  HGCalParameters& php,
69  const std::string& sdTag1,
70  const std::string& sdTag2,
71  const std::string& sdTag3,
72  const std::string& sdTag4);
75  const cms::DDVectorsMap& vmap,
76  HGCalParameters& php,
77  const std::string& sdTag1);
80  const cms::DDVectorsMap& vmap,
81  HGCalParameters& php,
82  const std::string& sdTag1);
85  void loadCellParsHexagon(const DDCompactView* cpv, HGCalParameters& php);
87  void loadCellParsHexagon(const HGCalParameters& php);
89 
90  struct layerParameters {
91  double rmin, rmax, zpos;
92  layerParameters(double rin = 0, double rout = 0, double zp = 0) : rmin(rin), rmax(rout), zpos(zp) {}
93  };
94  struct cellParameters {
95  bool half;
96  int wafer;
98  cellParameters(bool h = false, int w = 0, GlobalPoint p = GlobalPoint(0, 0, 0))
99  : half(h), wafer(w), xyz(std::move(p)) {}
100  };
101 
102  constexpr static int siliconFileEE = 2;
103  constexpr static int siliconFileHE = 3;
104  constexpr static int scintillatorFile = 4;
105  constexpr static int siliconCassetteEE = 5;
106  constexpr static int siliconCassetteHE = 6;
109 
110 private:
111  void loadGeometryHexagon(const std::map<int, HGCalGeomParameters::layerParameters>& layers,
112  std::vector<HGCalParameters::hgtrform>& trforms,
113  std::vector<bool>& trformUse,
114  const std::unordered_map<int32_t, int32_t>& copies,
115  const HGCalParameters::layer_map& copiesInLayers,
116  const std::vector<int32_t>& wafer2copy,
117  const std::vector<HGCalGeomParameters::cellParameters>& wafers,
118  const std::map<int, int>& wafertype,
119  const std::map<int, HGCalGeomParameters::cellParameters>& cellsf,
120  const std::map<int, HGCalGeomParameters::cellParameters>& cellsc,
121  HGCalParameters& php);
122  void loadGeometryHexagon8(const std::map<int, HGCalGeomParameters::layerParameters>& layers,
123  std::map<std::pair<int, int>, HGCalParameters::hgtrform>& trforms,
124  const int& firstLayer,
125  HGCalParameters& php);
126  void loadSpecParsHexagon(const HGCalParameters& php);
129  const std::vector<int>& layerType,
130  const std::vector<int>& waferIndex,
131  const std::vector<int>& waferProperties);
134  const std::vector<int>& tileIndex,
135  const std::vector<int>& tileProperty,
136  const std::vector<int>& tileHEX1,
137  const std::vector<int>& tileHEX2,
138  const std::vector<int>& tileHEX3,
139  const std::vector<int>& tileHEX4,
140  const std::vector<int>& tileHEX5,
141  const std::vector<int>& tileHEX6,
142  const std::vector<double>& tileRMin,
143  const std::vector<double>& tileRMax,
144  const std::vector<double>& tileRMinFine,
145  const std::vector<double>& tileRMaxFine,
146  const std::vector<int>& tileRingMin,
147  const std::vector<int>& tileRingMax,
148  const std::vector<int>& tileRingMinFine,
149  const std::vector<int>& tileRingMaxFine);
150  std::vector<double> getDDDArray(const std::string& str, const DDsvalues_type& sv, const int nmin);
151  std::pair<double, double> cellPosition(const std::vector<cellParameters>& wafers,
152  std::vector<cellParameters>::const_iterator& itrf,
153  int wafer,
154  double xx,
155  double yy);
156  void rescale(std::vector<double>&, const double s);
157  void resetZero(std::vector<double>&);
158 
159  constexpr static double tan30deg_ = 0.5773502693;
161  const double sqrt3_;
162  double waferSize_;
163 };
164 
165 #endif
static constexpr int scintillatorCassette
cellParameters(bool h=false, int w=0, GlobalPoint p=GlobalPoint(0, 0, 0))
T w() const
static constexpr int siliconFileEE
void rescale(std::vector< double > &, const double s)
void loadGeometryHexagonModule(const DDCompactView *cpv, HGCalParameters &php, const std::string &sdTag1, const std::string &sdTag2, int firstLayer)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
void loadSpecParsHexagon(const DDFilteredView &fv, HGCalParameters &php, const DDCompactView *cpv, const std::string &sdTag1, const std::string &sdTag2)
void resetZero(std::vector< double > &)
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
std::unordered_map< std::string, std::vector< double > > DDVectorsMap
Definition: DDNamespace.h:20
void loadSpecParsHexagon8(const DDFilteredView &fv, HGCalParameters &php)
static constexpr int scintillatorFile
int32_t tileIndex(int32_t layer, int32_t ring, int32_t phi)
~HGCalGeomParameters()=default
static constexpr int siliconCassetteHE
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
void loadCellTrapezoid(HGCalParameters &php)
std::pair< double, double > cellPosition(const std::vector< cellParameters > &wafers, std::vector< cellParameters >::const_iterator &itrf, int wafer, double xx, double yy)
layerParameters(double rin=0, double rout=0, double zp=0)
void loadCellParsHexagon(const DDCompactView *cpv, HGCalParameters &php)
static constexpr int siliconCassetteEE
std::vector< double > getDDDArray(const std::string &str, const DDsvalues_type &sv, const int nmin)
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
static constexpr double tan30deg_
void loadWaferHexagon(HGCalParameters &php)
void loadGeometryHexagon(const DDFilteredView &_fv, HGCalParameters &php, const std::string &sdTag1, const DDCompactView *cpv, const std::string &sdTag2, const std::string &sdTag3, HGCalGeometryMode::WaferMode mode)
void loadSpecParsTrapezoid(const DDFilteredView &fv, HGCalParameters &php)
static constexpr int siliconFileHE
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
#define str(s)
int32_t tileProperty(const int32_t type, const int32_t sipm)
def move(src, dest)
Definition: eostools.py:511
void loadWaferHexagon8(HGCalParameters &php)
std::vector< std::unordered_map< int32_t, int32_t > > layer_map
void loadGeometryHexagon8(const DDFilteredView &_fv, HGCalParameters &php, int firstLayer)
static constexpr int scintillatorFineCell