Belle II Software development
TOPCalModuleT0.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 TOPCalModuleT0: public TObject {
24 public:
25
29 enum EStatus {
32 c_Unusable = 2
33 };
34
39 {}
40
47 void setT0(int moduleID, double T0, double errT0);
48
53 void setUnusable(int moduleID);
54
59 void suppressAverage();
60
66 double getT0(int moduleID) const;
67
73 double getT0Error(int moduleID) const;
74
80 bool isCalibrated(int moduleID) const;
81
87 bool isDefault(int moduleID) const;
88
94 bool isUnusable(int moduleID) const;
95
96 private:
97
101 enum {c_numModules = 16,
102 };
103
104 float m_T0[c_numModules] = {0};
105 float m_errT0[c_numModules] = {0};
110 };
111
113} // end namespace Belle2
114
Module T0 calibration constants for all 16 modules.
TOPCalModuleT0()
Default constructor.
float m_errT0[c_numModules]
errors on constants
EStatus m_status[c_numModules]
calibration status
float m_T0[c_numModules]
calibration constants
@ c_numModules
number of modules
EStatus
Calibration status of a constant.
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
@ c_Default
uncalibrated default value
ClassDef(TOPCalModuleT0, 3)
ClassDef.
bool isCalibrated(int moduleID) const
Returns calibration status.
void suppressAverage()
Subtracts arithmetic average from constants whose status is not c_Default.
double getT0Error(int moduleID) const
Returns error on T0 of a module.
void setUnusable(int moduleID)
Switches calibration status to unusable to flag badly calibrated constant.
bool isDefault(int moduleID) const
Returns calibration status.
bool isUnusable(int moduleID) const
Returns calibration status.
void setT0(int moduleID, double T0, double errT0)
Sets calibration for a single module and switches status to calibrated.
double getT0(int moduleID) const
Returns T0 of a module.
Abstract base class for different kinds of events.