Belle II Software  release-05-02-19
TOPCalCommonT0.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <TObject.h>
14 
15 namespace Belle2 {
25  class TOPCalCommonT0: public TObject {
26  public:
27 
36  enum EStatus {
37  c_Default = 0,
38  c_Calibrated = 1,
39  c_Unusable = 2,
41  };
42 
47  {}
48 
54  TOPCalCommonT0(double T0, double errT0): m_T0(T0), m_errT0(errT0), m_status(c_Calibrated)
55  {}
56 
60  void setUnusable() {m_status = c_Unusable;}
61 
66 
71  double getT0() const {return m_T0;}
72 
77  double getT0Error() const {return m_errT0;}
78 
83  bool isCalibrated() const {return m_status == c_Calibrated;}
84 
89  bool isDefault() const {return m_status == c_Default;}
90 
95  bool isUnusable() const {return m_status == c_Unusable;}
96 
101  bool isRoughlyCalibrated() const {return m_status == c_roughlyCalibrated;}
102 
103  private:
104 
105  float m_T0 = 0;
106  float m_errT0 = 0;
111  };
112 
114 } // end namespace Belle2
115 
Belle2::TOPCalCommonT0::c_Default
@ c_Default
uncalibrated default value
Definition: TOPCalCommonT0.h:45
Belle2::TOPCalCommonT0::TOPCalCommonT0
TOPCalCommonT0()
Default constructor.
Definition: TOPCalCommonT0.h:54
Belle2::TOPCalCommonT0::isCalibrated
bool isCalibrated() const
Returns calibration status.
Definition: TOPCalCommonT0.h:91
Belle2::TOPCalCommonT0::m_status
EStatus m_status
calibration status
Definition: TOPCalCommonT0.h:115
Belle2::TOPCalCommonT0::m_T0
float m_T0
calibration constant
Definition: TOPCalCommonT0.h:113
Belle2::TOPCalCommonT0::c_Calibrated
@ c_Calibrated
good calibrated value
Definition: TOPCalCommonT0.h:46
Belle2::TOPCalCommonT0::c_roughlyCalibrated
@ c_roughlyCalibrated
only roughly calibrated value (for HLT/expressreco)
Definition: TOPCalCommonT0.h:48
Belle2::TOPCalCommonT0::isUnusable
bool isUnusable() const
Returns calibration status.
Definition: TOPCalCommonT0.h:103
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPCalCommonT0::c_Unusable
@ c_Unusable
bad calibrated value
Definition: TOPCalCommonT0.h:47
Belle2::TOPCalCommonT0::isRoughlyCalibrated
bool isRoughlyCalibrated() const
Returns calibration status.
Definition: TOPCalCommonT0.h:109
Belle2::TOPCalCommonT0::m_errT0
float m_errT0
error on constant
Definition: TOPCalCommonT0.h:114
Belle2::TOPCalCommonT0::ClassDef
ClassDef(TOPCalCommonT0, 3)
ClassDef.
Belle2::TOPCalCommonT0::EStatus
EStatus
Calibration status of a constant.
Definition: TOPCalCommonT0.h:44
Belle2::TOPCalCommonT0::getT0Error
double getT0Error() const
Returns error on T0.
Definition: TOPCalCommonT0.h:85
Belle2::TOPCalCommonT0::setUnusable
void setUnusable()
Switches calibration status to unusable to flag badly calibrated constant.
Definition: TOPCalCommonT0.h:68
Belle2::TOPCalCommonT0::isDefault
bool isDefault() const
Returns calibration status.
Definition: TOPCalCommonT0.h:97
Belle2::TOPCalCommonT0
Common T0 calibration constant.
Definition: TOPCalCommonT0.h:33
Belle2::TOPCalCommonT0::getT0
double getT0() const
Returns T0.
Definition: TOPCalCommonT0.h:79
Belle2::TOPCalCommonT0::setRoughlyCalibrated
void setRoughlyCalibrated()
Switches calibration status to roughly calibrated (usefull at HLT/express reco)
Definition: TOPCalCommonT0.h:73