Public Types | Public Member Functions | Private Attributes | List of all members
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 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 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...
 

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 42 of file SimEnergyDeposit.h.

Member Typedef Documentation

Definition at line 47 of file SimEnergyDeposit.h.

Definition at line 48 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 
)
inline

Definition at line 62 of file SimEnergyDeposit.h.

68  {0.,0.,0.},
69  geo::Point_t end = {0.,0.,0.},
70  double t0 = 0.,
71  double t1 = 0.,
72  int id = 0,
73  int pdg = 0)
74  : numPhotons(np)
75 // , numFPhotons(nfp)
76 // , numSPhotons(nsp)
77  , numElectrons(ne)
78  , scintYieldRatio(sy)
79  , edep(e)
80  , startPos(start)
81  , endPos(end)
82  , startTime(t0)
83  , endTime(t1)
84  , trackID(id)
85  , pdgCode(pdg)
86  {
87  }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
code to link reconstructed objects back to the MC truth information
int numElectrons
of ionization electrons
geo::Point_t startPos
positions in (cm)
int numPhotons
of scintillation photons
int pdgCode
pdg code of particle to avoid lookup by particle type later
const double e
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:184
float scintYieldRatio
scintillation yield of LAr
float edep
energy deposition (MeV)

Member Function Documentation

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

Definition at line 136 of file SimEnergyDeposit.h.

136 { return edep; }
float edep
energy deposition (MeV)
geo::Point_t sim::SimEnergyDeposit::End ( void  ) const
inline

Definition at line 101 of file SimEnergyDeposit.h.

101 { return { endPos.X(), endPos.Y(), endPos.Z() }; }
double sim::SimEnergyDeposit::EndT ( ) const
inline

Definition at line 117 of file SimEnergyDeposit.h.

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

Definition at line 114 of file SimEnergyDeposit.h.

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

Definition at line 115 of file SimEnergyDeposit.h.

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

Definition at line 116 of file SimEnergyDeposit.h.

116 { return endPos.Z(); }
double sim::SimEnergyDeposit::Energy ( void  ) const
inline

Definition at line 99 of file SimEnergyDeposit.h.

99 { return edep; }
float edep
energy deposition (MeV)
geo::Point_t sim::SimEnergyDeposit::MidPoint ( ) const
inline

Definition at line 120 of file SimEnergyDeposit.h.

120  {
121  return {
122  ( startPos.X() + endPos.X() )/2.
123  , ( startPos.Y() + endPos.Y() )/2.
124  , ( startPos.Z() + endPos.Z() )/2.
125  };
126  }
geo::Point_t startPos
positions in (cm)
geo::Length_t sim::SimEnergyDeposit::MidPointX ( ) const
inline

Definition at line 127 of file SimEnergyDeposit.h.

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

Definition at line 128 of file SimEnergyDeposit.h.

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

Definition at line 129 of file SimEnergyDeposit.h.

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

Definition at line 97 of file SimEnergyDeposit.h.

97 { return numElectrons; }
int numElectrons
of ionization electrons
int sim::SimEnergyDeposit::NumFPhotons ( ) const
inline

Definition at line 95 of file SimEnergyDeposit.h.

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

Definition at line 94 of file SimEnergyDeposit.h.

94 { return numPhotons; }
int numPhotons
of scintillation photons
int sim::SimEnergyDeposit::NumSPhotons ( ) const
inline

Definition at line 96 of file SimEnergyDeposit.h.

96 { 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 150 of file SimEnergyDeposit.h.

151  {
152  return trackID < rhs.trackID
153  && startTime < rhs.startTime
154  && startPos.Z() < rhs.startPos.Z()
155  && startPos.Y() < rhs.startPos.Y()
156  && startPos.X() < rhs.startPos.X()
157  && edep > rhs.edep; // sort by _decreasing_ energy
158  }
geo::Point_t startPos
positions in (cm)
int trackID
simulation track id
float edep
energy deposition (MeV)
int sim::SimEnergyDeposit::PdgCode ( void  ) const
inline

Definition at line 104 of file SimEnergyDeposit.h.

104 { return pdgCode; }
int pdgCode
pdg code of particle to avoid lookup by particle type later
double sim::SimEnergyDeposit::ScintYieldRatio ( ) const
inline

Definition at line 98 of file SimEnergyDeposit.h.

98 { return scintYieldRatio;}
float scintYieldRatio
scintillation yield of LAr
geo::Point_t sim::SimEnergyDeposit::Start ( ) const
inline

Definition at line 100 of file SimEnergyDeposit.h.

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

Definition at line 113 of file SimEnergyDeposit.h.

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

Definition at line 110 of file SimEnergyDeposit.h.

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

Definition at line 111 of file SimEnergyDeposit.h.

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

Definition at line 112 of file SimEnergyDeposit.h.

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

Definition at line 141 of file SimEnergyDeposit.h.

141 { return ( endPos - startPos ).R(); }
geo::Point_t startPos
positions in (cm)
double sim::SimEnergyDeposit::T ( ) const
inline

Definition at line 133 of file SimEnergyDeposit.h.

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

Definition at line 134 of file SimEnergyDeposit.h.

134 { return startTime; }
double sim::SimEnergyDeposit::T1 ( ) const
inline

Definition at line 135 of file SimEnergyDeposit.h.

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

Definition at line 102 of file SimEnergyDeposit.h.

102 { return (startTime+endTime)/2.; }
int sim::SimEnergyDeposit::TrackID ( ) const
inline

Definition at line 103 of file SimEnergyDeposit.h.

103 { return trackID; }
int trackID
simulation track id
geo::Length_t sim::SimEnergyDeposit::X ( ) const
inline

Definition at line 130 of file SimEnergyDeposit.h.

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

Definition at line 131 of file SimEnergyDeposit.h.

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

Definition at line 132 of file SimEnergyDeposit.h.

132 { 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 189 of file SimEnergyDeposit.h.

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

Definition at line 191 of file SimEnergyDeposit.h.

double sim::SimEnergyDeposit::endTime
private

(ns)

Definition at line 193 of file SimEnergyDeposit.h.

int sim::SimEnergyDeposit::numElectrons
private

of ionization electrons

Definition at line 187 of file SimEnergyDeposit.h.

int sim::SimEnergyDeposit::numPhotons
private

of scintillation photons

Definition at line 184 of file SimEnergyDeposit.h.

int sim::SimEnergyDeposit::pdgCode
private

pdg code of particle to avoid lookup by particle type later

Definition at line 195 of file SimEnergyDeposit.h.

float sim::SimEnergyDeposit::scintYieldRatio
private

scintillation yield of LAr

Definition at line 188 of file SimEnergyDeposit.h.

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

positions in (cm)

Definition at line 190 of file SimEnergyDeposit.h.

double sim::SimEnergyDeposit::startTime
private

(ns)

Definition at line 192 of file SimEnergyDeposit.h.

int sim::SimEnergyDeposit::trackID
private

simulation track id

Definition at line 194 of file SimEnergyDeposit.h.


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