PandaRoot
BSEmcOnlineFeatureExtractionProcess.h
Go to the documentation of this file.
1 #ifndef BSEMCONLINEFEATUREEXTRACTIONPROCESS_HH
2 #define BSEMCONLINEFEATUREEXTRACTIONPROCESS_HH
3 
4 #include <memory>
5 #include <string>
6 #include <vector>
7 
8 #include "Rtypes.h"
9 #include "RtypesCore.h"
10 #include "TString.h"
11 
12 #include "PndContainerI.h"
13 #include "PndMutableContainerI.h"
14 #include "PndProcess.h"
15 
16 #include "BSEmcDigi.h"
17 
18 #include "BSEmcMultiWaveform.h"
19 
21 class BSEmcAbsPSA;
22 class BSEmcWaveform;
23 class TBuffer;
24 class TClass;
25 class TMemberInspector;
26 template <class T>
28 
39  public:
42 
43  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
44  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
45  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
46  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
47  virtual void Process() /*override*/;
48 
49  void SetStorageOfData(Bool_t t_val); // Method to specify whether digis are stored or not.
50  void SetPSA(BSEmcAbsPSA *t_psa) { fPSA = t_psa; }
51  std::vector<BSEmcDigi *> ExtractDigis(const std::vector<const BSEmcMultiWaveform *> &t_waveforms) const;
52  void SetMCDepositBranchName(const TString &t_branchname) { fMCDepositBranchName = t_branchname; }
53  void SetWaveformBranchName(const TString &t_branchname) { fWaveformBranchName = t_branchname; }
54  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchName = t_branchname; }
55 
56  protected:
57  virtual Double_t GetTimeStamp(const BSEmcWaveform *t_waveform, Double_t t_digi_time) const;
58  virtual BSEmcDigi::eGAIN GetGainType(const BSEmcWaveform *t_waveform, Int_t t_deposit) const = 0;
59 
60  protected:
61  Double_t fTimebunchCutTime{0};
62 
63  TString fMCDepositBranchName{""};
64  TString fWaveformBranchName{""};
65  TString fDigiBranchName{""};
66 
69 
70  Double_t fEnergyDigiThreshold{0};
71 
72  BSEmcAbsPSA *fPSA{nullptr};
73 
75 };
76 
77 #endif /*BSEMCONLINEFEATUREEXTRACTIONPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:24
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: BSEmcAbsPSA.h:26
PndContainerI< BSEmcMultiWaveform > * fWaveformArray
virtual Double_t GetTimeStamp(const BSEmcWaveform *t_waveform, Double_t t_digi_time) const
void SetDigiBranchName(const TString &t_branchname)
ClassDef(BSEmcOnlineFeatureExtractionProcess, 1)
represents a simulated waveform in an emc crystal
Definition: BSEmcWaveform.h:63
Online feature extraction process intended as baseclass. Online like, but not actually online...
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
void SetMCDepositBranchName(const TString &t_branchname)
virtual void SetDetectorName(const std::string &t_detectorName)
Set the Detector name. Important, as most EmcParameter need to know for which detector they need to b...
PndMutableContainerI< BSEmcDigi > * fDigiArray
virtual BSEmcDigi::eGAIN GetGainType(const BSEmcWaveform *t_waveform, Int_t t_deposit) const =0
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
Interface to a datacontainer to be used in PandaROOT.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
void SetWaveformBranchName(const TString &t_branchname)
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
std::vector< BSEmcDigi * > ExtractDigis(const std::vector< const BSEmcMultiWaveform *> &t_waveforms) const
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.