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); }
12 
13  void setParameter(int cassette, const std::vector<double>& shifts);
14  std::pair<double, double> getShift(int layer, int zside, int cassette) const;
15  static int cassetteIndex(int det, int layer, int zside, int cassette);
16  static int cassetteType(int det, int zside, int cassette);
17 
18 private:
19  static constexpr int positEE_[6] = {2, 1, 0, 5, 4, 3};
20  static constexpr int positHE_[12] = {5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6};
21  int cassette_;
22  bool typeHE_;
23  std::vector<double> shifts_;
24  static constexpr int32_t factor_ = 100;
25 };
26 
27 #endif
static int cassetteIndex(int det, int layer, int zside, int cassette)
static constexpr int32_t factor_
Definition: HGCalCassette.h:24
std::pair< double, double > getShift(int layer, int zside, int cassette) const
static constexpr int positHE_[12]
Definition: HGCalCassette.h:20
int zside(DetId const &)
static constexpr int positEE_[6]
Definition: HGCalCassette.h:19
std::vector< double > shifts_
Definition: HGCalCassette.h:23
HGCalCassette(int cassette, const std::vector< double > &shifts)
Definition: HGCalCassette.h:10
static int cassetteType(int det, int zside, int cassette)
void setParameter(int cassette, const std::vector< double > &shifts)
Definition: HGCalCassette.cc:8