PandaRoot
PndEmcFullStackedWaveformSimulator.h
Go to the documentation of this file.
1 //#pragma once
2 #ifndef PNDEMCFULLSTACKEDWAVEFORMSIMULATOR_H_
3 #define PNDEMCFULLSTACKEDWAVEFORMSIMULATOR_H_
4 
6 #include <vector>
7 
9 class PndEmcWaveform;
11 class TClonesArray;
12 
13 #include <iostream>
14 
22  public:
24  PndEmcFullStackedWaveformSimulator(Double_t sampleRate, PndEmcAbsPulseshape *pulseShape);
26 
27  virtual void Init(Double_t samplingBeforeFirstPulse, Double_t samplingAfterLastPulse, Double_t cutoff, Double_t activeTimeIncrement);
28 
29  virtual void GetAbsoluteTimeInterval(PndEmcWaveformData *wfData, Double_t &startTime, Double_t &activeTime); // in ns
30 
31  virtual Double_t GetTimeBeforeFirstHit(PndEmcWaveformData *) { return fSamplingBeforeFirstPulse; } // in ns //wfData //[R.K.03/2017] unused variable(s)
32 
33  virtual Double_t GetScale() { return fScale; }
34  virtual PndEmcWaveform *Get1GevWaveform() { return f1GeVWaveform; };
35 
36  virtual Double_t GetPulseRiseTime() { return fPulseRiseTime; };
37 
38  protected:
39  virtual PndEmcWaveform *MakeWaveform(PndEmcWaveformData *wfData, TClonesArray *arrayToStore = nullptr);
40  virtual PndEmcWaveform *MakeSingleWaveform(Double_t hitEnergy, Double_t hitTime, TClonesArray *arrayToStore = nullptr, Int_t detId = -1, Int_t trackId = -1, Int_t hitIndex = -1);
41 
42  virtual Double_t CalcWaveForTime(Double_t absoluteTime, PndEmcWaveformData *wfData);
43  Double_t CalcSingleWaveForTime(Double_t absoluteTime, Double_t energy, Double_t pulseTime);
44 
45  private:
46  // don't allow copying (-Weffc++)
48  PndEmcFullStackedWaveformSimulator &operator=(const PndEmcFullStackedWaveformSimulator &); // no implementation
49 
50  private:
51  Double_t fSamplingBeforeFirstPulse;
52  Double_t fSamplingAfterLastPulse;
53  Double_t fCutoff; //<! minimum pulse after which waveform simulation is terminated. Given as corresponding energy/GeV when cutoff value treated as pulse amplitude.
54 
55  PndEmcAbsPulseshape *fPulseshape;
56 
57  Double_t fScale;
58  PndEmcWaveform *f1GeVWaveform;
59 
60  Double_t fPulseRiseTime;
61 
62  Double_t fActiveTimeIncrement;
63 
65 };
66 
67 #endif
virtual void GetAbsoluteTimeInterval(PndEmcWaveformData *wfData, Double_t &startTime, Double_t &activeTime)
virtual PndEmcWaveform * MakeSingleWaveform(Double_t hitEnergy, Double_t hitTime, TClonesArray *arrayToStore=nullptr, Int_t detId=-1, Int_t trackId=-1, Int_t hitIndex=-1)
virtual void Init(Double_t samplingBeforeFirstPulse, Double_t samplingAfterLastPulse, Double_t cutoff, Double_t activeTimeIncrement)
Double_t CalcSingleWaveForTime(Double_t absoluteTime, Double_t energy, Double_t pulseTime)
Abstract base class for waveform simulator.
virtual Double_t GetTimeBeforeFirstHit(PndEmcWaveformData *)
virtual Double_t CalcWaveForTime(Double_t absoluteTime, PndEmcWaveformData *wfData)
represents a simulated waveform in an emc crystal
virtual PndEmcWaveform * MakeWaveform(PndEmcWaveformData *wfData, TClonesArray *arrayToStore=nullptr)
pulseshape interface
represents a simulated waveform in an emc crystal, used by PndEmcFWEndcapTimebasedWaveforms ...