Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MbdGeomV1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MbdGeomV1.h
1 #ifndef __MBD_GEOM_V1_H__
2 #define __MBD_GEOM_V1_H__
3 
4 #include "MbdGeom.h"
5 
6 class MbdGeomV1 : public MbdGeom
7 {
8  public:
9  MbdGeomV1();
10  ~MbdGeomV1() override = default;
11 
12  float get_x(const unsigned int pmtch) const override { return pmt_x[pmtch]; }
13  float get_y(const unsigned int pmtch) const override { return pmt_y[pmtch]; }
14  float get_z(const unsigned int pmtch) const override { return pmt_z[pmtch]; }
15  float get_r(const unsigned int pmtch) const override { return pmt_r[pmtch]; }
16  float get_phi(const unsigned int pmtch) const override { return pmt_phi[pmtch]; }
17  int get_arm(const unsigned int pmtch) const override { return pmtch / 64; }
18  int get_feech(const unsigned int pmtch) const override { return (pmtch / 8) * 16 + pmtch % 8 + 8; }
19  void set_xyz(const unsigned int ipmt, const float x, const float y, const float z) override;
20 
21  int get_arm_feech(const unsigned int feech) const override { return get_pmt(feech) / 64; }
22  int get_pmt(const unsigned int feech) const override { return (feech / 16) * 8 + feech % 8; }
23  int get_type(const unsigned int feech) const override { return (feech / 8) % 2; } // 0=T-channel, 1=Q-channel
24 
25  virtual void Reset() override {}
26 
27  private:
28  float pmt_x[128]{};
29  float pmt_y[128]{};
30  float pmt_z[128]{};
31  float pmt_r[128]{};
32  float pmt_phi[128]{};
33 
35 };
36 
37 #endif // __MBD_GEOM_V1_H__