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
HcalGeomParameters::k_ScaleToDD4Hep
static constexpr double k_ScaleToDD4Hep
Definition: HcalGeomParameters.h:34
HcalGeomParameters::getEta
double getEta(double r, double z) const
Definition: HcalGeomParameters.cc:451
HcalGeomParameters::phie_
std::vector< int > phie_
Definition: HcalGeomParameters.h:61
HcalGeomParameters::zVcal_
double zVcal_
Definition: HcalGeomParameters.h:55
HcalGeomParameters::thkb_
std::vector< double > thkb_
Definition: HcalGeomParameters.h:60
HcalGeomParameters::phib_
std::vector< int > phib_
Definition: HcalGeomParameters.h:61
HcalGeomParameters::ib_
std::vector< int > ib_
Definition: HcalGeomParameters.h:61
HcalGeomParameters::nzHE_
int nzHE_
Definition: HcalGeomParameters.h:53
HcalGeomParameters::nzHB_
int nzHB_
Definition: HcalGeomParameters.h:52
mps_check.array
array
Definition: mps_check.py:216
HcalGeomParameters::k_ScaleToDDD
static constexpr double k_ScaleToDDD
Definition: HcalGeomParameters.h:30
HcalGeomParameters::kHELayer2_
static const int kHELayer2_
Definition: HcalGeomParameters.h:59
HcalGeomParameters::k_ScaleToDD4HepFromG4
static constexpr double k_ScaleToDD4HepFromG4
Definition: HcalGeomParameters.h:36
HcalGeomParameters::rminHE_
std::vector< double > rminHE_
Definition: HcalGeomParameters.h:62
HcalGeomParameters::thke_
std::vector< double > thke_
Definition: HcalGeomParameters.h:60
HcalGeomParameters::k_ScaleFromDD4Hep
static constexpr double k_ScaleFromDD4Hep
Definition: HcalGeomParameters.h:33
HcalGeomParameters::getConstDzHF
double getConstDzHF() const
Definition: HcalGeomParameters.h:40
DDFilteredView.h
HcalGeomParameters::dlShort_
double dlShort_
Definition: HcalGeomParameters.h:57
HcalGeomParameters::rminHO_
double rminHO_
Definition: HcalGeomParameters.h:54
HcalGeomParameters::find
unsigned find(int element, std::vector< int > &array) const
Definition: HcalGeomParameters.cc:440
HcalGeomParameters::rb_
std::vector< double > rb_
Definition: HcalGeomParameters.h:60
DDAxes::z
HcalGeomParameters::getModHalfHBHE
std::vector< int > getModHalfHBHE(const int type) const
Definition: HcalGeomParameters.cc:26
DDFilteredView.h
HcalGeomParameters::maxLayer_
static const int maxLayer_
Definition: HcalGeomParameters.h:58
DDCompactView.h
HcalGeomParameters::kHELayer1_
static const int kHELayer1_
Definition: HcalGeomParameters.h:59
HcalGeomParameters::nmodHE_
int nmodHE_
Definition: HcalGeomParameters.h:53
HcalGeomParameters::rxb_
std::vector< double > rxb_
Definition: HcalGeomParameters.h:62
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
HcalGeomParameters::getConstRHO
void getConstRHO(std::vector< double > &) const
Definition: HcalGeomParameters.cc:20
HcalGeomParameters::nmodHB_
int nmodHB_
Definition: HcalGeomParameters.h:52
HcalGeomParameters::k_ScaleFromDDDToG4
static constexpr double k_ScaleFromDDDToG4
Definition: HcalGeomParameters.h:31
HcalGeomParameters::k_ScaleFromDD4HepToG4
static constexpr double k_ScaleFromDD4HepToG4
Definition: HcalGeomParameters.h:35
HcalGeomParameters::loadfinal
void loadfinal(HcalParameters &php)
Definition: HcalGeomParameters.cc:493
HcalGeomParameters::ze_
std::vector< double > ze_
Definition: HcalGeomParameters.h:60
HcalSubdetector.h
HcalCellType.h
HcalGeomParameters::ie_
std::vector< int > ie_
Definition: HcalGeomParameters.h:61
HcalGeomParameters::clear
void clear(HcalParameters &php)
Definition: HcalGeomParameters.cc:461
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HcalGeomParameters::loadGeometry
void loadGeometry(const DDFilteredView &_fv, HcalParameters &php)
Definition: HcalGeomParameters.cc:38
HcalParameters
Definition: HcalParameters.h:6
cms::DDCompactView
Definition: DDCompactView.h:31
DDFilteredView
Definition: DDFilteredView.h:20
HcalGeomParameters::HcalGeomParameters
HcalGeomParameters()=default
HcalGeomParameters::ize_
std::vector< int > ize_
Definition: HcalGeomParameters.h:61
HcalGeomParameters
Definition: HcalGeomParameters.h:27
HcalGeomParameters::etaHO_
double etaHO_[4]
Definition: HcalGeomParameters.h:54
HcalGeomParameters::k_ScaleToDDDFromG4
static constexpr double k_ScaleToDDDFromG4
Definition: HcalGeomParameters.h:32
HcalGeomParameters::izb_
std::vector< int > izb_
Definition: HcalGeomParameters.h:61
HcalGeomParameters::dzVcal_
double dzVcal_
Definition: HcalGeomParameters.h:56
HcalGeomParameters::rmaxHE_
std::vector< double > rmaxHE_
Definition: HcalGeomParameters.h:62
HcalGeomParameters::k_ScaleFromDDD
static constexpr double k_ScaleFromDDD
Definition: HcalGeomParameters.h:29