PandaRoot
BSEmcApplyCalibrationProcess.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 BSEMCAPPLYCALIBRATIONPROCESS_HH
14 #define BSEMCAPPLYCALIBRATIONPROCESS_HH
15 
16 #include <map>
17 #include <string>
18 #include <vector>
19 
20 #include "Rtypes.h"
21 #include "RtypesCore.h"
22 
23 #include "PndMutableContainerI.h"
24 #include "PndProcess.h"
25 
26 #include "BSEmcCalibrationPar.h"
27 #include "BSEmcDigi.h"
28 
30 class BSEmcDigi;
32 class TBuffer;
33 class TClass;
34 class TMemberInspector;
35 template <class T>
37 
47  public:
50  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
51  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
52  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
53  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
54  virtual void Process() /*override*/;
55  void CalibrateDigis(const std::vector<BSEmcDigi *> &t_digiCont);
56  void SetCalibrationParName(const std::string &t_parName) { fCalibrationParName = t_parName; }
57  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
58 
59  private:
60  virtual Double_t CalculateTime(BSEmcDigi *t_digi) const;
61  virtual Double_t CalculateEnergy(BSEmcDigi *t_digi) const;
62 
63  private:
64  std::string fCalibrationParName{""};
65  BSEmcCalibrationPar *fCalibrationPar{nullptr};
66 
67  TString fDigiBranchname{""};
68  PndMutableContainerI<BSEmcDigi> *fDigiArray{nullptr};
69 
70  ClassDef(BSEmcApplyCalibrationProcess, 1);
71 };
72 
73 #endif /*BSEMCAPPLYCALIBRATIONPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:36
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:59
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)