LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
larg4::ISCalculationNEST Class Reference

#include "ISCalculationNEST.h"

Inheritance diagram for larg4::ISCalculationNEST:
larg4::ISCalculation

Public Member Functions

 ISCalculationNEST (CLHEP::HepRandomEngine &engine)
 
void Reset ()
 
void CalculateIonizationAndScintillation (const G4Step *step)
 
double StepSizeLimit () const
 
double EnergyDeposit () const
 
double NumberIonizationElectrons () const
 
double NumberScintillationPhotons () const
 
double VisibleEnergyDeposit () const
 
double EFieldAtStep (double fEfield, const G4Step *step) const
 

Protected Attributes

double fEnergyDeposit
 total energy deposited in the step More...
 
double fNumIonElectrons
 number of ionization electrons for this step More...
 
double fNumScintPhotons
 number of scintillation photons for this step More...
 
double fVisibleEnergyDeposition
 

Private Attributes

NestAlg fNest
 the fast optical simulation process More...
 
double fStepSize
 maximum step to take More...
 

Detailed Description

Definition at line 22 of file ISCalculationNEST.h.

Constructor & Destructor Documentation

larg4::ISCalculationNEST::ISCalculationNEST ( CLHEP::HepRandomEngine &  engine)

Definition at line 19 of file ISCalculationNEST.cxx.

References fStepSize.

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  }
double fStepSize
maximum step to take
micrometer_as<> micrometer
Type of space stored in micrometers, in double precision.
Definition: spacetime.h:475
NestAlg fNest
the fast optical simulation process

Member Function Documentation

void larg4::ISCalculationNEST::CalculateIonizationAndScintillation ( const G4Step *  step)
virtual

Implements larg4::ISCalculation.

Definition at line 40 of file ISCalculationNEST.cxx.

References NestAlg::CalculateIonizationAndScintillation(), NestAlg::EnergyDeposition(), larg4::ISCalculation::fEnergyDeposit, fNest, larg4::ISCalculation::fNumIonElectrons, larg4::ISCalculation::fNumScintPhotons, larg4::ISCalculation::fVisibleEnergyDeposition, NestAlg::NumberIonizationElectrons(), NestAlg::NumberScintillationPhotons(), and track.

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  }
int NumberScintillationPhotons() const
Definition: NestAlg.h:27
const G4VParticleChange & CalculateIonizationAndScintillation(G4Track const &aTrack, G4Step const &aStep)
Definition: NestAlg.cxx:81
int NumberIonizationElectrons() const
Definition: NestAlg.h:28
double fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:33
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
Float_t track
Definition: plot.C:35
NestAlg fNest
the fast optical simulation process
double larg4::ISCalculation::EFieldAtStep ( double  fEfield,
const G4Step *  step 
) const
inherited

Definition at line 18 of file ISCalculation.cxx.

Referenced by larg4::ISCalculationSeparate::CalculateIonizationAndScintillation(), larg4::ISCalculationCorrelated::CalculateIonizationAndScintillation(), and larg4::ISCalculation::VisibleEnergyDeposit().

19  {
20  auto const* SCE = lar::providerFrom<spacecharge::SpaceChargeService>();
21  if (!SCE->EnableSimEfieldSCE()) return efield;
22  geo::Point_t midPoint{
23  (step->GetPreStepPoint()->GetPosition() + step->GetPostStepPoint()->GetPosition()) * 0.5 /
24  CLHEP::cm};
25  auto const eFieldOffsets = SCE->GetEfieldOffsets(midPoint);
26  return efield * std::hypot(1 + eFieldOffsets.X(), eFieldOffsets.Y(), eFieldOffsets.Z());
27  }
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:180
double larg4::ISCalculation::EnergyDeposit ( ) const
inlineinherited

Definition at line 22 of file ISCalculation.h.

References larg4::ISCalculation::fEnergyDeposit.

22 { return fEnergyDeposit; }
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:32
double larg4::ISCalculation::NumberIonizationElectrons ( ) const
inlineinherited

Definition at line 23 of file ISCalculation.h.

References larg4::ISCalculation::fNumIonElectrons.

23 { return fNumIonElectrons; }
double fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:33
double larg4::ISCalculation::NumberScintillationPhotons ( ) const
inlineinherited

Definition at line 24 of file ISCalculation.h.

References larg4::ISCalculation::fNumScintPhotons.

24 { return fNumScintPhotons; }
double fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:34
void larg4::ISCalculationNEST::Reset ( )
virtual

Implements larg4::ISCalculation.

Definition at line 31 of file ISCalculationNEST.cxx.

References larg4::ISCalculation::fEnergyDeposit, larg4::ISCalculation::fNumIonElectrons, larg4::ISCalculation::fNumScintPhotons, and larg4::ISCalculation::fVisibleEnergyDeposition.

32  {
33  fEnergyDeposit = 0.;
34  fNumIonElectrons = 0.;
35  fNumScintPhotons = 0.;
37  }
double fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:33
double fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:34
double fVisibleEnergyDeposition
Definition: ISCalculation.h:35
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:32
double larg4::ISCalculationNEST::StepSizeLimit ( ) const
inlinevirtual

Implements larg4::ISCalculation.

Definition at line 28 of file ISCalculationNEST.h.

28 { return fStepSize; }
double fStepSize
maximum step to take
double larg4::ISCalculation::VisibleEnergyDeposit ( ) const
inlineinherited

Member Data Documentation

NestAlg larg4::ISCalculationNEST::fNest
private

the fast optical simulation process

Definition at line 31 of file ISCalculationNEST.h.

Referenced by CalculateIonizationAndScintillation().

double larg4::ISCalculationNEST::fStepSize
private

maximum step to take

Definition at line 32 of file ISCalculationNEST.h.

Referenced by ISCalculationNEST().

double larg4::ISCalculation::fVisibleEnergyDeposition
protectedinherited

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