Belle II Software development
TOPCalChannelT0.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <TObject.h>
12
13namespace Belle2 {
23 class TOPCalChannelT0: public TObject {
24 public:
25
29 enum EStatus {
32 c_Unusable = 2
33 };
34
35
40 {}
41
49 void setT0(int moduleID, unsigned channel, double T0, double errT0);
50
56 void setUnusable(int moduleID, unsigned channel);
57
62 void suppressAverage();
63
70 double getT0(int moduleID, unsigned channel) const;
71
78 double getT0Error(int moduleID, unsigned channel) const;
79
86 bool isCalibrated(int moduleID, unsigned channel) const;
87
94 bool isDefault(int moduleID, unsigned channel) const;
95
102 bool isUnusable(int moduleID, unsigned channel) const;
103
104 private:
105
109 enum {c_numModules = 16,
110 c_numChannels = 512
111 };
112
119 };
120
122} // end namespace Belle2
123
Channel T0 calibration constants for all 512 channels of 16 modules.
EStatus m_status[c_numModules][c_numChannels]
calibration status
float m_T0[c_numModules][c_numChannels]
calibration constants
float m_errT0[c_numModules][c_numChannels]
errors on constants
EStatus
Calibration status of a constant.
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
@ c_Default
uncalibrated default value
@ c_numChannels
number of channels per module
@ c_numModules
number of modules
TOPCalChannelT0()
Default constructor.
ClassDef(TOPCalChannelT0, 3)
ClassDef.
bool isCalibrated(int moduleID, unsigned channel) const
Returns calibration status.
double getT0(int moduleID, unsigned channel) const
Returns T0 of a single channel.
void suppressAverage()
Subtracts arithmetic average of a module from constants whose status is not c_Default.
void setT0(int moduleID, unsigned channel, double T0, double errT0)
Sets calibration for a single channel and switches status to calibrated.
void setUnusable(int moduleID, unsigned channel)
Switches calibration status to unusable to flag badly calibrated constant.
double getT0Error(int moduleID, unsigned channel) const
Returns error on T0 of a single channel.
bool isDefault(int moduleID, unsigned channel) const
Returns calibration status.
bool isUnusable(int moduleID, unsigned channel) const
Returns calibration status.
Abstract base class for different kinds of events.