Belle II Software development
TOPCalTimeWalk.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#include <vector>
13
14namespace Belle2 {
24 class TOPCalTimeWalk: public TObject {
25
26 public:
27
31 enum EStatus {
34 c_Unusable = 2
35 };
36
41 {}
42
49 void set(const std::vector<double>& timeWalkParams, double noise, double quadratic);
50
55
60 const std::vector<double>& getTimeWalkParams() const {return m_timeWalkParams;}
61
66 double getNoiseCoefficient() const {return m_noise;}
67
72 double getQuadraticCoefficient() const {return m_quadratic;}
73
79 double getTimeWalk(int pulseHeight) const;
80
86 double getSigmaSq(int pulseHeight) const;
87
93 double getSigma(int pulseHeight) const;
94
99 bool isCalibrated() const {return m_status == c_Calibrated;}
100
105 bool isDefault() const {return m_status == c_Default;};
106
111 bool isUnusable() const {return m_status == c_Unusable;};
112
113 private:
114
115 std::vector<double> m_timeWalkParams;
116 double m_noise = 0;
117 double m_quadratic = 0;
122 };
123
124
126} // end namespace Belle2
Calibration constants for time-walk correction and for tuning of electronic time resolution in digiti...
double getQuadraticCoefficient() const
Returns quadratic term coefficient of electronic time resolution.
ClassDef(TOPCalTimeWalk, 1)
ClassDef.
const std::vector< double > & getTimeWalkParams() const
Returns polynomial coefficients of time walk calibration curve.
EStatus m_status
calibration status
bool isDefault() const
Returns calibration status.
TOPCalTimeWalk()
Default constructor.
void setUnusable()
Switches calibration status to unusable to flag badly calibrated constants.
double m_quadratic
quadratic term coefficient [ns]
EStatus
Calibration status of a constant.
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
@ c_Default
uncalibrated default value
bool isCalibrated() const
Returns calibration status.
double m_noise
noise term excess coefficient [ns]
bool isUnusable() const
Returns calibration status.
double getNoiseCoefficient() const
Returns noise term excess coefficient of electronic time resolution.
std::vector< double > m_timeWalkParams
parameters of calibration curve [ns]
double getTimeWalk(int pulseHeight) const
Returns time-walk at given pulse height.
double getSigmaSq(int pulseHeight) const
Returns an excess of electronic time resolution at given pulse height.
void set(const std::vector< double > &timeWalkParams, double noise, double quadratic)
Sets all the parameters and switches status to calibrated.
double getSigma(int pulseHeight) const
Returns an excess of electronic time resolution at given pulse height.
Abstract base class for different kinds of events.