TPCCluster.h
Go to the documentation of this file.
1 //
2 // TPCCluster.h
3 //
4 // Created by Brian Rebel on 10/6/16.
5 //
6 
7 #ifndef GAR_RECONSTRUCTIONDATAPRODUCTS_TPCCluster_h
8 #define GAR_RECONSTRUCTIONDATAPRODUCTS_TPCCluster_h
9 
10 #include <iostream>
11 #include "IDNumberGen.h"
12 
13 namespace gar {
14  namespace rec {
15 
16  class TPCCluster {
17 
18  public:
19  TPCCluster();
20 
21  // let the compiler provide the dtor
22 
23  private:
24  static gar::rec::IDNumber const FirstNumber = 100100000;
26 
27  float fSignal; ///< size of the signal for this TPCCluster (integral of ADC values)
28  float fPosition[3]; ///< position of the TPCCluster
29  float fTime; ///< time of TPCCluster charge arrival at the readout plane (ticks)
30  float fStartTime; ///< start time of the TPCCluster (ticks)
31  float fEndTime; ///< end time of the TPCCluster (ticks)
32  float fRMS; ///< TPCCluster width calculated with RMS (in ticks)
33  float fCovMat[6]; ///< packed covariance matrix, assuming symmetry. xx, xy, xz, yy, yz, zz
34 
35 #ifndef __GCCXML__
36 
37  public:
38 
39  TPCCluster(
40  const float sig,
41  const float *pos,
42  const float startT,
43  const float endT,
44  const float Time,
45  const float RMS,
46  const float *cov);
47 
48  bool operator==(const TPCCluster& rhs) const;
49  bool operator!=(const TPCCluster& rhs) const;
51 
52  const float* Position() const;
53  float const& Signal() const;
54  float StartTime() const;
55  float EndTime() const;
56  float Time() const;
57  float RMS() const;
58  const float* CovMatPacked() const;
59 
60  void operator += (gar::rec::TPCCluster const& h);
61 
62  friend std::ostream& operator << (std::ostream & o, gar::rec::TPCCluster const& h);
63 
64 #endif
65 
66  };
67 
68  inline const float* TPCCluster::Position() const { return &fPosition[0]; }
69  inline float const& TPCCluster::Signal() const { return fSignal; }
70  inline float TPCCluster::StartTime() const { return fStartTime; }
71  inline float TPCCluster::EndTime() const { return fEndTime; }
72  inline float TPCCluster::RMS() const { return fRMS; }
73  inline float TPCCluster::Time() const { return fTime; }
74  inline const float* TPCCluster::CovMatPacked() const { return &fCovMat[0]; }
75 
76  } // rec
77 } // gar
78 
79 
80 #endif /* GAR_RECONSTRUCTIONDATAPRODUCTS_TPCCluster_h */
rec
Definition: tracks.py:88
float fSignal
size of the signal for this TPCCluster (integral of ADC values)
Definition: TPCCluster.h:27
friend std::ostream & operator<<(std::ostream &o, gar::rec::TPCCluster const &h)
Definition: TPCCluster.cxx:106
float EndTime() const
Definition: TPCCluster.h:71
float fStartTime
start time of the TPCCluster (ticks)
Definition: TPCCluster.h:30
float fRMS
TPCCluster width calculated with RMS (in ticks)
Definition: TPCCluster.h:32
float fCovMat[6]
packed covariance matrix, assuming symmetry. xx, xy, xz, yy, yz, zz
Definition: TPCCluster.h:33
gar::rec::IDNumber getIDNumber() const
Definition: TPCCluster.cxx:32
bool operator!=(const TPCCluster &rhs) const
Definition: TPCCluster.cxx:28
float fEndTime
end time of the TPCCluster (ticks)
Definition: TPCCluster.h:31
float fTime
time of TPCCluster charge arrival at the readout plane (ticks)
Definition: TPCCluster.h:29
gar::rec::IDNumber fIDnumero
Definition: TPCCluster.h:25
float StartTime() const
Definition: TPCCluster.h:70
float fPosition[3]
position of the TPCCluster
Definition: TPCCluster.h:28
static gar::rec::IDNumber const FirstNumber
Definition: TPCCluster.h:24
float RMS() const
Definition: TPCCluster.h:72
bool operator==(const TPCCluster &rhs) const
Definition: TPCCluster.cxx:24
void operator+=(gar::rec::TPCCluster const &h)
Definition: TPCCluster.cxx:68
General GArSoft Utilities.
float const & Signal() const
Definition: TPCCluster.h:69
const float * CovMatPacked() const
Definition: TPCCluster.h:74
const float * Position() const
Definition: TPCCluster.h:68
float Time() const
Definition: TPCCluster.h:73
size_t IDNumber
Definition: IDNumberGen.h:71