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