1 #include "CLHEP/Vector/ThreeVector.h" 10 #include "Geant4/G4ParticleTypes.hh" 11 #include "Geant4/G4LossTableManager.hh" 12 #include "Geant4/G4EmSaturation.hh" 21 #include "cetlib_except/exception.h" 43 double density = detprop->
Density(detprop->Temperature());
62 fEMSaturation = G4LossTableManager::Instance()->EmSaturation();
102 G4ThreeVector totstep = step->GetPostStepPoint()->GetPosition();
103 totstep -= step->GetPreStepPoint()->GetPosition();
105 double dx = totstep.mag()/CLHEP::cm;
111 if(dEdx < 1.) dEdx = 1.;
115 double Xi =
fModBoxB * dEdx / EFieldStep;
130 <<
" MeV deposited with " << recomb
134 G4MaterialPropertiesTable* mpt = step->GetTrack()->GetMaterial()->GetMaterialPropertiesTable();
136 throw cet::exception(
"ISCalculationSeparate") <<
"Cannot find materials property table" 137 <<
" for this step! " 138 << step->GetTrack()->GetMaterial() <<
"\n";
141 double scintYield = mpt->GetConstProperty(
"SCINTILLATIONYIELD");
145 LOG_DEBUG(
"ISCalculationSeparate") <<
"scintillating by particle type";
148 G4ParticleDefinition *pDef = step->GetTrack()->GetDynamicParticle()->GetDefinition();
156 if(pDef == G4Proton::ProtonDefinition()){
157 scintYield = mpt->GetConstProperty(
"PROTONSCINTILLATIONYIELD");
160 else if(pDef == G4MuonPlus::MuonPlusDefinition() ||
161 pDef == G4MuonMinus::MuonMinusDefinition()){
162 scintYield = mpt->GetConstProperty(
"MUONSCINTILLATIONYIELD");
165 else if(pDef == G4PionPlus::PionPlusDefinition() ||
166 pDef == G4PionMinus::PionMinusDefinition()){
167 scintYield = mpt->GetConstProperty(
"PIONSCINTILLATIONYIELD");
170 else if(pDef == G4KaonPlus::KaonPlusDefinition() ||
171 pDef == G4KaonMinus::KaonMinusDefinition()){
172 scintYield = mpt->GetConstProperty(
"KAONSCINTILLATIONYIELD");
175 else if(pDef == G4Alpha::AlphaDefinition()){
176 scintYield = mpt->GetConstProperty(
"ALPHASCINTILLATIONYIELD");
180 else if(pDef == G4Electron::ElectronDefinition() ||
181 pDef == G4Gamma::GammaDefinition()){
182 scintYield = mpt->GetConstProperty(
"ELECTRONSCINTILLATIONYIELD");
186 scintYield = mpt->GetConstProperty(
"ELECTRONSCINTILLATIONYIELD");
195 throw cet::exception(
"ISCalculationSeparate") <<
"Request for scintillation yield for energy " 196 <<
"deposit and particle type without correct " 197 <<
"entry in MaterialPropertiesTable\n" 198 <<
"ScintillationByParticleType requires at " 199 <<
"minimum that ELECTRONSCINTILLATIONYIELD is " 200 <<
"set by the user\n";
227 <<
" step length: " << step->GetStepLength()/CLHEP::cm;
Store parameters for running LArG4.
double VoxelSizeX() const
Access to voxel dimensions and offsets.
bool fUseModBoxRecomb
from LArG4Parameters service
double fEnergyDeposit
total energy deposited in the step
G4EmSaturation * fEMSaturation
pointer to EM saturation
double fScintYieldFactor
scintillation yield factor
Encapsulates calculation of LArVoxelID and LArVoxel parameters.
double fGeVToElectrons
conversion factor from LArProperties service
bool UseModBoxRecomb() const
double VoxelSizeY() const
double fRecombA
from LArG4Parameters service
virtual ~ISCalculationSeparate()
double fNumIonElectrons
number of ionization electrons for this step
double fNumScintPhotons
number of scintillation photons for this step
double VoxelSizeZ() const
double fEfield
value of electric field from LArProperties service
double EFieldAtStep(double efield, sim::SimEnergyDeposit const &edep)
double fModBoxB
from LArG4Parameters service
bool fScintByParticleType
from LArProperties service
void CalculateIonizationAndScintillation(sim::SimEnergyDeposit const &edep)
double fStepSize
maximum step to take
virtual double Density(double temperature) const =0
Returns argon density at a given temperature.
double fRecombk
from LArG4Parameters service
double fVisibleEnergyDeposition
double fModBoxA
from LArG4Parameters service
virtual bool ScintByParticleType() const =0
double GeVToElectrons() const
cet::coded_exception< error, detail::translate > exception