LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
IonizationAndScintillation.h
Go to the documentation of this file.
1 #ifndef LARG4_IONIZATIONANDSCINTILLATION_H
9 #define LARG4_IONIZATIONANDSCINTILLATION_H
10 
11 #include <memory>
12 #include <string>
13 
15 
16 class G4Step;
17 class TH1F;
18 class TH2F;
19 
20 namespace CLHEP {
21  class HepRandomEngine;
22 }
23 
24 namespace detinfo {
25  class DetectorPropertiesData;
26 }
27 
28 namespace larg4 {
29 
30  // The Ionization and Scintillation singleton
32  public:
33  static IonizationAndScintillation* CreateInstance(
34  detinfo::DetectorPropertiesData const& detProp,
35  CLHEP::HepRandomEngine& engine);
36  static IonizationAndScintillation* Instance();
37 
38  // Method to reset the internal variables held in the ISCalculation
39  // This method should be called at the start of any G4Step
40  void Reset(const G4Step* step);
41 
42  double EnergyDeposit() const { return fISCalc->EnergyDeposit(); }
43  double VisibleEnergyDeposit() const { return fISCalc->VisibleEnergyDeposit(); }
44  double NumberIonizationElectrons() const { return fISCalc->NumberIonizationElectrons(); }
45  double NumberScintillationPhotons() const { return fISCalc->NumberScintillationPhotons(); }
46  double StepSizeLimit() const { return fISCalc->StepSizeLimit(); }
47 
48  private:
50  CLHEP::HepRandomEngine& engine);
51 
52  std::unique_ptr<larg4::ISCalculation>
54  std::string fISCalculator;
56  G4Step const* fStep{nullptr};
57  int fStepNumber{-1};
58  int fTrkID{-1};
59 
60  TH1F* fElectronsPerStep{nullptr};
61  TH1F* fStepSize{nullptr};
62  TH1F* fPhotonsPerStep{nullptr};
63  TH1F* fEnergyPerStep{nullptr};
68  TH2F* fElectronsVsPhotons{nullptr};
69  CLHEP::HepRandomEngine& fEngine;
70  };
71 
72 } // namespace larg4
73 
74 #endif // LARG4_IONIZATIONANDSCINTILLATION
TH1F * fPhotonsPerEDep
histogram of photons per MeV deposited
TH1F * fElectronsPerEDep
histogram of electrons per MeV deposited
Geant4 interface.
TH1F * fElectronsPerLength
histogram of electrons per cm
std::unique_ptr< larg4::ISCalculation > fISCalc
ntupleExperimental Reset()
CLHEP::HepRandomEngine & fEngine
random engine (needed for NEST)
General LArSoft Utilities.
Interface to algorithm class for a specific detector channel mapping.
TH1F * fPhotonsPerLength
histogram of photons per cm