PandaRoot
BSEmcHighLowPSA.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 //-----------------------------------------------------------
14 // Description:
15 // Wrapping class to manage two independent PSAs
16 // for high, resp. low gain
17 // Philipp Mahlberg
18 //-----------------------------------------------------------
19 
20 #ifndef BSEMCHIGHLOWPSA_HH
21 #define BSEMCHIGHLOWPSA_HH
22 
23 #include <utility>
24 #include <vector>
25 
26 #include "Rtypes.h"
27 #include "RtypesCore.h"
28 
29 #include "BSEmcAbsPSA.h"
30 
32 class BSEmcWaveform;
33 class TBuffer;
34 class TClass;
35 class TMemberInspector;
36 
43 class BSEmcHighLowPSA : public BSEmcAbsPSA {
44  public:
45  BSEmcHighLowPSA(Int_t t_verbose = 0);
46  virtual void
47  Init(BSEmcPSAFPGASampleAnalyser *t_highgainPSA, BSEmcPSAFPGASampleAnalyser *t_lowgainPSA, Double_t t_overflowThreshold, Int_t t_highgainWfIndex = 0, Int_t t_lowgainWfIndex = 1);
48  virtual ~BSEmcHighLowPSA() {}
49 
50  void SetVerbose(Int_t t_verbose = 0) { fVerbose = t_verbose; };
51  virtual Int_t Process(const BSEmcWaveform *t_waveform) /*override*/;
52  virtual void Reset() /*override*/;
53  virtual void GetHit(Int_t t_idx, Double_t &t_energy, Double_t &t_time) /*override*/;
54  virtual void GetHit(Int_t t_idx, Double_t &t_energy, Double_t &t_time, Int_t &t_PileupType);
55 
56  virtual Int_t GetWaveformIdx(Int_t t_idx);
57 
58  private:
59  BSEmcPSAFPGASampleAnalyser *fHighgainPSA{nullptr};
60  BSEmcPSAFPGASampleAnalyser *fLowgainPSA{nullptr};
61 
62  Int_t fIdx_high{0};
63  Int_t fIdx_low{0};
64 
65  std::vector<std::pair<BSEmcPSAFPGASampleAnalyser *, Int_t>> fHitsInFE{};
66  Double_t fOverflowThreshold{0};
67 
68  Int_t fVerbose{0};
69 
71 };
72 
73 #endif /*BSEMCHIGHLOWPSA_HH*/
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: BSEmcAbsPSA.h:38
represents a simulated waveform in an emc crystal
Definition: BSEmcWaveform.h:75
virtual Int_t Process(const BSEmcWaveform *t_waveform)
Find Hits in Waveform.
BSEmcHighLowPSA(Int_t t_verbose=0)
void SetVerbose(Int_t t_verbose=0)
virtual void GetHit(Int_t t_idx, Double_t &t_energy, Double_t &t_time)
Get energy and time of hit.
virtual void Init(BSEmcPSAFPGASampleAnalyser *t_highgainPSA, BSEmcPSAFPGASampleAnalyser *t_lowgainPSA, Double_t t_overflowThreshold, Int_t t_highgainWfIndex=0, Int_t t_lowgainWfIndex=1)
virtual ~BSEmcHighLowPSA()
Wrapping class to manage two independent PSAs for high, resp. low gain.
virtual void Reset()
reset found hits
ClassDef(BSEmcAbsPSA, 1)
virtual Int_t GetWaveformIdx(Int_t t_idx)