LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
OpHit.h
Go to the documentation of this file.
1 //
3 // \brief Definition of OpHit object for LArSoft
4 //
5 // \author bjpjones@mit.edu
6 // cschiu@mit.edu
7 //
9 #ifndef OPHIT_H
10 #define OPHIT_H
11 
12 #include <iosfwd> // std::ostream
13 #include <limits>
14 
15 namespace recob {
16 
19  class OpHit {
20  public:
21  static constexpr double DefaultTime = std::numeric_limits<double>::max();
22 
23  OpHit(); // Default constructor
24 
25  private:
27  unsigned short fFrame;
28  double fPeakTime;
29  double fPeakTimeAbs;
30  double fStartTime;
31  double fRiseTime;
32  double fWidth;
33  double fArea;
34  double fAmplitude;
35  double fPE;
36  double fFastToTotal;
37 
38  public:
39  OpHit(int opchannel,
40  double peaktime,
41  double peaktimeabs,
42  double starttime,
43  double risetime,
44  unsigned short frame,
45  double width,
46  double area,
47  double peakheight,
48  double pe,
49  double fasttototal);
50 
51  OpHit(int opchannel,
52  double peaktime,
53  double peaktimeabs,
54  unsigned short frame,
55  double width,
56  double area,
57  double peakheight,
58  double pe,
59  double fasttototal);
60 
61  // Get Methods
62  int OpChannel() const;
63  double PeakTimeAbs() const;
64  double PeakTime() const;
65  double StartTime() const;
66  double RiseTime() const;
67  unsigned short Frame() const;
68  double Width() const;
69  double Area() const;
70  double Amplitude() const;
71  double PE() const;
72  double FastToTotal() const;
73  friend bool operator<(const OpHit& a, const OpHit& b);
74 
75  //Returns true if the StartTime has been initialized
76  bool HasStartTime() const;
77  };
78 
82  std::ostream& operator<<(std::ostream& out, OpHit const& hit);
83 
84 }
85 
86 inline int recob::OpHit::OpChannel() const
87 {
88  return fOpChannel;
89 }
90 inline unsigned short recob::OpHit::Frame() const
91 {
92  return fFrame;
93 }
94 inline double recob::OpHit::PeakTime() const
95 {
96  return fPeakTime;
97 }
98 inline double recob::OpHit::PeakTimeAbs() const
99 {
100  return fPeakTimeAbs;
101 }
102 inline double recob::OpHit::StartTime() const
103 {
104  return fStartTime;
105 }
106 inline double recob::OpHit::RiseTime() const
107 {
108  return fRiseTime;
109 }
110 inline double recob::OpHit::Width() const
111 {
112  return fWidth;
113 }
114 inline double recob::OpHit::Area() const
115 {
116  return fArea;
117 }
118 inline double recob::OpHit::Amplitude() const
119 {
120  return fAmplitude;
121 }
122 inline double recob::OpHit::PE() const
123 {
124  return fPE;
125 }
126 inline double recob::OpHit::FastToTotal() const
127 {
128  return fFastToTotal;
129 }
130 inline bool recob::OpHit::HasStartTime() const
131 {
132  return fStartTime != DefaultTime;
133 }
134 
135 #endif
double FastToTotal() const
Definition: OpHit.h:126
Reconstruction base classes.
double fAmplitude
Definition: OpHit.h:34
double fFastToTotal
Definition: OpHit.h:36
double PeakTime() const
Definition: OpHit.h:94
double StartTime() const
Definition: OpHit.h:102
bool HasStartTime() const
Definition: OpHit.h:130
double fWidth
Definition: OpHit.h:32
unsigned short fFrame
Definition: OpHit.h:27
double fPeakTimeAbs
Definition: OpHit.h:29
double Width() const
Definition: OpHit.h:110
unsigned short Frame() const
Definition: OpHit.h:90
double Amplitude() const
Definition: OpHit.h:118
double fStartTime
Definition: OpHit.h:30
static constexpr double DefaultTime
Definition: OpHit.h:21
double PE() const
Definition: OpHit.h:122
Detector simulation of raw signals on wires.
int fOpChannel
Definition: OpHit.h:26
double fRiseTime
Definition: OpHit.h:31
friend bool operator<(const OpHit &a, const OpHit &b)
Definition: OpHit.cxx:80
double fPeakTime
Definition: OpHit.h:28
double PeakTimeAbs() const
Definition: OpHit.h:98
double Area() const
Definition: OpHit.h:114
double fPE
Definition: OpHit.h:35
int OpChannel() const
Definition: OpHit.h:86
double fArea
Definition: OpHit.h:33
std::ostream & operator<<(std::ostream &o, Cluster const &c)
Definition: Cluster.cxx:168
double RiseTime() const
Definition: OpHit.h:106