16 #include "cetlib_except/exception.h" 31 (CLHEP::HepRandomEngine& engine)
48 (CLHEP::HepRandomEngine& engine)
66 mf::LogWarning(
"IonizationAndScintillation") <<
"No ISCalculation set, this can't be good.";
87 fStepSize = tfs->
make<TH1F>(
"stepSize",
";Step Size (CLHEP::cm);Steps",
99 500, 0., 5000., 500, 0., 5000.);
115 if(
fStepNumber==step->GetTrack()->GetCurrentStepNumber() &&
fTrkID==step->GetTrack()->GetTrackID())
118 fStepNumber=step->GetTrack()->GetCurrentStepNumber();
119 fTrkID=step->GetTrack()->GetTrackID();
127 if(step->GetTrack()->GetMaterial()->GetName() !=
"LAr")
return;
131 if( step->GetTotalEnergyDeposit() > 0 ){
135 LOG_DEBUG(
"IonizationAndScintillation") <<
"Step Size: " <<
fStep->GetStepLength()/CLHEP::cm
140 G4ThreeVector totstep =
fStep->GetPostStepPoint()->GetPosition();
141 totstep -=
fStep->GetPreStepPoint()->GetPosition();
144 fStepSize ->Fill(totstep.mag()/CLHEP::cm);
150 double const stepSize = totstep.mag()/CLHEP::cm;
151 if (stepSize > 0.0) {
Store parameters for running LArG4.
TH1F * fPhotonsPerEDep
histogram of photons per MeV deposited
TH1F * fElectronsPerEDep
histogram of electrons per MeV deposited
virtual void Initialize()=0
int fStepNumber
last StepNumber checked
virtual void CalculateIonizationAndScintillation(const G4Step *step)=0
larg4::ISCalculation * fISCalc
const std::string IonAndScintCalculator() const
void Reset(const G4Step *step)
G4Step const * fStep
pointer to the current G4 step
TH1F * fElectronsPerLength
histogram of electrons per cm
double NumberScintillationPhotons() const
double NumberIonizationElectrons() const
Interface to algorithm class for a specific calculation of ionization electrons and scintillation pho...
CLHEP::HepRandomEngine & fEngine
random engine
static IonizationAndScintillation * Instance()
static IonizationAndScintillation * CreateInstance(CLHEP::HepRandomEngine &engine)
~IonizationAndScintillation()
TH1F * fStepSize
histogram of the step sizes
TH1F * fElectronsPerStep
histogram of electrons per step
double EnergyDeposit() const
T * make(ARGS...args) const
TH1F * fPhotonsPerStep
histogram of the photons per step
Singleton to access a unified treatment of ionization and scintillation in LAr.
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
TH1F * fEnergyPerStep
histogram of the energy deposited per step
TH1F * fPhotonsPerLength
histogram of photons per cm
TH2F * fElectronsVsPhotons
histogram of electrons vs photons per step
IonizationAndScintillation(CLHEP::HepRandomEngine &engine)
std::string fISCalculator
name of calculator to use, NEST or Separate
static IonizationAndScintillation * gInstance
int fTrkID
last TrkID checked