 |
Belle II Software
release-05-02-19
|
14 #include <framework/logging/Logger.h>
15 #include <top/dbobjects/TOPPulseHeightPar.h>
28 class TOPCalChannelPulseHeight:
public TObject {
54 void setParameters(
int moduleID,
unsigned channel,
double x0,
double p1,
double p2)
56 unsigned module = moduleID - 1;
58 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
62 B2ERROR(
"Invalid channel number, constant not set (" << ClassName() <<
")");
66 B2ERROR(
"Invalid parameter value x0, constant not set (" << ClassName() <<
")."
68 <<
LogVar(
"slot", moduleID)
69 <<
LogVar(
"channel", channel));
73 B2ERROR(
"Invalid parameter value p1, constant not set (" << ClassName() <<
")."
75 <<
LogVar(
"slot", moduleID)
76 <<
LogVar(
"channel", channel));
80 B2ERROR(
"Invalid parameter value p2, constant not set (" << ClassName() <<
")."
82 <<
LogVar(
"slot", moduleID)
83 <<
LogVar(
"channel", channel));
99 unsigned module = moduleID - 1;
101 B2ERROR(
"Invalid module number, status not set (" << ClassName() <<
")");
105 B2ERROR(
"Invalid channel number, status not set (" << ClassName() <<
")");
117 const TOPPulseHeightPar&
getParameters(
int moduleID,
unsigned channel)
const
119 unsigned module = moduleID - 1;
121 B2WARNING(
"Invalid slot number, "
122 "returning parameters of slot 1 channel 0 (" << ClassName() <<
")"
123 <<
LogVar(
"slot", moduleID));
127 B2WARNING(
"Invalid channel, "
128 "returning parameters of channel 0 (" << ClassName() <<
")"
129 <<
LogVar(
"channel", channel));
130 return m_par[module][0];
132 return m_par[module][channel];
143 unsigned module = moduleID - 1;
155 bool isDefault(
int moduleID,
unsigned channel)
const
157 unsigned module = moduleID - 1;
169 bool isUnusable(
int moduleID,
unsigned channel)
const
171 unsigned module = moduleID - 1;
bool isUnusable(int moduleID, unsigned channel) const
Returns calibration status.
TOPPulseHeightPar m_par[c_numModules][c_numChannels]
calibration constants
@ c_numModules
number of modules
TOPCalChannelPulseHeight()
Default constructor.
@ c_Default
uncalibrated default value
EStatus m_status[c_numModules][c_numChannels]
calibration status
ClassDef(TOPCalChannelPulseHeight, 3)
ClassDef.
@ c_Calibrated
good calibrated value
EStatus
Calibration status of a constant.
Struct holding the pulse height parameterizations for the TOP counter.
Abstract base class for different kinds of events.
void setUnusable(int moduleID, unsigned channel)
Switches calibration status to unusable to flag badly calibrated constant.
float p1
distribution parameter p1
Class to store variables with their name which were sent to the logging service.
float p2
distribution parameter p2
bool isDefault(int moduleID, unsigned channel) const
Returns calibration status.
bool isCalibrated(int moduleID, unsigned channel) const
Returns calibration status.
@ c_numChannels
number of channels per module
void setParameters(int moduleID, unsigned channel, double x0, double p1, double p2)
Sets calibration for a single channel and switches status to calibrated.
@ c_Unusable
bad calibrated value
float x0
distribution parameter x0 [ADC counts]
const TOPPulseHeightPar & getParameters(int moduleID, unsigned channel) const
Returns pulse height parameters for a given slot and channel.