HerdSoftware  0.1.1
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 
13 #include "dataobjects/Point.h"
14 #include <common/AxesArray.h>
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  _HGnoises.resize(nChannels);
60  _LGnoises.resize(nChannels);
61  _gainRatios.resize(nChannels);
62  _maxHGADCvalues.resize(nChannels);
63  _maxLGADCvalues.resize(nChannels);
64  _pedestals.resize(nChannels);
65  };
66 
72  const float &MIPvalue(unsigned int volID) const { return _MIPvalues[volID]; };
73 
78  const std::vector<float> &MIPvalues() const { return _MIPvalues; };
79 
85  const float &HighGainNoise(unsigned int volID) const { return _HGnoises[volID]; };
86 
91  const std::vector<float> &HighGainNoises() const { return _HGnoises; };
92 
98  const float &LowGainNoise(unsigned int volID) const { return _LGnoises[volID]; };
99 
104  const std::vector<float> &LowGainNoises() const { return _LGnoises; };
105 
111  const float &GainRatio(unsigned int volID) const { return _gainRatios[volID]; };
112 
117  const std::vector<float> &GainRatios() const { return _gainRatios; };
118 
124  const float &MaximumHighGainSignal(unsigned int volID) const { return _maxHGADCvalues[volID]; };
125 
130  const std::vector<float> &MaximumHighGainSignals() const { return _maxHGADCvalues; };
131 
137  const float &MaximumLowGainSignal(unsigned int volID) const { return _maxLGADCvalues[volID]; };
138 
143  const std::vector<float> &MaximumLowGainSignals() const { return _maxLGADCvalues; };
144 
150  const float &Pedestal(unsigned int volID) const { return _pedestals[volID]; };
151 
156  const std::vector<float> &Pedestals() const { return _pedestals; };
157 
162  unsigned int NChannels() const { return _MIPvalues.size(); };
163 
170  void SetMIPvalue(unsigned int volID, float MIPvalue) { _MIPvalues.at(volID) = MIPvalue; };
171 
178  void SetHighGainNoise(unsigned int volID, float HGnoise) { _HGnoises.at(volID) = HGnoise; };
179 
186  void SetLowGainNoise(unsigned int volID, float LGnoise) { _LGnoises.at(volID) = LGnoise; };
187 
194  void SetGainRatio(unsigned int volID, float gainRatio) { _gainRatios.at(volID) = gainRatio; };
195 
202  void SetMaximumHighGainSignal(unsigned int volID, float maxHGADCvalues) {
203  _maxHGADCvalues.at(volID) = maxHGADCvalues;
204  };
205 
212  void SetMaximumLowGainSignal(unsigned int volID, float maxLGADCvalues) {
213  _maxLGADCvalues.at(volID) = maxLGADCvalues;
214  };
215 
222  void SetPedestal(unsigned int volID, float pedestal) { _pedestals.at(volID) = pedestal; };
223 
224 private:
225  std::vector<float> _MIPvalues;
226  std::vector<float> _HGnoises;
227  std::vector<float> _LGnoises;
228  std::vector<float> _gainRatios;
229  std::vector<float> _maxHGADCvalues;
230  std::vector<float> _maxLGADCvalues;
231  std::vector<float> _pedestals;
232 
233 #ifdef HS_USE_ROOT
234  ClassDef(CaloPDChannelInfo, 1)
235 #endif
236 };
237 
238 } // namespace Herd
239 
240 #endif /* HERD_CALOPDCHANNELINFO_H_ */
const std::vector< float > & Pedestals() const
Return a vector with the pedestal means [ADC].
Definition: CaloPDChannelInfo.h:156
CaloPDChannelInfo(unsigned int nChannels)
Constructor.
Definition: CaloPDChannelInfo.h:48
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
void SetPedestal(unsigned int volID, float pedestal)
Set pedestal mean.
Definition: CaloPDChannelInfo.h:222
std::vector< float > _LGnoises
RMS of the pedestal when the electronics is in low gain, for each crystal.
Definition: CaloPDChannelInfo.h:227
void SetMaximumHighGainSignal(unsigned int volID, float maxHGADCvalues)
Set saturation level for high gain.
Definition: CaloPDChannelInfo.h:202
const float & MaximumLowGainSignal(unsigned int volID) const
Return the maximum signal obtained with low gain [ADC].
Definition: CaloPDChannelInfo.h:137
const float & GainRatio(unsigned int volID) const
Return the gain ratio.
Definition: CaloPDChannelInfo.h:111
const std::vector< float > & MaximumHighGainSignals() const
Return a vector with the maximum signals obtained with high gain [ADC].
Definition: CaloPDChannelInfo.h:130
std::vector< float > _gainRatios
Ration between Low gain and low gain.
Definition: CaloPDChannelInfo.h:228
std::vector< float > _maxLGADCvalues
ADC value of the saLuration for Low gain, i.e. the saturation of teh chip.
Definition: CaloPDChannelInfo.h:230
void SetGainRatio(unsigned int volID, float gainRatio)
Set gain ratio.
Definition: CaloPDChannelInfo.h:194
void SetHighGainNoise(unsigned int volID, float HGnoise)
Set high gain noise (i.e. pedestal distribution RMS).
Definition: CaloPDChannelInfo.h:178
void SetMaximumLowGainSignal(unsigned int volID, float maxLGADCvalues)
Set saturation level for low gain gain.
Definition: CaloPDChannelInfo.h:212
const float & Pedestal(unsigned int volID) const
Return the pedestal mean [ADC].
Definition: CaloPDChannelInfo.h:150
std::vector< float > _HGnoises
RMS of the pedestal when the electronics is in Low gain, for each crystal.
Definition: CaloPDChannelInfo.h:226
void SetNChannels(size_t nChannels)
Setup the total number of channels.
Definition: CaloPDChannelInfo.h:57
virtual ~CaloPDChannelInfo()=default
Virtual destructor.
CaloPDChannelInfo()
Default constructor with the number of channels = 0.
Definition: CaloPDChannelInfo.h:41
const float & MIPvalue(unsigned int volID) const
Return the MIP value [ADC].
Definition: CaloPDChannelInfo.h:72
const std::vector< float > & GainRatios() const
Return a vector with the gain ratios.
Definition: CaloPDChannelInfo.h:117
const std::vector< float > & HighGainNoises() const
Return a vector with the high gain noises [ADC].
Definition: CaloPDChannelInfo.h:91
std::vector< float > _MIPvalues
MIP values for each crystal.
Definition: CaloPDChannelInfo.h:222
const std::vector< float > & LowGainNoises() const
Return a vector with the low gain noises [ADC].
Definition: CaloPDChannelInfo.h:104
std::vector< float > _pedestals
ADC value of the pedestal, the pedesLal is the same in LG and HG.
Definition: CaloPDChannelInfo.h:231
void SetMIPvalue(unsigned int volID, float MIPvalue)
Set MIP value.
Definition: CaloPDChannelInfo.h:170
std::vector< float > _maxHGADCvalues
ADC value of the saturation for Low gain.
Definition: CaloPDChannelInfo.h:229
const float & MaximumHighGainSignal(unsigned int volID) const
Return the maximum signal obtained with high gain [ADC].
Definition: CaloPDChannelInfo.h:124
Data structure for the Calo PD readout information.
Definition: CaloPDChannelInfo.h:35
const std::vector< float > & MaximumLowGainSignals() const
Return a vector with the maximum signals obtained with low gain [ADC].
Definition: CaloPDChannelInfo.h:143
unsigned int NChannels() const
Return the number of channels.
Definition: CaloPDChannelInfo.h:162
const std::vector< float > & MIPvalues() const
Return a vector with the MIP values [ADC].
Definition: CaloPDChannelInfo.h:78
void SetLowGainNoise(unsigned int volID, float LGnoise)
Set low gain noise (i.e. pedestal distribution RMS).
Definition: CaloPDChannelInfo.h:186
const float & LowGainNoise(unsigned int volID) const
Return the low gain noise [ADC].
Definition: CaloPDChannelInfo.h:98
const float & HighGainNoise(unsigned int volID) const
Return the high gain noise [ADC].
Definition: CaloPDChannelInfo.h:85