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 BSEmcMCHit;
20 class BSEmcDigi;
23 class TBuffer;
24 class TClass;
25 class TMemberInspector;
26 template <class T>
27 class PndInputContainerI;
28 template <class T>
30 
39 class BSEmcFwEndcapAPDAndVPTTWaveformGenerator : public PndProcess<BSEmcDigitizationData> {
40  public:
43 
44  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
45  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
46  virtual void SetData(BSEmcDigitizationData *t_data) /*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 SetWaveformBranchName(const TString &t_branchName) { fWaveformBranchName = t_branchName; }
55  void SetWaveformDataBranchName(const TString &t_branchName) { fWaveformDataBranchName = t_branchName; }
56  void RunTimebased(Bool_t t_timebased = kTRUE)
57  {
58  fAPDWaveformGenerator->RunTimebased(t_timebased);
59  fVPTTWaveformGenerator->RunTimebased(t_timebased);
60  };
61  void SetStorageOfData(Bool_t t_storeWaves = kTRUE)
62  {
63  fAPDWaveformGenerator->SetStorageOfData(t_storeWaves);
64  fVPTTWaveformGenerator->SetStorageOfData(t_storeWaves);
65  };
66  void StoreDataClass(Bool_t t_storeData = kTRUE)
67  {
68  fAPDWaveformGenerator->StoreDataClass(t_storeData);
69  fVPTTWaveformGenerator->StoreDataClass(t_storeData);
70  };
71 
72  protected:
73  virtual Bool_t IsVpttHit(const BSEmcMCHit *t_hit) const;
74 
75  private:
76  PndInputContainerI<BSEmcMCHit> *fHitArray{nullptr};
77  TString fWaveformBranchName{""};
78  TString fWaveformDataBranchName{""};
79  std::unique_ptr<BSEmcFwEndcapCosmicWaveformGeneration> fAPDWaveformGenerator{new BSEmcFwEndcapCosmicWaveformGeneration()};
80  std::unique_ptr<BSEmcFwEndcapCosmicWaveformGeneration> fVPTTWaveformGenerator{new BSEmcFwEndcapCosmicWaveformGeneration()};
81  std::vector<Int_t> fVpttIds{}; // searching a vector for each hit is bad. Need a different approach.
82 
84 };
85 
86 #endif /*BSEMCFWENDCAPAPDANDVPTTWAVEFORMGENERATOR_HH*/
Base Process class.
Definition: PndProcess.h:24
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
void SetVpttIds(const std::vector< Int_t > &t_vpttIds)
virtual void SetData(BSEmcDigitizationData *t_data)
Pass the data container ptrs to the process, and store pointers in class members. ...
virtual Bool_t IsVpttHit(const BSEmcMCHit *t_hit) const
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 BSEmcMCHits 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.
represents the deposited energy of one emc crystal from simulation
Definition: BSEmcMCHit.h:32
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 BSEmcMCHits to BSEmcDi...
Definition: BSEmcDigiPar.h:23
DataStruct to pass addresses to data Container between BSEmcDigitizerTask and PndProcess<BSEmcDigitiz...