PandaRoot
PndEmcFullStackedWaveformSimulator.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //#pragma once
14 #ifndef PNDEMCFULLSTACKEDWAVEFORMSIMULATOR_H_
15 #define PNDEMCFULLSTACKEDWAVEFORMSIMULATOR_H_
16 
18 #include <vector>
19 
20 class PndEmcWaveformData;
21 class PndEmcWaveform;
23 class TClonesArray;
24 
25 #include <iostream>
26 
34  public:
36  PndEmcFullStackedWaveformSimulator(Double_t sampleRate, PndEmcAbsPulseshape *pulseShape);
38 
39  virtual void Init(Double_t samplingBeforeFirstPulse, Double_t samplingAfterLastPulse, Double_t cutoff, Double_t activeTimeIncrement);
40 
41  virtual void GetAbsoluteTimeInterval(PndEmcWaveformData *wfData, Double_t &startTime, Double_t &activeTime); // in ns
42 
43  virtual Double_t GetTimeBeforeFirstHit(PndEmcWaveformData *) { return fSamplingBeforeFirstPulse; } // in ns //wfData //[R.K.03/2017] unused variable(s)
44 
45  virtual Double_t GetScale() { return fScale; }
46  virtual PndEmcWaveform *Get1GevWaveform() { return f1GeVWaveform; };
47 
48  virtual Double_t GetPulseRiseTime() { return fPulseRiseTime; };
49 
50  protected:
51  virtual PndEmcWaveform *MakeWaveform(PndEmcWaveformData *wfData, TClonesArray *arrayToStore = nullptr);
52  virtual PndEmcWaveform *MakeSingleWaveform(Double_t hitEnergy, Double_t hitTime, TClonesArray *arrayToStore = nullptr, Int_t detId = -1, Int_t trackId = -1, Int_t hitIndex = -1);
53 
54  virtual Double_t CalcWaveForTime(Double_t absoluteTime, PndEmcWaveformData *wfData);
55  Double_t CalcSingleWaveForTime(Double_t absoluteTime, Double_t energy, Double_t pulseTime);
56 
57  private:
58  // don't allow copying (-Weffc++)
60  PndEmcFullStackedWaveformSimulator &operator=(const PndEmcFullStackedWaveformSimulator &); // no implementation
61 
62  private:
63  Double_t fSamplingBeforeFirstPulse;
64  Double_t fSamplingAfterLastPulse;
65  Double_t fCutoff; //<! minimum pulse after which waveform simulation is terminated. Given as corresponding energy/GeV when cutoff value treated as pulse amplitude.
66 
67  PndEmcAbsPulseshape *fPulseshape;
68 
69  Double_t fScale;
70  PndEmcWaveform *f1GeVWaveform;
71 
72  Double_t fPulseRiseTime;
73 
74  Double_t fActiveTimeIncrement;
75 
77 };
78 
79 #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 ...