CMS 3D CMS Logo

HGCalTBGeomParameters.h
Go to the documentation of this file.
1 #ifndef HGCalCommonData_HGCalTBGeomParameters_h
2 #define HGCalCommonData_HGCalTBGeomParameters_h
3 
14 #include <string>
15 #include <utility>
16 #include <vector>
17 
27 
29 public:
31  ~HGCalTBGeomParameters() = default;
32 
33  void loadGeometryHexagon(const DDFilteredView& _fv,
34  HGCalTBParameters& php,
35  const std::string& sdTag1,
36  const DDCompactView* cpv,
37  const std::string& sdTag2,
38  const std::string& sdTag3,
41  HGCalTBParameters& php,
42  const std::string& sdTag1,
43  const std::string& sdTag2,
44  const std::string& sdTag3,
46  void loadSpecParsHexagon(const DDFilteredView& fv,
47  HGCalTBParameters& php,
48  const DDCompactView* cpv,
49  const std::string& sdTag1,
50  const std::string& sdTag2);
52  HGCalTBParameters& php,
53  const std::string& sdTag1,
54  const std::string& sdTag2,
55  const std::string& sdTag3,
56  const std::string& sdTag4);
60  void loadCellParsHexagon(const HGCalTBParameters& php);
61 
62  struct layerParameters {
63  double rmin, rmax, zpos;
64  layerParameters(double rin = 0, double rout = 0, double zp = 0) : rmin(rin), rmax(rout), zpos(zp) {}
65  };
66  struct cellParameters {
67  bool half;
68  int wafer;
70  cellParameters(bool h = false, int w = 0, GlobalPoint p = GlobalPoint(0, 0, 0))
71  : half(h), wafer(w), xyz(std::move(p)) {}
72  };
73 
74 private:
75  void loadGeometryHexagon(const std::map<int, HGCalTBGeomParameters::layerParameters>& layers,
76  std::vector<HGCalTBParameters::hgtrform>& trforms,
77  std::vector<bool>& trformUse,
78  const std::unordered_map<int32_t, int32_t>& copies,
79  const HGCalTBParameters::layer_map& copiesInLayers,
80  const std::vector<int32_t>& wafer2copy,
81  const std::vector<HGCalTBGeomParameters::cellParameters>& wafers,
82  const std::map<int, int>& wafertype,
83  const std::map<int, HGCalTBGeomParameters::cellParameters>& cellsf,
84  const std::map<int, HGCalTBGeomParameters::cellParameters>& cellsc,
85  HGCalTBParameters& php);
86  void loadSpecParsHexagon(const HGCalTBParameters& php);
87  std::vector<double> getDDDArray(const std::string& str, const DDsvalues_type& sv, const int nmin);
88  std::pair<double, double> cellPosition(const std::vector<cellParameters>& wafers,
89  std::vector<cellParameters>::const_iterator& itrf,
90  int wafer,
91  double xx,
92  double yy);
93  void rescale(std::vector<double>&, const double s);
94  void resetZero(std::vector<double>&);
95 
96  constexpr static double tan30deg_ = 0.5773502693;
98  const double sqrt3_;
99  double waferSize_;
100 };
101 
102 #endif
void rescale(std::vector< double > &, const double s)
T w() const
void loadWaferHexagon(HGCalTBParameters &php)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< std::unordered_map< int32_t, int32_t > > layer_map
void resetZero(std::vector< double > &)
layerParameters(double rin=0, double rout=0, double zp=0)
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
std::unordered_map< std::string, std::vector< double > > DDVectorsMap
Definition: DDNamespace.h:20
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
void loadCellParsHexagon(const DDCompactView *cpv, HGCalTBParameters &php)
std::vector< double > getDDDArray(const std::string &str, const DDsvalues_type &sv, const int nmin)
static constexpr double tan30deg_
~HGCalTBGeomParameters()=default
std::pair< double, double > cellPosition(const std::vector< cellParameters > &wafers, std::vector< cellParameters >::const_iterator &itrf, int wafer, double xx, double yy)
void loadSpecParsHexagon(const DDFilteredView &fv, HGCalTBParameters &php, const DDCompactView *cpv, const std::string &sdTag1, const std::string &sdTag2)
cellParameters(bool h=false, int w=0, GlobalPoint p=GlobalPoint(0, 0, 0))
void loadGeometryHexagon(const DDFilteredView &_fv, HGCalTBParameters &php, const std::string &sdTag1, const DDCompactView *cpv, const std::string &sdTag2, const std::string &sdTag3, HGCalGeometryMode::WaferMode mode)
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)
def move(src, dest)
Definition: eostools.py:511