Belle II Software development
ECLCrystalCalib.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/* ECL headers. */
12#include <ecl/dataobjects/ECLElementNumbers.h>
13
14/* Basf2 headers. */
15#include <framework/logging/Logger.h>
16
17/* ROOT headers. */
18#include <TObject.h>
19
20namespace Belle2 {
27 class ECLCrystalCalib: public TObject {
28
29 public:
30
33
35 const std::vector<float>& getCalibVector() const {return m_CalibConst;};
36
38 const std::vector<float>& getCalibUncVector() const {return m_CalibConstUnc;};
39
41 void setCalibVector(const std::vector<float>& CalibConst, const std::vector<float>& CalibConstUnc)
42 {
43 if ((CalibConst.size() != ECLElementNumbers::c_NCrystals) ||
44 (CalibConstUnc.size() != ECLElementNumbers::c_NCrystals)) {
45 B2FATAL("ECLCrystalCalib: wrong size vector uploaded, " <<
46 CalibConst.size() << " " << CalibConstUnc.size() <<
47 " instead of " << ECLElementNumbers::c_NCrystals);
48 }
49 m_CalibConst = CalibConst;
50 m_CalibConstUnc = CalibConstUnc;
51 };
52
53 private:
54 std::vector<float> m_CalibConst;
55 std::vector<float> m_CalibConstUnc;
58 };
60}
General DB object to store one calibration number per ECL crystal.
const std::vector< float > & getCalibUncVector() const
Get vector of uncertainties on calibration constants.
ECLCrystalCalib()
Constructor.
const std::vector< float > & getCalibVector() const
Get vector of calibration constants.
std::vector< float > m_CalibConst
Calibration constants.
ClassDef(ECLCrystalCalib, 1)
ClassDef.
void setCalibVector(const std::vector< float > &CalibConst, const std::vector< float > &CalibConstUnc)
Set vector of constants with uncertainties.
std::vector< float > m_CalibConstUnc
Uncertainty on constants.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.