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();
90 G4ThreeVector totstep = step->GetPostStepPoint()->GetPosition();
91 totstep -= step->GetPreStepPoint()->GetPosition();
99 if (dEdx < 1.) dEdx = 1.;
103 double Xi =
fModBoxB * dEdx / EFieldStep;
117 <<
" Electrons produced for " <<
fEnergyDeposit <<
" MeV deposited with " << recomb
121 G4MaterialPropertiesTable* mpt = step->GetTrack()->GetMaterial()->GetMaterialPropertiesTable();
124 <<
"Cannot find materials property table" 125 <<
" for this step! " << step->GetTrack()->GetMaterial() <<
"\n";
128 double scintYield = mpt->GetConstProperty(
"SCINTILLATIONYIELD");
132 MF_LOG_DEBUG(
"ISCalculationSeparate") <<
"scintillating by particle type";
135 G4ParticleDefinition* pDef = step->GetTrack()->GetDynamicParticle()->GetDefinition();
142 if (pDef == G4Proton::ProtonDefinition()) {
143 scintYield = mpt->GetConstProperty(
"PROTONSCINTILLATIONYIELD");
146 else if (pDef == G4MuonPlus::MuonPlusDefinition() ||
147 pDef == G4MuonMinus::MuonMinusDefinition()) {
148 scintYield = mpt->GetConstProperty(
"MUONSCINTILLATIONYIELD");
151 else if (pDef == G4PionPlus::PionPlusDefinition() ||
152 pDef == G4PionMinus::PionMinusDefinition()) {
153 scintYield = mpt->GetConstProperty(
"PIONSCINTILLATIONYIELD");
156 else if (pDef == G4KaonPlus::KaonPlusDefinition() ||
157 pDef == G4KaonMinus::KaonMinusDefinition()) {
158 scintYield = mpt->GetConstProperty(
"KAONSCINTILLATIONYIELD");
161 else if (pDef == G4Alpha::AlphaDefinition()) {
162 scintYield = mpt->GetConstProperty(
"ALPHASCINTILLATIONYIELD");
166 else if (pDef == G4Electron::ElectronDefinition() || pDef == G4Gamma::GammaDefinition()) {
167 scintYield = mpt->GetConstProperty(
"ELECTRONSCINTILLATIONYIELD");
171 scintYield = mpt->GetConstProperty(
"ELECTRONSCINTILLATIONYIELD");
181 <<
"Request for scintillation yield for energy " 182 <<
"deposit and particle type without correct " 183 <<
"entry in MaterialPropertiesTable\n" 184 <<
"ScintillationByParticleType requires at " 185 <<
"minimum that ELECTRONSCINTILLATIONYIELD is " 186 <<
"set by the user\n";
201 <<
" saturation: " <<
fEMSaturation->VisibleEnergyDepositionAtAStep(step)
202 <<
" step length: " << step->GetStepLength() /
CLHEP::cm;
static constexpr double cm
Store parameters for running LArG4.
double VoxelSizeX() const
Access to voxel dimensions and offsets.
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
static constexpr double MeV
double fRecombA
from LArG4Parameters service
double VoxelSizeZ() const
double fEfield
value of electric field from LArProperties service
double dEdx(float dqdx, float Efield)
double fNumIonElectrons
number of ionization electrons for this step
double fModBoxB
from LArG4Parameters service
bool fScintByParticleType
from LArProperties service
static int max(int a, int b)
double fStepSize
maximum step to take
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