Belle II Software  release-05-01-25
ECLLeakageCorrections.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2020 - Belle II Collaboration *
4  * *
5  * DB object to store leakage corrections, including dependence on nCrys *
6  * *
7  * Author: The Belle II Collaboration *
8  * Contributors: Christopher Hearty (hearty@physics.ubc.ca) *
9  * *
10  * This software is provided "as is" without any warranty. *
11  **************************************************************************/
12 
13 #pragma once
14 #include <TObject.h>
15 #include <framework/logging/Logger.h>
16 #include <TH2F.h>
17 
18 namespace Belle2 {
25  class ECLLeakageCorrections: public TObject {
26 
27 
28 //---------------------------------------------------
29  public:
30 
40  { };
41 
42  //---------------------------------------------------
43  //..Getters for the various calibration components
44 
46  const std::vector<float>& getlogEnergiesFwd() const {return m_logEnergiesFwd;}
47 
49  const std::vector<float>& getlogEnergiesBrl() const {return m_logEnergiesBrl;}
50 
52  const std::vector<float>& getlogEnergiesBwd() const {return m_logEnergiesBwd;}
53 
55  const std::vector<float>& getThetaBoundaries() const {return m_thetaBoundaries;}
56 
58  const TH2F getThetaCorrections() const {return m_thetaCorrections;}
59 
61  const TH2F getPhiCorrections() const {return m_phiCorrections;}
62 
64  const TH2F getnCrystalCorrections() const {return m_nCrystalCorrections;}
65 
66 
67  //---------------------------------------------------
68  //..Setters for the various calibration components
69 
71  void setlogEnergiesFwd(const std::vector<float>& logEnergiesFwd) {m_logEnergiesFwd = logEnergiesFwd;}
72 
74  void setlogEnergiesBrl(const std::vector<float>& logEnergiesBrl) {m_logEnergiesBrl = logEnergiesBrl;}
75 
77  void setlogEnergiesBwd(const std::vector<float>& logEnergiesBwd) {m_logEnergiesBwd = logEnergiesBwd;}
78 
80  void setThetaBoundaries(const std::vector<float>& thetaBoundaries)
81  {
82  if (thetaBoundaries.size() != 70) {B2FATAL("ECLLeakageCorrections: wrong size vector uploaded for thetaBoundaries, " << thetaBoundaries.size() << " instead of 70");} m_thetaBoundaries
83  = thetaBoundaries;
84  }
85 
87  void setThetaCorrections(const TH2F& thetaCorrections) {m_thetaCorrections = thetaCorrections;}
88 
90  void setPhiCorrections(const TH2F& phiCorrections) {m_phiCorrections = phiCorrections;}
91 
93  void setnCrystalCorrections(const TH2F& nCrystalCorrections) {m_nCrystalCorrections = nCrystalCorrections;}
94 
95 
96 //---------------------------------------------------
97  private:
98  std::vector<float> m_logEnergiesFwd;
99  std::vector<float> m_logEnergiesBrl;
100  std::vector<float> m_logEnergiesBwd;
101  std::vector<float> m_thetaBoundaries;
102  TH2F m_thetaCorrections;
104  TH2F m_nCrystalCorrections;
107  };
109 }
Belle2::ECLLeakageCorrections::setlogEnergiesBrl
void setlogEnergiesBrl(const std::vector< float > &logEnergiesBrl)
Set the vector of energies used to evaluate the leakage corrections in the barrel.
Definition: ECLLeakageCorrections.h:84
Belle2::ECLLeakageCorrections::ClassDef
ClassDef(ECLLeakageCorrections, 1)
ClassDef.
Belle2::ECLLeakageCorrections::setThetaBoundaries
void setThetaBoundaries(const std::vector< float > &thetaBoundaries)
Set the 70-element vector of theta lab values bounding the 69 theta rings.
Definition: ECLLeakageCorrections.h:90
Belle2::ECLLeakageCorrections::m_logEnergiesBwd
std::vector< float > m_logEnergiesBwd
log(energies) used to find constants in the backward endcap (GeV)
Definition: ECLLeakageCorrections.h:110
Belle2::ECLLeakageCorrections::m_phiCorrections
TH2F m_phiCorrections
2D histogram containing phi-dependent correction for each thetaID & energy
Definition: ECLLeakageCorrections.h:113
Belle2::ECLLeakageCorrections::m_thetaCorrections
TH2F m_thetaCorrections
2D histogram containing theta-dependent correction for each thetaID & energy
Definition: ECLLeakageCorrections.h:112
Belle2::ECLLeakageCorrections::setThetaCorrections
void setThetaCorrections(const TH2F &thetaCorrections)
Set the 2D histogram containing the theta corrections for each thetaID and energy.
Definition: ECLLeakageCorrections.h:97
Belle2::ECLLeakageCorrections::m_nCrystalCorrections
TH2F m_nCrystalCorrections
2D histogram containing nCrys-dependent correction for each thetaID & energy
Definition: ECLLeakageCorrections.h:114
Belle2::ECLLeakageCorrections::m_thetaBoundaries
std::vector< float > m_thetaBoundaries
70 values of theta that bound the 69 theta rings (rad)
Definition: ECLLeakageCorrections.h:111
Belle2::ECLLeakageCorrections::setnCrystalCorrections
void setnCrystalCorrections(const TH2F &nCrystalCorrections)
Set the 2D histogram containing the nCrys corrections for each thetaID and energy.
Definition: ECLLeakageCorrections.h:103
Belle2::ECLLeakageCorrections::getlogEnergiesFwd
const std::vector< float > & getlogEnergiesFwd() const
Get vector of log(energies) used to evaluate the leakage corrections in the forward endcap.
Definition: ECLLeakageCorrections.h:56
Belle2::ECLLeakageCorrections::getThetaCorrections
const TH2F getThetaCorrections() const
Get 2D histogram of theta-dependent constants (one column per thetaID & energy)
Definition: ECLLeakageCorrections.h:68
Belle2::ECLLeakageCorrections::setlogEnergiesFwd
void setlogEnergiesFwd(const std::vector< float > &logEnergiesFwd)
Set the vector of energies used to evaluate the leakage corrections in the forward endcap.
Definition: ECLLeakageCorrections.h:81
Belle2::ECLLeakageCorrections::getPhiCorrections
const TH2F getPhiCorrections() const
Get 2D histogram of phi-dependent constants (one column per thetaID & energy in barrel,...
Definition: ECLLeakageCorrections.h:71
Belle2::ECLLeakageCorrections::ECLLeakageCorrections
ECLLeakageCorrections()
Constructor.
Definition: ECLLeakageCorrections.h:42
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECLLeakageCorrections
DB object to store leakage corrections, including nCrys dependence
Definition: ECLLeakageCorrections.h:35
Belle2::ECLLeakageCorrections::getlogEnergiesBwd
const std::vector< float > & getlogEnergiesBwd() const
Get vector of log(energies) used in the backward endcap.
Definition: ECLLeakageCorrections.h:62
Belle2::ECLLeakageCorrections::setPhiCorrections
void setPhiCorrections(const TH2F &phiCorrections)
Set the 2D histogram containing the phi corrections for each thetaID and energy.
Definition: ECLLeakageCorrections.h:100
Belle2::ECLLeakageCorrections::getlogEnergiesBrl
const std::vector< float > & getlogEnergiesBrl() const
Get vector of log(energies) used in the barrel.
Definition: ECLLeakageCorrections.h:59
Belle2::ECLLeakageCorrections::m_logEnergiesFwd
std::vector< float > m_logEnergiesFwd
log(energies) used to find constants in the forward endcap (GeV)
Definition: ECLLeakageCorrections.h:108
Belle2::ECLLeakageCorrections::getnCrystalCorrections
const TH2F getnCrystalCorrections() const
Get 2D histogram of nCrys dependent constants (one column per thetaID & energy)
Definition: ECLLeakageCorrections.h:74
Belle2::ECLLeakageCorrections::setlogEnergiesBwd
void setlogEnergiesBwd(const std::vector< float > &logEnergiesBwd)
Set the vector of energies used to evaluate the leakage corrections in the backward endcap.
Definition: ECLLeakageCorrections.h:87
Belle2::ECLLeakageCorrections::m_logEnergiesBrl
std::vector< float > m_logEnergiesBrl
log(energies) used to find constants in the barrel (GeV)
Definition: ECLLeakageCorrections.h:109
Belle2::ECLLeakageCorrections::getThetaBoundaries
const std::vector< float > & getThetaBoundaries() const
Get vector containing theta (deg) separating theta rings.
Definition: ECLLeakageCorrections.h:65