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

class to extract info from individual clusters and combine for SPTC More...

#include <HitInfoExtractor.h>

Inheritance diagram for HitInfoExtractor:
Collaboration diagram for HitInfoExtractor:

Public Member Functions

 HitInfoExtractor (std::vector< Named< float * >> &variableSet)
 Constructor fills variableSet with variables to be extracted. More...
 
void extractVariables (const RecoTrack &recoTrack)
 extract variables from SpacePoints
 

Protected Member Functions

void initializeStats (const std::string &identifier, std::vector< Named< float * >> &variables)
 initialize statistics subsets of variables from clusters that get combined for SPTC
 
void setStats (const std::string &identifier, std::vector< float > &values)
 calculated statistics and saves them in variable set
 
void addVariable (const std::string &identifier, std::vector< Named< float * >> &variables)
 add a variable to the variable set
 

Protected Attributes

std::unordered_map< std::string, float > m_variables
 unordered_map to associate float value with a string name
 

Private Member Functions

genfit::KalmanFitterInfogetKalmanFitterInfo (const RecoTrack &recoTrack, const RecoHitInformation *recoHitInformation)
 Helper function to get Kalman fitter info from RecoHitInformation if available.
 
std::optional< float > getSmoothedChi2 (const genfit::KalmanFitterInfo *kalmanFitterInfo)
 Helper function to safely get Chi2 from a KalmanFitterInfo object if available, and if not return nullopt.
 

Private Attributes

const float m_valueIfNAN = -1.0
 Define a default value to use if a variable cannot be calculated. More...
 

Detailed Description

class to extract info from individual clusters and combine for SPTC

Definition at line 26 of file HitInfoExtractor.h.

Constructor & Destructor Documentation

◆ HitInfoExtractor()

HitInfoExtractor ( std::vector< Named< float * >> &  variableSet)
inlineexplicit

Constructor fills variableSet with variables to be extracted.

Parameters
variableSetset of variable to be filled

Definition at line 31 of file HitInfoExtractor.h.

31  :
32  VariableExtractor()
33  {
34  addVariable("N_TrackPoints_without_KalmanFitterInfo", variableSet);
35  addVariable("N_Hits_without_TrackPoint", variableSet);
36 
37  initializeStats("weight", variableSet);
38  initializeStats("smoothedChi2", variableSet);
39  }
void initializeStats(const std::string &identifier, std::vector< Named< float * >> &variables)
initialize statistics subsets of variables from clusters that get combined for SPTC
void addVariable(const std::string &identifier, std::vector< Named< float * >> &variables)
add a variable to the variable set

Member Data Documentation

◆ m_valueIfNAN

const float m_valueIfNAN = -1.0
private

Define a default value to use if a variable cannot be calculated.

A value different from NAN, but which is not obtainable otherwise, can be useful if one wants the MVA classifier to train on the variable not being available instead of ignoring it.

Definition at line 206 of file HitInfoExtractor.h.


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