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

Class to contain payload of everything needed for MVA based charged particle identification. More...

#include <ECLChargedPIDMVAWeights.h>

Inheritance diagram for ECLChargedPIDMVAWeights:
Collaboration diagram for ECLChargedPIDMVAWeights:

Public Member Functions

 ECLChargedPIDMVAWeights ()
 Default constructor, necessary for ROOT to stream the object.
 
 ~ECLChargedPIDMVAWeights ()
 Destructor.
 
void setWeightCategories (ECLChargedPIDPhasespaceBinning *h)
 Set the N dimensional grid representing the categories for which weightfiles are defined. More...
 
void storeMVAWeights (std::unordered_map< unsigned int, ECLChargedPIDPhasespaceCategory > &phasespaceCategories)
 Store the ECLChargedPIDPhasespaceCategory objects into the payload. More...
 
const ECLChargedPIDPhasespaceCategorygetPhasespaceCategory (const unsigned int idx) const
 Returns the ith ECLChargedPIDPhasespaceCategory. More...
 
const std::unordered_map< unsigned int, ECLChargedPIDPhasespaceCategory > * getPhasespaceCategories () const
 Returns the map of phasespaceCategories.
 
bool isPhasespaceCovered (const int linearBinIndex) const
 Returns bool whether or not the given values are within the phasespace covered by the trainings in the weightfile. More...
 
unsigned int getLinearisedCategoryIndex (std::vector< float > values) const
 Returns the flattened 1D index of the N dimensional phasespace category grid. More...
 
std::vector< std::string > getBinningVariables () const
 Returns string definitions of the variables used in defining the phasespace categories.
 
void setBinningVariables (std::vector< std::string > &binningVariables)
 Set string definitions of the variables used in defining the phasespace categories. More...
 

Private Member Functions

 ClassDef (ECLChargedPIDMVAWeights, 1)
 ClassDef

 

Private Attributes

ECLChargedPIDPhasespaceBinningm_categories = nullptr
 An N Dimensional binning whose bins define the boundaries of the categories for which the training is performed. More...
 
std::unordered_map< unsigned int, ECLChargedPIDPhasespaceCategorym_phasespaceCategories
 Stores the ECLChargedPIDPhasespaceCategory object for all the N dimensional categories.
 
std::vector< std::string > m_binningVariables
 Stores the list of variables used to define the phasespace binning.
 

Detailed Description

Class to contain payload of everything needed for MVA based charged particle identification.

Definition at line 369 of file ECLChargedPIDMVAWeights.h.

Member Function Documentation

◆ getLinearisedCategoryIndex()

unsigned int getLinearisedCategoryIndex ( std::vector< float >  values) const
inline

Returns the flattened 1D index of the N dimensional phasespace category grid.

Parameters
valuesN dimensional input vector of floats to be mapped to a globalBinIndex.

Definition at line 429 of file ECLChargedPIDMVAWeights.h.

◆ getPhasespaceCategory()

const ECLChargedPIDPhasespaceCategory* getPhasespaceCategory ( const unsigned int  idx) const
inline

Returns the ith ECLChargedPIDPhasespaceCategory.

Parameters
idxindex of ECLChargedPIDPhasespaceCategory.

Definition at line 404 of file ECLChargedPIDMVAWeights.h.

◆ isPhasespaceCovered()

bool isPhasespaceCovered ( const int  linearBinIndex) const
inline

Returns bool whether or not the given values are within the phasespace covered by the trainings in the weightfile.

Parameters
linearBinIndexglobal bin index.

Definition at line 415 of file ECLChargedPIDMVAWeights.h.

◆ setBinningVariables()

void setBinningVariables ( std::vector< std::string > &  binningVariables)
inline

Set string definitions of the variables used in defining the phasespace categories.

Parameters
binningVariablesstring definitions of the variables used in defining the phasespace categories.

Definition at line 446 of file ECLChargedPIDMVAWeights.h.

◆ setWeightCategories()

void setWeightCategories ( ECLChargedPIDPhasespaceBinning h)
inline

Set the N dimensional grid representing the categories for which weightfiles are defined.

A multiclass MVA is trained for each phases-space region defined by the bin boundaries.

Parameters
hthe N dimensional ECLChargedPIDPhasespaceBinning object.

Definition at line 387 of file ECLChargedPIDMVAWeights.h.

◆ storeMVAWeights()

void storeMVAWeights ( std::unordered_map< unsigned int, ECLChargedPIDPhasespaceCategory > &  phasespaceCategories)
inline

Store the ECLChargedPIDPhasespaceCategory objects into the payload.

Parameters
phasespaceCategoriesa map of ECLChargedPIDPhasespaceCategory objects. Each object contains all the data required to process tracks in that phasespace. The map does not need to cover all phasespace regions.

Definition at line 395 of file ECLChargedPIDMVAWeights.h.

Member Data Documentation

◆ m_categories

ECLChargedPIDPhasespaceBinning* m_categories = nullptr
private

An N Dimensional binning whose bins define the boundaries of the categories for which the training is performed.

It is used to lookup the correct file in the payload, given a reconstructed value vector.

Definition at line 452 of file ECLChargedPIDMVAWeights.h.


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