Belle II Software  release-05-02-19
TruthVarFilter< ATruthVarSet > Class Template Reference

MC Filter Type using a VarSet and the truth variable in it. More...

#include <TruthVarFilter.dcl.h>

Inheritance diagram for TruthVarFilter< ATruthVarSet >:
Collaboration diagram for TruthVarFilter< ATruthVarSet >:

Public Types

using Object = typename Super::Object
 Type of the handled object.
 
using Interface = Filter< ATruthVarSet::Object >
 Mark this class as the basic interface.
 

Public Member Functions

 TruthVarFilter ()
 Constructor.
 
 ~TruthVarFilter ()
 Default destructor.
 
Weight operator() (const Object &object) override
 Reject an item if the truth variable is 0, else accept it.
 
void exposeParameters (ModuleParamList *parameterList, const std::string &prefix) override
 Add the parameters of this filter to the given parameter list.
 
void initialize () override
 Initialisation method sets up a reference to the value in the variable set to be returned.
 
Weight operator() (const Object &object) override
 Returns the variable with the set requested name from the variable set.
 
Weight operator() (const Object &obj) override
 Function extracting the variables of the object into the variable set.
 
Weight operator() (const Object *obj)
 Function to evaluate the object. More...
 
bool needsTruthInformation () override
 Checks if any variables need Monte Carlo information.
 
std::unique_ptr< AVarSetreleaseVarSet () &&
 Steal the set of variables form this filter - filter becomes disfunctional afterwards.
 
void beginRun () override
 Receive and dispatch signal for the beginning of a new run.
 
void beginEvent () override
 Receive and dispatch signal for the start of a new event.
 
void endRun () override
 Receive and dispatch signal for the end of the run.
 
void terminate () override
 Receive and dispatch Signal for termination of the event processing.
 

Protected Member Functions

AVarSetgetVarSet () const
 Getter for the set of variables.
 
void setVarSet (std::unique_ptr< AVarSet > varSet)
 Setter for the set of variables.
 
void addProcessingSignalListener (ProcessingSignalListener *psl)
 Register a processing signal listener to be notified.
 
int getNProcessingSignalListener ()
 Get the number of currently registered listeners.
 

Private Types

using Super = ChoosableFromVarSetFilter< ATruthVarSet >
 Type of the base class.
 
using AVarSet = BaseVarSet< Object >
 Type of the variable set.
 

Private Attributes

std::string m_param_varName
 Memory for the name of the variable selected as the return value of the filter.
 
Float_t * m_variable
 Reference to the location of the value in the variable set to be returned.
 
std::unique_ptr< AVarSetm_varSet
 Instance of the variable set to be used in the filter.
 
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
 References to subordinary signal processing listener contained in this findlet.
 
bool m_initialized = false
 Flag to keep track whether initialization happend before.
 
bool m_terminated = false
 Flag to keep track whether termination happend before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

template<class ATruthVarSet>
class Belle2::TrackFindingCDC::TruthVarFilter< ATruthVarSet >

MC Filter Type using a VarSet and the truth variable in it.

Definition at line 30 of file TruthVarFilter.dcl.h.

Member Function Documentation

◆ operator()()

Weight operator() ( const Object obj)
inherited

Function to evaluate the object.

Base implementation accepts all objects, except nullptr.

Parameters
objThe object to be accepted or rejected.
Returns
A finit float value if the object is accepted. NAN if the object is rejected. Nullptr is always rejected.

Definition at line 60 of file Filter.icc.h.


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