CMS 3D CMS Logo

HcalGeomParameters.h
Go to the documentation of this file.
1 #ifndef HcalCommonData_HcalGeomParameters_h
2 #define HcalCommonData_HcalGeomParameters_h
3 
14 #include <string>
15 #include <vector>
16 #include <iostream>
17 
23 #include "DD4hep/DD4hepUnits.h"
24 
25 class HcalParameters;
26 
28 public:
29  static constexpr double k_ScaleFromDDD = 0.1;
30  static constexpr double k_ScaleToDDD = 10.0;
31  static constexpr double k_ScaleFromDDDToG4 = 1.0;
32  static constexpr double k_ScaleToDDDFromG4 = 1.0;
33  static constexpr double k_ScaleFromDD4hep = (1.0 / dd4hep::cm);
34  static constexpr double k_ScaleToDD4hep = dd4hep::cm;
35  static constexpr double k_ScaleFromDD4hepToG4 = (1.0 / dd4hep::mm);
36  static constexpr double k_ScaleToDD4hepFromG4 = dd4hep::mm;
37 
38  HcalGeomParameters() = default;
39 
40  double getConstDzHF() const { return dzVcal_; }
41  void getConstRHO(std::vector<double>&) const;
42  std::vector<int> getModHalfHBHE(const int type) const;
43  void loadGeometry(const DDFilteredView& _fv, HcalParameters& php);
44  void loadGeometry(const cms::DDCompactView& cpv, HcalParameters& php);
45 
46 private:
47  unsigned find(int element, std::vector<int>& array) const;
48  double getEta(double r, double z) const;
49  void clear(HcalParameters& php);
50  void loadfinal(HcalParameters& php);
51 
52  int nzHB_, nmodHB_; // Number of halves and modules in HB
53  int nzHE_, nmodHE_; // Number of halves and modules in HE
54  double etaHO_[4], rminHO_; // eta in HO ring boundaries
55  double zVcal_; // Z-position of the front of HF
56  double dzVcal_; // Half length of the HF
57  double dlShort_; // Diference of length between long and short
58  static const int maxLayer_ = 20;
59  static const int kHELayer1_ = 21, kHELayer2_ = 71;
60  std::vector<double> rb_, ze_, thkb_, thke_;
61  std::vector<int> ib_, ie_, izb_, phib_, ize_, phie_;
62  std::vector<double> rxb_, rminHE_, rmaxHE_;
63 };
64 
65 #endif
static constexpr double k_ScaleToDDDFromG4
void loadGeometry(const DDFilteredView &_fv, HcalParameters &php)
std::vector< int > izb_
std::vector< double > thke_
static const int maxLayer_
std::vector< int > getModHalfHBHE(const int type) const
static constexpr double k_ScaleFromDDD
static const int kHELayer1_
static constexpr double k_ScaleToDD4hepFromG4
std::vector< int > phie_
std::vector< double > rxb_
void getConstRHO(std::vector< double > &) const
static constexpr double k_ScaleFromDDDToG4
static const int kHELayer2_
std::vector< int > phib_
double getConstDzHF() const
std::vector< double > rminHE_
static constexpr double k_ScaleToDDD
unsigned find(int element, std::vector< int > &array) const
void loadfinal(HcalParameters &php)
std::vector< double > rb_
static constexpr double k_ScaleFromDD4hep
static constexpr double k_ScaleToDD4hep
HcalGeomParameters()=default
std::vector< int > ize_
std::vector< double > ze_
std::vector< double > thkb_
std::vector< double > rmaxHE_
double getEta(double r, double z) const
std::vector< int > ie_
std::vector< int > ib_
static constexpr double k_ScaleFromDD4hepToG4
void clear(HcalParameters &php)