Belle II Software  release-05-01-25
TOPCalChannelT0.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 TOPCalChannelT0: public TObject {
26  public:
27 
31  enum EStatus {
32  c_Default = 0,
34  c_Unusable = 2
35  };
36 
37 
42  {}
43 
51  void setT0(int moduleID, unsigned channel, double T0, double errT0);
52 
58  void setUnusable(int moduleID, unsigned channel);
59 
64  void suppressAverage();
65 
72  double getT0(int moduleID, unsigned channel) const;
73 
80  double getT0Error(int moduleID, unsigned channel) const;
81 
88  bool isCalibrated(int moduleID, unsigned channel) const;
89 
96  bool isDefault(int moduleID, unsigned channel) const;
97 
104  bool isUnusable(int moduleID, unsigned channel) const;
105 
106  private:
107 
111  enum {c_numModules = 16,
112  c_numChannels = 512
113  };
114 
115  float m_T0[c_numModules][c_numChannels] = {{0}};
116  float m_errT0[c_numModules][c_numChannels] = {{0}};
121  };
122 
124 } // end namespace Belle2
125 
Belle2::TOPCalChannelT0::m_errT0
float m_errT0[c_numModules][c_numChannels]
errors on constants
Definition: TOPCalChannelT0.h:124
Belle2::TOPCalChannelT0::TOPCalChannelT0
TOPCalChannelT0()
Default constructor.
Definition: TOPCalChannelT0.h:49
Belle2::TOPCalChannelT0::m_T0
float m_T0[c_numModules][c_numChannels]
calibration constants
Definition: TOPCalChannelT0.h:123
Belle2::TOPCalChannelT0::m_status
EStatus m_status[c_numModules][c_numChannels]
calibration status
Definition: TOPCalChannelT0.h:125
Belle2::TOPCalChannelT0::EStatus
EStatus
Calibration status of a constant.
Definition: TOPCalChannelT0.h:39
Belle2::TOPCalChannelT0::c_Calibrated
@ c_Calibrated
good calibrated value
Definition: TOPCalChannelT0.h:41
Belle2::TOPCalChannelT0::getT0
double getT0(int moduleID, unsigned channel) const
Returns T0 of a single channel.
Definition: TOPCalChannelT0.cc:75
Belle2::TOPCalChannelT0::setUnusable
void setUnusable(int moduleID, unsigned channel)
Switches calibration status to unusable to flag badly calibrated constant.
Definition: TOPCalChannelT0.cc:39
Belle2::TOPCalChannelT0
Channel T0 calibration constants for all 512 channels of 16 modules.
Definition: TOPCalChannelT0.h:33
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPCalChannelT0::c_Unusable
@ c_Unusable
bad calibrated value
Definition: TOPCalChannelT0.h:42
Belle2::TOPCalChannelT0::isUnusable
bool isUnusable(int moduleID, unsigned channel) const
Returns calibration status.
Definition: TOPCalChannelT0.cc:123
Belle2::TOPCalChannelT0::ClassDef
ClassDef(TOPCalChannelT0, 3)
ClassDef.
Belle2::TOPCalChannelT0::isCalibrated
bool isCalibrated(int moduleID, unsigned channel) const
Returns calibration status.
Definition: TOPCalChannelT0.cc:105
Belle2::TOPCalChannelT0::c_Default
@ c_Default
uncalibrated default value
Definition: TOPCalChannelT0.h:40
Belle2::TOPCalChannelT0::isDefault
bool isDefault(int moduleID, unsigned channel) const
Returns calibration status.
Definition: TOPCalChannelT0.cc:114
Belle2::TOPCalChannelT0::c_numChannels
@ c_numChannels
number of channels per module
Definition: TOPCalChannelT0.h:120
Belle2::TOPCalChannelT0::getT0Error
double getT0Error(int moduleID, unsigned channel) const
Returns error on T0 of a single channel.
Definition: TOPCalChannelT0.cc:90
Belle2::TOPCalChannelT0::setT0
void setT0(int moduleID, unsigned channel, double T0, double errT0)
Sets calibration for a single channel and switches status to calibrated.
Definition: TOPCalChannelT0.cc:22
Belle2::TOPCalChannelT0::suppressAverage
void suppressAverage()
Subtracts arithmetic average of a module from constants whose status is not c_Default.
Definition: TOPCalChannelT0.cc:54
Belle2::TOPCalChannelT0::c_numModules
@ c_numModules
number of modules
Definition: TOPCalChannelT0.h:119