LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Hit.h
Go to the documentation of this file.
1 
21 #ifndef LARDATAOBJ_RECOBASE_HIT_H
22 #define LARDATAOBJ_RECOBASE_HIT_H
23 
24 
25 // C/C++ standard librraies
26 #include <vector>
27 # include <iosfwd>
28 
29 // LArSoft libraries
30 #include "larcoreobj/SimpleTypesAndConstants/geo_types.h" // geo::View_t, geo::SignalType, geo::WireID
31 #include "larcoreobj/SimpleTypesAndConstants/RawTypes.h" // raw::ChannelID_t
32 
33 
34 namespace recob {
35 
49  class Hit {
50  public:
52  Hit();
53 
54  private:
55 
59  float fPeakTime;
61  float fRMS;
64  float fSummedADC;
65  float fIntegral;
67  short int fMultiplicity;
68  short int fLocalIndex;
70  int fNDF;
74 
75  friend class HitCreator; // helper to create hits
76 
77  public:
102  Hit(
103  raw::ChannelID_t channel,
104  raw::TDCtick_t start_tick,
105  raw::TDCtick_t end_tick,
106  float peak_time,
107  float sigma_peak_time,
108  float rms,
109  float peak_amplitude,
110  float sigma_peak_amplitude,
111  float summedADC,
112  float hit_integral,
113  float hit_sigma_integral,
114  short int multiplicity,
115  short int local_index,
116  float goodness_of_fit,
117  int dof,
118  geo::View_t view,
119  geo::SigType_t signal_type,
120  geo::WireID wireID
121  );
122 
125 
127  raw::TDCtick_t StartTick() const;
128 
130  raw::TDCtick_t EndTick() const;
131 
133  float PeakTime() const;
134 
136  float SigmaPeakTime() const;
137 
139  float RMS() const;
140 
142  float PeakAmplitude() const;
143 
145  float SigmaPeakAmplitude() const;
146 
148  float SummedADC() const;
149 
151  float Integral() const;
152 
154  float SigmaIntegral() const;
155 
157  short int Multiplicity() const;
158 
160  short int LocalIndex() const;
161 
163  float GoodnessOfFit() const;
164 
166  int DegreesOfFreedom() const;
167 
169  raw::ChannelID_t Channel() const;
170 
172  geo::View_t View() const;
173 
175  geo::SigType_t SignalType() const;
176 
178  geo::WireID WireID() const;
179 
181 
183 
195  float PeakTimePlusRMS(float sigmas = +1.) const;
196  float PeakTimeMinusRMS(float sigmas = +1.) const;
198 
207  float TimeDistanceAsRMS(float time) const;
208 
209 
210  friend std::ostream& operator << (std::ostream & o, const Hit & a);
211  friend bool operator < (const Hit & a, const Hit & b);
212 
213  }; // class Hit
214 } // namespace recob
215 
216 
218 inline raw::TDCtick_t recob::Hit::EndTick() const { return fEndTick; }
219 inline float recob::Hit::PeakTime() const { return fPeakTime; }
220 inline float recob::Hit::SigmaPeakTime() const { return fSigmaPeakTime; }
221 inline float recob::Hit::RMS() const { return fRMS; }
222 inline float recob::Hit::PeakAmplitude() const { return fPeakAmplitude; }
223 inline float recob::Hit::SigmaPeakAmplitude() const { return fSigmaPeakAmplitude; }
224 inline float recob::Hit::SummedADC() const { return fSummedADC; }
225 inline float recob::Hit::Integral() const { return fIntegral; }
226 inline float recob::Hit::SigmaIntegral() const { return fSigmaIntegral; }
227 inline short int recob::Hit::Multiplicity() const { return fMultiplicity; }
228 inline short int recob::Hit::LocalIndex() const { return fLocalIndex; }
229 inline float recob::Hit::GoodnessOfFit() const { return fGoodnessOfFit; }
230 inline int recob::Hit::DegreesOfFreedom() const { return fNDF; }
233 inline geo::View_t recob::Hit::View() const { return fView; }
234 inline geo::WireID recob::Hit::WireID() const { return fWireID; }
235 
236 
237 inline float recob::Hit::PeakTimePlusRMS(float sigmas /* = +1. */) const
238  { return PeakTime() + sigmas * RMS(); }
239 
240 inline float recob::Hit::PeakTimeMinusRMS(float sigmas /* = +1. */) const
241  { return PeakTimePlusRMS(-sigmas); }
242 
243 inline float recob::Hit::TimeDistanceAsRMS(float time) const
244  { return (time - PeakTime()) / RMS(); }
245 
246 
247 
248 #endif // LARDATAOBJ_RECOBASE_HIT_H
short int LocalIndex() const
How well do we believe we know this hit?
Definition: Hit.h:228
friend bool operator<(const Hit &a, const Hit &b)
Definition: Hit.cxx:114
geo::SigType_t SignalType() const
Signal type for the plane of the hit.
Definition: Hit.h:232
float fPeakAmplitude
the estimated amplitude of the hit at its peak, in ADC units
Definition: Hit.h:62
raw::TDCtick_t fStartTick
initial tdc tick for hit
Definition: Hit.h:57
Reconstruction base classes.
float fSummedADC
the sum of calibrated ADC counts of the hit
Definition: Hit.h:64
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
geo::WireID WireID() const
Initial tdc tick for hit.
Definition: Hit.h:234
float RMS() const
RMS of the hit shape, in tick units.
Definition: Hit.h:221
float fSigmaPeakAmplitude
uncertainty on estimated amplitude of the hit at its peak, in ADC units
Definition: Hit.h:63
geo::View_t fView
view for the plane of the hit
Definition: Hit.h:71
geo::SigType_t fSignalType
signal type for the plane of the hit
Definition: Hit.h:72
float SigmaPeakAmplitude() const
Uncertainty on estimated amplitude of the hit at its peak, in ADC units.
Definition: Hit.h:223
float SigmaIntegral() const
Initial tdc tick for hit.
Definition: Hit.h:226
int DegreesOfFreedom() const
Initial tdc tick for hit.
Definition: Hit.h:230
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
Definition: Hit.h:225
geo::View_t View() const
View for the plane of the hit.
Definition: Hit.h:233
Hit()
Default constructor: a hit with no signal.
Definition: Hit.cxx:21
float GoodnessOfFit() const
Degrees of freedom in the determination of the hit signal shape (-1 by default)
Definition: Hit.h:229
short int Multiplicity() const
How many hits could this one be shared with.
Definition: Hit.h:227
raw::TDCtick_t fEndTick
final tdc tick for hit
Definition: Hit.h:58
float fSigmaPeakTime
uncertainty for the signal peak, in tick units
Definition: Hit.h:60
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
Definition: Hit.h:222
int TDCtick_t
Type representing a TDC tick.
Definition: RawTypes.h:24
friend std::ostream & operator<<(std::ostream &o, const Hit &a)
short int fMultiplicity
how many hits could this one be shared with
Definition: Hit.h:67
Class managing the creation of a new recob::Hit object.
Definition: HitCreator.h:84
float TimeDistanceAsRMS(float time) const
Returns the distance of the specified time from peak, in RMS units.
Definition: Hit.h:243
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
float fPeakTime
time of the signal peak, in tick units
Definition: Hit.h:59
raw::ChannelID_t fChannel
ID of the readout channel the hit was extracted from.
Definition: Hit.h:56
int fNDF
degrees of freedom in the determination of the hit shape
Definition: Hit.h:70
float fRMS
RMS of the hit shape, in tick units.
Definition: Hit.h:61
raw::TDCtick_t StartTick() const
Initial tdc tick for hit.
Definition: Hit.h:217
Definition of data types for geometry description.
float PeakTimeMinusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
Definition: Hit.h:240
raw::TDCtick_t EndTick() const
Final tdc tick for hit.
Definition: Hit.h:218
float PeakTime() const
Time of the signal peak, in tick units.
Definition: Hit.h:219
geo::WireID fWireID
WireID for the hit (Cryostat, TPC, Plane, Wire)
Definition: Hit.h:73
float fSigmaIntegral
the uncertainty of integral under the calibrated signal waveform of the hit, in ADC units ...
Definition: Hit.h:66
float fGoodnessOfFit
how well do we believe we know this hit?
Definition: Hit.h:69
float SummedADC() const
The sum of calibrated ADC counts of the hit (0. by default)
Definition: Hit.h:224
short int fLocalIndex
index of this hit among the Multiplicity() hits in the signal window
Definition: Hit.h:68
float SigmaPeakTime() const
Uncertainty for the signal peak, in tick units.
Definition: Hit.h:220
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:49
float fIntegral
the integral under the calibrated signal waveform of the hit, in tick x ADC units ...
Definition: Hit.h:65
float PeakTimePlusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
Definition: Hit.h:237
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:27
raw::ChannelID_t Channel() const
ID of the readout channel the hit was extracted from.
Definition: Hit.h:231