CMS 3D CMS Logo

HGCalCassette.h
Go to the documentation of this file.
1 #ifndef Geometry_HGCalCommonData_HGCalCassette_h
2 #define Geometry_HGCalCommonData_HGCalCassette_h
3 
4 #include <cmath>
5 #include <cstdint>
6 #include <vector>
7 
8 class HGCalCassette {
9 public:
10  HGCalCassette(int cassette, const std::vector<double>& shifts) { setParameter(cassette, shifts, true); }
12 
13  void setParameter(int cassette, const std::vector<double>& shifts, bool both = true);
14  void setParameterScint(const std::vector<double>& shifts);
15  std::pair<double, double> getShift(int layer, int zside, int cassette, bool scnt = false) const;
16  static int cassetteIndex(int det, int layer, int zside, int cassette);
17  static int cassetteType(int det, int zside, int cassette);
18 
19 private:
20  static constexpr int positEE_[6] = {2, 1, 0, 5, 4, 3};
21  static constexpr int positHE_[12] = {5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6};
22  int cassette_;
23  bool typeHE_;
24  std::vector<double> shifts_, shiftsScnt_;
25  static constexpr int32_t factor_ = 100;
26 };
27 
28 #endif
static int cassetteIndex(int det, int layer, int zside, int cassette)
static constexpr int32_t factor_
Definition: HGCalCassette.h:25
std::pair< double, double > getShift(int layer, int zside, int cassette, bool scnt=false) const
static constexpr int positHE_[12]
Definition: HGCalCassette.h:21
int zside(DetId const &)
void setParameterScint(const std::vector< double > &shifts)
static constexpr int positEE_[6]
Definition: HGCalCassette.h:20
std::vector< double > shifts_
Definition: HGCalCassette.h:24
void setParameter(int cassette, const std::vector< double > &shifts, bool both=true)
Definition: HGCalCassette.cc:8
HGCalCassette(int cassette, const std::vector< double > &shifts)
Definition: HGCalCassette.h:10
std::vector< double > shiftsScnt_
Definition: HGCalCassette.h:24
static int cassetteType(int det, int zside, int cassette)