HerdSoftware  0.4.0
CaloPDChannelInfo.h
Go to the documentation of this file.
1 /*
2  * CaloPDChannelInfo.h
3  *
4  * Created on: 06 Aug. 2020
5  * Author: Lorenzo Pacini
6  */
7 
10 #ifndef HERD_CALOPDCHANNELINFO_H_
11 #define HERD_CALOPDCHANNELINFO_H_
12 
15 
16 #include <vector>
17 
18 #ifdef HS_USE_ROOT
19 #include "Rtypes.h"
20 #endif
21 
22 namespace Herd {
23 
36 
42 
48  CaloPDChannelInfo(unsigned int nChannels) { SetNChannels(nChannels); };
49 
51  virtual ~CaloPDChannelInfo() = default;
52 
57  void SetNChannels(size_t nChannels) {
58  _MIPvalues.resize(nChannels);
59  _SiLpdMIPvalues.resize(nChannels);
60  _SiSpdMIPvalues.resize(nChannels);
61  _SiLpdMIPvar.resize(nChannels);
62  _SiSpdMIPvar.resize(nChannels);
63  _HGnoises.resize(nChannels);
64  _LGnoises.resize(nChannels);
65  _gainRatios.resize(nChannels);
66  _maxHGADCvalues.resize(nChannels);
67  _maxLGADCvalues.resize(nChannels);
68  _pedestals.resize(nChannels);
69  };
70 
79  [[nodiscard]] float MIPvalue(unsigned int volID) const { return _MIPvalues[volID]; };
80 
86  [[nodiscard]] float SiLpdMIPvalue(unsigned int volID) const { return _SiLpdMIPvalues[volID]; };
87 
93  [[nodiscard]] float SiSpdMIPvalue(unsigned int volID) const { return _SiSpdMIPvalues[volID]; };
94 
100  [[nodiscard]] float SiLpdMipVar(unsigned int volID) const { return _SiLpdMIPvar[volID]; };
101 
107  [[nodiscard]] float SiSpdMipVar(unsigned int volID) const { return _SiSpdMIPvar[volID]; };
108 
116  [[nodiscard]] const std::vector<float> &MIPvalues() const { return _MIPvalues; };
117 
122  [[nodiscard]] const std::vector<float> &SiLpdMIPvalues() const { return _SiLpdMIPvalues; };
123 
128  [[nodiscard]] const std::vector<float> &SiSpdMIPvalues() const { return _SiSpdMIPvalues; };
129 
134  [[nodiscard]] const std::vector<float> &SiLpdMopVar() const { return _SiLpdMIPvar; };
135 
140  [[nodiscard]] const std::vector<float> &SiSpdMipVar() const { return _SiSpdMIPvar; };
141 
147  [[nodiscard]] float HighGainNoise(unsigned int volID) const { return _HGnoises[volID]; };
148 
153  [[nodiscard]] const std::vector<float> &HighGainNoises() const { return _HGnoises; };
154 
160  [[nodiscard]] float LowGainNoise(unsigned int volID) const { return _LGnoises[volID]; };
161 
166  [[nodiscard]] const std::vector<float> &LowGainNoises() const { return _LGnoises; };
167 
173  [[nodiscard]] float GainRatio(unsigned int volID) const { return _gainRatios[volID]; };
174 
179  [[nodiscard]] const std::vector<float> &GainRatios() const { return _gainRatios; };
180 
186  [[nodiscard]] float MaximumHighGainSignal(unsigned int volID) const { return _maxHGADCvalues[volID]; };
187 
192  [[nodiscard]] const std::vector<float> &MaximumHighGainSignals() const { return _maxHGADCvalues; };
193 
199  [[nodiscard]] float MaximumLowGainSignal(unsigned int volID) const { return _maxLGADCvalues[volID]; };
200 
205  [[nodiscard]] const std::vector<float> &MaximumLowGainSignals() const { return _maxLGADCvalues; };
206 
212  [[nodiscard]] float Pedestal(unsigned int volID) const { return _pedestals[volID]; };
213 
218  [[nodiscard]] const std::vector<float> &Pedestals() const { return _pedestals; };
219 
224  [[nodiscard]] unsigned int NChannels() const { return _MIPvalues.size(); };
225 
232  void SetMIPvalue(unsigned int volID, float MIPvalue) { _MIPvalues.at(volID) = MIPvalue; };
233 
240  void SetSiLpdMipValue(unsigned int volID, float MIPvalue) { _SiLpdMIPvalues.at(volID) = MIPvalue; };
241 
248  void SetSiSpdMipValue(unsigned int volID, float MIPvalue) { _SiSpdMIPvalues.at(volID) = MIPvalue; };
249 
256  void SetSiLPDMIPvar(unsigned int volID, float MIPvar) { _SiLpdMIPvar.at(volID) = MIPvar; };
257 
264  void SetSiSPDMIPvar(unsigned int volID, float MIPvar) { _SiSpdMIPvar.at(volID) = MIPvar; };
265 
272  void SetHighGainNoise(unsigned int volID, float HGnoise) { _HGnoises.at(volID) = HGnoise; };
273 
280  void SetLowGainNoise(unsigned int volID, float LGnoise) { _LGnoises.at(volID) = LGnoise; };
281 
288  void SetGainRatio(unsigned int volID, float gainRatio) { _gainRatios.at(volID) = gainRatio; };
289 
296  void SetMaximumHighGainSignal(unsigned int volID, float maxHGADCvalues) {
297  _maxHGADCvalues.at(volID) = maxHGADCvalues;
298  };
299 
306  void SetMaximumLowGainSignal(unsigned int volID, float maxLGADCvalues) {
307  _maxLGADCvalues.at(volID) = maxLGADCvalues;
308  };
309 
316  void SetPedestal(unsigned int volID, float pedestal) { _pedestals.at(volID) = pedestal; };
317 
318 private:
319  std::vector<float> _MIPvalues;
320  std::vector<float> _HGnoises;
321  std::vector<float> _LGnoises;
322  std::vector<float> _gainRatios;
323  std::vector<float> _maxHGADCvalues;
324  std::vector<float> _maxLGADCvalues;
325  std::vector<float> _pedestals;
326  std::vector<float> _SiLpdMIPvalues;
327  std::vector<float> _SiSpdMIPvalues;
328  std::vector<float> _SiLpdMIPvar;
329  std::vector<float> _SiSpdMIPvar;
330 
331 #ifdef HS_USE_ROOT
332  ClassDef(CaloPDChannelInfo, 2)
333 #endif
334 };
335 
336 } // namespace Herd
337 
338 #endif /* HERD_CALOPDCHANNELINFO_H_ */
Herd::CaloPDChannelInfo::SetHighGainNoise
void SetHighGainNoise(unsigned int volID, float HGnoise)
Set high gain noise (i.e. pedestal distribution RMS).
Definition: CaloPDChannelInfo.h:272
Herd::CaloPDChannelInfo::SetSiLpdMipValue
void SetSiLpdMipValue(unsigned int volID, float MIPvalue)
Set MIP value in Si for LPD.
Definition: CaloPDChannelInfo.h:240
Herd::CaloPDChannelInfo::Pedestals
const std::vector< float > & Pedestals() const
Return a vector with the pedestal means [ADC].
Definition: CaloPDChannelInfo.h:218
Point.h
Herd::CaloPDChannelInfo::SiLpdMIPvalue
float SiLpdMIPvalue(unsigned int volID) const
Return the MIP value in Si for LPD [ADC].
Definition: CaloPDChannelInfo.h:86
Herd::CaloPDChannelInfo
Data structure for the Calo PD readout information.
Definition: CaloPDChannelInfo.h:35
Herd::CaloPDChannelInfo::SiSpdMipVar
const std::vector< float > & SiSpdMipVar() const
Return a vector with the MIP RMS in Si for SPD [ADC].
Definition: CaloPDChannelInfo.h:140
Herd::CaloPDChannelInfo::HighGainNoises
const std::vector< float > & HighGainNoises() const
Return a vector with the high gain noises [ADC].
Definition: CaloPDChannelInfo.h:153
Herd::CaloPDChannelInfo::SiLpdMipVar
float SiLpdMipVar(unsigned int volID) const
Return the MIP RMS in Si for LPD [ADC].
Definition: CaloPDChannelInfo.h:100
Herd::CaloPDChannelInfo::_SiLpdMIPvalues
std::vector< float > _SiLpdMIPvalues
MIP values in Si LPD for each crystal.
Definition: CaloPDChannelInfo.h:326
Herd::CaloPDChannelInfo::Pedestal
float Pedestal(unsigned int volID) const
Return the pedestal mean [ADC].
Definition: CaloPDChannelInfo.h:212
Herd::CaloPDChannelInfo::GainRatios
const std::vector< float > & GainRatios() const
Return a vector with the gain ratios.
Definition: CaloPDChannelInfo.h:179
Herd::CaloPDChannelInfo::_LGnoises
std::vector< float > _LGnoises
RMS of the pedestal when the electronics is in low gain, for each crystal.
Definition: CaloPDChannelInfo.h:321
Herd::CaloPDChannelInfo::SetMaximumHighGainSignal
void SetMaximumHighGainSignal(unsigned int volID, float maxHGADCvalues)
Set saturation level for high gain.
Definition: CaloPDChannelInfo.h:296
Herd::CaloPDChannelInfo::NChannels
unsigned int NChannels() const
Return the number of channels.
Definition: CaloPDChannelInfo.h:224
Herd::CaloPDChannelInfo::SiSpdMipVar
float SiSpdMipVar(unsigned int volID) const
Return the MIP RMS in Si for SPD [ADC].
Definition: CaloPDChannelInfo.h:107
Herd::CaloPDChannelInfo::_SiLpdMIPvar
std::vector< float > _SiLpdMIPvar
RMS of MIP values in Si LPD for each crystal.
Definition: CaloPDChannelInfo.h:328
AxesArray.h
Herd::CaloPDChannelInfo::SiLpdMopVar
const std::vector< float > & SiLpdMopVar() const
Return a vector with the MIP RMS in Si for LPD [ADC].
Definition: CaloPDChannelInfo.h:134
Herd::CaloPDChannelInfo::SiSpdMIPvalue
float SiSpdMIPvalue(unsigned int volID) const
Return the MIP value in Si for SPD [ADC].
Definition: CaloPDChannelInfo.h:93
Herd::CaloPDChannelInfo::SetSiSPDMIPvar
void SetSiSPDMIPvar(unsigned int volID, float MIPvar)
Set MIP RMS in Si for SPD.
Definition: CaloPDChannelInfo.h:264
Herd::CaloPDChannelInfo::SetSiSpdMipValue
void SetSiSpdMipValue(unsigned int volID, float MIPvalue)
Set MIP value in Si for SPD.
Definition: CaloPDChannelInfo.h:248
Herd
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:22
Herd::CaloPDChannelInfo::MaximumLowGainSignals
const std::vector< float > & MaximumLowGainSignals() const
Return a vector with the maximum signals obtained with low gain [ADC].
Definition: CaloPDChannelInfo.h:205
Herd::CaloPDChannelInfo::CaloPDChannelInfo
CaloPDChannelInfo(unsigned int nChannels)
Constructor.
Definition: CaloPDChannelInfo.h:48
Herd::CaloPDChannelInfo::MIPvalue
float MIPvalue(unsigned int volID) const
Return the MIP value [ADC].
Definition: CaloPDChannelInfo.h:79
Herd::CaloPDChannelInfo::SetGainRatio
void SetGainRatio(unsigned int volID, float gainRatio)
Set gain ratio.
Definition: CaloPDChannelInfo.h:288
Herd::CaloPDChannelInfo::MIPvalues
const std::vector< float > & MIPvalues() const
Return a vector with the MIP values [ADC].
Definition: CaloPDChannelInfo.h:116
Herd::CaloPDChannelInfo::SetPedestal
void SetPedestal(unsigned int volID, float pedestal)
Set pedestal mean.
Definition: CaloPDChannelInfo.h:316
Herd::CaloPDChannelInfo::SiLpdMIPvalues
const std::vector< float > & SiLpdMIPvalues() const
Return a vector with the MIP values in Si for LPD [ADC].
Definition: CaloPDChannelInfo.h:122
Herd::CaloPDChannelInfo::MaximumHighGainSignals
const std::vector< float > & MaximumHighGainSignals() const
Return a vector with the maximum signals obtained with high gain [ADC].
Definition: CaloPDChannelInfo.h:192
Herd::CaloPDChannelInfo::SetMaximumLowGainSignal
void SetMaximumLowGainSignal(unsigned int volID, float maxLGADCvalues)
Set saturation level for low gain gain.
Definition: CaloPDChannelInfo.h:306
Herd::CaloPDChannelInfo::LowGainNoises
const std::vector< float > & LowGainNoises() const
Return a vector with the low gain noises [ADC].
Definition: CaloPDChannelInfo.h:166
Herd::CaloPDChannelInfo::_maxHGADCvalues
std::vector< float > _maxHGADCvalues
ADC value of the saturation for Low gain.
Definition: CaloPDChannelInfo.h:323
Herd::CaloPDChannelInfo::MaximumLowGainSignal
float MaximumLowGainSignal(unsigned int volID) const
Return the maximum signal obtained with low gain [ADC].
Definition: CaloPDChannelInfo.h:199
Herd::CaloPDChannelInfo::_gainRatios
std::vector< float > _gainRatios
Ration between Low gain and low gain.
Definition: CaloPDChannelInfo.h:322
Herd::CaloPDChannelInfo::~CaloPDChannelInfo
virtual ~CaloPDChannelInfo()=default
Virtual destructor
Herd::CaloPDChannelInfo::SiSpdMIPvalues
const std::vector< float > & SiSpdMIPvalues() const
Return a vector with the MIP values in Si for SPD [ADC].
Definition: CaloPDChannelInfo.h:128
Herd::CaloPDChannelInfo::_MIPvalues
std::vector< float > _MIPvalues
MIP values for each crystal in ADC as read by the LPD.
Definition: CaloPDChannelInfo.h:316
Herd::CaloPDChannelInfo::SetLowGainNoise
void SetLowGainNoise(unsigned int volID, float LGnoise)
Set low gain noise (i.e. pedestal distribution RMS).
Definition: CaloPDChannelInfo.h:280
Herd::CaloPDChannelInfo::HighGainNoise
float HighGainNoise(unsigned int volID) const
Return the high gain noise [ADC].
Definition: CaloPDChannelInfo.h:147
Herd::CaloPDChannelInfo::LowGainNoise
float LowGainNoise(unsigned int volID) const
Return the low gain noise [ADC].
Definition: CaloPDChannelInfo.h:160
Herd::CaloPDChannelInfo::_HGnoises
std::vector< float > _HGnoises
RMS of the pedestal when the electronics is in Low gain, for each crystal.
Definition: CaloPDChannelInfo.h:320
Herd::CaloPDChannelInfo::SetNChannels
void SetNChannels(size_t nChannels)
Setup the total number of channels.
Definition: CaloPDChannelInfo.h:57
Herd::CaloPDChannelInfo::CaloPDChannelInfo
CaloPDChannelInfo()
Default constructor with the number of channels = 0.
Definition: CaloPDChannelInfo.h:41
Herd::CaloPDChannelInfo::GainRatio
float GainRatio(unsigned int volID) const
Return the gain ratio.
Definition: CaloPDChannelInfo.h:173
Herd::CaloPDChannelInfo::SetMIPvalue
void SetMIPvalue(unsigned int volID, float MIPvalue)
Set MIP value.
Definition: CaloPDChannelInfo.h:232
Herd::CaloPDChannelInfo::SetSiLPDMIPvar
void SetSiLPDMIPvar(unsigned int volID, float MIPvar)
Set MIP RMS in Si for LPD.
Definition: CaloPDChannelInfo.h:256
Herd::CaloPDChannelInfo::_pedestals
std::vector< float > _pedestals
ADC value of the pedestal, the pedesLal is the same in LG and HG.
Definition: CaloPDChannelInfo.h:325
Herd::CaloPDChannelInfo::_SiSpdMIPvar
std::vector< float > _SiSpdMIPvar
RMS of MIP values in Si SPD for each crystal.
Definition: CaloPDChannelInfo.h:329
Herd::CaloPDChannelInfo::_maxLGADCvalues
std::vector< float > _maxLGADCvalues
ADC value of the saLuration for Low gain, i.e. the saturation of teh chip.
Definition: CaloPDChannelInfo.h:324
Herd::CaloPDChannelInfo::_SiSpdMIPvalues
std::vector< float > _SiSpdMIPvalues
MIP values in Si SPD for each crystal.
Definition: CaloPDChannelInfo.h:327
Herd::CaloPDChannelInfo::MaximumHighGainSignal
float MaximumHighGainSignal(unsigned int volID) const
Return the maximum signal obtained with high gain [ADC].
Definition: CaloPDChannelInfo.h:186