File indexing completed on 2024-04-06 12:14:45
0001 #ifndef HcalCommonData_HcalGeomParameters_h
0002 #define HcalCommonData_HcalGeomParameters_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <string>
0015 #include <vector>
0016 #include <iostream>
0017
0018 #include "DetectorDescription/Core/interface/DDFilteredView.h"
0019 #include "DetectorDescription/DDCMS/interface/DDFilteredView.h"
0020 #include "DetectorDescription/DDCMS/interface/DDCompactView.h"
0021 #include "Geometry/HcalCommonData/interface/HcalCellType.h"
0022 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0023 #include "DD4hep/DD4hepUnits.h"
0024
0025 class HcalParameters;
0026
0027 class HcalGeomParameters {
0028 public:
0029 static constexpr double k_ScaleFromDDD = 0.1;
0030 static constexpr double k_ScaleToDDD = 10.0;
0031 static constexpr double k_ScaleFromDDDToG4 = 1.0;
0032 static constexpr double k_ScaleToDDDFromG4 = 1.0;
0033 static constexpr double k_ScaleFromDD4hep = (1.0 / dd4hep::cm);
0034 static constexpr double k_ScaleToDD4hep = dd4hep::cm;
0035 static constexpr double k_ScaleFromDD4hepToG4 = (1.0 / dd4hep::mm);
0036 static constexpr double k_ScaleToDD4hepFromG4 = dd4hep::mm;
0037
0038 HcalGeomParameters() = default;
0039
0040 double getConstDzHF() const { return dzVcal_; }
0041 void getConstRHO(std::vector<double>&) const;
0042 std::vector<int> getModHalfHBHE(const int type) const;
0043 void loadGeometry(const DDFilteredView& _fv, HcalParameters& php);
0044 void loadGeometry(const cms::DDCompactView& cpv, HcalParameters& php);
0045
0046 private:
0047 unsigned find(int element, std::vector<int>& array) const;
0048 double getEta(double r, double z) const;
0049 void clear(HcalParameters& php);
0050 void loadfinal(HcalParameters& php);
0051
0052 int nzHB_, nmodHB_;
0053 int nzHE_, nmodHE_;
0054 double etaHO_[4], rminHO_;
0055 double zVcal_;
0056 double dzVcal_;
0057 double dlShort_;
0058 static const int maxLayer_ = 20;
0059 static const int kHELayer1_ = 21, kHELayer2_ = 71;
0060 std::vector<double> rb_, ze_, thkb_, thke_;
0061 std::vector<int> ib_, ie_, izb_, phib_, ize_, phie_;
0062 std::vector<double> rxb_, rminHE_, rmaxHE_;
0063 };
0064
0065 #endif