9 #include "Geant4/G4EmSaturation.hh" 10 #include "Geant4/G4LossTableManager.hh" 11 #include "Geant4/G4ParticleTypes.hh" 20 #include "cetlib_except/exception.h" 33 double density = detProp.Density(detProp.Temperature());
52 fEMSaturation = G4LossTableManager::Instance()->EmSaturation();
88 G4ThreeVector totstep = step->GetPostStepPoint()->GetPosition();
89 totstep -= step->GetPreStepPoint()->GetPosition();
91 double dx = totstep.mag() / CLHEP::cm;
97 if (dEdx < 1.) dEdx = 1.;
101 double Xi =
fModBoxB * dEdx / EFieldStep;
115 <<
" Electrons produced for " <<
fEnergyDeposit <<
" MeV deposited with " << recomb
119 G4MaterialPropertiesTable* mpt = step->GetTrack()->GetMaterial()->GetMaterialPropertiesTable();
122 <<
"Cannot find materials property table" 123 <<
" for this step! " << step->GetTrack()->GetMaterial() <<
"\n";
126 double scintYield = mpt->GetConstProperty(
"SCINTILLATIONYIELD");
130 MF_LOG_DEBUG(
"ISCalculationSeparate") <<
"scintillating by particle type";
133 G4ParticleDefinition* pDef = step->GetTrack()->GetDynamicParticle()->GetDefinition();
140 if (pDef == G4Proton::ProtonDefinition()) {
141 scintYield = mpt->GetConstProperty(
"PROTONSCINTILLATIONYIELD");
144 else if (pDef == G4MuonPlus::MuonPlusDefinition() ||
145 pDef == G4MuonMinus::MuonMinusDefinition()) {
146 scintYield = mpt->GetConstProperty(
"MUONSCINTILLATIONYIELD");
149 else if (pDef == G4PionPlus::PionPlusDefinition() ||
150 pDef == G4PionMinus::PionMinusDefinition()) {
151 scintYield = mpt->GetConstProperty(
"PIONSCINTILLATIONYIELD");
154 else if (pDef == G4KaonPlus::KaonPlusDefinition() ||
155 pDef == G4KaonMinus::KaonMinusDefinition()) {
156 scintYield = mpt->GetConstProperty(
"KAONSCINTILLATIONYIELD");
159 else if (pDef == G4Alpha::AlphaDefinition()) {
160 scintYield = mpt->GetConstProperty(
"ALPHASCINTILLATIONYIELD");
164 else if (pDef == G4Electron::ElectronDefinition() || pDef == G4Gamma::GammaDefinition()) {
165 scintYield = mpt->GetConstProperty(
"ELECTRONSCINTILLATIONYIELD");
169 scintYield = mpt->GetConstProperty(
"ELECTRONSCINTILLATIONYIELD");
179 <<
"Request for scintillation yield for energy " 180 <<
"deposit and particle type without correct " 181 <<
"entry in MaterialPropertiesTable\n" 182 <<
"ScintillationByParticleType requires at " 183 <<
"minimum that ELECTRONSCINTILLATIONYIELD is " 184 <<
"set by the user\n";
199 <<
" saturation: " <<
fEMSaturation->VisibleEnergyDepositionAtAStep(step)
200 <<
" step length: " << step->GetStepLength() / CLHEP::cm;
Store parameters for running LArG4.
double VoxelSizeX() const
Access to voxel dimensions and offsets.
Utilities related to art service access.
bool fUseModBoxRecomb
from LArG4Parameters service
G4EmSaturation * fEMSaturation
pointer to EM saturation
double fScintYieldFactor
scintillation yield factor
Encapsulates calculation of LArVoxelID and LArVoxel parameters.
double EFieldAtStep(double fEfield, const G4Step *step) const
void CalculateIonizationAndScintillation(const G4Step *step) override
double fGeVToElectrons
conversion factor from LArProperties service
bool UseModBoxRecomb() const
double VoxelSizeY() const
double fRecombA
from LArG4Parameters service
double VoxelSizeZ() const
double fEfield
value of electric field from LArProperties service
double fNumIonElectrons
number of ionization electrons for this step
double fModBoxB
from LArG4Parameters service
bool fScintByParticleType
from LArProperties service
double fStepSize
maximum step to take
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
double fRecombk
from LArG4Parameters service
double fNumScintPhotons
number of scintillation photons for this step
double fVisibleEnergyDeposition
double fModBoxA
from LArG4Parameters service
double fEnergyDeposit
total energy deposited in the step
virtual bool ScintByParticleType() const =0
double GeVToElectrons() const
cet::coded_exception< error, detail::translate > exception