PandaRoot
BSEmcOnlineFeatureExtractionProcess.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 BSEMCONLINEFEATUREEXTRACTIONPROCESS_HH
14 #define BSEMCONLINEFEATUREEXTRACTIONPROCESS_HH
15 
16 #include <memory>
17 #include <string>
18 #include <vector>
19 
20 #include "Rtypes.h"
21 #include "RtypesCore.h"
22 #include "TString.h"
23 
24 #include "PndContainerI.h"
25 #include "PndMutableContainerI.h"
26 #include "PndProcess.h"
27 
28 #include "BSEmcDigi.h"
29 
30 #include "BSEmcMultiWaveform.h"
31 
33 class BSEmcAbsPSA;
34 class BSEmcWaveform;
35 class TBuffer;
36 class TClass;
37 class TMemberInspector;
38 template <class T>
40 
51  public:
54 
55  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
56  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
57  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
58  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
59  virtual void Process() /*override*/;
60 
61  void SetStorageOfData(Bool_t t_val); // Method to specify whether digis are stored or not.
62  void SetPSA(BSEmcAbsPSA *t_psa) { fPSA = t_psa; }
63  std::vector<BSEmcDigi *> ExtractDigis(const std::vector<const BSEmcMultiWaveform *> &t_waveforms) const;
64  void SetMCDepositBranchName(const TString &t_branchname) { fMCDepositBranchName = t_branchname; }
65  void SetWaveformBranchName(const TString &t_branchname) { fWaveformBranchName = t_branchname; }
66  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchName = t_branchname; }
67 
68  protected:
69  virtual Double_t GetTimeStamp(const BSEmcWaveform *t_waveform, Double_t t_digi_time) const;
70  virtual BSEmcDigi::eGAIN GetGainType(const BSEmcWaveform *t_waveform, Int_t t_deposit) const = 0;
71 
72  protected:
73  Double_t fTimebunchCutTime{0};
74 
75  TString fMCDepositBranchName{""};
76  TString fWaveformBranchName{""};
77  TString fDigiBranchName{""};
78 
81 
82  Double_t fEnergyDigiThreshold{0};
83 
84  BSEmcAbsPSA *fPSA{nullptr};
85 
87 };
88 
89 #endif /*BSEMCONLINEFEATUREEXTRACTIONPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:36
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: BSEmcAbsPSA.h:38
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:75
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.