Hit.h
Go to the documentation of this file.
1 //
2 // Hit.h
3 //
4 // Created by Brian Rebel on 10/6/16.
5 //
6 
7 #ifndef GAR_RECONSTRUCTIONDATAPRODUCTS_Hit_h
8 #define GAR_RECONSTRUCTIONDATAPRODUCTS_Hit_h
9 
10 #include <iostream>
11 
12 namespace gar {
13  namespace rec {
14 
15  class Hit {
16 
17  public:
18  Hit();
19 
20  // let the compiler provide the dtor
21 
22  private:
23 
24  unsigned int fChannel; ///< channel recording this hit
25  float fSignal; ///< size of the signal for this hit (integral of ADC values)
26  float fPosition[3]; ///< position of the hit
27  float fTime; ///< time of hit charge arrival at the readout plane (ticks)
28  float fStartTime; ///< start time of the hit (ticks)
29  float fEndTime; ///< end time of the hit (ticks)
30  float fRMS; ///< Hit width calculated with RMS (in ticks)
31 
32 #ifndef __GCCXML__
33 
34  public:
35 
36  Hit(unsigned int chan,
37  float sig,
38  float *pos,
39  float startT,
40  float endT,
41  float Time,
42  float RMS);
43 
44  const float* Position() const;
45  float const& Signal() const;
46  unsigned int Channel() const;
47  float StartTime() const;
48  float EndTime() const;
49  float Time() const;
50  float RMS() const;
51 
52  void operator += (gar::rec::Hit const& h);
53 
54  bool operator < (gar::rec::Hit const& h) const;
55 
56  bool operator == (gar::rec::Hit const& h) const;
57 
58  friend std::ostream& operator << (std::ostream & o, gar::rec::Hit const& h);
59 
60 #endif
61 
62  };
63 
64  inline unsigned int Hit::Channel() const { return fChannel; }
65  inline const float* Hit::Position() const { return &fPosition[0]; }
66  inline float const& Hit::Signal() const { return fSignal; }
67  inline float Hit::StartTime() const { return fStartTime; }
68  inline float Hit::EndTime() const { return fEndTime; }
69  inline float Hit::RMS() const { return fRMS; }
70  inline float Hit::Time() const { return fTime; }
71  } // rec
72 } // gar
73 
74 
75 #endif /* GAR_RECONSTRUCTIONDATAPRODUCTS_Hit_h */
float fPosition[3]
position of the hit
Definition: Hit.h:26
rec
Definition: tracks.py:88
float StartTime() const
Definition: Hit.h:67
friend std::ostream & operator<<(std::ostream &o, gar::rec::Hit const &h)
Definition: Hit.cxx:128
const float * Position() const
Definition: Hit.h:65
bool operator==(gar::rec::Hit const &h) const
Definition: Hit.cxx:106
float EndTime() const
Definition: Hit.h:68
bool operator<(gar::rec::Hit const &h) const
Definition: Hit.cxx:91
float fStartTime
start time of the hit (ticks)
Definition: Hit.h:28
void operator+=(gar::rec::Hit const &h)
Definition: Hit.cxx:47
float fRMS
Hit width calculated with RMS (in ticks)
Definition: Hit.h:30
General GArSoft Utilities.
unsigned int Channel() const
Definition: Hit.h:64
float Time() const
Definition: Hit.h:70
float fSignal
size of the signal for this hit (integral of ADC values)
Definition: Hit.h:25
unsigned int fChannel
channel recording this hit
Definition: Hit.h:24
float const & Signal() const
Definition: Hit.h:66
float fEndTime
end time of the hit (ticks)
Definition: Hit.h:29
float fTime
time of hit charge arrival at the readout plane (ticks)
Definition: Hit.h:27
float RMS() const
Definition: Hit.h:69