PandaRoot
BSEmcParameterLoadingProcess.h
Go to the documentation of this file.
1 #ifndef BSEMCPARAMETERLOADINGPROCESS_HH
2 #define BSEMCPARAMETERLOADINGPROCESS_HH
3 
4 #include "TObjString.h"
5 #include "TString.h"
6 
7 #include "FairRun.h"
8 
9 #include "PndProcess.h"
10 
13 #include "BSEmcPositionPar.h"
14 #include "BSEmcStructure.h"
15 
25  public:
26  BSEmcParameterLoadingProcess(const TString &t_neighbouringFilename = "EmcCrystalsNeighbouringRelations.txt", const TString &t_positionparFilename = "")
27  : PndProcess("BSEmcParameterLoadingProcess"), fNeighbouringFilename(t_neighbouringFilename), fPositionParFilename(t_positionparFilename){};
29  virtual void Process(){};
30 
31  void SetNeighbouringFilename(const TString &t_neighbouringFilename) { fNeighbouringFilename = t_neighbouringFilename; }
32  void SetPositionParFilename(const TString &t_positionFilename) { fPositionParFilename = t_positionFilename; }
33 
34  void SetDetectorName(const std::string &t_detectorName);
35 
36  void SetupParameters(const PndParameterRegister *t_parameter);
37 
38  private:
39  TString fNeighbouringFilename{"EmcCrystalsNeighbouringRelations.txt"};
40  TString fPositionParFilename{""};
41 
42  void GetPositionParameterFromCrystals(BSEmcCrystalPositionPar *t_par, Int_t t_lowerDetectorId, Int_t t_upperDetectorId);
43 
44  void ReadPositionParParameter(BSEmcCrystalPositionPar *t_par, Int_t t_lowerDetectorId, Int_t t_upperDetectorId);
45 
46  void FillPositionParameter(BSEmcCrystalPositionPar *t_posPar, Int_t t_inputVersion, Int_t t_lowerDetectorId, Int_t t_upperDetectorId);
47 
48  void SetupPositionParameter(BSEmcCrystalPositionPar *t_posPar, BSEmcPositionPar *t_digiPar);
49 
50  void SetupPositionParameters(const PndParameterRegister *t_paramRegister);
51 
52  void ReadNeighbouringParameter(BSEmcGeoNeighbouringRelationPar *t_par, Int_t t_lowerId, Int_t t_upperId);
53 
54  void LoadNeighbouringParameter(BSEmcGeoNeighbouringRelationPar *t_par, Int_t t_version, Int_t t_lowerId, Int_t t_upperId);
55 
56  void SetupNeighbouringParameters(const PndParameterRegister *t_paramRegister);
57 };
58 
59 #endif /*BSEMCPARAMETERLOADINGPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:24
Parameter for crystal positions.
void SetPositionParFilename(const TString &t_positionFilename)
void SetupParameters(const PndParameterRegister *t_parameter)
Fetch all parameters from the PndParameterRegister.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
Neigbouring Relations based on a list of detectorIds.
void SetNeighbouringFilename(const TString &t_neighbouringFilename)
Mini parameter set to contain position relevant parameter.
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...
BSEmcParameterLoadingProcess(const TString &t_neighbouringFilename="EmcCrystalsNeighbouringRelations.txt", const TString &t_positionparFilename="")
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
Process to load neighbouring and position parameters from txtfiles or position values via BSEmcStruct...