Belle II Software development
ECLPhotonEnergyResolution Class Reference

Class to hold the information ECL energy resolution derived from PERC. More...

#include <ECLPhotonEnergyResolution.h>

Inheritance diagram for ECLPhotonEnergyResolution:

Public Member Functions

 ECLPhotonEnergyResolution ()
 !
 
 ~ECLPhotonEnergyResolution ()
 !
 
ParticleWeightingLookUpTable getFullEnergyResolution () const
 Get ParticleWeightingLookUpTable with binned energy resolution.
 
void addRelativeEnergyResolution (std::vector< double > energyResolution, Binning binning)
 Add energy bin [vector of three pairs] and energy resolution [vector of three values] Energy resolution structure: [value, uncertainty up, uncertainty down] Energy bin structure for bin limit pairs: [energy limits, theta limits, phi limits].
 
double getRelativeEnergyResolution (double energy, double theta, double phi) const
 Get energy resolution for given energy, theta, phi.
 
void addThetaPhiResolution (std::vector< double > thetaResolution, std::vector< double > phiResolution, Binning binning)
 For neutral hadrons Add theta resolution [vector of three values] and phi resolution [vector of three values] in bins of (clusterUncEnergy, theta, phi) [vector of three pairs] thetaResolution structure: [value, uncertainty up, uncertainty down] phiResolution structure: [value, uncertainty up, uncertainty down] bin structure for bin limit pairs: [energy limits, theta limits, phi limits].
 
double getThetaPhiResolution (double energy, double theta, double phi, bool thetaOrPhi) const
 Get theta or phi resolution for given energy, theta, phi.
 

Private Member Functions

 ClassDef (ECLPhotonEnergyResolution, 2)
 ClassDef.
 

Private Attributes

ParticleWeightingLookUpTable m_resolutionBinningTable
 Utilise ParticleWeighting modules as holders for binning of energy resolution.
 

Detailed Description

Class to hold the information ECL energy resolution derived from PERC.

Currently the energy resolution is given in energy bins and only valid for barrel region

Definition at line 32 of file ECLPhotonEnergyResolution.h.

Constructor & Destructor Documentation

◆ ECLPhotonEnergyResolution()

!

Default constructor

Define out of range resolution value as -1

Definition at line 15 of file ECLPhotonEnergyResolution.cc.

16{
20 WeightInfo energyResolutionInfo = {
21 {"RelativeEnergyResolution", -1.},
22 {"RelativeEnergyResolutionUncertUp", -1.},
23 {"RelativeEnergyResolutionUncertDown", -1.}
24 };
25
26 m_resolutionBinningTable.defineOutOfRangeWeight(energyResolutionInfo);
27}
ParticleWeightingLookUpTable m_resolutionBinningTable
Utilise ParticleWeighting modules as holders for binning of energy resolution.
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.

◆ ~ECLPhotonEnergyResolution()

!

Destructor

Definition at line 42 of file ECLPhotonEnergyResolution.h.

42{};

Member Function Documentation

◆ addRelativeEnergyResolution()

void addRelativeEnergyResolution ( std::vector< double > energyResolution,
Binning binning )

Add energy bin [vector of three pairs] and energy resolution [vector of three values] Energy resolution structure: [value, uncertainty up, uncertainty down] Energy bin structure for bin limit pairs: [energy limits, theta limits, phi limits].

Parameters
energyResolutionenergy resolution with uncertainties
binningbinning of energy resolution valid region in bins of [energy, theta phi]

Build energy resolution with uncertainties as info map

Extract energy, theta and phi bin values

Add resolution value to binning table

Definition at line 29 of file ECLPhotonEnergyResolution.cc.

30{
34 WeightInfo energyResolutionInfo = {
35 {"RelativeEnergyResolution", energyResolution.at(0)},
36 {"RelativeEnergyResolutionUncertUp", energyResolution.at(1)},
37 {"RelativeEnergyResolutionUncertDown", energyResolution.at(2)}
38 };
39
43 ParticleWeightingBinLimits* energyBinValues = new ParticleWeightingBinLimits(binning.at(0).first, binning.at(0).second);
44 ParticleWeightingBinLimits* thetaBinValues = new ParticleWeightingBinLimits(binning.at(1).first, binning.at(1).second);
45 ParticleWeightingBinLimits* phiBinValues = new ParticleWeightingBinLimits(binning.at(2).first, binning.at(2).second);
46
47 NDBin energyBinning = {{"Energy", energyBinValues}, {"Theta", thetaBinValues}, {"Phi", phiBinValues}};
48
52 m_resolutionBinningTable.addEntry(energyResolutionInfo, energyBinning);
53}
std::map< std::string, ParticleWeightingBinLimits * > NDBin
N-dim bin: pairs of bin limits with name of the axis variable.

◆ addThetaPhiResolution()

void addThetaPhiResolution ( std::vector< double > thetaResolution,
std::vector< double > phiResolution,
Binning binning )

For neutral hadrons Add theta resolution [vector of three values] and phi resolution [vector of three values] in bins of (clusterUncEnergy, theta, phi) [vector of three pairs] thetaResolution structure: [value, uncertainty up, uncertainty down] phiResolution structure: [value, uncertainty up, uncertainty down] bin structure for bin limit pairs: [energy limits, theta limits, phi limits].

Parameters
thetaResolutiontheta resolution with uncertainties
phiResolutionphi resolution with uncertainties
binningbinning of theta/phi resolution valid region in bins of [energy, theta phi]

Build energy resolution with uncertainties as info map

Extract energy, theta and phi bin values

Add resolution value to binning table

Definition at line 74 of file ECLPhotonEnergyResolution.cc.

76{
80 WeightInfo resolutionInfo = {
81 {"ThetaResolution", thetaResolution.at(0)},
82 {"ThetaResolutionUncertUp", thetaResolution.at(1)},
83 {"ThetaResolutionUncertDown", thetaResolution.at(2)},
84 {"PhiResolution", phiResolution.at(0)},
85 {"PhiResolutionUncertUp", phiResolution.at(1)},
86 {"PhiResolutionUncertDown", phiResolution.at(2)}
87 };
88
92 ParticleWeightingBinLimits* energyBinValues = new ParticleWeightingBinLimits(binning.at(0).first, binning.at(0).second);
93 ParticleWeightingBinLimits* thetaBinValues = new ParticleWeightingBinLimits(binning.at(1).first, binning.at(1).second);
94 ParticleWeightingBinLimits* phiBinValues = new ParticleWeightingBinLimits(binning.at(2).first, binning.at(2).second);
95
96 NDBin energyBinning = {{"Energy", energyBinValues}, {"Theta", thetaBinValues}, {"Phi", phiBinValues}};
97
101 m_resolutionBinningTable.addEntry(resolutionInfo, energyBinning);
102}

◆ getFullEnergyResolution()

ParticleWeightingLookUpTable getFullEnergyResolution ( ) const
inline

Get ParticleWeightingLookUpTable with binned energy resolution.

Returns
ParticleWeightingLookUpTable of the energy resolution in energy, theta, and phi bins

Definition at line 48 of file ECLPhotonEnergyResolution.h.

48{ return m_resolutionBinningTable; }

◆ getRelativeEnergyResolution()

double getRelativeEnergyResolution ( double energy,
double theta,
double phi ) const

Get energy resolution for given energy, theta, phi.

Parameters
energyphoton energy value
thetaphoton theta value
phiphoton phi value
Returns
Energy resolution

Construct energy, theta, phi map corresponding to binning structure

Extract energy resolution information

Definition at line 55 of file ECLPhotonEnergyResolution.cc.

56{
60 std::map<std::string, double> binning = {{"Energy", energy}, {"Theta", theta}, {"Phi", phi}};
61
65 WeightInfo energyResolutionInfo = m_resolutionBinningTable.getInfo(binning);
66
67 if (energyResolutionInfo.at("RelativeEnergyResolution") == -1.) {
68 B2DEBUG(20, "Energy resolution was returned as -1 since provided energy was not within energy resolution binning.");
69 }
70
71 return energyResolutionInfo.at("RelativeEnergyResolution");
72}

◆ getThetaPhiResolution()

double getThetaPhiResolution ( double energy,
double theta,
double phi,
bool thetaOrPhi ) const

Get theta or phi resolution for given energy, theta, phi.

Parameters
energy- for photons, energy value, for hadrons clusterUnCorr energy value
thetaphoton theta value
phiphoton phi value
thetaOrPhiflag to pick theta or phi, 0 - return theta resolution, 1 - return phi resolution
Returns
Theta or Phiresolution

Construct energy, theta, phi map corresponding to binning structure

Extract resolution information

Definition at line 104 of file ECLPhotonEnergyResolution.cc.

105{
109 std::map<std::string, double> binning = {{"Energy", energy}, {"Theta", theta}, {"Phi", phi}};
110
114 WeightInfo resolutionInfo = m_resolutionBinningTable.getInfo(binning);
115
116 if (thetaOrPhi) {
117 if (resolutionInfo.at("PhiResolution") == -1.) {
118 B2DEBUG(20, "Phi resolution was returned as -1 since provided energy was not within theta resolution binning.");
119 }
120 return resolutionInfo.at("PhiResolution");
121 } else {
122 if (resolutionInfo.at("ThetaResolution") == -1.) {
123 B2DEBUG(20, "Theta resolution was returned as -1 since provided energy was not within theta resolution binning.");
124 }
125 return resolutionInfo.at("ThetaResolution");
126 }
127}

Member Data Documentation

◆ m_resolutionBinningTable

ParticleWeightingLookUpTable m_resolutionBinningTable
private

Utilise ParticleWeighting modules as holders for binning of energy resolution.

Definition at line 95 of file ECLPhotonEnergyResolution.h.


The documentation for this class was generated from the following files: