SdPMTSimulatorOG/SdPMTSimulator.h
Go to the documentation of this file.
1 #ifndef _SdPMTSimulatorOG_SdPMTSimulator_h_
2 #define _SdPMTSimulatorOG_SdPMTSimulator_h_
3 
4 #include <fwk/VModule.h>
5 #include <utl/TabulatedFunction.h>
6 #include <utl/TimeDistribution-fwd.h>
7 #include <utl/config.h>
8 
9 #include <sevt/SEvent.h>
10 #include <sevt/StationConstants.h>
11 #include <CLHEP/Random/Randomize.h>
12 
13 #include <set>
14 
15 
16 namespace utl {
17  class RandomEngine;
18 }
19 
20 class TH1D;
21 
22 namespace SdPMTSimulatorOG {
23 
49  class SdPMTSimulator : public fwk::VModule {
50 
51  public:
52  virtual ~SdPMTSimulator() = default;
53 
54  fwk::VModule::ResultFlag Init() override;
55  fwk::VModule::ResultFlag Run(evt::Event& event) override;
57 
58  private:
59  void FillPulseShape(const utl::TabulatedFunction& rawPulse);
60 
61  void ConvertPEToBaseSignal(const double scaling,
62  const utl::TimeDistributionI& pe,
63  utl::TimeDistributionD& baseSignal);
64 
66  const utl::TimeDistributionD& totalBaseSignal);
67 
68  // points to maximum of the pulse
69  double fPulseMaxTime = 0;
70 
72  CLHEP::RandGeneral* fChargeDistribution = nullptr;
73 
74  double fPMTGain = 0;
75  double fKFactor = 0;
76  double fMinCharge = 0;
77  double fMaxCharge = 0;
78 
81 
83 
84  typedef std::set<sevt::StationConstants::SignalComponent> FundamentalComponents;
86 
87  REGISTER_MODULE("SdPMTSimulatorOG", SdPMTSimulator);
88 
89  };
90 
91 }
92 
93 
94 #endif
std::set< sevt::StationConstants::SignalComponent > FundamentalComponents
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
Class to hold collection (x,y) points and provide interpolation between them.
Histogram class for time distributions with suppressed empty bins.
REGISTER_MODULE("SdPMTSimulatorOG", SdPMTSimulator)
Wraps the random number engine used to generate distributions.
Definition: RandomEngine.h:27
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
void ConvertPEToBaseSignal(const double scaling, const utl::TimeDistributionI &pe, utl::TimeDistributionD &baseSignal)
Module interface.
Definition: VModule.h:53
void FillPulseShape(const utl::TabulatedFunction &rawPulse)
PMT simulation from PE release times to PE charge distribution.
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
virtual ~SdPMTSimulator()=default
void SimulateSaturation(utl::TimeDistributionD &baseSignal, const utl::TimeDistributionD &totalBaseSignal)

, generated on Tue Sep 26 2023.