Public Member Functions | Private Attributes | List of all members
gar::rosim::ISCalculationNEST Class Reference

#include <ISCalculationNEST.h>

Inheritance diagram for gar::rosim::ISCalculationNEST:
gar::rosim::ISCalculation

Public Member Functions

 ISCalculationNEST (CLHEP::HepRandomEngine &engine)
 
virtual ~ISCalculationNEST ()
 
void Initialize ()
 
void Reset ()
 
void CalculateIonizationAndScintillation (const gar::sdp::EnergyDeposit *dep)
 
double EnergyDeposit () const
 
int NumberIonizationElectrons () const
 
int NumberScintillationPhotons () const
 
double StepSizeLimit () const
 
- Public Member Functions inherited from gar::rosim::ISCalculation
 ISCalculation ()
 
virtual ~ISCalculation ()
 

Private Attributes

NestAlgfNest
 the fast optical simulation process More...
 
double fStepSize
 maximum step to take More...
 
CLHEP::HepRandomEngine & fEngine
 random engine More...
 

Additional Inherited Members

- Protected Attributes inherited from gar::rosim::ISCalculation
double fEnergyDeposit
 total energy deposited in the step More...
 
int fNumIonElectrons
 number of ionization electrons for this step More...
 
int fNumScintPhotons
 number of scintillation photons for this step More...
 

Detailed Description

Definition at line 20 of file ISCalculationNEST.h.

Constructor & Destructor Documentation

gar::rosim::ISCalculationNEST::ISCalculationNEST ( CLHEP::HepRandomEngine &  engine)

Definition at line 18 of file ISCalculationNEST.cxx.

19  : ISCalculation()
20  , fNest(0)
21  , fEngine(engine)
22  {
23  return;
24  }
NestAlg * fNest
the fast optical simulation process
CLHEP::HepRandomEngine & fEngine
random engine
gar::rosim::ISCalculationNEST::~ISCalculationNEST ( )
virtual

Definition at line 27 of file ISCalculationNEST.cxx.

28  {
29  if(fNest) delete fNest;
30 
31  return;
32  }
NestAlg * fNest
the fast optical simulation process

Member Function Documentation

void gar::rosim::ISCalculationNEST::CalculateIonizationAndScintillation ( const gar::sdp::EnergyDeposit dep)
virtual

Implements gar::rosim::ISCalculation.

Definition at line 60 of file ISCalculationNEST.cxx.

61  {
62  // get a const representation of the track for this step
63  //const G4Track track(*(step->GetTrack()));
64 
65  //fNest->CalculateIonizationAndScintillation(track, *step);
66 
67  // compare the energy deposition of this step to what is in the fNest object
68  if(fNest->EnergyDeposition() != dep->Energy() / CLHEP::GeV)
69  MF_LOG_WARNING("ISCalculationNest")
70  << "NEST and G4 step depositions do not agree!\n"
72  << " vs "
73  << dep->Energy() / CLHEP::GeV;
74 
75  // Nest uses Geant units, GArSoft assumes energy is in units of GeV here
79 
80  return;
81  }
double EnergyDeposition() const
Definition: NestAlg.h:28
float const & Energy() const
Definition: EnergyDeposit.h:42
int fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:35
NestAlg * fNest
the fast optical simulation process
static constexpr double GeV
Definition: Units.h:28
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:33
int fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:34
int NumberScintillationPhotons() const
Definition: NestAlg.h:26
int NumberIonizationElectrons() const
Definition: NestAlg.h:27
#define MF_LOG_WARNING(category)
double gar::rosim::ISCalculationNEST::EnergyDeposit ( ) const
inlinevirtual

Implements gar::rosim::ISCalculation.

Definition at line 30 of file ISCalculationNEST.h.

30 { return fEnergyDeposit; }
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:33
void gar::rosim::ISCalculationNEST::Initialize ( )
virtual

Implements gar::rosim::ISCalculation.

Definition at line 35 of file ISCalculationNEST.cxx.

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 GArSoft uses a fudge factor to compensate, but NEST is "purer" -- no
43  // fudge factor. "
45 
46  return;
47  }
NestAlg * fNest
the fast optical simulation process
double fStepSize
maximum step to take
CLHEP::HepRandomEngine & fEngine
random engine
micrometer_as<> micrometer
Type of space stored in micrometers, in double precision.
Definition: spacetime.h:468
int gar::rosim::ISCalculationNEST::NumberIonizationElectrons ( ) const
inlinevirtual

Implements gar::rosim::ISCalculation.

Definition at line 31 of file ISCalculationNEST.h.

31 { return fNumIonElectrons; }
int fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:34
int gar::rosim::ISCalculationNEST::NumberScintillationPhotons ( ) const
inlinevirtual

Implements gar::rosim::ISCalculation.

Definition at line 32 of file ISCalculationNEST.h.

32 { return fNumScintPhotons; }
int fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:35
void gar::rosim::ISCalculationNEST::Reset ( )
virtual

Implements gar::rosim::ISCalculation.

Definition at line 50 of file ISCalculationNEST.cxx.

51  {
52  fEnergyDeposit = 0.;
53  fNumIonElectrons = 0.;
54  fNumScintPhotons = 0.;
55 
56  return;
57  }
int fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:35
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:33
int fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:34
double gar::rosim::ISCalculationNEST::StepSizeLimit ( ) const
inlinevirtual

Implements gar::rosim::ISCalculation.

Definition at line 33 of file ISCalculationNEST.h.

33 { return fStepSize; }
double fStepSize
maximum step to take

Member Data Documentation

CLHEP::HepRandomEngine& gar::rosim::ISCalculationNEST::fEngine
private

random engine

Definition at line 39 of file ISCalculationNEST.h.

NestAlg* gar::rosim::ISCalculationNEST::fNest
private

the fast optical simulation process

Definition at line 37 of file ISCalculationNEST.h.

double gar::rosim::ISCalculationNEST::fStepSize
private

maximum step to take

Definition at line 38 of file ISCalculationNEST.h.


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