Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:43

0001 #ifndef MBD_GEOM_H
0002 #define MBD_GEOM_H
0003 
0004 #include <phool/PHObject.h>
0005 
0006 #include <vector>
0007 #include <utility>
0008 #include <tuple>
0009 #include <iostream>
0010 #include <limits>
0011 
0012 class MbdGeom : public PHObject
0013 {
0014   public:
0015     MbdGeom() = default;
0016     ~MbdGeom() override = default;
0017 
0018     virtual float get_x(const unsigned int /*pmtch*/) const {return std::numeric_limits<float>::quiet_NaN();};
0019     virtual float get_y(const unsigned int /*pmtch*/) const {return std::numeric_limits<float>::quiet_NaN();};
0020     virtual float get_z(const unsigned int /*pmtch*/) const {return std::numeric_limits<float>::quiet_NaN();};
0021     virtual float get_r(const unsigned int /*pmtch*/) const {return std::numeric_limits<float>::quiet_NaN();};
0022     virtual float get_phi(const unsigned int /*pmtch*/) const {return std::numeric_limits<float>::quiet_NaN();};
0023     virtual int   get_arm(const unsigned int pmtch) const { return pmtch / 64; }
0024     virtual int   get_feech(const unsigned int pmtch, const unsigned int type = 1) const {
0025       return (pmtch / 8) * 16 + pmtch % 8 + 8*type;
0026     }
0027     virtual void  set_xyz(const unsigned int /*pmtch*/, const float /*x*/, const float /*y*/, const float /*z*/) {}
0028 
0029     // methods when accessing raw fee channels
0030     virtual int get_arm_feech(const unsigned int feech) const { return get_pmt(feech) / 64; }
0031     virtual int get_pmt(const unsigned int feech) const { return (feech / 16) * 8 + feech % 8; }
0032     virtual int get_type(const unsigned int feech) const { return (feech / 8) % 2; }  // 0=T-channel, 1=Q-channel
0033 
0034     virtual void download_hv() {}
0035 
0036     virtual void Reset() override {}
0037 
0038   private:
0039     ClassDefOverride(MbdGeom, 1);
0040 };
0041 
0042 
0043 #endif // __MBD_GEOM_H__