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

this observer searches for mcParticles attached to the hits given and stores the information found to be retrieved later. More...

#include <ObserverCheckMCPurity.h>

Collaboration diagram for ObserverCheckMCPurity:

Public Member Functions

 ObserverCheckMCPurity ()
 empty constructor:
 

Static Public Member Functions

template<class Var , class RangeType >
static void notify (const Var &, typename Var::variableType fResult, const RangeType &range, const typename Var::argumentType &, const typename Var::argumentType &, const typename Var::argumentType &)
 notifier which finds the mcParticles attached to given triplet of spacePoints and determines the purities for them.
 
template<class Var , class RangeType >
static void notify (const Var &, typename Var::variableType fResult, const RangeType &range, const typename Var::argumentType &, const typename Var::argumentType &)
 notifier which finds the mcParticles attached to given pair of spacePoints and determines the purities for them.
 
template<class Var , class Range , typename ... types>
static bool initialize (Var var, Range, const types &...)
 static method used by the observed object to initialize the observer. More...
 
static bool initialize (TTree *attree)
 version for 2-hit-combinations.
 
static void prepare (const SpacePoint &outerHit, const SpacePoint &innerHit)
 static method used by the observed object to reset the stored values of the observer.
 
template<typename ... types>
static void terminate (const types &...)
 static method used by the observed object to terminate the observer.
 
template<typename ... types>
static void collect (const types &...)
 fill the tree.
 

Static Public Attributes

static std::map< std::string, double * > s_results
 stores the results calculated (->value) for a selectionVariableName (->Key). More...
 
static std::map< std::string, bool * > s_wasAccepted
 stores if hits were accepted (->value) for a selectionVariableName (->Key). More...
 
static std::map< std::string, bool * > s_wasUsed
 stores if the filter was actually used this time (->value) for a selectionVariableName (->Key). More...
 
static TTree * s_ttree = nullptr
 a ttree to store all the collected data.
 
static SpacePoint s_outerHitOfTwo
 stores the outer hit of a two-hit-combination.
 
static SpacePoint s_innerHitOfTwo
 stores the inner hit of a two-hit-combination.
 
static SpacePoint s_outerHitOfThree
 stores the outer hit of a three-hit-combination.
 
static SpacePoint s_centerHitOfThree
 stores the center hit of a three-hit-combination.
 
static SpacePoint s_innerHitOfThree
 stores the inner hit of a three-hit-combination.
 
static int s_mainMCParticleID = 0
 dominating mcParticleID.
 
static double s_mainPurity = -1.
 purity for the dominating particleID.
 

Static Protected Member Functions

template<class Var , class RangeType >
static void generalNotify (typename Var::variableType fResult, const RangeType &range)
 unified part of the notifier function. More...
 

Detailed Description

this observer searches for mcParticles attached to the hits given and stores the information found to be retrieved later.

Definition at line 30 of file ObserverCheckMCPurity.h.

Member Function Documentation

◆ generalNotify()

static void generalNotify ( typename Var::variableType  fResult,
const RangeType &  range 
)
inlinestaticprotected

unified part of the notifier function.

Stores filter-specific things.

Definition at line 215 of file ObserverCheckMCPurity.h.

217  {
218  // store the data retrieved:
219  auto varName = Var().name();
220  *(s_results.at(varName)) = double(fResult);
221  *(s_wasUsed.at(varName)) = true;
222  *(s_wasAccepted.at(varName)) = range.contains(fResult);
223  }
static std::map< std::string, bool * > s_wasAccepted
stores if hits were accepted (->value) for a selectionVariableName (->Key).
static std::map< std::string, double * > s_results
stores the results calculated (->value) for a selectionVariableName (->Key).
static std::map< std::string, bool * > s_wasUsed
stores if the filter was actually used this time (->value) for a selectionVariableName (->Key).

◆ initialize()

static bool initialize ( Var  var,
Range  ,
const types &  ... 
)
inlinestatic

static method used by the observed object to initialize the observer.

will be called once per Filter containing a single SelectionVariable and its range.

Definition at line 113 of file ObserverCheckMCPurity.h.

Member Data Documentation

◆ s_results

std::map< std::string, double * > s_results
static

stores the results calculated (->value) for a selectionVariableName (->Key).

defining member s_results of the ObserverCheckMCPurity.

Definition at line 35 of file ObserverCheckMCPurity.h.

◆ s_wasAccepted

std::map< std::string, bool * > s_wasAccepted
static

stores if hits were accepted (->value) for a selectionVariableName (->Key).

defining member s_results of the ObserverCheckMCPurity.

Definition at line 40 of file ObserverCheckMCPurity.h.

◆ s_wasUsed

std::map< std::string, bool * > s_wasUsed
static

stores if the filter was actually used this time (->value) for a selectionVariableName (->Key).

defining member s_results of the ObserverCheckMCPurity.

Definition at line 45 of file ObserverCheckMCPurity.h.


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