Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BbcPmtInfoV1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file BbcPmtInfoV1.h
1 #ifndef __BBCPMTINFOV1_H__
2 #define __BBCPMTINFOV1_H__
3 
4 #include <calobase/TowerInfo.h>
5 
6 #include <phool/PHObject.h>
7 
8 #include <cmath>
9 
10 class BbcPmtInfoV1 : public TowerInfo
11 {
12  public:
14  // BbcPmtInfoV1(TowerInfo& tower);
15  ~BbcPmtInfoV1() override = default;
16  void Reset() override;
17 
19  void Clear(Option_t* = "") override;
20 
22  void identify(std::ostream& os = std::cout) const override;
23 
25  virtual int isValid() const override
26  {
27  if (bq == NAN) return 0;
28  return 1;
29  }
30 
31  // short get_time() override { return get_t(); } // deprecated for MBD since MBD returns time in ns
32  Float_t get_energy() override { return get_q(); }
33 
34  // void set_time(short t) override; // too simple to be used for MBD
35  void set_energy(float energy) override { set_q(energy); }
36 
37  Short_t get_pmt() { return bpmt; }
38  Float_t get_q() { return bq; }
39  Float_t get_t() { return btq; }
40  Float_t get_tt() { return btt; }
41  Float_t get_tq() { return btq; }
42 
43  void set_pmt(const Short_t pmt) { bpmt = pmt; }
44  void set_q(const Float_t q) { bq = q; }
45  void set_tt(const Float_t t) { btt = t; }
46  void set_tq(const Float_t t) { btq = t; }
47  void set_pmt(const Short_t pmt, const Float_t q, const Float_t tt, const Float_t tq)
48  {
49  bpmt = pmt;
50  bq = q;
51  btt = tt;
52  btq = tq;
53  }
54 
55  private:
56  Short_t bpmt{-1};
57  Float_t bq{NAN};
58  Float_t btt{NAN};
59  Float_t btq{NAN};
60 
62 };
63 
64 #endif // __BBCPMTINFOV1_H__