Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:49

0001 #ifndef __BBC_GEOM_V1_H__
0002 #define __BBC_GEOM_V1_H__
0003 
0004 #include "BbcGeom.h"
0005 
0006 class BbcGeomV1 : public BbcGeom
0007 {
0008  public:
0009   BbcGeomV1();
0010   ~BbcGeomV1() override = default;
0011 
0012   float get_x(const unsigned int pmtch) const override { return pmt_x[pmtch]; }
0013   float get_y(const unsigned int pmtch) const override { return pmt_y[pmtch]; }
0014   float get_z(const unsigned int pmtch) const override { return pmt_z[pmtch]; }
0015   float get_r(const unsigned int pmtch) const override { return pmt_r[pmtch]; }
0016   float get_phi(const unsigned int pmtch) const override { return pmt_phi[pmtch]; }
0017   int get_arm(const unsigned int pmtch) const override { return pmtch / 64; }
0018   void set_xyz(const unsigned int ipmt, const float x, const float y, const float z) override;
0019 
0020   int get_arm_feech(const unsigned int feech) const override { return get_pmt(feech) / 64; }
0021   int get_pmt(const unsigned int feech) const override { return (feech / 16) * 8 + feech % 8; }
0022   int get_type(const unsigned int feech) const override { return (feech / 8) % 2; }  // 0=T-channel, 1=Q-channel
0023 
0024  private:
0025   float pmt_x[128]{};
0026   float pmt_y[128]{};
0027   float pmt_z[128]{};
0028   float pmt_r[128]{};
0029   float pmt_phi[128]{};
0030 
0031   ClassDefOverride(BbcGeomV1, 1)
0032 };
0033 
0034 #endif  // __BBC_GEOM_V1_H__