Belle II Software light-2406-ragdoll
ECLPhotonEnergyResolution Class Reference

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

#include <ECLPhotonEnergyResolution.h>

Inheritance diagram for ECLPhotonEnergyResolution:
Collaboration diagram for ECLPhotonEnergyResolution:

Public Member Functions

 ECLPhotonEnergyResolution ()
 ! Default constructor
 
 ~ECLPhotonEnergyResolution ()
 ! Destructor
 
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.
 

Private Member Functions

 ClassDef (ECLPhotonEnergyResolution, 1)
 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 35 of file ECLPhotonEnergyResolution.h.

Constructor & Destructor Documentation

◆ ECLPhotonEnergyResolution()

! Default constructor

Define out of range resolution value as -1

Definition at line 14 of file ECLPhotonEnergyResolution.cc.

15{
19 WeightInfo energyResolutionInfo = {
20 {"RelativeEnergyResolution", -1.},
21 {"RelativeEnergyResolutionUncertUp", -1.},
22 {"RelativeEnergyResolutionUncertDown", -1.}
23 };
24
26}
ParticleWeightingLookUpTable m_resolutionBinningTable
Utilise ParticleWeighting modules as holders for binning of energy resolution.
void defineOutOfRangeWeight(const WeightInfo &entryValue)
Define reweight info for particles out of range.
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.

◆ ~ECLPhotonEnergyResolution()

! Destructor

Definition at line 45 of file ECLPhotonEnergyResolution.h.

45{};

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 28 of file ECLPhotonEnergyResolution.cc.

29{
33 WeightInfo energyResolutionInfo = {
34 {"RelativeEnergyResolution", energyResolution.at(0)},
35 {"RelativeEnergyResolutionUncertUp", energyResolution.at(1)},
36 {"RelativeEnergyResolutionUncertDown", energyResolution.at(2)}
37 };
38
42 ParticleWeightingBinLimits* energyBinValues = new ParticleWeightingBinLimits(binning.at(0).first, binning.at(0).second);
43 ParticleWeightingBinLimits* thetaBinValues = new ParticleWeightingBinLimits(binning.at(1).first, binning.at(1).second);
44 ParticleWeightingBinLimits* phiBinValues = new ParticleWeightingBinLimits(binning.at(2).first, binning.at(2).second);
45
46 NDBin energyBinning = {{"Energy", energyBinValues}, {"Theta", thetaBinValues}, {"Phi", phiBinValues}};
47
51 m_resolutionBinningTable.addEntry(energyResolutionInfo, energyBinning);
52}
Just pair of numbers - min and max values of bin border.
void addEntry(WeightInfo entryValue, NDBin bin)
Adds entry to the LookUp table and also adds entry to key table if needed.
std::map< std::string, ParticleWeightingBinLimits * > NDBin
N-dim bin: pairs of bin limits with name of the axis variable.

◆ 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 51 of file ECLPhotonEnergyResolution.h.

◆ 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 54 of file ECLPhotonEnergyResolution.cc.

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

Member Data Documentation

◆ m_resolutionBinningTable

ParticleWeightingLookUpTable m_resolutionBinningTable
private

Utilise ParticleWeighting modules as holders for binning of energy resolution.

Definition at line 75 of file ECLPhotonEnergyResolution.h.


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