LArDeposit.cxx
Go to the documentation of this file.
1 //
2 // EnergyDeposit.cxx
3 // garsoft-mrb
4 //
5 // Created by Brian Rebel on 1/30/17.
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  , fX (0.)
22  , fY (0.)
23  , fZ (0.)
24  , fdX (0.)
25  , fIsPrimary(true)
26  {}
27 
28  //-------------------------------------------------
29  // order the energy deposits by id, then time, then z position
31  {
32  if( std::abs(fTrackID) < std::abs(b.TrackID()) )
33  return true;
34  else if( std::abs(fTrackID) == std::abs(b.TrackID()) ){
35  if( fTime < b.Time() )
36  return true;
37  else if(fTime == b.Time() ){
38  if(fZ < b.Z()) return true;
39  }
40  }
41 
42  return false;
43  }
44 
45  } //sdp
46 } // gar
int const & TrackID() const
Definition: LArDeposit.h:40
float fZ
z position of the energy deposit
Definition: LArDeposit.h:60
float fTime
time of the energy deposit
Definition: LArDeposit.h:56
float const & Time() const
Definition: LArDeposit.h:41
bool operator<(gar::sdp::LArDeposit const &b) const
Definition: LArDeposit.cxx:30
T abs(T value)
int fTrackID
g4 track ID of particle making the deposit
Definition: LArDeposit.h:55
float const & Z() const
Definition: LArDeposit.h:45
General GArSoft Utilities.
static bool * b
Definition: config.cpp:1043