9#include <analysis/dbobjects/ECLPhotonEnergyResolution.h>
10#include <framework/logging/Logger.h>
20 {
"RelativeEnergyResolution", -1.},
21 {
"RelativeEnergyResolutionUncertUp", -1.},
22 {
"RelativeEnergyResolutionUncertDown", -1.}
34 {
"RelativeEnergyResolution", energyResolution.at(0)},
35 {
"RelativeEnergyResolutionUncertUp", energyResolution.at(1)},
36 {
"RelativeEnergyResolutionUncertDown", energyResolution.at(2)}
46 NDBin energyBinning = {{
"Energy", energyBinValues}, {
"Theta", thetaBinValues}, {
"Phi", phiBinValues}};
59 std::map<std::string, double> binning = {{
"Energy", energy}, {
"Theta", theta}, {
"Phi", phi}};
66 if (energyResolutionInfo.at(
"RelativeEnergyResolution") == -1.) {
67 B2DEBUG(20,
"Energy resolution was returned as -1 since provided energy was not within energy resolution binning.");
70 return energyResolutionInfo.at(
"RelativeEnergyResolution");
double getRelativeEnergyResolution(double energy, double theta, double phi) const
Get energy resolution for given energy, theta, phi.
ECLPhotonEnergyResolution()
! Default constructor
void addRelativeEnergyResolution(std::vector< double > energyResolution, Binning binning)
Add energy bin [vector of three pairs] and energy resolution [vector of three values] Energy resoluti...
ParticleWeightingLookUpTable m_resolutionBinningTable
Utilise ParticleWeighting modules as holders for binning of energy resolution.
Just pair of numbers - min and max values of bin border.
WeightInfo getInfo(std::map< std::string, double > values) const
Get axes names.
void addEntry(WeightInfo entryValue, NDBin bin)
Adds entry to the LookUp table and also adds entry to key table if needed.
void defineOutOfRangeWeight(const WeightInfo &entryValue)
Define reweight info for particles out of range.
std::map< std::string, ParticleWeightingBinLimits * > NDBin
N-dim bin: pairs of bin limits with name of the axis variable.
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.
std::vector< std::pair< double, double > > Binning
Bin holder as vector for bin limit pairs: [energy limits, theta limits, phi limits].
Abstract base class for different kinds of events.