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