CaloDeposit.h
Go to the documentation of this file.
1 //
2 // CaloDeposit.h
3 //
4 // Created by Eldwan Brianne on 8/23/17.
5 //
6 
7 #ifndef GAR_SIMULATIONDATAPRODUCTS_CaloDeposit_h
8 #define GAR_SIMULATIONDATAPRODUCTS_CaloDeposit_h
9 
10 #include <list>
11 #include <vector>
12 
14 
15 namespace gar {
16  namespace sdp {
17 
18 
19  class CaloDeposit{
20  public:
21 
22  CaloDeposit();
23 
24  #ifndef __GCCXML__
25  CaloDeposit(int trackID,
26  float t,
27  float e,
28  double pos[3],
30  : fTrackID (trackID)
31  , fTime (t)
32  , fEnergy (e)
33  , fCellID (CellID)
34  , fStepLength(0.)
35  {
36  fPos[0] = pos[0];
37  fPos[1] = pos[1];
38  fPos[2] = pos[2];
39  }
40 
41  CaloDeposit(int trackID,
42  float t,
43  float e,
44  double pos[3],
46  float step_l)
47  : fTrackID (trackID)
48  , fTime (t)
49  , fEnergy (e)
50  , fCellID (CellID)
51  , fStepLength(step_l)
52  {
53  fPos[0] = pos[0];
54  fPos[1] = pos[1];
55  fPos[2] = pos[2];
56  }
57 
58  CaloDeposit(double pos[3])
59  : fTrackID(0),
60  fTime(0.),
61  fEnergy(0.),
62  fCellID(0),
63  fStepLength(0.)
64  {
65  fPos[0] = pos[0];
66  fPos[1] = pos[1];
67  fPos[2] = pos[2];
68  }
69 
70  int const& TrackID() const { return fTrackID; }
71  float const& Time() const { return fTime; }
72  float const& Energy() const { return fEnergy; }
73  double const& X() const { return fPos[0]; }
74  double const& Y() const { return fPos[1]; }
75  double const& Z() const { return fPos[2]; }
76  raw::CellID_t const& CellID() const { return fCellID; }
77  double const* Pos() const { return &fPos[0]; }
78  float const& StepLength() const { return fStepLength; }
79  bool operator <(gar::sdp::CaloDeposit const& b) const;
80 
81  void operator +=(gar::sdp::CaloDeposit const& b);
82 
83  #endif
84 
85  private:
86 
87  int fTrackID; ///< g4 track ID of particle making the deposit
88  float fTime; ///< time of the energy deposit
89  float fEnergy; ///< energy deposited
90  double fPos[3]; ///< position of the energy deposit
91  raw::CellID_t fCellID; ///< cellID encoded in 64 bits containing det_id, stave, module, layer, slice, cellX and cellY, use Helper to access the values
92  float fStepLength; ///< step length
93  };
94 
95 
96  } // sdp
97 } // gar
98 
99 #endif /* GAR_SIMULATIONDATAPRODUCTS_CaloDeposit_h */
float const & Time() const
Definition: CaloDeposit.h:71
bool operator<(gar::sdp::CaloDeposit const &b) const
Definition: CaloDeposit.cxx:31
raw::CellID_t fCellID
cellID encoded in 64 bits containing det_id, stave, module, layer, slice, cellX and cellY...
Definition: CaloDeposit.h:91
CaloDeposit(double pos[3])
Definition: CaloDeposit.h:58
int fTrackID
g4 track ID of particle making the deposit
Definition: CaloDeposit.h:87
void operator+=(gar::sdp::CaloDeposit const &b)
Definition: CaloDeposit.cxx:39
double const & Z() const
Definition: CaloDeposit.h:75
float const & Energy() const
Definition: CaloDeposit.h:72
double const * Pos() const
Definition: CaloDeposit.h:77
const double e
int const & TrackID() const
Definition: CaloDeposit.h:70
float fTime
time of the energy deposit
Definition: CaloDeposit.h:88
CaloDeposit(int trackID, float t, float e, double pos[3], raw::CellID_t CellID, float step_l)
Definition: CaloDeposit.h:41
Definition of basic calo raw digits.
double const & Y() const
Definition: CaloDeposit.h:74
long long int CellID_t
Definition: CaloRawDigit.h:24
raw::CellID_t const & CellID() const
Definition: CaloDeposit.h:76
float fStepLength
step length
Definition: CaloDeposit.h:92
General GArSoft Utilities.
double const & X() const
Definition: CaloDeposit.h:73
double fPos[3]
position of the energy deposit
Definition: CaloDeposit.h:90
float fEnergy
energy deposited
Definition: CaloDeposit.h:89
static bool * b
Definition: config.cpp:1043
float const & StepLength() const
Definition: CaloDeposit.h:78
CaloDeposit(int trackID, float t, float e, double pos[3], raw::CellID_t CellID)
Definition: CaloDeposit.h:25