PandaRoot
BSEmcParameterLoadingProcess.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 BSEMCPARAMETERLOADINGPROCESS_HH
14 #define BSEMCPARAMETERLOADINGPROCESS_HH
15 
16 #include "TObjString.h"
17 #include "TString.h"
18 
19 #include "FairRun.h"
20 
21 #include "PndProcess.h"
22 
25 #include "BSEmcPositionPar.h"
26 #include "BSEmcStructure.h"
27 
37  public:
38  BSEmcParameterLoadingProcess(const TString &t_neighbouringFilename = "EmcCrystalsNeighbouringRelations.txt", const TString &t_positionparFilename = "")
39  : PndProcess("BSEmcParameterLoadingProcess"), fNeighbouringFilename(t_neighbouringFilename), fPositionParFilename(t_positionparFilename){};
41  virtual void Process(){};
42 
43  void SetNeighbouringFilename(const TString &t_neighbouringFilename) { fNeighbouringFilename = t_neighbouringFilename; }
44  void SetPositionParFilename(const TString &t_positionFilename) { fPositionParFilename = t_positionFilename; }
45 
46  void SetDetectorName(const std::string &t_detectorName);
47 
48  void SetupParameters(const PndParameterRegister *t_parameter);
49 
50  private:
51  TString fNeighbouringFilename{"EmcCrystalsNeighbouringRelations.txt"};
52  TString fPositionParFilename{""};
53 
54  void GetPositionParameterFromCrystals(BSEmcCrystalPositionPar *t_par, Int_t t_lowerDetectorId, Int_t t_upperDetectorId);
55 
56  void ReadPositionParParameter(BSEmcCrystalPositionPar *t_par, Int_t t_lowerDetectorId, Int_t t_upperDetectorId);
57 
58  void FillPositionParameter(BSEmcCrystalPositionPar *t_posPar, Int_t t_inputVersion, Int_t t_lowerDetectorId, Int_t t_upperDetectorId);
59 
60  void SetupPositionParameter(BSEmcCrystalPositionPar *t_posPar, BSEmcPositionPar *t_digiPar);
61 
62  void SetupPositionParameters(const PndParameterRegister *t_paramRegister);
63 
64  void ReadNeighbouringParameter(BSEmcGeoNeighbouringRelationPar *t_par, Int_t t_lowerId, Int_t t_upperId);
65 
66  void LoadNeighbouringParameter(BSEmcGeoNeighbouringRelationPar *t_par, Int_t t_version, Int_t t_lowerId, Int_t t_upperId);
67 
68  void SetupNeighbouringParameters(const PndParameterRegister *t_paramRegister);
69 };
70 
71 #endif /*BSEMCPARAMETERLOADINGPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:36
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...