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

Energy deposition in the active material. More...

#include "SimEnergyDeposit.h"

Public Types

using Length_t = float
 
using Point_t = geo::Point_t
 

Public Member Functions

 SimEnergyDeposit (int np=0, int ne=0, double sy=0, double e=0., geo::Point_t start={0., 0., 0.}, geo::Point_t end={0., 0., 0.}, double t0=0., double t1=0., int id=0, int pdg=0, int origTrackID=0)
 
int NumPhotons () const
 
int NumFPhotons () const
 
int NumSPhotons () const
 
int NumElectrons () const
 
double ScintYieldRatio () const
 
double Energy () const
 
geo::Point_t Start () const
 
geo::Point_t End () const
 
double Time () const
 
int TrackID () const
 
int OrigTrackID () const
 
void setTrackID (int id)
 
int PdgCode () const
 
geo::Length_t StartX () const
 
geo::Length_t StartY () const
 
geo::Length_t StartZ () const
 
double StartT () const
 
geo::Length_t EndX () const
 
geo::Length_t EndY () const
 
geo::Length_t EndZ () const
 
double EndT () const
 
geo::Point_t MidPoint () const
 
geo::Length_t MidPointX () const
 
geo::Length_t MidPointY () const
 
geo::Length_t MidPointZ () const
 
geo::Length_t X () const
 
geo::Length_t Y () const
 
geo::Length_t Z () const
 
double T () const
 
double T0 () const
 
double T1 () const
 
double E () const
 
geo::Length_t StepLength () const
 
bool operator< (const SimEnergyDeposit &rhs) const
 

Private Attributes

int numPhotons
 of scintillation photons More...
 
int numElectrons
 of ionization electrons More...
 
float scintYieldRatio
 scintillation yield of LAr More...
 
float edep
 energy deposition (MeV) More...
 
geo::Point_t startPos
 positions in (cm) More...
 
geo::Point_t endPos
 
double startTime
 (ns) More...
 
double endTime
 (ns) More...
 
int trackID
 simulation track id More...
 
int pdgCode
 pdg code of particle to avoid lookup by particle type later More...
 
int origTrackID
 complementary simulation track id, kept true to G4 even for shower secondaries/tertiaries etc. More...
 

Detailed Description

Energy deposition in the active material.

The detector simulation (presently LArG4, which invokes Geant4) propagates particles through the detector in intervals of "steps". In Geant4, a step is normally defined by the smallest of the distance from the current position of the particle to the point where it enters a new volume boundary, the particle undergoes some "interesting" physics event, or the range of the particle due to its energy falls below a given limit.

In LArG4, an additional limit is applied: We force the steps to be small (typically 1/10th the wire spacing in the planes of the TPC) so we can process the energy deposited by each step into electron clusters.

The SimEnergyDeposit class defines what Geant4 truth information for each step is passed to the ionization -> sim::SimChannel conversion, and for the optical-photon -> sim::SimPhoton conversion.

William Seligman, Nevis Labs, 10/12/2017

Definition at line 40 of file SimEnergyDeposit.h.

Member Typedef Documentation

Definition at line 43 of file SimEnergyDeposit.h.

Constructor & Destructor Documentation

sim::SimEnergyDeposit::SimEnergyDeposit ( int  np = 0,
int  ne = 0,
double  sy = 0,
double  e = 0.,
geo::Point_t  start = {0., 0., 0.},
geo::Point_t  end = {0., 0., 0.},
double  t0 = 0.,
double  t1 = 0.,
int  id = 0,
int  pdg = 0,
int  origTrackID = 0 
)
inline

Definition at line 58 of file SimEnergyDeposit.h.

64  {0., 0., 0.},
65  geo::Point_t end = {0., 0., 0.},
66  double t0 = 0.,
67  double t1 = 0.,
68  int id = 0,
69  int pdg = 0,
70  int origTrackID = 0)
71  : numPhotons(np)
72  // , numFPhotons(nfp)
73  // , numSPhotons(nsp)
74  , numElectrons(ne)
75  , scintYieldRatio(sy)
76  , edep(e)
77  , startPos(start)
78  , endPos(end)
79  , startTime(t0)
80  , endTime(t1)
81  , trackID(id)
82  , pdgCode(pdg)
84  {}
code to link reconstructed objects back to the MC truth information
TTree * t1
Definition: plottest35.C:26
int numElectrons
of ionization electrons
int origTrackID
complementary simulation track id, kept true to G4 even for shower secondaries/tertiaries etc...
geo::Point_t startPos
positions in (cm)
int numPhotons
of scintillation photons
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
int pdgCode
pdg code of particle to avoid lookup by particle type later
int trackID
simulation track id
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:180
float scintYieldRatio
scintillation yield of LAr
Float_t e
Definition: plot.C:35
float edep
energy deposition (MeV)

Member Function Documentation

double sim::SimEnergyDeposit::E ( ) const
inline

Definition at line 133 of file SimEnergyDeposit.h.

References edep.

133 { return edep; }
float edep
energy deposition (MeV)
geo::Point_t sim::SimEnergyDeposit::End ( ) const
inline
double sim::SimEnergyDeposit::EndT ( ) const
inline

Definition at line 115 of file SimEnergyDeposit.h.

References endTime.

115 { return endTime; }
geo::Length_t sim::SimEnergyDeposit::EndX ( ) const
inline

Definition at line 112 of file SimEnergyDeposit.h.

References endPos.

Referenced by larg4::ISCalcCorrelated::AngleToEFieldAtStep(), and larg4::ISCalcNESTLAr::CalcIonAndScint().

112 { return endPos.X(); }
geo::Length_t sim::SimEnergyDeposit::EndY ( ) const
inline

Definition at line 113 of file SimEnergyDeposit.h.

References endPos.

Referenced by larg4::ISCalcCorrelated::AngleToEFieldAtStep(), and larg4::ISCalcNESTLAr::CalcIonAndScint().

113 { return endPos.Y(); }
geo::Length_t sim::SimEnergyDeposit::EndZ ( ) const
inline

Definition at line 114 of file SimEnergyDeposit.h.

References endPos.

Referenced by larg4::ISCalcCorrelated::AngleToEFieldAtStep(), and larg4::ISCalcNESTLAr::CalcIonAndScint().

114 { return endPos.Z(); }
geo::Point_t sim::SimEnergyDeposit::MidPoint ( ) const
inline
geo::Length_t sim::SimEnergyDeposit::MidPointX ( ) const
inline

Definition at line 124 of file SimEnergyDeposit.h.

References endPos, and startPos.

Referenced by detsim::ISCalculationSeparate::CalculateIonization(), and detsim::ISCalculationSeparate::EFieldAtStep().

124 { return (startPos.X() + endPos.X()) / 2.; }
geo::Point_t startPos
positions in (cm)
geo::Length_t sim::SimEnergyDeposit::MidPointY ( ) const
inline

Definition at line 125 of file SimEnergyDeposit.h.

References endPos, and startPos.

Referenced by detsim::ISCalculationSeparate::CalculateIonization(), and detsim::ISCalculationSeparate::EFieldAtStep().

125 { return (startPos.Y() + endPos.Y()) / 2.; }
geo::Point_t startPos
positions in (cm)
geo::Length_t sim::SimEnergyDeposit::MidPointZ ( ) const
inline

Definition at line 126 of file SimEnergyDeposit.h.

References endPos, and startPos.

Referenced by detsim::ISCalculationSeparate::CalculateIonization(), and detsim::ISCalculationSeparate::EFieldAtStep().

126 { return (startPos.Z() + endPos.Z()) / 2.; }
geo::Point_t startPos
positions in (cm)
int sim::SimEnergyDeposit::NumElectrons ( ) const
inline
int sim::SimEnergyDeposit::NumFPhotons ( ) const
inline

Definition at line 91 of file SimEnergyDeposit.h.

References numPhotons, and scintYieldRatio.

Referenced by sim::DumpSimEnergyDeposits::dumpEnergyDeposit().

91 { return round(numPhotons * scintYieldRatio); }
int numPhotons
of scintillation photons
float scintYieldRatio
scintillation yield of LAr
int sim::SimEnergyDeposit::NumPhotons ( ) const
inline
int sim::SimEnergyDeposit::NumSPhotons ( ) const
inline

Definition at line 92 of file SimEnergyDeposit.h.

References numPhotons, and scintYieldRatio.

Referenced by sim::DumpSimEnergyDeposits::dumpEnergyDeposit().

92 { return round(numPhotons * (1.0 - scintYieldRatio)); }
int numPhotons
of scintillation photons
float scintYieldRatio
scintillation yield of LAr
bool sim::SimEnergyDeposit::operator< ( const SimEnergyDeposit rhs) const
inline

Definition at line 147 of file SimEnergyDeposit.h.

References edep, startPos, startTime, and trackID.

148  {
149  return trackID < rhs.trackID && startTime < rhs.startTime &&
150  startPos.Z() < rhs.startPos.Z() && startPos.Y() < rhs.startPos.Y() &&
151  startPos.X() < rhs.startPos.X() && edep > rhs.edep; // sort by _decreasing_ energy
152  }
geo::Point_t startPos
positions in (cm)
int trackID
simulation track id
float edep
energy deposition (MeV)
int sim::SimEnergyDeposit::OrigTrackID ( ) const
inline

Definition at line 100 of file SimEnergyDeposit.h.

References origTrackID.

Referenced by sim::MergeSimSourcesUtility::offsetSimEnergyDepositTrackID().

100 { return origTrackID; }
int origTrackID
complementary simulation track id, kept true to G4 even for shower secondaries/tertiaries etc...
double sim::SimEnergyDeposit::ScintYieldRatio ( ) const
inline

Definition at line 94 of file SimEnergyDeposit.h.

References scintYieldRatio.

Referenced by sim::MergeSimSourcesUtility::offsetSimEnergyDepositTrackID().

94 { return scintYieldRatio; }
float scintYieldRatio
scintillation yield of LAr
void sim::SimEnergyDeposit::setTrackID ( int  id)
inline

Definition at line 101 of file SimEnergyDeposit.h.

References trackID.

101 { trackID = id; }
int trackID
simulation track id
geo::Point_t sim::SimEnergyDeposit::Start ( ) const
inline

Definition at line 96 of file SimEnergyDeposit.h.

References startPos.

Referenced by sim::DumpSimEnergyDeposits::dumpEnergyDeposit(), and sim::MergeSimSourcesUtility::offsetSimEnergyDepositTrackID().

96 { return {startPos.X(), startPos.Y(), startPos.Z()}; }
geo::Point_t startPos
positions in (cm)
double sim::SimEnergyDeposit::StartT ( ) const
inline

Definition at line 111 of file SimEnergyDeposit.h.

References startTime.

111 { return startTime; }
geo::Length_t sim::SimEnergyDeposit::StartX ( ) const
inline

Definition at line 108 of file SimEnergyDeposit.h.

References startPos.

Referenced by larg4::ISCalcCorrelated::AngleToEFieldAtStep(), and larg4::ISCalcNESTLAr::CalcIonAndScint().

108 { return startPos.X(); }
geo::Point_t startPos
positions in (cm)
geo::Length_t sim::SimEnergyDeposit::StartY ( ) const
inline

Definition at line 109 of file SimEnergyDeposit.h.

References startPos.

Referenced by larg4::ISCalcCorrelated::AngleToEFieldAtStep(), and larg4::ISCalcNESTLAr::CalcIonAndScint().

109 { return startPos.Y(); }
geo::Point_t startPos
positions in (cm)
geo::Length_t sim::SimEnergyDeposit::StartZ ( ) const
inline

Definition at line 110 of file SimEnergyDeposit.h.

References startPos.

Referenced by larg4::ISCalcCorrelated::AngleToEFieldAtStep(), and larg4::ISCalcNESTLAr::CalcIonAndScint().

110 { return startPos.Z(); }
geo::Point_t startPos
positions in (cm)
geo::Length_t sim::SimEnergyDeposit::StepLength ( ) const
inline
double sim::SimEnergyDeposit::T ( ) const
inline

Definition at line 130 of file SimEnergyDeposit.h.

References endTime, and startTime.

130 { return (startTime + endTime) / 2.; }
double sim::SimEnergyDeposit::T0 ( ) const
inline
double sim::SimEnergyDeposit::T1 ( ) const
inline

Definition at line 132 of file SimEnergyDeposit.h.

References endTime.

Referenced by sim::MergeSimSourcesUtility::offsetSimEnergyDepositTrackID().

132 { return endTime; }
double sim::SimEnergyDeposit::Time ( ) const
inline

Definition at line 98 of file SimEnergyDeposit.h.

References endTime, and startTime.

Referenced by sim::DumpSimEnergyDeposits::dumpEnergyDeposit().

98 { return (startTime + endTime) / 2.; }
int sim::SimEnergyDeposit::TrackID ( ) const
inline
geo::Length_t sim::SimEnergyDeposit::X ( ) const
inline

Definition at line 127 of file SimEnergyDeposit.h.

References endPos, and startPos.

127 { return (startPos.X() + endPos.X()) / 2.; }
geo::Point_t startPos
positions in (cm)
geo::Length_t sim::SimEnergyDeposit::Y ( ) const
inline

Definition at line 128 of file SimEnergyDeposit.h.

References endPos, and startPos.

128 { return (startPos.Y() + endPos.Y()) / 2.; }
geo::Point_t startPos
positions in (cm)
geo::Length_t sim::SimEnergyDeposit::Z ( ) const
inline

Definition at line 129 of file SimEnergyDeposit.h.

References endPos, and startPos.

129 { return (startPos.Z() + endPos.Z()) / 2.; }
geo::Point_t startPos
positions in (cm)

Member Data Documentation

float sim::SimEnergyDeposit::edep
private

energy deposition (MeV)

Definition at line 183 of file SimEnergyDeposit.h.

Referenced by E(), Energy(), and operator<().

geo::Point_t sim::SimEnergyDeposit::endPos
private

Definition at line 185 of file SimEnergyDeposit.h.

Referenced by End(), EndX(), EndY(), EndZ(), MidPoint(), MidPointX(), MidPointY(), MidPointZ(), StepLength(), X(), Y(), and Z().

double sim::SimEnergyDeposit::endTime
private

(ns)

Definition at line 187 of file SimEnergyDeposit.h.

Referenced by EndT(), T(), T1(), and Time().

int sim::SimEnergyDeposit::numElectrons
private

of ionization electrons

Definition at line 181 of file SimEnergyDeposit.h.

Referenced by NumElectrons().

int sim::SimEnergyDeposit::numPhotons
private

of scintillation photons

Definition at line 178 of file SimEnergyDeposit.h.

Referenced by NumFPhotons(), NumPhotons(), and NumSPhotons().

int sim::SimEnergyDeposit::origTrackID
private

complementary simulation track id, kept true to G4 even for shower secondaries/tertiaries etc.

Definition at line 191 of file SimEnergyDeposit.h.

Referenced by OrigTrackID().

int sim::SimEnergyDeposit::pdgCode
private

pdg code of particle to avoid lookup by particle type later

Definition at line 189 of file SimEnergyDeposit.h.

Referenced by PdgCode().

float sim::SimEnergyDeposit::scintYieldRatio
private

scintillation yield of LAr

Definition at line 182 of file SimEnergyDeposit.h.

Referenced by NumFPhotons(), NumSPhotons(), and ScintYieldRatio().

geo::Point_t sim::SimEnergyDeposit::startPos
private

positions in (cm)

Definition at line 184 of file SimEnergyDeposit.h.

Referenced by MidPoint(), MidPointX(), MidPointY(), MidPointZ(), operator<(), Start(), StartX(), StartY(), StartZ(), StepLength(), X(), Y(), and Z().

double sim::SimEnergyDeposit::startTime
private

(ns)

Definition at line 186 of file SimEnergyDeposit.h.

Referenced by operator<(), StartT(), T(), T0(), and Time().

int sim::SimEnergyDeposit::trackID
private

simulation track id

Definition at line 188 of file SimEnergyDeposit.h.

Referenced by operator<(), setTrackID(), and TrackID().


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