R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandHitPar.cxx
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2025 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13
14#include "R3BNeulandHitPar.h"
15#include "R3BNeulandCommon.h"
16
17#include "FairLogger.h"
18#include "FairParamList.h" // for FairParamList
19
20namespace Neuland = R3B::Neuland;
21
22R3BNeulandHitPar::R3BNeulandHitPar(const char* name, const char* title, const char* context, Bool_t own)
23 : FairParGenericSet(name, title, context, own)
24 , fParams(new TObjArray(Neuland::MaxNumberOfBars))
25 , fGlobalTimeOffset(Neuland::NaN)
26 , fDistanceToTarget(Neuland::NaN)
27 , fEnergyCut(0.0)
28{
29 fDistancesToFirstPlane.resize(Neuland::MaxNumberOfPlanes, 0);
30 for (int p = 1; p < Neuland::MaxNumberOfPlanes; ++p)
31 {
32 fDistancesToFirstPlane[p] = p * Neuland::BarSize_Z;
33 }
34}
35
37{
38 if (fParams)
39 {
40 delete fParams;
41 fParams = NULL;
42 }
43}
44
45void R3BNeulandHitPar::putParams(FairParamList* list)
46{
47 LOG(info) << "R3BNeulandHitPar::putParams() called";
48 if (!list)
49 {
50 return;
51 }
52 list->addObject(GetName(), fParams);
53}
54
55Bool_t R3BNeulandHitPar::getParams(FairParamList* list)
56{
57 LOG(info) << "R3BNeulandHitPar::getParams() called";
58 if (!list)
59 {
60 return kFALSE;
61 }
62 if (!list->fillObject(GetName(), fParams))
63 {
64 return kFALSE;
65 }
66 return kTRUE;
67}
68
70
72{
73
74 LOG(info) << " ----------- " << GetName() << " NeuLAND Parameters ------------- ";
75
76 LOG(info) << " Number of Parameters " << fParams->GetEntries();
77 for (Int_t i = 0; i < fParams->GetEntries(); i++)
78 {
79 R3BNeulandHitModulePar* t_par = dynamic_cast<R3BNeulandHitModulePar*>(fParams->At(i));
80 LOG(info) << "----------------------------------------------------------------------";
81 if (t_par)
82 {
83 t_par->printParams();
84 }
85 }
86}
87
ClassImp(R3BNeulandHitPar)
void printParams()
A method to print value of parameters to the standard output using FairLogger.
void clear(void)
Method to reset the values of parameters.
void putParams(FairParamList *list)
Method to store parameters using FairRuntimeDB.
void printParams()
Method to print value of parameters to the standard output.
R3BNeulandHitPar(const char *name="NeulandHitPar", const char *title="Calibration", const char *context="TestDefaultContext", Bool_t own=kTRUE)
Standard constructor.
Bool_t getParams(FairParamList *list)
Method to retrieve parameters using FairRuntimeDB.
virtual ~R3BNeulandHitPar(void)
Destructor.
Simulation of NeuLAND Bar/Paddle.
constexpr auto BarSize_Z
constexpr auto MaxNumberOfPlanes