PandaRoot
BSEmcFwEndcapAPDAndVPTTWaveformGenerator.h
Go to the documentation of this file.
1 #ifndef BSEMCFWENDCAPAPDANDVPTTWAVEFORMGENERATOR_HH
2 #define BSEMCFWENDCAPAPDANDVPTTWAVEFORMGENERATOR_HH
3 #include <algorithm>
4 #include <memory>
5 #include <string>
6 #include <vector>
7 
8 #include "Rtypes.h"
9 #include "RtypesCore.h"
10 
11 #include "PndContainerI.h"
12 #include "PndParameterRegister.h"
13 #include "PndProcess.h"
14 
16 
17 class TClonesArray;
18 class BSEmcDigiPar;
19 class BSEmcMCDeposit;
20 class BSEmcDigi;
22 class TBuffer;
23 class TClass;
24 class TMemberInspector;
25 template <class T>
26 class PndConstContainerI;
27 template <class T>
29 
39  public:
42 
43  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
44  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
45  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
46  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
47  virtual void Process() /*override*/;
48 
49  void SetVpttIds(const std::vector<Int_t> &t_vpttIds)
50  {
51  fVpttIds = t_vpttIds;
52  std::sort(fVpttIds.begin(), fVpttIds.end());
53  }
54  void SetMCDepositBranchName(const TString &t_branchName) { fMCDepositBranchName = t_branchName; }
55  void SetWaveformBranchName(const TString &t_branchName) { fWaveformBranchName = t_branchName; }
56  void SetWaveformDataBranchName(const TString &t_branchName) { fWaveformDataBranchName = t_branchName; }
57  void RunTimebased(Bool_t t_timebased = kTRUE)
58  {
59  fAPDWaveformGenerator->RunTimebased(t_timebased);
60  fVPTTWaveformGenerator->RunTimebased(t_timebased);
61  };
62  void SetStorageOfData(Bool_t t_storeWaves = kTRUE)
63  {
64  fAPDWaveformGenerator->SetStorageOfData(t_storeWaves);
65  fVPTTWaveformGenerator->SetStorageOfData(t_storeWaves);
66  };
67  void StoreDataClass(Bool_t t_storeData = kTRUE)
68  {
69  fAPDWaveformGenerator->StoreDataClass(t_storeData);
70  fVPTTWaveformGenerator->StoreDataClass(t_storeData);
71  };
72 
73  protected:
74  virtual Bool_t IsVpttDeposit(const BSEmcMCDeposit *t_deposit) const;
75 
76  private:
77  PndContainerI<BSEmcMCDeposit> *fMCDepositArray{nullptr};
78  TString fMCDepositBranchName{""};
79  TString fWaveformBranchName{""};
80  TString fWaveformDataBranchName{""};
81  std::unique_ptr<BSEmcFwEndcapCosmicWaveformGeneration> fAPDWaveformGenerator{new BSEmcFwEndcapCosmicWaveformGeneration()};
82  std::unique_ptr<BSEmcFwEndcapCosmicWaveformGeneration> fVPTTWaveformGenerator{new BSEmcFwEndcapCosmicWaveformGeneration()};
83  std::vector<Int_t> fVpttIds{}; // searching a vector for each deposit is bad.
84  // Need a different approach.
85 
87 };
88 
89 #endif /*BSEMCFWENDCAPAPDANDVPTTWAVEFORMGENERATOR_HH*/
Base Process class.
Definition: PndProcess.h:24
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
void SetVpttIds(const std::vector< Int_t > &t_vpttIds)
represents the deposited energy of one emc crystal from simulation
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:47
IdealDigitizationProcess (non waveform) for FwEndcap requires special treatment since the FwEndcap ha...
Interface to a datacontainer to be used in PandaROOT.
Process to create Cosmic Waveforms out of BSEmcMCDeposits based on BSEmcFwEndcapDigi.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
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...
Container for runtime parameters that are required for the transformation from BSEmcMCDeposits to BSE...
Definition: BSEmcDigiPar.h:24
virtual Bool_t IsVpttDeposit(const BSEmcMCDeposit *t_deposit) const