LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ISCalc.cxx
Go to the documentation of this file.
1 //Class: ISCalc
3 //File: ISCalc.h and ISCalc.cxx
4 //Description: Interface to the ion and scintillation calculation algorithm
5 //2022
7 
9 
14 
15 namespace larg4 {
16 
17  //----------------------------------------------------------------------------
18  ISCalc::ISCalc() : fLArProp{lar::providerFrom<detinfo::LArPropertiesService>()} {}
19 
20  //----------------------------------------------------------------------------
21  double ISCalc::GetScintYield(sim::SimEnergyDeposit const& edep, bool prescale)
22  {
23  if (!fLArProp->ScintByParticleType()) return fLArProp->ScintYield(true);
24  switch (edep.PdgCode()) {
25  case 2212: return fLArProp->ProtonScintYield(true);
26  case 13:
27  case -13: return fLArProp->MuonScintYield(true);
28  case 211:
29  case -211: return fLArProp->PionScintYield(true);
30  case 321:
31  case -321: return fLArProp->KaonScintYield(true);
32  case 1000020040: return fLArProp->AlphaScintYield(true);
33  case 11:
34  case -11:
35  case 22: return fLArProp->ElectronScintYield(true);
36  default: return fLArProp->ElectronScintYield(true);
37  }
38  }
39 
40  //----------------------------------------------------------------------------
42  {
43  // ScintByParticleType option only controls the scintillation
44  // yield ratio, which is the ratio of fast light (singlet
45  // component) to the total light (singlet+triplet components).
46 
48 
49  switch (edep.PdgCode()) {
50  case 2212: return fLArProp->ProtonScintYieldRatio();
51  case 13:
52  case -13: return fLArProp->MuonScintYieldRatio();
53  case 211:
54  case -211: return fLArProp->PionScintYieldRatio();
55  case 321:
56  case -321: return fLArProp->KaonScintYieldRatio();
57  case 1000020040: return fLArProp->AlphaScintYieldRatio();
58  case 11:
59  case -11:
60  case 22: return fLArProp->ElectronScintYieldRatio();
61  default: return fLArProp->ElectronScintYieldRatio();
62  }
63  }
64 
65 }
virtual double ElectronScintYieldRatio() const =0
virtual double ScintYieldRatio() const =0
virtual double AlphaScintYield(bool prescale=false) const =0
Utilities related to art service access.
virtual double AlphaScintYieldRatio() const =0
Geant4 interface.
virtual double ProtonScintYieldRatio() const =0
virtual double ProtonScintYield(bool prescale=false) const =0
virtual double PionScintYieldRatio() const =0
const detinfo::LArProperties * fLArProp
Definition: ISCalc.h:33
virtual double ElectronScintYield(bool prescale=false) const =0
virtual double PionScintYield(bool prescale=false) const =0
Double_t edep
Definition: macro.C:13
virtual double MuonScintYield(bool prescale=false) const =0
virtual double KaonScintYield(bool prescale=false) const =0
contains information for a single step in the detector simulation
virtual double ScintYield(bool prescale=false) const =0
Energy deposition in the active material.
virtual double MuonScintYieldRatio() const =0
double GetScintYield(sim::SimEnergyDeposit const &edep, bool prescale)
Definition: ISCalc.cxx:21
virtual double KaonScintYieldRatio() const =0
virtual bool ScintByParticleType() const =0
double GetScintYieldRatio(sim::SimEnergyDeposit const &edep)
Definition: ISCalc.cxx:41