Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MbdPmtHitV1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MbdPmtHitV1.h
1 #ifndef __MBD_MBDPMTHITV1_H__
2 #define __MBD_MBDPMTHITV1_H__
3 
4 #include "MbdPmtHit.h"
5 
6 #include <cmath>
7 #include <iostream>
8 #include <limits>
9 
10 class MbdPmtHitV1 : public MbdPmtHit
11 {
12  public:
14  ~MbdPmtHitV1() override = default;
15 
17  void Reset() override;
18 
20  void Clear(Option_t* = "") override;
21 
23  Short_t get_pmt() const override { return bpmt; }
24 
26  Float_t get_q() const override { return bq; }
27 
29  Float_t get_tt() const override { return btt; }
30  Float_t get_time() const override { return btt; }
31 
33  Float_t get_tq() const override { return btq; }
34 
35  void set_pmt(const Short_t pmt, const Float_t q, const Float_t tt, const Float_t tq) override
36  {
37  bpmt = pmt;
38  bq = q;
39  btt = tt;
40  btq = tq;
41  }
42 
44  void identify(std::ostream& os = std::cout) const override;
45 
47  virtual int isValid() const override
48  {
49  if (std::isnan(get_time())) return 0;
50  return 1;
51  }
52 
53  private:
54  Short_t bpmt{-1};
55  Float_t bq{std::numeric_limits<float>::quiet_NaN()};
56  Float_t btt{std::numeric_limits<float>::quiet_NaN()};
57  Float_t btq{std::numeric_limits<float>::quiet_NaN()};
58 
59  ClassDefOverride(MbdPmtHitV1, 1)
60 };
61 
62 #endif