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

Filter for two hits plus a virtual IP using QualityEstimators. More...

#include <TwoHitVirtualIPQIFilter.h>

Inheritance diagram for TwoHitVirtualIPQIFilter:
Collaboration diagram for TwoHitVirtualIPQIFilter:

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 More...
 
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

SpacePoint m_virtualIPSpacePoint
 virtual IP SpacePoint
 
std::string m_EstimationMethod = "helixFit"
 Identifier which estimation methsod 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
 
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 two hits plus a virtual IP using QualityEstimators.

Definition at line 22 of file TwoHitVirtualIPQIFilter.h.

Member Function Documentation

◆ beginRun()

void beginRun ( void  )
overridevirtual

set BField value for estimator

BeamSpot from DB

Reimplemented from CompositeProcessingSignalListener.

Definition at line 36 of file TwoHitVirtualIPQIFilter.cc.

37 {
38  const double bFieldZ = BFieldManager::getField(0, 0, 0).Z() / Unit::T;
39  m_estimator->setMagneticFieldStrength(bFieldZ);
40 
41  if (m_EstimationMethod == "mcInfo") {
42  QualityEstimatorMC* MCestimator = static_cast<QualityEstimatorMC*>(m_estimator.get());
43  MCestimator->forceUpdateClusterNames();
44  }
45 
46 
48  DBObjPtr<BeamSpot> beamSpotDB;
49  if (beamSpotDB.isValid()) {
50  const B2Vector3D& BeamSpotPosition = (*beamSpotDB).getIPPosition();
51  const TMatrixDSym posErr = (*beamSpotDB).getIPPositionCovMatrix();
52  const B2Vector3D BeamSpotPositionError(sqrt(posErr[0][0]), sqrt(posErr[1][1]), sqrt(posErr[2][2]));
53  m_virtualIPSpacePoint = SpacePoint(BeamSpotPosition, BeamSpotPositionError, {0.5, 0.5}, {false, false}, VxdID(0),
55  } else {
56  m_virtualIPSpacePoint = SpacePoint(B2Vector3D(0., 0., 0.), B2Vector3D(0.1, 0.1, 0.5), {0.5, 0.5}, {false, false}, VxdID(0),
58  }
59 
60 }
bool isValid() const
Check whether a valid object was obtained from the database.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class implementing the algorithm used for the MC based quality estimation.
void forceUpdateClusterNames()
Setter to force the class to update its cluster names.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
static const double T
[tesla]
Definition: Unit.h:120
@ VXD
Any type of VXD Sensor.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
std::string m_EstimationMethod
Identifier which estimation methsod to use.
std::unique_ptr< QualityEstimatorBase > m_estimator
pointer to the selected QualityEstimator
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Definition: BFieldManager.h:91
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ 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

Reimplemented from Filter< AObject >.

Definition at line 78 of file TwoHitVirtualIPQIFilter.cc.

◆ 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 = "helixFit"
private

Identifier which estimation methsod to use.

Valid identifiers are: mcInfo, tripletFit, helixFit

Definition at line 41 of file TwoHitVirtualIPQIFilter.h.


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