Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-09 02:00:24

0001 #ifndef Geometry_HGCalCommonData_HGCalCassette_h
0002 #define Geometry_HGCalCommonData_HGCalCassette_h
0003 
0004 #include <cmath>
0005 #include <cstdint>
0006 #include <vector>
0007 
0008 class HGCalCassette {
0009 public:
0010   HGCalCassette(int cassette, const std::vector<double>& shifts) { setParameter(cassette, shifts, true); }
0011   HGCalCassette() {}
0012 
0013   void setParameter(int cassette, const std::vector<double>& shifts, bool both = true);
0014   void setParameterScint(const std::vector<double>& shifts);
0015   void setParameterRetract(const std::vector<double>& shifts);
0016   std::pair<double, double> getShift(int layer, int zside, int cassette, bool scnt = false) const;
0017   std::pair<double, double> getShiftScnt(int layer, int zside, double phi) const;
0018   static int cassetteIndex(int det, int layer, int zside, int cassette);
0019   static int cassetteType(int det, int zside, int cassette);
0020 
0021 private:
0022   static constexpr int positEE_[6] = {2, 1, 0, 5, 4, 3};
0023   static constexpr int positHE_[12] = {5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6};
0024   int cassette_;
0025   bool typeHE_;
0026   std::vector<double> shifts_, shiftsScnt_, retractScnt_;
0027   static constexpr int32_t factor_ = 100;
0028 };
0029 
0030 #endif