ISCalculationNEST.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file ISCalculationNEST.cxx
3 /// \brief Interface to algorithm class for calculating ionization electrons
4 /// and scintillation photons using nest
5 ///
6 /// \author brebel@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
8 
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  //----------------------------------------------------------------------------
31  void
33  {
34  fEnergyDeposit = 0.;
35  fNumIonElectrons = 0.;
36  fNumScintPhotons = 0.;
38  }
39 
40  //----------------------------------------------------------------------------
41  void
43  {
44  // get a const representation of the track for this step
45  const G4Track track(*(step->GetTrack()));
46 
48 
49  // compare the energy deposition of this step to what is in the fNest object
50  if (fNest.EnergyDeposition() != step->GetTotalEnergyDeposit() / CLHEP::MeV)
51  mf::LogWarning("ISCalculationNest")
52  << "NEST and G4 step depositions do not agree!\n"
53  << fNest.EnergyDeposition() << " vs " << step->GetTotalEnergyDeposit() / CLHEP::MeV;
54 
55  // Nest uses Geant units, LArSoft assumes energy is in units of MeV here
59  fVisibleEnergyDeposition = 0.; //Not implimented for NEST.
60  }
61 
62 } // namespace
int NumberScintillationPhotons() const
Definition: NestAlg.h:26
void CalculateIonizationAndScintillation(const G4Step *step)
Geant4 interface.
static constexpr double MeV
Definition: Units.h:129
const G4VParticleChange & CalculateIonizationAndScintillation(G4Track const &aTrack, G4Step const &aStep)
Definition: NestAlg.cxx:81
int NumberIonizationElectrons() const
Definition: NestAlg.h:27
double fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:49
double fStepSize
maximum step to take
ISCalculationNEST(CLHEP::HepRandomEngine &engine)
double fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:50
double fVisibleEnergyDeposition
Definition: ISCalculation.h:51
double EnergyDeposition() const
Definition: NestAlg.h:28
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:48
micrometer_as<> micrometer
Type of space stored in micrometers, in double precision.
Definition: spacetime.h:468
NestAlg fNest
the fast optical simulation process