PandaRoot
BSEmcFwEndcapDigi.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 #ifndef BSEMCFWENDCAPDIGI_HH
14 #define BSEMCFWENDCAPDIGI_HH
15 
16 #include <set>
17 #include <string>
18 
19 #include "Rtypes.h"
20 #include "RtypesCore.h"
21 #include "TString.h"
22 
23 #include "fairlogger/Logger.h"
24 
25 #include "BSEmcAbsPSA.h"
26 #include "BSEmcDigi.h"
28 #include "BSEmcFwEndcapDigiPar.h"
29 #include "BSEmcHighLowPSA.h"
31 
32 class BSEmcWaveform;
33 class TBuffer;
34 class TClass;
35 class TMemberInspector;
36 //#include <vector>
37 
38 class BSEmcAbsPSA;
39 class BSEmcAbsPulseshape;
40 
49 class BSEmcFwEndcapDigi : public BSEmcExtractDigisFromWaveforms<BSEmcFwEndcapDigiPar> {
50  public:
51  // Constructors
52  BSEmcFwEndcapDigi(Bool_t t_storedigis = kTRUE);
53  // Destructor
54  virtual ~BSEmcFwEndcapDigi();
55 
56  void SetPSAAlgorithms(BSEmcAbsPSA *t_highgain, BSEmcAbsPSA *t_lowgain)
57  {
58  fHighgainPSA = dynamic_cast<BSEmcPSAFPGASampleAnalyser *>(t_highgain);
59  fLowgainPSA = dynamic_cast<BSEmcPSAFPGASampleAnalyser *>(t_lowgain);
60 
61  if (fHighgainPSA == nullptr || fLowgainPSA == nullptr) {
62  LOG(error) << "BSEmcFwEndcapDigi::SetPSAAlgorithms: PSA must be a BSEmcPSAFPGASampleAnalyser. External PSA setting has no effect";
63  }
64  }
65 
66  protected:
68  virtual void DefinePSA() /*override*/;
69  virtual BSEmcDigi::eGAIN GetGainType(BSEmcWaveform *t_waveform, Int_t t_hit) const /*override*/;
70 
71  private:
72  BSEmcPSAFPGASampleAnalyser *fHighgainPSA{nullptr};
73  BSEmcPSAFPGASampleAnalyser *fLowgainPSA{nullptr};
74 
75  ClassDef(BSEmcFwEndcapDigi, 1);
76 };
77 
78 #endif /*BSEMCFWENDCAPDIGI_HH*/
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: BSEmcAbsPSA.h:38
represents a simulated waveform in an emc crystal
Definition: BSEmcWaveform.h:75
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