PandaRoot
BSEmcApplyCalibrationProcess.h
Go to the documentation of this file.
1 #ifndef BSEMCAPPLYCALIBRATIONPROCESS_HH
2 #define BSEMCAPPLYCALIBRATIONPROCESS_HH
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
8 #include "Rtypes.h"
9 #include "RtypesCore.h"
10 
11 #include "PndMutableContainerI.h"
12 #include "PndProcess.h"
13 
14 #include "BSEmcCalibrationPar.h"
15 #include "BSEmcDigi.h"
16 
18 class BSEmcDigi;
20 class TBuffer;
21 class TClass;
22 class TMemberInspector;
23 template <class T>
25 
35  public:
38  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
39  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
40  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
41  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
42  virtual void Process() /*override*/;
43  void CalibrateDigis(const std::vector<BSEmcDigi *> &t_digiCont);
44  void SetCalibrationParName(const std::string &t_parName) { fCalibrationParName = t_parName; }
45  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
46 
47  private:
48  virtual Double_t CalculateTime(BSEmcDigi *t_digi) const;
49  virtual Double_t CalculateEnergy(BSEmcDigi *t_digi) const;
50 
51  private:
52  std::string fCalibrationParName{""};
53  BSEmcCalibrationPar *fCalibrationPar{nullptr};
54 
55  TString fDigiBranchname{""};
56  PndMutableContainerI<BSEmcDigi> *fDigiArray{nullptr};
57 
58  ClassDef(BSEmcApplyCalibrationProcess, 1);
59 };
60 
61 #endif /*BSEMCAPPLYCALIBRATIONPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:24
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...
void CalibrateDigis(const std::vector< BSEmcDigi *> &t_digiCont)
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
void SetDigiBranchName(const TString &t_branchname)
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
Very basic start for CalibrationPar (each Detector gets its own)
Simple Process to calculate calibrated energy for BSEmcDigi.
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
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
void SetCalibrationParName(const std::string &t_parName)