LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
sim::MCHit Class Reference

#include "MCHit.h"

Public Member Functions

 MCHit ()
 Default ctor. More...
 
void Reset ()
 Method to reset. More...
 
void SetCharge (float qsum, float amp)
 Setter function for charge/amplitude. More...
 
void SetTime (const float peak, const float width)
 Setter function for time. More...
 
void SetParticleInfo (const float vtx[], const float energy, const int trackId)
 Setter function for partile info. More...
 
float PeakTime () const
 Getter for start time. More...
 
float PeakWidth () const
 Getter for start time. More...
 
float Charge (bool max=false) const
 Getter for "charge". More...
 
const float * PartVertex () const
 Getter for particle vertex. More...
 
float PartEnergy () const
 Getter for particle energy. More...
 
int PartTrackId () const
 Getter for track ID. More...
 
bool operator< (const MCHit &rhs) const
 For sorting with MCHit itself. More...
 
bool operator< (const float &rhs) const
 For sorting with generic time. More...
 

Private Attributes

float fSignalTime
 where peak resides in waveform ticks More...
 
float fSignalWidth
 width (1sigma) in waveform ticks More...
 
float fPeakAmp
 Peak amplitude (ADC) More...
 
float fCharge
 Charge sum (ADC integral over MCWire) More...
 
float fPartVertex [3]
 particle vertex (x,y,z) information More...
 
float fPartEnergy
 particle energy deposition (dE) in MeV More...
 
int fPartTrackId
 particle G4 Track ID More...
 

Detailed Description

Definition at line 10 of file MCHit.h.

Constructor & Destructor Documentation

sim::MCHit::MCHit ( )
inline

Default ctor.

Definition at line 14 of file MCHit.h.

References Reset().

14 { Reset(); }
void Reset()
Method to reset.
Definition: MCHit.h:17

Member Function Documentation

float sim::MCHit::Charge ( bool  max = false) const
inline

Getter for "charge".

Definition at line 76 of file MCHit.h.

76 { return (max ? fPeakAmp : fCharge); }
float fCharge
Charge sum (ADC integral over MCWire)
Definition: MCHit.h:35
float fPeakAmp
Peak amplitude (ADC)
Definition: MCHit.h:34
bool sim::MCHit::operator< ( const MCHit rhs) const
inline

For sorting with MCHit itself.

Definition at line 88 of file MCHit.h.

References fSignalTime.

88 { return fSignalTime < rhs.fSignalTime; }
float fSignalTime
where peak resides in waveform ticks
Definition: MCHit.h:31
bool sim::MCHit::operator< ( const float &  rhs) const
inline

For sorting with generic time.

Definition at line 91 of file MCHit.h.

91 { return fSignalTime < rhs; }
float fSignalTime
where peak resides in waveform ticks
Definition: MCHit.h:31
float sim::MCHit::PartEnergy ( ) const
inline

Getter for particle energy.

Definition at line 82 of file MCHit.h.

References fPartEnergy.

82 { return fPartEnergy; }
float fPartEnergy
particle energy deposition (dE) in MeV
Definition: MCHit.h:42
int sim::MCHit::PartTrackId ( ) const
inline

Getter for track ID.

Definition at line 85 of file MCHit.h.

References fPartTrackId.

85 { return fPartTrackId; }
int fPartTrackId
particle G4 Track ID
Definition: MCHit.h:43
const float* sim::MCHit::PartVertex ( ) const
inline

Getter for particle vertex.

Definition at line 79 of file MCHit.h.

References fPartVertex.

79 { return fPartVertex; }
float fPartVertex[3]
particle vertex (x,y,z) information
Definition: MCHit.h:41
float sim::MCHit::PeakTime ( ) const
inline

Getter for start time.

Definition at line 70 of file MCHit.h.

References fSignalTime.

Referenced by hit::MCHitAnaExample::analyze().

70 { return fSignalTime; }
float fSignalTime
where peak resides in waveform ticks
Definition: MCHit.h:31
float sim::MCHit::PeakWidth ( ) const
inline

Getter for start time.

Definition at line 73 of file MCHit.h.

References fSignalWidth.

73 { return fSignalWidth; }
float fSignalWidth
width (1sigma) in waveform ticks
Definition: MCHit.h:32
void sim::MCHit::Reset ( )
inline

Method to reset.

Definition at line 17 of file MCHit.h.

References fCharge, fPartEnergy, fPartTrackId, fPartVertex, fPeakAmp, fSignalTime, fSignalWidth, sim::kINVALID_FLOAT, kINVALID_FLOAT, and sim::kINVALID_INT.

Referenced by MCHit().

18  {
21  for (int i = 0; i < 3; ++i)
25  }
static constexpr float kINVALID_FLOAT
Definition: TruncMean.h:32
const int kINVALID_INT
Definition: MCLimits.h:16
float fCharge
Charge sum (ADC integral over MCWire)
Definition: MCHit.h:35
int fPartTrackId
particle G4 Track ID
Definition: MCHit.h:43
float fPartEnergy
particle energy deposition (dE) in MeV
Definition: MCHit.h:42
float fPeakAmp
Peak amplitude (ADC)
Definition: MCHit.h:34
float fPartVertex[3]
particle vertex (x,y,z) information
Definition: MCHit.h:41
float fSignalWidth
width (1sigma) in waveform ticks
Definition: MCHit.h:32
float fSignalTime
where peak resides in waveform ticks
Definition: MCHit.h:31
const float kINVALID_FLOAT
Definition: MCLimits.h:12
void sim::MCHit::SetCharge ( float  qsum,
float  amp 
)
inline

Setter function for charge/amplitude.

Definition at line 47 of file MCHit.h.

Referenced by hit::MCHitFinder::produce().

48  {
49  fCharge = qsum;
50  fPeakAmp = amp;
51  }
float fCharge
Charge sum (ADC integral over MCWire)
Definition: MCHit.h:35
float fPeakAmp
Peak amplitude (ADC)
Definition: MCHit.h:34
void sim::MCHit::SetParticleInfo ( const float  vtx[],
const float  energy,
const int  trackId 
)
inline

Setter function for partile info.

Definition at line 61 of file MCHit.h.

References energy.

Referenced by hit::MCHitFinder::produce().

62  {
63  for (size_t i = 0; i < 3; ++i)
64  fPartVertex[i] = vtx[i];
66  fPartTrackId = trackId;
67  }
int fPartTrackId
particle G4 Track ID
Definition: MCHit.h:43
float fPartEnergy
particle energy deposition (dE) in MeV
Definition: MCHit.h:42
double energy
Definition: plottest35.C:25
float fPartVertex[3]
particle vertex (x,y,z) information
Definition: MCHit.h:41
void sim::MCHit::SetTime ( const float  peak,
const float  width 
)
inline

Setter function for time.

Definition at line 54 of file MCHit.h.

Referenced by hit::MCHitAnaExample::analyze(), and hit::MCHitFinder::produce().

55  {
56  fSignalTime = peak;
57  fSignalWidth = width;
58  }
float fSignalWidth
width (1sigma) in waveform ticks
Definition: MCHit.h:32
float fSignalTime
where peak resides in waveform ticks
Definition: MCHit.h:31

Member Data Documentation

float sim::MCHit::fCharge
private

Charge sum (ADC integral over MCWire)

Definition at line 35 of file MCHit.h.

Referenced by Reset().

float sim::MCHit::fPartEnergy
private

particle energy deposition (dE) in MeV

Definition at line 42 of file MCHit.h.

Referenced by PartEnergy(), and Reset().

int sim::MCHit::fPartTrackId
private

particle G4 Track ID

Definition at line 43 of file MCHit.h.

Referenced by PartTrackId(), and Reset().

float sim::MCHit::fPartVertex[3]
private

particle vertex (x,y,z) information

Definition at line 41 of file MCHit.h.

Referenced by PartVertex(), and Reset().

float sim::MCHit::fPeakAmp
private

Peak amplitude (ADC)

Definition at line 34 of file MCHit.h.

Referenced by Reset().

float sim::MCHit::fSignalTime
private

where peak resides in waveform ticks

Definition at line 31 of file MCHit.h.

Referenced by operator<(), PeakTime(), and Reset().

float sim::MCHit::fSignalWidth
private

width (1sigma) in waveform ticks

Definition at line 32 of file MCHit.h.

Referenced by PeakWidth(), and Reset().


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