CaloDeposit.cxx
Go to the documentation of this file.
1 //
2 // CaloDeposit.cxx
3 // garsoft-mrb
4 //
5 // Created by Eldwan Brianne on 8/23/18.
6 //
7 
9 #include <limits>
10 
12 
13 namespace gar {
14  namespace sdp{
15 
16  //-------------------------------------------------
18  : fTrackID(0)
19  , fTime (0.)
20  , fEnergy (0.)
21  , fCellID (0)
22  , fStepLength(0.)
23  {
24  fPos[0] = 0.;
25  fPos[1] = 0.;
26  fPos[2] = 0.;
27  }
28 
29  //-------------------------------------------------
30  // order the hit deposits by time
32  {
33  if( fTime < b.Time() )
34  return true;
35 
36  return false;
37  }
38 
40  {
41  //Simply adding contributions
42  fEnergy += b.Energy();
43 
44  //Taking the earliest time
45  if(b.Time() < fTime)
46  fTime = b.Time();
47  }
48 
49  } //sdp
50 } // gar
float const & Time() const
Definition: CaloDeposit.h:71
bool operator<(gar::sdp::CaloDeposit const &b) const
Definition: CaloDeposit.cxx:31
void operator+=(gar::sdp::CaloDeposit const &b)
Definition: CaloDeposit.cxx:39
float const & Energy() const
Definition: CaloDeposit.h:72
float fTime
time of the energy deposit
Definition: CaloDeposit.h:88
General GArSoft Utilities.
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