File indexing completed on 2025-08-05 08:16:22
0001 #ifndef TOWERINFO_H
0002 #define TOWERINFO_H
0003
0004 #include <phool/PHObject.h>
0005
0006 #include <g4main/PHG4HitDefs.h>
0007
0008 #include <limits>
0009 #include <map>
0010
0011 class TowerInfo : public PHObject
0012 {
0013 public:
0014 typedef std::map<PHG4HitDefs::keytype, float> EdepMap;
0015 typedef std::map<int, float> ShowerEdepMap;
0016 TowerInfo() = default;
0017 ~TowerInfo() override = default;
0018 void Reset() override { return; }
0019
0020 virtual void set_time(short ) { return; }
0021 virtual short get_time() { return -1; }
0022 virtual void set_energy(float ) { return; }
0023 virtual float get_energy() { return std::numeric_limits<float>::signaling_NaN(); }
0024 virtual void copy_tower(TowerInfo* ) { return; }
0025
0026 virtual void set_time_float(float ) { return; }
0027 virtual float get_time_float() { return std::numeric_limits<float>::signaling_NaN(); }
0028 virtual void set_chi2(float ) { return; }
0029 virtual float get_chi2() { return std::numeric_limits<float>::signaling_NaN(); }
0030 virtual void set_pedestal(float ) { return; }
0031 virtual float get_pedestal() { return std::numeric_limits<float>::signaling_NaN(); }
0032 virtual void set_isHot(bool ) { return; }
0033 virtual bool get_isHot() const { return false; }
0034 virtual void set_isBadTime(bool ) { return; }
0035 virtual bool get_isBadTime() const { return false; }
0036 virtual void set_isBadChi2(bool ) { return; }
0037 virtual bool get_isBadChi2() const { return false; }
0038 virtual void set_isNotInstr(bool ) { return; }
0039 virtual bool get_isNotInstr() const { return false; }
0040 virtual void set_isNoCalib(bool ) { return; }
0041 virtual bool get_isNoCalib() const { return false; }
0042 virtual void set_isZS(bool ) { return; }
0043 virtual bool get_isZS() const { return false; }
0044 virtual void set_isRecovered(bool ) { return; }
0045 virtual bool get_isRecovered() const { return false; }
0046 virtual void set_isSaturated(bool ) { return; }
0047 virtual bool get_isSaturated() const { return false; }
0048 virtual bool get_isGood() const { return true; }
0049 virtual uint8_t get_status() const { return 0; }
0050 virtual void set_status(uint8_t ) { return; }
0051
0052 virtual int get_nsample() const { return 0; }
0053 virtual int16_t get_waveform_value(int ) const { return -1; }
0054 virtual void set_waveform_value(int , int16_t ) { return; }
0055
0056 virtual EdepMap& get_hitEdepMap() { static EdepMap dummy; return dummy; }
0057 virtual ShowerEdepMap& get_showerEdepMap() { static ShowerEdepMap dummy; return dummy; }
0058 virtual const EdepMap& get_hitEdepMap() const { static EdepMap dummy; return dummy; }
0059 virtual const ShowerEdepMap& get_showerEdepMap() const { static ShowerEdepMap dummy; return dummy; }
0060 virtual void add_edep(const PHG4HitDefs::keytype , const float ) { return; }
0061 virtual void add_shower_edep(const int , const float ) { return; }
0062
0063 private:
0064 ClassDefOverride(TowerInfo, 1);
0065 };
0066
0067 #endif