PandaRoot
BSEmcFwEndcapDigi.h
Go to the documentation of this file.
1 #ifndef BSEMCFWENDCAPDIGI_HH
2 #define BSEMCFWENDCAPDIGI_HH
3 
4 #include <set>
5 #include <string>
6 
7 #include "Rtypes.h"
8 #include "RtypesCore.h"
9 #include "TString.h"
10 
11 #include "fairlogger/Logger.h"
12 
13 #include "BSEmcAbsPSA.h"
14 #include "BSEmcDigi.h"
16 #include "BSEmcFwEndcapDigiPar.h"
17 #include "BSEmcHighLowPSA.h"
19 
20 class BSEmcWaveform;
21 class TBuffer;
22 class TClass;
23 class TMemberInspector;
24 //#include <vector>
25 
26 class BSEmcAbsPSA;
27 class BSEmcAbsPulseshape;
28 
37 class BSEmcFwEndcapDigi : public BSEmcExtractDigisFromWaveforms<BSEmcFwEndcapDigiPar> {
38  public:
39  // Constructors
40  BSEmcFwEndcapDigi(Bool_t t_storedigis = kTRUE);
41  // Destructor
42  virtual ~BSEmcFwEndcapDigi();
43 
44  void SetPSAAlgorithms(BSEmcAbsPSA *t_highgain, BSEmcAbsPSA *t_lowgain)
45  {
46  fHighgainPSA = dynamic_cast<BSEmcPSAFPGASampleAnalyser *>(t_highgain);
47  fLowgainPSA = dynamic_cast<BSEmcPSAFPGASampleAnalyser *>(t_lowgain);
48 
49  if (fHighgainPSA == nullptr || fLowgainPSA == nullptr) {
50  LOG(error) << "BSEmcFwEndcapDigi::SetPSAAlgorithms: PSA must be a BSEmcPSAFPGASampleAnalyser. External PSA setting has no effect";
51  }
52  }
53 
54  protected:
56  virtual void DefinePSA() /*override*/;
57  virtual BSEmcDigi::eGAIN GetGainType(BSEmcWaveform *t_waveform, Int_t t_hit) const /*override*/;
58 
59  private:
60  BSEmcPSAFPGASampleAnalyser *fHighgainPSA{nullptr};
61  BSEmcPSAFPGASampleAnalyser *fLowgainPSA{nullptr};
62 
63  ClassDef(BSEmcFwEndcapDigi, 1);
64 };
65 
66 #endif /*BSEMCFWENDCAPDIGI_HH*/
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: BSEmcAbsPSA.h:26
represents a simulated waveform in an emc crystal
Definition: BSEmcWaveform.h:63
virtual ~BSEmcFwEndcapDigi()
BSEmcFwEndcapDigi(Bool_t t_storedigis=kTRUE)
void SetPSAAlgorithms(BSEmcAbsPSA *t_highgain, BSEmcAbsPSA *t_lowgain)
Task to create digis from waveforms.
pulseshape interface
Task to create digis from waveforms.
virtual void DefinePSA()
virtual BSEmcDigi::eGAIN GetGainType(BSEmcWaveform *t_waveform, Int_t t_hit) const