All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
larg4::ISCalculationCorrelated Class Reference

#include <ISCalculationCorrelated.h>

Inheritance diagram for larg4::ISCalculationCorrelated:
larg4::ISCalculation

Public Member Functions

 ISCalculationCorrelated (detinfo::DetectorPropertiesData const &detProp)
 
void Reset ()
 
void CalculateIonizationAndScintillation (const G4Step *step)
 
double StepSizeLimit () const
 
- Public Member Functions inherited from larg4::ISCalculation
virtual ~ISCalculation ()=default
 
double EnergyDeposit () const
 
double NumberIonizationElectrons () const
 
double NumberScintillationPhotons () const
 
double VisibleEnergyDeposit () const
 
double EFieldAtStep (double fEfield, const G4Step *step) const
 

Private Member Functions

double EscapingEFraction (double const dEdx)
 
double FieldCorrection (double const EF, double const dEdx)
 

Private Attributes

double fStepSize
 maximum step to take More...
 
double fEfield
 value of electric field from LArProperties service More...
 
double fWion
 W_ion (23.6 eV) == 1/fGeVToElectrons. More...
 
double fWph
 W_ph (19.5 eV) More...
 
double fScintPreScale
 scintillation pre-scale from LArProperties service More...
 
double fRecombA
 from LArG4Parameters service More...
 
double fRecombk
 from LArG4Parameters service More...
 
double fModBoxA
 from LArG4Parameters service More...
 
double fModBoxB
 from LArG4Parameters service More...
 
double fLarqlChi0A
 from LArG4Parameters service More...
 
double fLarqlChi0B
 from LArG4Parameters service More...
 
double fLarqlChi0C
 from LArG4Parameters service More...
 
double fLarqlChi0D
 from LArG4Parameters service More...
 
double fLarqlAlpha
 from LArG4Parameters service More...
 
double fLarqlBeta
 from LArG4Parameters service More...
 
bool fUseModBoxRecomb
 from LArG4Parameters service More...
 
bool fUseModLarqlRecomb
 from LArG4Parameters service More...
 

Additional Inherited Members

- Protected Attributes inherited from larg4::ISCalculation
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
 

Detailed Description

Definition at line 30 of file ISCalculationCorrelated.h.

Constructor & Destructor Documentation

larg4::ISCalculationCorrelated::ISCalculationCorrelated ( detinfo::DetectorPropertiesData const &  detProp)
explicit

Definition at line 39 of file ISCalculationCorrelated.cxx.

40  {
41  std::cout << "LegacyLArG4/ISCalculationCorrelated Initialize." << std::endl;
42  art::ServiceHandle<sim::LArG4Parameters const> lgpHandle;
43  const detinfo::LArProperties* larp = lar::providerFrom<detinfo::LArPropertiesService>();
44 
45  double density = detProp.Density(detProp.Temperature());
46  fEfield = detProp.Efield();
47  fScintPreScale = larp->ScintPreScale();
48 
49  // ionization work function
50  fWion = 1. / lgpHandle->GeVToElectrons() * 1e3; // MeV
51 
52  // ion+excitation work function (\todo: get from LArG4Parameters or LArProperties?)
53  fWph = 19.5 * 1e-6; // MeV
54 
55  // the recombination coefficient is in g/(MeVcm^2), but
56  // we report energy depositions in MeV/cm, need to divide
57  // Recombk from the LArG4Parameters service by the density
58  // of the argon we got above.
59  fRecombA = lgpHandle->RecombA();
60  fRecombk = lgpHandle->Recombk() / density;
61  fModBoxA = lgpHandle->ModBoxA();
62  fModBoxB = lgpHandle->ModBoxB() / density;
63  fLarqlChi0A = lgpHandle->LarqlChi0A();
64  fLarqlChi0B = lgpHandle->LarqlChi0B();
65  fLarqlChi0C = lgpHandle->LarqlChi0C();
66  fLarqlChi0D = lgpHandle->LarqlChi0D();
67  fLarqlAlpha = lgpHandle->LarqlAlpha();
68  fLarqlBeta = lgpHandle->LarqlBeta();
69  fUseModBoxRecomb = lgpHandle->UseModBoxRecomb();
70  fUseModLarqlRecomb = lgpHandle->UseModLarqlRecomb();
71 
72  // determine the step size using the voxel sizes
73  art::ServiceHandle<sim::LArVoxelCalculator const> lvc;
74  double maxsize =
75  std::max(lvc->VoxelSizeX(), std::max(lvc->VoxelSizeY(), lvc->VoxelSizeZ())) * CLHEP::cm;
76 
77  fStepSize = 0.1 * maxsize;
78  }
double fWion
W_ion (23.6 eV) == 1/fGeVToElectrons.
double fModBoxA
from LArG4Parameters service
double fLarqlChi0D
from LArG4Parameters service
double fLarqlChi0B
from LArG4Parameters service
double fLarqlAlpha
from LArG4Parameters service
bool fUseModLarqlRecomb
from LArG4Parameters service
double fLarqlChi0C
from LArG4Parameters service
bool fUseModBoxRecomb
from LArG4Parameters service
virtual double ScintPreScale(bool prescale=true) const =0
double fStepSize
maximum step to take
double fScintPreScale
scintillation pre-scale from LArProperties service
do i e
double fRecombA
from LArG4Parameters service
double fLarqlChi0A
from LArG4Parameters service
double fRecombk
from LArG4Parameters service
double fEfield
value of electric field from LArProperties service
BEGIN_PROLOG could also be cout
auto const detProp
double fModBoxB
from LArG4Parameters service
double fLarqlBeta
from LArG4Parameters service

Member Function Documentation

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

Implements larg4::ISCalculation.

Definition at line 95 of file ISCalculationCorrelated.cxx.

96  {
97  fEnergyDeposit = step->GetTotalEnergyDeposit() / CLHEP::MeV;
98 
99  // calculate total quanta (ions + excitons)
100  double Nq = fEnergyDeposit / fWph;
101 
102  // Get the recombination factor for this voxel - Nucl.Instrum.Meth.A523:275-286,2004
103  // R = A/(1 + (dE/dx)*k)
104  // dE/dx is given by the voxel energy deposition, but have to convert it to MeV/cm
105  // from GeV/voxel width
106  // A = 0.800 +/- 0.003
107  // k = (0.097+/-0.001) g/(MeVcm^2)
108  // the dx depends on the trajectory of the step
109  // k should be divided by the density as our dE/dx is in MeV/cm,
110  // the division is handled in the constructor when we set fRecombk
111  // B.Baller: Add Modified Box recombination - ArgoNeuT result submitted to JINST
112 
113  G4ThreeVector totstep = step->GetPostStepPoint()->GetPosition();
114  totstep -= step->GetPreStepPoint()->GetPosition();
115  double dx = totstep.mag() / CLHEP::cm;
116  double dEdx = (dx == 0.0) ? 0.0 : fEnergyDeposit / dx;
117  double EFieldStep = EFieldAtStep(fEfield, step);
118 
119  // Guard against spurious values of dE/dx. Note: assumes density of LAr
120  if (dEdx < 1.) dEdx = 1.;
121 
122  // calculate the recombination survival fraction
123  double recomb = 0.;
124  if (fUseModBoxRecomb) {
125  if (dx) {
126  double Xi = fModBoxB * dEdx / EFieldStep;
127  recomb = log(fModBoxA + Xi) / Xi;
128  }
129  else
130  recomb = 0;
131  }
132  else {
133  recomb = fRecombA / (1. + dEdx * fRecombk / EFieldStep);
134  }
135 
136  if(fUseModLarqlRecomb){ //Use corrections from LArQL model
137  recomb += EscapingEFraction(dEdx)*FieldCorrection(EFieldStep, dEdx); //Correction for low EF
138  }
139 
140  // using this recombination, calculate number of ionization electrons
141  fNumIonElectrons = (fEnergyDeposit / fWion) * recomb;
142 
143  // calculate scintillation photons
145 
146  // apply the scintillation pre-scaling (normally this is already folded into
147  // the particle-specific scintillation yields)
149 
150  MF_LOG_DEBUG("ISCalculationCorrelated")
151  << " Electrons produced for " << fEnergyDeposit << " MeV deposited with " << recomb
152  << " recombination: " << fNumIonElectrons;
153  MF_LOG_DEBUG("ISCalculationCorrelated") << "number photons: " << fNumScintPhotons;
154 
155  return;
156  }
double fWion
W_ion (23.6 eV) == 1/fGeVToElectrons.
double fModBoxA
from LArG4Parameters service
double EFieldAtStep(double fEfield, const G4Step *step) const
bool fUseModLarqlRecomb
from LArG4Parameters service
util::quantities::megaelectronvolt MeV
double fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:49
bool fUseModBoxRecomb
from LArG4Parameters service
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2687
double fScintPreScale
scintillation pre-scale from LArProperties service
double EscapingEFraction(double const dEdx)
double fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:50
double fRecombA
from LArG4Parameters service
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:48
double fRecombk
from LArG4Parameters service
double FieldCorrection(double const EF, double const dEdx)
double fEfield
value of electric field from LArProperties service
double fModBoxB
from LArG4Parameters service
double larg4::ISCalculationCorrelated::EscapingEFraction ( double const  dEdx)
private

Definition at line 158 of file ISCalculationCorrelated.cxx.

158  { //LArQL chi0 function = fraction of escaping electrons
160  }
double fLarqlChi0D
from LArG4Parameters service
double fLarqlChi0B
from LArG4Parameters service
double fLarqlChi0C
from LArG4Parameters service
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2687
double fLarqlChi0A
from LArG4Parameters service
double larg4::ISCalculationCorrelated::FieldCorrection ( double const  EF,
double const  dEdx 
)
private

Definition at line 162 of file ISCalculationCorrelated.cxx.

162  { //LArQL f_corr function = correction factor for electric field dependence
163  return exp(-EF/(fLarqlAlpha*log(dEdx)+fLarqlBeta));
164  }
double fLarqlAlpha
from LArG4Parameters service
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2687
double fLarqlBeta
from LArG4Parameters service
void larg4::ISCalculationCorrelated::Reset ( )
virtual

Implements larg4::ISCalculation.

Definition at line 83 of file ISCalculationCorrelated.cxx.

84  {
85  fEnergyDeposit = 0.;
86  fNumScintPhotons = 0.;
87  fNumIonElectrons = 0.;
88 
89  return;
90  }
double fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:49
double fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:50
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:48
double larg4::ISCalculationCorrelated::StepSizeLimit ( ) const
inlinevirtual

Implements larg4::ISCalculation.

Definition at line 37 of file ISCalculationCorrelated.h.

38  {
39  return fStepSize;
40  }
double fStepSize
maximum step to take

Member Data Documentation

double larg4::ISCalculationCorrelated::fEfield
private

value of electric field from LArProperties service

Definition at line 44 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fLarqlAlpha
private

from LArG4Parameters service

Definition at line 56 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fLarqlBeta
private

from LArG4Parameters service

Definition at line 57 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fLarqlChi0A
private

from LArG4Parameters service

Definition at line 52 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fLarqlChi0B
private

from LArG4Parameters service

Definition at line 53 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fLarqlChi0C
private

from LArG4Parameters service

Definition at line 54 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fLarqlChi0D
private

from LArG4Parameters service

Definition at line 55 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fModBoxA
private

from LArG4Parameters service

Definition at line 50 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fModBoxB
private

from LArG4Parameters service

Definition at line 51 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fRecombA
private

from LArG4Parameters service

Definition at line 48 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fRecombk
private

from LArG4Parameters service

Definition at line 49 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fScintPreScale
private

scintillation pre-scale from LArProperties service

Definition at line 47 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fStepSize
private

maximum step to take

Definition at line 43 of file ISCalculationCorrelated.h.

bool larg4::ISCalculationCorrelated::fUseModBoxRecomb
private

from LArG4Parameters service

Definition at line 58 of file ISCalculationCorrelated.h.

bool larg4::ISCalculationCorrelated::fUseModLarqlRecomb
private

from LArG4Parameters service

Definition at line 59 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fWion
private

W_ion (23.6 eV) == 1/fGeVToElectrons.

Definition at line 45 of file ISCalculationCorrelated.h.

double larg4::ISCalculationCorrelated::fWph
private

W_ph (19.5 eV)

Definition at line 46 of file ISCalculationCorrelated.h.


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