All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OpHit.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////
2 //
3 // \brief Definition of OpHit object for LArSoft
4 //
5 // \author bjpjones@mit.edu
6 // cschiu@mit.edu
7 //
8 ////////////////////////////////////////////////////////////////////////////
9 #ifndef OPHIT_H
10 #define OPHIT_H
11 
12 #include <limits>
13 
14 namespace recob {
15 
16  /// hits are 2D representations of charge deposited in the tdc/wire plane
17  /// hits are assumed to be made from deconvoluted, unipolar signals
18  class OpHit {
19  public:
20 
21  static constexpr double DefaultTime = std::numeric_limits<double>::max();
22 
23  OpHit(); // Default constructor
24 
25 private:
26 
28  unsigned short fFrame;
29  double fPeakTime;
30  double fPeakTimeAbs;
31  double fStartTime;
32  double fRiseTime;
33  double fWidth;
34  double fArea;
35  double fAmplitude;
36  double fPE;
37  double fFastToTotal;
38 
39 
40  public:
41 
42  OpHit(int opchannel,
43  double peaktime,
44  double peaktimeabs,
45  double starttime,
46  double risetime,
47  unsigned short frame,
48  double width,
49  double area,
50  double peakheight,
51  double pe,
52  double fasttototal);
53 
54  OpHit(int opchannel,
55  double peaktime,
56  double peaktimeabs,
57  unsigned short frame,
58  double width,
59  double area,
60  double peakheight,
61  double pe,
62  double fasttototal);
63 
64  // Get Methods
65  int OpChannel() const;
66  double PeakTimeAbs() const;
67  double PeakTime() const;
68  double StartTime() const;
69  double RiseTime() const;
70  unsigned short Frame() const;
71  double Width() const;
72  double Area() const;
73  double Amplitude() const;
74  double PE() const;
75  double FastToTotal() const;
76  friend bool operator < (const OpHit & a, const OpHit & b);
77 
78  //Returns true if the StartTime has been initialized
79  bool HasStartTime() const;
80 
81 
82  };
83 }
84 
85 
86 inline int recob::OpHit::OpChannel() const { return fOpChannel; }
87 inline unsigned short recob::OpHit::Frame() const { return fFrame; }
88 inline double recob::OpHit::PeakTime() const { return fPeakTime; }
89 inline double recob::OpHit::PeakTimeAbs() const { return fPeakTimeAbs; }
90 inline double recob::OpHit::StartTime() const { return fStartTime; }
91 inline double recob::OpHit::RiseTime() const { return fRiseTime; }
92 inline double recob::OpHit::Width() const { return fWidth; }
93 inline double recob::OpHit::Area() const { return fArea; }
94 inline double recob::OpHit::Amplitude() const { return fAmplitude; }
95 inline double recob::OpHit::PE() const { return fPE; }
96 inline double recob::OpHit::FastToTotal() const { return fFastToTotal; }
97 inline bool recob::OpHit::HasStartTime() const { return fStartTime != DefaultTime; }
98 
99 
100 #endif
double FastToTotal() const
Definition: OpHit.h:96
double fAmplitude
Definition: OpHit.h:35
double fFastToTotal
Definition: OpHit.h:37
double PeakTime() const
Definition: OpHit.h:88
process_name gaushit a
double StartTime() const
Definition: OpHit.h:90
bool HasStartTime() const
Definition: OpHit.h:97
double fWidth
Definition: OpHit.h:33
unsigned short fFrame
Definition: OpHit.h:28
double fPeakTimeAbs
Definition: OpHit.h:30
double Width() const
Definition: OpHit.h:92
unsigned short Frame() const
Definition: OpHit.h:87
double Amplitude() const
Definition: OpHit.h:94
double fStartTime
Definition: OpHit.h:31
static constexpr double DefaultTime
Definition: OpHit.h:21
double PE() const
Definition: OpHit.h:95
int fOpChannel
Definition: OpHit.h:27
double fRiseTime
Definition: OpHit.h:32
friend bool operator<(const OpHit &a, const OpHit &b)
Definition: OpHit.cxx:76
double fPeakTime
Definition: OpHit.h:29
double PeakTimeAbs() const
Definition: OpHit.h:89
double Area() const
Definition: OpHit.h:93
double fPE
Definition: OpHit.h:36
int OpChannel() const
Definition: OpHit.h:86
double fArea
Definition: OpHit.h:34
double RiseTime() const
Definition: OpHit.h:91