Public Member Functions | Public Attributes | List of all members
gar::sdp::IDE Class Reference

#include <SimChannel.h>

Public Member Functions

 IDE ()
 
 IDE (IDE const &, int)
 
 IDE (int id, float numE, unsigned int channel, unsigned short tdc)
 
int const & TrackID () const
 
float const & NumElectrons () const
 
unsigned int const & Channel () const
 
unsigned short const & TDC () const
 
void operator+= (gar::sdp::IDE const &b)
 
bool operator== (gar::sdp::IDE const &b) const
 
bool operator< (gar::sdp::IDE const &b) const
 

Public Attributes

int fTrackID
 Geant4 supplied track ID. More...
 
float fNumElectrons
 total number of electrons for this track ID and time More...
 
unsigned int fChannel
 channel number for these electrons More...
 
unsigned short fTDC
 TDC value of the readout. More...
 

Detailed Description

Definition at line 24 of file SimChannel.h.

Constructor & Destructor Documentation

gar::sdp::IDE::IDE ( )

Definition at line 19 of file SimChannel.cxx.

24 {}
unsigned short fTDC
TDC value of the readout.
Definition: SimChannel.h:56
int fTrackID
Geant4 supplied track ID.
Definition: SimChannel.h:53
static int max(int a, int b)
unsigned int fChannel
channel number for these electrons
Definition: SimChannel.h:55
float fNumElectrons
total number of electrons for this track ID and time
Definition: SimChannel.h:54
gar::sdp::IDE::IDE ( sdp::IDE const &  ide,
int  offset 
)

Definition at line 27 of file SimChannel.cxx.

29 : fTrackID (ide.TrackID() + offset)
30 , fNumElectrons(ide.NumElectrons() )
31 , fChannel (ide.Channel() )
32 , fTDC (ide.TDC() )
33 {}
unsigned short fTDC
TDC value of the readout.
Definition: SimChannel.h:56
int fTrackID
Geant4 supplied track ID.
Definition: SimChannel.h:53
unsigned int fChannel
channel number for these electrons
Definition: SimChannel.h:55
float fNumElectrons
total number of electrons for this track ID and time
Definition: SimChannel.h:54
gar::sdp::IDE::IDE ( int  id,
float  numE,
unsigned int  channel,
unsigned short  tdc 
)
inline

Definition at line 32 of file SimChannel.h.

36  : fTrackID (id)
37  , fNumElectrons(numE)
38  , fChannel (channel)
39  , fTDC (tdc)
40  {}
unsigned short fTDC
TDC value of the readout.
Definition: SimChannel.h:56
int fTrackID
Geant4 supplied track ID.
Definition: SimChannel.h:53
uint8_t channel
Definition: CRTFragment.hh:201
unsigned int fChannel
channel number for these electrons
Definition: SimChannel.h:55
float fNumElectrons
total number of electrons for this track ID and time
Definition: SimChannel.h:54

Member Function Documentation

unsigned int const& gar::sdp::IDE::Channel ( ) const
inline

Definition at line 44 of file SimChannel.h.

44 { return fChannel; }
unsigned int fChannel
channel number for these electrons
Definition: SimChannel.h:55
float const& gar::sdp::IDE::NumElectrons ( ) const
inline

Definition at line 43 of file SimChannel.h.

43 { return fNumElectrons; }
float fNumElectrons
total number of electrons for this track ID and time
Definition: SimChannel.h:54
void gar::sdp::IDE::operator+= ( gar::sdp::IDE const &  b)

Definition at line 36 of file SimChannel.cxx.

37 {
38  if(fTrackID != b.TrackID() ||
39  fTDC != b.TDC() ){
40  MF_LOG_WARNING("SimChannel")
41  << "attempting to add IDEs with different trackIDs: "
42  << fTrackID
43  << "; "
44  << b.TrackID()
45  << " or TDCs "
46  << fTDC
47  << "; "
48  << b.TDC()
49  << " bail";
50  return;
51  }
52 
53  fNumElectrons += b.NumElectrons();
54 
55  return;
56 }
unsigned short fTDC
TDC value of the readout.
Definition: SimChannel.h:56
int fTrackID
Geant4 supplied track ID.
Definition: SimChannel.h:53
static bool * b
Definition: config.cpp:1043
float fNumElectrons
total number of electrons for this track ID and time
Definition: SimChannel.h:54
#define MF_LOG_WARNING(category)
bool gar::sdp::IDE::operator< ( gar::sdp::IDE const &  b) const

Definition at line 69 of file SimChannel.cxx.

70 {
71  if(fChannel < b.Channel() ) return true;
72  else if(fChannel == b.Channel() ){
73  if(fTDC < b.TDC() ) return true;
74  else if(fTDC == b.TDC()){
75  int absTrkID = std::abs(fTrackID);
76  int absTrkIDB = std::abs(b.TrackID());
77 
78  if(absTrkID < absTrkIDB) return true;
79  } // end if the same TDC value
80  } // end if the same channel
81 
82  return false;
83 }
unsigned short fTDC
TDC value of the readout.
Definition: SimChannel.h:56
int fTrackID
Geant4 supplied track ID.
Definition: SimChannel.h:53
T abs(T value)
unsigned int fChannel
channel number for these electrons
Definition: SimChannel.h:55
static bool * b
Definition: config.cpp:1043
bool gar::sdp::IDE::operator== ( gar::sdp::IDE const &  b) const

Definition at line 59 of file SimChannel.cxx.

60 {
61  return (fChannel == b.Channel() &&
62  std::abs(fTrackID) == std::abs(b.TrackID()) &&
63  fTDC == b.TDC() );
64 }
unsigned short fTDC
TDC value of the readout.
Definition: SimChannel.h:56
int fTrackID
Geant4 supplied track ID.
Definition: SimChannel.h:53
T abs(T value)
unsigned int fChannel
channel number for these electrons
Definition: SimChannel.h:55
static bool * b
Definition: config.cpp:1043
unsigned short const& gar::sdp::IDE::TDC ( ) const
inline

Definition at line 45 of file SimChannel.h.

45 { return fTDC; }
unsigned short fTDC
TDC value of the readout.
Definition: SimChannel.h:56
int const& gar::sdp::IDE::TrackID ( ) const
inline

Definition at line 42 of file SimChannel.h.

42 { return fTrackID; }
int fTrackID
Geant4 supplied track ID.
Definition: SimChannel.h:53

Member Data Documentation

unsigned int gar::sdp::IDE::fChannel

channel number for these electrons

Definition at line 55 of file SimChannel.h.

float gar::sdp::IDE::fNumElectrons

total number of electrons for this track ID and time

Definition at line 54 of file SimChannel.h.

unsigned short gar::sdp::IDE::fTDC

TDC value of the readout.

Definition at line 56 of file SimChannel.h.

int gar::sdp::IDE::fTrackID

Geant4 supplied track ID.

Definition at line 53 of file SimChannel.h.


The documentation for this class was generated from the following files: