Belle II Software  release-08-01-10
ParticleWeightingLookUpTable Class Reference

Class for handling LookUp tables. More...

#include <ParticleWeightingLookUpTable.h>

Inheritance diagram for ParticleWeightingLookUpTable:
Collaboration diagram for ParticleWeightingLookUpTable:

Public Member Functions

 ParticleWeightingLookUpTable ()
 Constructor.
 
void addEntry (WeightInfo entryValue, NDBin bin)
 Adds entry to the LookUp table and also adds entry to key table if needed. More...
 
void addEntry (WeightInfo entryValue, NDBin bin, int key_ID)
 Adds entry to the LookUp table and also adds entry to key table with predefined bin ID if needed. More...
 
void defineOutOfRangeWeight (const WeightInfo &entryValue)
 Define reweight info for particles out of range. More...
 
std::vector< std::string > getAxesNames () const
 Get axes names. More...
 
WeightInfo getInfo (std::map< std::string, double > values) const
 Get axes names. More...
 
void printParticleWeightingLookUpTable () const
 Print content of LookUpTable.
 

Private Member Functions

 ClassDef (ParticleWeightingLookUpTable, 1)
 ClassDef as this is a TObject.
 

Private Attributes

ParticleWeightingKeyMap m_KeyMap
 LookUp table matches bins of the key map with the LookUp info. More...
 
WeightMap m_WeightMap
 Collection of weight infos for global bins.
 
const int m_OutOfRangeBinID = -1
 out-of-range bin ID
 

Detailed Description

Class for handling LookUp tables.

Definition at line 28 of file ParticleWeightingLookUpTable.h.

Member Function Documentation

◆ addEntry() [1/2]

void addEntry ( WeightInfo  entryValue,
NDBin  bin 
)

Adds entry to the LookUp table and also adds entry to key table if needed.

Parameters
entryValueis a line from LookUp table
bincontains bin limits for given LookUp table values

Definition at line 16 of file ParticleWeightingLookUpTable.cc.

17 {
18  int id = m_WeightMap.size();
19  this->addEntry(std::move(entryValue), std::move(bin), id);
20 }
void addEntry(WeightInfo entryValue, NDBin bin)
Adds entry to the LookUp table and also adds entry to key table if needed.
WeightMap m_WeightMap
Collection of weight infos for global bins.

◆ addEntry() [2/2]

void addEntry ( WeightInfo  entryValue,
NDBin  bin,
int  key_ID 
)

Adds entry to the LookUp table and also adds entry to key table with predefined bin ID if needed.

Parameters
entryValueis a line from LookUp table
bincontains bin limits for given LookUp table values
key_IDis bin ID. You might want to use it to make several bins with the same ID or for non-square bins.

Definition at line 22 of file ParticleWeightingLookUpTable.cc.

◆ defineOutOfRangeWeight()

void defineOutOfRangeWeight ( const WeightInfo entryValue)

Define reweight info for particles out of range.

This info is stored in bin -1.

Parameters
entryValueis a line from LookUp table

Definition at line 30 of file ParticleWeightingLookUpTable.cc.

◆ getAxesNames()

std::vector< std::string > getAxesNames ( ) const

Get axes names.

Returns
vector of axes names

Definition at line 36 of file ParticleWeightingLookUpTable.cc.

◆ getInfo()

WeightInfo getInfo ( std::map< std::string, double >  values) const

Get axes names.

Parameters
valuesmap of axes names with values along corresponding names
Returns
vector of axes names

Definition at line 41 of file ParticleWeightingLookUpTable.cc.

Member Data Documentation

◆ m_KeyMap

ParticleWeightingKeyMap m_KeyMap
private

LookUp table matches bins of the key map with the LookUp info.

This matching is paired with the key map. Key map

Definition at line 33 of file ParticleWeightingLookUpTable.h.


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