Belle II Software development
TOPCalTOFCorrection.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 <TProfile.h>
13#include <vector>
14
15namespace Belle2 {
20
24 class TOPCalTOFCorrection: public TObject {
25 public:
26
32
37 void set(const TProfile* pf);
38
44 double get(double z) const;
45
50 double getZmin() const {return m_zmin;}
51
56 double getZbinWidth() const {return m_dz;}
57
62 const std::vector<float>& getConstants() const {return m_corrections;}
63
68 bool isCalibrated() const {return !m_corrections.empty();}
69
70 private:
71
72 float m_zmin = 0;
73 float m_dz = 0;
74 std::vector<float> m_corrections;
75
77
78 };
79
81} // end namespace Belle2
82
ClassDef(TOPCalTOFCorrection, 1)
ClassDef.
const std::vector< float > & getConstants() const
Returns a vector of calibration constants.
double getZbinWidth() const
Returns bin width.
bool isCalibrated() const
Returns calibration status.
std::vector< float > m_corrections
time-of-flight corrections as function of z
double getZmin() const
Returns minimal z.
TOPCalTOFCorrection()
Default constructor.
void set(const TProfile *pf)
Setter.
double get(double z) const
Getter.
Abstract base class for different kinds of events.