PandaRoot
BSEmcMultiPSA.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 multiple independent PSAs
16 // Guang Zhao
17 //-----------------------------------------------------------
18 
19 #ifndef BSEMCMULTIPSA_HH
20 #define BSEMCMULTIPSA_HH
21 
22 #include <vector>
23 
24 #include "Rtypes.h"
25 #include "RtypesCore.h"
26 
27 #include "BSEmcAbsPSA.h"
28 
29 class BSEmcPSACombinator;
30 class BSEmcWaveform;
31 class TBuffer;
32 class TClass;
33 class TMemberInspector;
34 
41 class BSEmcMultiPSA : public BSEmcAbsPSA {
42  public:
44  void AddPSA(BSEmcAbsPSA *);
45 
46  virtual ~BSEmcMultiPSA();
47 
48  virtual Int_t Process(const BSEmcWaveform *t_waveform) /*override*/;
49  virtual void Reset() /*override*/;
50  virtual void GetHit(Int_t t_idx, Double_t &t_energy, Double_t &t_time) /*override*/;
51  Int_t GetAPDGainIndex() { return fAPDGainIndex; }
52 
53  private:
54  std::vector<BSEmcAbsPSA *> fPSA{};
55  std::vector<Int_t> fNhit{};
56  BSEmcPSACombinator *fCombinator{nullptr}; // combinator to combine multi-PSA outputs to a signle output
57  Int_t fAPDGainIndex{-1}; // 0 for hg, 1 for lg //TODO: Create a more meaningfull and expressive enum GainMode especially sind APDGainIndex is unset until Process is run
58  std::vector<Double_t> fEnergyList{};
59  std::vector<Double_t> fTimeList{};
60 
62 };
63 
64 #endif /*BSEMCMULTIPSA_HH*/
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: BSEmcAbsPSA.h:38
BSEmcMultiPSA(BSEmcPSACombinator *)
represents a simulated waveform in an emc crystal
Definition: BSEmcWaveform.h:75
void AddPSA(BSEmcAbsPSA *)
Int_t GetAPDGainIndex()
Definition: BSEmcMultiPSA.h:51
virtual void GetHit(Int_t t_idx, Double_t &t_energy, Double_t &t_time)
Get energy and time of hit.
virtual void Reset()
reset found hits
virtual ~BSEmcMultiPSA()
virtual Int_t Process(const BSEmcWaveform *t_waveform)
Find Hits in Waveform.
Wrapping class to manage multiple independent PSAs.
Definition: BSEmcMultiPSA.h:41
ClassDef(BSEmcAbsPSA, 1)