Belle II Software light-2406-ragdoll
ParticleWeightingLookUpTable.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 <analysis/dbobjects/ParticleWeightingKeyMap.h>
12#include <map>
13
14namespace Belle2 {
21 typedef std::map<std::string, double> WeightInfo;
23 typedef std::map<int, WeightInfo> WeightMap;
24
28 class ParticleWeightingLookUpTable : public TObject {
36 // We assign unique bin ID for out-of-range bin.
37 const int m_OutOfRangeBinID = -1;
41 public:
46
52 void addEntry(WeightInfo entryValue, NDBin bin);
53
60 void addEntry(WeightInfo entryValue, NDBin bin, int key_ID);
61
66 void defineOutOfRangeWeight(const WeightInfo& entryValue);
67
72 std::vector<std::string> getAxesNames() const;
73
79 WeightInfo getInfo(std::map<std::string, double> values) const;
80
85 };
86
88} // Belle2 namespace
89
90
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.
std::vector< std::string > getAxesNames() const
Get axes names.
WeightMap m_WeightMap
Collection of weight infos for global bins.
void defineOutOfRangeWeight(const WeightInfo &entryValue)
Define reweight info for particles out of range.
ClassDef(ParticleWeightingLookUpTable, 1)
ClassDef as this is a TObject.
ParticleWeightingKeyMap m_KeyMap
LookUp table matches bins of the key map with the LookUp info.
void printParticleWeightingLookUpTable() const
Print content of LookUpTable.
std::map< int, WeightInfo > WeightMap
Weight map: the whole lookup table
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.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24