PandaRoot
BSEmcFullStackedWaveformSimulator.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 BSEMCFULLSTACKEDWAVEFORMSIMULATOR_HH
15 #define BSEMCFULLSTACKEDWAVEFORMSIMULATOR_HH
16 
17 #include <iostream>
18 #include <vector>
19 
20 #include "Rtypes.h"
21 #include "RtypesCore.h"
22 
24 
25 class BSEmcWaveformData;
26 class BSEmcWaveform;
27 class BSEmcAbsPulseshape;
28 class TClonesArray;
29 class TBuffer;
30 class TClass;
31 class TMemberInspector;
32 
40  public:
42  BSEmcFullStackedWaveformSimulator(Double_t t_sampleRate, BSEmcAbsPulseshape *t_pulseShape);
44 
45  virtual void Init(Double_t t_samplingBeforeFirstPulse, Double_t t_samplingAfterLastPulse, Double_t t_cutoff, Double_t t_activeTimeIncrement);
46 
47  virtual void GetAbsoluteTimeInterval(BSEmcWaveformData *t_wfData, Double_t &t_startTime, Double_t &t_activeTime) /*override*/; // in ns
48 
49  virtual Double_t GetTimeBeforeFirstHit(BSEmcWaveformData * /*unused*/) /*override*/ { return fSamplingBeforeFirstPulse; } // in ns //wfData //[R.K.03/2017] unused variable(s)
50 
51  virtual Double_t GetScale() /*override*/ { return fScale; }
52  virtual BSEmcWaveform *Get1GevWaveform() /*override*/ { return f1GeVWaveform; };
53 
54  virtual Double_t GetPulseRiseTime() { return fPulseRiseTime; };
55 
56  protected:
57  virtual BSEmcWaveform *MakeWaveform(BSEmcWaveformData *t_wfData, TClonesArray *t_arrayToStore = nullptr);
58  virtual BSEmcWaveform *
59  MakeSingleWaveform(Double_t t_depositEnergy, Double_t t_depositTime, TClonesArray *t_arrayToStore = nullptr, Int_t t_detId = -1, Int_t t_trackId = -1, Int_t t_depositIndex = -1);
60 
61  virtual Double_t CalcWaveForTime(Double_t t_absoluteTime, BSEmcWaveformData *t_wfData);
62  Double_t CalcSingleWaveForTime(Double_t t_absoluteTime, Double_t t_energy, Double_t t_pulseTime);
63 
64  private:
65  // don't allow copying (-Weffc++)
67  BSEmcFullStackedWaveformSimulator &operator=(const BSEmcFullStackedWaveformSimulator &); // no implementation
68 
69  private:
70  Double_t fSamplingBeforeFirstPulse{-1};
71  Double_t fSamplingAfterLastPulse{-1};
72  Double_t fCutoff{-1}; //<! minimum pulse after which waveform simulation is terminated. Given as corresponding energy/GeV when cutoff value treated as pulse amplitude.
73 
74  BSEmcAbsPulseshape *fPulseshape{nullptr};
75 
76  Double_t fScale{-1};
77  BSEmcWaveform *f1GeVWaveform{nullptr};
78 
79  Double_t fPulseRiseTime{-1};
80 
81  Double_t fActiveTimeIncrement{-1};
82 
84 };
85 
86 #endif /*BSEMCFULLSTACKEDWAVEFORMSIMULATOR_HH*/
virtual BSEmcWaveform * MakeSingleWaveform(Double_t t_depositEnergy, Double_t t_depositTime, TClonesArray *t_arrayToStore=nullptr, Int_t t_detId=-1, Int_t t_trackId=-1, Int_t t_depositIndex=-1)
represents a simulated waveform in an emc crystal
Definition: BSEmcWaveform.h:75
virtual void GetAbsoluteTimeInterval(BSEmcWaveformData *t_wfData, Double_t &t_startTime, Double_t &t_activeTime)
Double_t CalcSingleWaveForTime(Double_t t_absoluteTime, Double_t t_energy, Double_t t_pulseTime)
virtual Double_t GetTimeBeforeFirstHit(BSEmcWaveformData *)
virtual BSEmcWaveform * MakeWaveform(BSEmcWaveformData *t_wfData, TClonesArray *t_arrayToStore=nullptr)
virtual void Init(Double_t t_samplingBeforeFirstPulse, Double_t t_samplingAfterLastPulse, Double_t t_cutoff, Double_t t_activeTimeIncrement)
Abstract base class for waveform simulator.
pulseshape interface
represents a simulated waveform in an emc crystal, used by BSEmcFwEndcapTimebasedWaveforms ...
virtual Double_t CalcWaveForTime(Double_t t_absoluteTime, BSEmcWaveformData *t_wfData)