Belle II Software development
ECLnOptimal.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/* ROOT headers. */
12#include <TH2F.h>
13#include <TObject.h>
14
15namespace Belle2 {
21//---------------------------------------------------
23 class ECLnOptimal: public TObject {
24
25//---------------------------------------------------
26 public:
27
34 m_nOptimal(),
36 m_bias(),
38 { };
39
40 //---------------------------------------------------
41 //..Getters for the various calibration components
42
44 const std::vector<float>& getUpperBoundariesFwd() const {return m_eUpperBoundariesFwd;}
45
47 const std::vector<float>& getUpperBoundariesBrl() const {return m_eUpperBoundariesBrl;}
48
50 const std::vector<float>& getUpperBoundariesBwd() const {return m_eUpperBoundariesBwd;}
51
53 const std::vector<int>& getGroupNumber() const {return m_groupNumber;}
54
56 const TH2F getNOptimal() const {return m_nOptimal;}
57
58 //..The following have 3 xBins per group for energy interpolation.
59 // Value for nominal energy bin is histogram x bin ix = 3*iGroup + 1;
60 // Value for lower energy bin is ix = 3*iGroup + 2;
61 // Value for higher energy bin is ix = 3*iGroup + 3;
62 // In all three cases, the histogram y bin is iy = iEnergy + 1
63
66 const TH2F getPeakFracEnergy() const {return m_peakFracEnergy;}
67
70 const TH2F getBias() const {return m_bias;}
71
74 const TH2F getLogPeakEnergy() const {return m_logPeakEnergy;}
75
76 //---------------------------------------------------
77 //..Setters for the various components
78
80 void setUpperBoundariesFwd(const std::vector<float>& eUpperBoundariesFwd) {m_eUpperBoundariesFwd = eUpperBoundariesFwd;}
81
83 void setUpperBoundariesBrl(const std::vector<float>& eUpperBoundariesBrl) {m_eUpperBoundariesBrl = eUpperBoundariesBrl;}
84
86 void setUpperBoundariesBwd(const std::vector<float>& eUpperBoundariesBwd) {m_eUpperBoundariesBwd = eUpperBoundariesBwd;}
87
89 void setGroupNumber(const std::vector<int>& groupNumber) {m_groupNumber = groupNumber;}
90
92 void setNOptimal(const TH2F& nOptimal) {m_nOptimal = nOptimal;}
93
95 void setPeakFracEnergy(const TH2F& peakFracEnergy) {m_peakFracEnergy = peakFracEnergy;}
96
98 void setBias(const TH2F& bias) {m_bias = bias;}
99
101 void setLogPeakEnergy(const TH2F& logPeakEnergy) {m_logPeakEnergy = logPeakEnergy;}
102
103//---------------------------------------------------
104 private:
105 std::vector<float> m_eUpperBoundariesFwd;
106 std::vector<float> m_eUpperBoundariesBrl;
107 std::vector<float> m_eUpperBoundariesBwd;
108 std::vector<int> m_groupNumber;
111 //..For the following, there are 3 bins in x for each group.
112 // First contains the value for the specified group number and energy point,
113 // corresponding to the optimal number of crystals.
114 // Second is the value, for that number of crystals, for the specified group
115 // but the next lower energy point.
116 // Third is the value for the next higher energy point.
118 TH2F m_bias;
122 };
124}
DB object to store the optimal number of crystals to be used in a cluster energy sum,...
Definition: ECLnOptimal.h:23
void setNOptimal(const TH2F &nOptimal)
Set the 2D histogram of nOptimal.
Definition: ECLnOptimal.h:92
const TH2F getLogPeakEnergy() const
Get the 2D histogram of log peak energies (GeV), one yBin per energy group, 3 xBins per group number.
Definition: ECLnOptimal.h:74
const std::vector< float > & getUpperBoundariesBrl() const
Get vector of energies that specify energy ranges in the barrel.
Definition: ECLnOptimal.h:47
TH2F m_logPeakEnergy
log of peak contained energy in GeV
Definition: ECLnOptimal.h:119
void setLogPeakEnergy(const TH2F &logPeakEnergy)
Set the 2D histogram of log of peak contained energy in GeV.
Definition: ECLnOptimal.h:101
TH2F m_nOptimal
2D histogram containing optimal number of crystals for each group number (x) and energy range (y)
Definition: ECLnOptimal.h:109
void setGroupNumber(const std::vector< int > &groupNumber)
Set the vector of group numbers for each crystal.
Definition: ECLnOptimal.h:89
const std::vector< float > & getUpperBoundariesBwd() const
Get vector of energies that specify energy ranges in the backward endcap.
Definition: ECLnOptimal.h:50
TH2F m_bias
2D histogram of bias = sum of ECLCalDigit energy minus true (GeV)
Definition: ECLnOptimal.h:118
void setUpperBoundariesFwd(const std::vector< float > &eUpperBoundariesFwd)
Set vector of energies that specify energy ranges in the forward endcap.
Definition: ECLnOptimal.h:80
void setBias(const TH2F &bias)
Set the 2D histogram of beam background bias (reconstructed - true) (GeV)
Definition: ECLnOptimal.h:98
TH2F m_peakFracEnergy
2D histogram of peak fractional contained energy
Definition: ECLnOptimal.h:117
void setUpperBoundariesBrl(const std::vector< float > &eUpperBoundariesBrl)
Set vector of energies that specify energy ranges in the barrel.
Definition: ECLnOptimal.h:83
const std::vector< float > & getUpperBoundariesFwd() const
Get vector of energies that specify energy ranges in the forward endcap.
Definition: ECLnOptimal.h:44
ECLnOptimal()
Constructor.
Definition: ECLnOptimal.h:29
const std::vector< int > & getGroupNumber() const
Get the vector of group number for each cellID.
Definition: ECLnOptimal.h:53
std::vector< float > m_eUpperBoundariesBwd
upper edges of the energy ranges in the backward endcap (GeV)
Definition: ECLnOptimal.h:107
void setUpperBoundariesBwd(const std::vector< float > &eUpperBoundariesBwd)
Set vector of energies that specify energy ranges in the backward endcap.
Definition: ECLnOptimal.h:86
std::vector< float > m_eUpperBoundariesBrl
upper edges of the energy ranges in the barrel (GeV)
Definition: ECLnOptimal.h:106
void setPeakFracEnergy(const TH2F &peakFracEnergy)
Set the 2D histogram of peak fractional contained energy.
Definition: ECLnOptimal.h:95
const TH2F getPeakFracEnergy() const
Get 2D histogram of the peak fraction of contained energy, one yBin per energy group,...
Definition: ECLnOptimal.h:66
const TH2F getNOptimal() const
Get 2D histogram of nOptimal (one xBin per group number, one yBin per energy range.
Definition: ECLnOptimal.h:56
std::vector< int > m_groupNumber
group number of each crystal
Definition: ECLnOptimal.h:108
std::vector< float > m_eUpperBoundariesFwd
upper edges of the energy ranges in the forward endcap (GeV)
Definition: ECLnOptimal.h:105
ClassDef(ECLnOptimal, 1)
ClassDef.
const TH2F getBias() const
Get the 2D histogram of bias (reconstructed - true) from beam backgrounds, one yBin per energy group,...
Definition: ECLnOptimal.h:70
Abstract base class for different kinds of events.