R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandHitModulePar.h
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#ifndef R3BNEULANDHITMODULEPAR_H
15#define R3BNEULANDHITMODULEPAR_H
16
17#include "FairParGenericSet.h"
18
19#include "R3BNeulandCommon.h"
20
21#include "assert.h"
22
23// FIXME Do we need this???
24// #define NCHMAX 5000
25
26class FairParamList;
27
28class R3BNeulandHitModulePar : public FairParGenericSet
29{
30 public:
38 R3BNeulandHitModulePar(const char* name = "NeulandHitModulePar",
39 const char* title = "Calibration of a NeuLAND module",
40 const char* context = "TestDefaultContext",
41 Bool_t own = kTRUE);
42
47 virtual ~R3BNeulandHitModulePar(void);
48
52 void clear(void);
53
58 void putParams(FairParamList* list);
59
65 Bool_t getParams(FairParamList* list);
66
71 void printParams();
72
74 Int_t GetModuleId() const { return fModuleId; }
75 Double_t GetTDiff() const { return fTDiff; }
76 Double_t GetTSync() const { return fTSync; }
77 Double_t GetTimeOffset(const Int_t side) const
78 {
79 assert(side == 1 || side == 2);
80 return -fTSync + (1.5 - side) * fTDiff;
81 }
82 Double_t GetEffectiveSpeed() const { return fEffectiveSpeed; }
83 Int_t GetPedestal(const Int_t side) const
84 {
85 assert(side == 1 || side == 2);
86 return fPedestal[side - 1];
87 }
88 Double_t GetEnergyGain(const Int_t side) const
89 {
90 assert(side == 1 || side == 2);
91 return fEnergyGain[side - 1];
92 }
93 Double_t GetLightAttenuationLength() const { return fLightAttenuationLength; }
94 Double_t GetPMTSaturation(const Int_t side) const
95 {
96 assert(side == 1 || side == 2);
97 return fPMTSaturation[side - 1];
98 }
99 Double_t GetPMTThreshold(const Int_t side) const
100 {
101 assert(side == 1 || side == 2);
102 return fPMTThreshold[side - 1];
103 }
104
105 void SetModuleId(const Int_t i) { fModuleId = i; }
106 void SetTDiff(const Double_t val) { fTDiff = val; }
107 void SetTSync(const Double_t val) { fTSync = val; }
108 void SetEffectiveSpeed(const Double_t val) { fEffectiveSpeed = val; }
109 void SetPedestal(const Int_t val, const Int_t side)
110 {
111 assert(side == 1 || side == 2);
112 fPedestal[side - 1] = val;
113 }
114 void SetEnergyGain(const Double_t val, const Int_t side)
115 {
116 assert(side == 1 || side == 2);
117 fEnergyGain[side - 1] = val;
118 }
119 void SetLightAttenuationLength(const Double_t val) { fLightAttenuationLength = val; }
120 void SetPMTSaturation(const Double_t val, const Int_t side)
121 {
122 assert(side == 1 || side == 2);
123 fPMTSaturation[side - 1] = val;
124 }
125 void SetPMTThreshold(const Double_t val, const Int_t side)
126 {
127 assert(side == 1 || side == 2);
128 fPMTThreshold[side - 1] = val;
129 }
130
131 private:
132 Int_t fModuleId;
133 Double_t fTDiff;
134 Double_t fTSync;
135 Double_t fEffectiveSpeed;
136 Int_t fPedestal[2]; // R/B, L/T
137 Double_t fEnergyGain[2]; // R/B, L/T
138 Double_t fLightAttenuationLength;
139 Double_t fPMTSaturation[2]; // R/B, L/T
140 Double_t fPMTThreshold[2]; // R/B, L/T
141 ClassDef(R3BNeulandHitModulePar, 3);
142};
143
144#endif /* !R3BNEULANDHITMODULEPAR_H*/
virtual ~R3BNeulandHitModulePar(void)
Destructor.
Double_t GetPMTSaturation(const Int_t side) const
R3BNeulandHitModulePar(const char *name="NeulandHitModulePar", const char *title="Calibration of a NeuLAND module", const char *context="TestDefaultContext", Bool_t own=kTRUE)
Standard constructor.
void SetModuleId(const Int_t i)
void SetPMTSaturation(const Double_t val, const Int_t side)
Int_t GetPedestal(const Int_t side) const
void clear(void)
A method to reset the parameter values.
void printParams()
A method to print value of parameters to the standard output using FairLogger.
void SetTDiff(const Double_t val)
Int_t GetModuleId() const
Accessor functions.
Double_t GetLightAttenuationLength() const
Double_t GetTimeOffset(const Int_t side) const
void SetTSync(const Double_t val)
Bool_t getParams(FairParamList *list)
A method to read parameters using RuntimeDB.
void SetPedestal(const Int_t val, const Int_t side)
void SetEnergyGain(const Double_t val, const Int_t side)
void SetPMTThreshold(const Double_t val, const Int_t side)
void putParams(FairParamList *list)
A method to write parameters using RuntimeDB.
void SetEffectiveSpeed(const Double_t val)
Double_t GetPMTThreshold(const Int_t side) const
void SetLightAttenuationLength(const Double_t val)
Double_t GetEnergyGain(const Int_t side) const