Belle II Software  release-08-00-10
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 #include <TObject.h>
11 #include <framework/logging/Logger.h>
12 #include <TH2F.h>
13 
14 namespace Belle2 {
20 //---------------------------------------------------
22  class ECLnOptimal: public TObject {
23 
24 //---------------------------------------------------
25  public:
26 
32  m_groupNumber(),
33  m_nOptimal(),
35  m_bias(),
37  { };
38 
39  //---------------------------------------------------
40  //..Getters for the various calibration components
41 
43  const std::vector<float>& getUpperBoundariesFwd() const {return m_eUpperBoundariesFwd;}
44 
46  const std::vector<float>& getUpperBoundariesBrl() const {return m_eUpperBoundariesBrl;}
47 
49  const std::vector<float>& getUpperBoundariesBwd() const {return m_eUpperBoundariesBwd;}
50 
52  const std::vector<int>& getGroupNumber() const {return m_groupNumber;}
53 
55  const TH2F getNOptimal() const {return m_nOptimal;}
56 
57  //..The following have 3 xBins per group for energy interpolation.
58  // Value for nominal energy bin is histogram x bin ix = 3*iGroup + 1;
59  // Value for lower energy bin is ix = 3*iGroup + 2;
60  // Value for higher energy bin is ix = 3*iGroup + 3;
61  // In all three cases, the histogram y bin is iy = iEnergy + 1
62 
65  const TH2F getPeakFracEnergy() const {return m_peakFracEnergy;}
66 
69  const TH2F getBias() const {return m_bias;}
70 
73  const TH2F getLogPeakEnergy() const {return m_logPeakEnergy;}
74 
75  //---------------------------------------------------
76  //..Setters for the various components
77 
79  void setUpperBoundariesFwd(const std::vector<float>& eUpperBoundariesFwd) {m_eUpperBoundariesFwd = eUpperBoundariesFwd;}
80 
82  void setUpperBoundariesBrl(const std::vector<float>& eUpperBoundariesBrl) {m_eUpperBoundariesBrl = eUpperBoundariesBrl;}
83 
85  void setUpperBoundariesBwd(const std::vector<float>& eUpperBoundariesBwd) {m_eUpperBoundariesBwd = eUpperBoundariesBwd;}
86 
88  void setGroupNumber(const std::vector<int>& groupNumber) {m_groupNumber = groupNumber;}
89 
91  void setNOptimal(const TH2F& nOptimal) {m_nOptimal = nOptimal;}
92 
94  void setPeakFracEnergy(const TH2F& peakFracEnergy) {m_peakFracEnergy = peakFracEnergy;}
95 
97  void setBias(const TH2F& bias) {m_bias = bias;}
98 
100  void setLogPeakEnergy(const TH2F& logPeakEnergy) {m_logPeakEnergy = logPeakEnergy;}
101 
102 //---------------------------------------------------
103  private:
104  std::vector<float> m_eUpperBoundariesFwd;
105  std::vector<float> m_eUpperBoundariesBrl;
106  std::vector<float> m_eUpperBoundariesBwd;
107  std::vector<int> m_groupNumber;
108  TH2F m_nOptimal;
110  //..For the following, there are 3 bins in x for each group.
111  // First contains the value for the specified group number and energy point,
112  // corresponding to the optimal number of crystals.
113  // Second is the value, for that number of crystals, for the specified group
114  // but the next lower energy point.
115  // Third is the value for the next higher energy point.
117  TH2F m_bias;
121  };
123 }
DB object to store the optimal number of crystals to be used in a cluster energy sum,...
Definition: ECLnOptimal.h:22
void setNOptimal(const TH2F &nOptimal)
Set the 2D histogram of nOptimal.
Definition: ECLnOptimal.h:91
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:73
const std::vector< float > & getUpperBoundariesFwd() const
Get vector of energies that specify energy ranges in the forward endcap.
Definition: ECLnOptimal.h:43
TH2F m_logPeakEnergy
log of peak contained energy in GeV
Definition: ECLnOptimal.h:118
const std::vector< float > & getUpperBoundariesBwd() const
Get vector of energies that specify energy ranges in the backward endcap.
Definition: ECLnOptimal.h:49
void setLogPeakEnergy(const TH2F &logPeakEnergy)
Set the 2D histogram of log of peak contained energy in GeV.
Definition: ECLnOptimal.h:100
TH2F m_nOptimal
2D histogram containing optimal number of crystals for each group number (x) and energy range (y)
Definition: ECLnOptimal.h:108
void setGroupNumber(const std::vector< int > &groupNumber)
Set the vector of group numbers for each crystal.
Definition: ECLnOptimal.h:88
const std::vector< int > & getGroupNumber() const
Get the vector of group number for each cellID.
Definition: ECLnOptimal.h:52
TH2F m_bias
2D histogram of bias = sum of ECLCalDigit energy minus true (GeV)
Definition: ECLnOptimal.h:117
void setUpperBoundariesFwd(const std::vector< float > &eUpperBoundariesFwd)
Set vector of energies that specify energy ranges in the forward endcap.
Definition: ECLnOptimal.h:79
void setBias(const TH2F &bias)
Set the 2D histogram of beam background bias (reconstructed - true) (GeV)
Definition: ECLnOptimal.h:97
TH2F m_peakFracEnergy
2D histogram of peak fractional contained energy
Definition: ECLnOptimal.h:116
void setUpperBoundariesBrl(const std::vector< float > &eUpperBoundariesBrl)
Set vector of energies that specify energy ranges in the barrel.
Definition: ECLnOptimal.h:82
ECLnOptimal()
Constructor.
Definition: ECLnOptimal.h:28
std::vector< float > m_eUpperBoundariesBwd
upper edges of the energy ranges in the backward endcap (GeV)
Definition: ECLnOptimal.h:106
void setUpperBoundariesBwd(const std::vector< float > &eUpperBoundariesBwd)
Set vector of energies that specify energy ranges in the backward endcap.
Definition: ECLnOptimal.h:85
std::vector< float > m_eUpperBoundariesBrl
upper edges of the energy ranges in the barrel (GeV)
Definition: ECLnOptimal.h:105
void setPeakFracEnergy(const TH2F &peakFracEnergy)
Set the 2D histogram of peak fractional contained energy.
Definition: ECLnOptimal.h:94
const TH2F getPeakFracEnergy() const
Get 2D histogram of the peak fraction of contained energy, one yBin per energy group,...
Definition: ECLnOptimal.h:65
const TH2F getNOptimal() const
Get 2D histogram of nOptimal (one xBin per group number, one yBin per energy range.
Definition: ECLnOptimal.h:55
std::vector< int > m_groupNumber
group number of each crystal
Definition: ECLnOptimal.h:107
std::vector< float > m_eUpperBoundariesFwd
upper edges of the energy ranges in the forward endcap (GeV)
Definition: ECLnOptimal.h:104
ClassDef(ECLnOptimal, 1)
ClassDef.
const std::vector< float > & getUpperBoundariesBrl() const
Get vector of energies that specify energy ranges in the barrel.
Definition: ECLnOptimal.h:46
const TH2F getBias() const
Get the 2D histogram of bias (reconstructed - true) from beam backgrounds, one yBin per energy group,...
Definition: ECLnOptimal.h:69
Abstract base class for different kinds of events.