PandaRoot
BSEmcFwEndcapIdealDigitizerProcess.h
Go to the documentation of this file.
1 #ifndef BSEMCFWENDCAPIDEALDIGITIZER_HH
2 #define BSEMCFWENDCAPIDEALDIGITIZER_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 PndContainerI;
27 template <class T>
29 
39  public:
42  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
43  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
44  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
45  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
46 
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 
55  void SetMCDepositBranchName(const TString &t_branchname)
56  {
57  fMCDepositBranchname = t_branchname;
58  fAPDDigitizer->SetMCDepositBranchName(t_branchname);
59  fVPTDigitizer->SetMCDepositBranchName(t_branchname);
60  }
61 
62  void SetDigiBranchName(const TString &t_branchname)
63  {
64  fDigiBranchname = t_branchname;
65  fAPDDigitizer->SetDigiBranchName(t_branchname);
66  fVPTDigitizer->SetDigiBranchName(t_branchname);
67  }
68 
69  protected:
70  virtual Bool_t IsVpttDeposit(const BSEmcMCDeposit *t_deposit) const;
71 
72  private:
73  TString fMCDepositBranchname{""};
74  TString fDigiBranchname{""};
75 
76  PndContainerI<BSEmcMCDeposit> *fMCDepositArray{nullptr};
77  PndMutableContainerI<BSEmcDigi> *fDigiArray{nullptr};
78 
79  std::unique_ptr<BSEmcIdealDigitizationProcess> fAPDDigitizer{new BSEmcIdealDigitizationProcess()};
80  std::unique_ptr<BSEmcIdealDigitizationProcess> fVPTDigitizer{new BSEmcIdealDigitizationProcess()};
81  std::vector<Int_t> fVpttIds{}; // searching a vector for each deposit is bad. Need a different approach.
82 
84 };
85 
86 #endif /*BSEMCFWENDCAPIDEALDIGITIZER_HH*/
Base Process class.
Definition: PndProcess.h:24
Smears BSEmcMCDeposit energy and forms BSEmcDigi if energy above threshold.
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
represents the deposited energy of one emc crystal from simulation
void SetMCDepositBranchName(const TString &t_branchname)
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
IdealDigitizationProcess (non waveform) for FwEndcap requires special treatment since the FwEndcap ha...
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:47
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
Interface to a datacontainer to be used in PandaROOT.
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
void SetDigiBranchName(const TString &t_branchname)
virtual Bool_t IsVpttDeposit(const BSEmcMCDeposit *t_deposit) const
void SetVpttIds(const std::vector< Int_t > &t_vpttIds)
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...
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
Container for runtime parameters that are required for the transformation from BSEmcMCDeposits to BSE...
Definition: BSEmcDigiPar.h:24