Belle II Software  release-06-01-15
ECLReferenceCrystalPerCrateCalib.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 /**************************************************************************
10  * Title: ECLReferenceCrystalPerCrateCalib *
11  * *
12  * General database object to keep track of the reference crystals, *
13  * one for each crate. This was Originally designed for *
14  * determining which crystal to define as having a crystal time *
15  * calibration consant fixed to a specific value to ensure there are *
16  * no extra degrees of freedom with the combiation of crystal and crate *
17  * time calibration constants. *
18  * *
19  * 1 <= cell id <= 8736 *
20  **************************************************************************/
21 
22 #pragma once
23 #include <TObject.h>
24 #include <framework/logging/Logger.h>
25 
26 namespace Belle2 {
34  class ECLReferenceCrystalPerCrateCalib: public TObject {
35 
36  public:
37 
40 
42  const std::vector<short>& getReferenceCrystals() const {return m_refCrystals;};
43 
45  void setCalibVector(const std::vector<short>& refCrystals)
46  {
47  if (refCrystals.size() != 52) {B2FATAL("ECLReferenceCrystalPerCrateCalib: wrong size vector uploaded, " << refCrystals.size() << " instead of 52 (one crystal per crate)");}
48  for (int i = 0; i < 52; i++) {
49  if ((refCrystals[i] < 1) || (refCrystals[i] > 8736)) {
50  B2FATAL("ECLReferenceCrystalPerCrateCalib: cell id outside valid range of 1..8736. Crate " << i << " has reference cid = " <<
51  refCrystals[i]);
52  }
53  }
54  m_refCrystals = refCrystals;
55  };
56 
57  private:
58  std::vector<short> m_refCrystals;
61  };
63 }
General DB object to store one reference crystal per per ECL crate for calibration purposes.
ClassDef(ECLReferenceCrystalPerCrateCalib, 3)
ClassDef.
const std::vector< short > & getReferenceCrystals() const
Get vector of calibration constants.
void setCalibVector(const std::vector< short > &refCrystals)
Set vector of constants with uncertainties.
std::vector< short > m_refCrystals
Calibration constants.
Abstract base class for different kinds of events.