22 #include "art/Framework/Services/Registry/ServiceHandle.h"
23 #include "messagefacility/MessageLogger/MessageLogger.h"
31 fSCE = lar::providerFrom<spacecharge::SpaceChargeService>();
37 art::ServiceHandle<sim::LArG4Parameters const> LArG4PropHandle;
38 fRecombA = LArG4PropHandle->RecombA();
39 fRecombk = LArG4PropHandle->Recombk();
40 fModBoxA = LArG4PropHandle->ModBoxA();
41 fModBoxB = LArG4PropHandle->ModBoxB();
56 double dEdx = (ds <= 0.0) ? 0.0 : e /
ds;
60 if (dEdx < 1.) { dEdx = 1.; }
65 double const Xi = scaled_modboxb * dEdx / EFieldStep;
74 recomb =
fRecombA / (1. + dEdx * scaled_recombk / EFieldStep);
80 MF_LOG_DEBUG(
"ISCalcSeparate")
81 <<
" Electrons produced for " << edep.
Energy() <<
" MeV deposited with " << recomb
82 <<
" recombination: " << numIonElectrons << std::endl;
83 return numIonElectrons;
87 std::pair<double, double>
99 auto const numElectrons =
CalcIon(detProp, edep);
100 auto const [numPhotons, scintYieldRatio] =
CalcScint(edep);
101 return {edep.
Energy(), numElectrons, numPhotons, scintYieldRatio};
111 efield + efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
Store parameters for running LArG4.
geo::Length_t StepLength() const
Utilities related to art service access.
std::pair< double, double > CalcScint(sim::SimEnergyDeposit const &edep)
double Temperature() const
In kelvin.
double fModBoxA
from LArG4Parameters service
ISCalcData CalcIonAndScint(detinfo::DetectorPropertiesData const &detProp, sim::SimEnergyDeposit const &edep) override
double fRecombk
from LArG4Parameters service
double Efield(unsigned int planegap=0) const
kV/cm
double CalcIon(detinfo::DetectorPropertiesData const &detProp, sim::SimEnergyDeposit const &edep)
virtual geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const =0
double fRecombA
from LArG4Parameters service
geo::Point_t MidPoint() const
double Density(double temperature=0.) const
Returns argon density at a given temperature.
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
double EFieldAtStep(double efield, sim::SimEnergyDeposit const &edep) override
const spacecharge::SpaceCharge * fSCE
contains information for a single step in the detector simulation
Energy deposition in the active material.
double fGeVToElectrons
from LArG4Parameters service
double fModBoxB
from LArG4Parameters service
double GetScintYield(sim::SimEnergyDeposit const &edep, bool prescale)
double GetScintYieldRatio(sim::SimEnergyDeposit const &edep)
virtual bool EnableSimEfieldSCE() const =0
bool fUseModBoxRecomb
from LArG4Parameters service