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

Filter for >= 3 hits using QualityEstimators. More...

#include <QualityIndicatorFilter.h>

Inheritance diagram for QualityIndicatorFilter:
Collaboration diagram for QualityIndicatorFilter:

Public Types

using Object = AObject
 Type of the object to be analysed.
 
using Interface = Filter< AObject >
 Mark this class as the basic interface.
 

Public Member Functions

TrackFindingCDC::Weight operator() (const BasePathFilter::Object &pair) override
 Return the weight based on the quality estimator. More...
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters.
 
void initialize () override
 initialize quality estimator
 
void beginRun () override
 set BField value for estimator
 
virtual bool needsTruthInformation ()
 Indicates if the filter requires Monte Carlo information.
 
Weight operator() (const Object *obj)
 Function to evaluate the object. More...
 
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

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 = ProcessingSignalListener
 Type of the base class.
 

Private Attributes

std::string m_EstimationMethod = "tripletFit"
 Identifier which estimation method to use. More...
 
std::string m_MCRecoTracksStoreArrayName = "MCRecoTracks"
 sets the name of the expected StoreArray containing MCRecoTracks. Only required for MCInfo method
 
bool m_MCStrictQualityEstimator = true
 Only required for MCInfo method.
 
std::unique_ptr< QualityEstimatorBasem_estimator
 pointer to the selected QualityEstimator
 
double m_QIcut = 0.0
 cut on quality indicator
 
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

Filter for >= 3 hits using QualityEstimators.

Definition at line 22 of file QualityIndicatorFilter.h.

Member Function Documentation

◆ operator()() [1/2]

TrackFindingCDC::Weight operator() ( const BasePathFilter::Object pair)
overridevirtual

Return the weight based on the quality estimator.

Returns the QI value obtained from the fit with the chosen QualityEstimator if above the m_QIcut, and NAN if the QI is below the cut.

Reimplemented from Filter< AObject >.

Definition at line 69 of file QualityIndicatorFilter.cc.

70 {
71  const std::vector<TrackFindingCDC::WithWeight<const VXDHoughState*>>& previousHits = pair.first;
72 
73  std::vector<const SpacePoint*> spacePoints;
74  spacePoints.reserve(previousHits.size() + 1);
75  for (auto& hit : previousHits) {
76  spacePoints.emplace_back(hit->getHit());
77  }
78  spacePoints.emplace_back(pair.second->getHit());
79 
80  // The path is outwards-in, and thus the SPs are added outwards-in, too.
81  // The tripletFit only works with hits inside-out, so reverse the SP vector
82  std::reverse(spacePoints.begin(), spacePoints.end());
83 
84  const auto& estimatorResult = m_estimator->estimateQualityAndProperties(spacePoints);
85 
86  if (estimatorResult.qualityIndicator < m_QIcut) {
87  return NAN;
88  }
89 
90  return estimatorResult.qualityIndicator;
91 }
std::unique_ptr< QualityEstimatorBase > m_estimator
pointer to the selected QualityEstimator

◆ operator()() [2/2]

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 58 of file Filter.icc.h.

Member Data Documentation

◆ m_EstimationMethod

std::string m_EstimationMethod = "tripletFit"
private

Identifier which estimation method to use.

Valid identifiers are: mcInfo, circleFit, tripletFit, helixFit

Definition at line 39 of file QualityIndicatorFilter.h.


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