LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ISCalculationNEST.cxx
Go to the documentation of this file.
1 
9 #include "Geant4/G4Step.hh"
10 
13 
15 
16 namespace larg4 {
17 
18  //----------------------------------------------------------------------------
19  ISCalculationNEST::ISCalculationNEST(CLHEP::HepRandomEngine& engine)
20  : // \todo should ideally make the yield factor passed to the NestAlg ctor a parameter
21  fNest(1., engine)
22  {
23  // Set the step size to small value if NEST is chosen, per Matthew Szydagis,
24  // "because without delta rays, the yields are wrong. The ICARUS model that is
25  // in LArSoft uses a fudge factor to compensate, but NEST is "purer" -- no
26  // fudge factor. "
28  }
29 
30  //----------------------------------------------------------------------------
32  {
33  fEnergyDeposit = 0.;
34  fNumIonElectrons = 0.;
35  fNumScintPhotons = 0.;
37  }
38 
39  //----------------------------------------------------------------------------
41  {
42  // get a const representation of the track for this step
43  const G4Track track(*(step->GetTrack()));
44 
46 
47  // compare the energy deposition of this step to what is in the fNest object
48  if (fNest.EnergyDeposition() != step->GetTotalEnergyDeposit() / CLHEP::MeV)
49  mf::LogWarning("ISCalculationNest")
50  << "NEST and G4 step depositions do not agree!\n"
51  << fNest.EnergyDeposition() << " vs " << step->GetTotalEnergyDeposit() / CLHEP::MeV;
52 
53  // Nest uses Geant units, LArSoft assumes energy is in units of MeV here
54  fEnergyDeposit = fNest.EnergyDeposition() / CLHEP::MeV;
57  fVisibleEnergyDeposition = 0.; //Not implimented for NEST.
58  }
59 
60 } // namespace
int NumberScintillationPhotons() const
Definition: NestAlg.h:27
void CalculateIonizationAndScintillation(const G4Step *step)
Geant4 interface.
const G4VParticleChange & CalculateIonizationAndScintillation(G4Track const &aTrack, G4Step const &aStep)
Definition: NestAlg.cxx:81
Interface to algorithm class for a specific calculation of ionization electrons and scintillation pho...
int NumberIonizationElectrons() const
Definition: NestAlg.h:28
double fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:33
double fStepSize
maximum step to take
ISCalculationNEST(CLHEP::HepRandomEngine &engine)
double fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:34
double fVisibleEnergyDeposition
Definition: ISCalculation.h:35
double EnergyDeposition() const
Definition: NestAlg.h:29
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:32
micrometer_as<> micrometer
Type of space stored in micrometers, in double precision.
Definition: spacetime.h:475
Float_t track
Definition: plot.C:35
NestAlg fNest
the fast optical simulation process