Belle II Software  release-06-02-00
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_param_EstimationMethod = "helixFit"
 Identifier which estimation methsod to use. More...
 
std::string m_param_MCRecoTracksStoreArrayName = "MCRecoTracks"
 sets the name of the expected StoreArray containing MCRecoTracks. Only required for MCInfo method
 
bool m_param_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_param_EstimationMethod == "mcInfo") {
42  StoreArray<RecoTrack> mcRecoTracks;
44  std::string svdClustersName = ""; std::string pxdClustersName = "";
45 
46  if (mcRecoTracks.getEntries() > 0) {
47  svdClustersName = mcRecoTracks[0]->getStoreArrayNameOfSVDHits();
48  pxdClustersName = mcRecoTracks[0]->getStoreArrayNameOfPXDHits();
49  } else {
50  B2WARNING("No Entries in mcRecoTracksStoreArray: using empty cluster name for svd and pxd");
51  }
52 
53  QualityEstimatorMC* MCestimator = static_cast<QualityEstimatorMC*>(m_estimator.get());
54  MCestimator->setClustersNames(svdClustersName, pxdClustersName);
55  }
56 
57 
59  DBObjPtr<BeamSpot> beamSpotDB;
60  if (beamSpotDB.isValid()) {
61  const B2Vector3D& BeamSpotPosition = (*beamSpotDB).getIPPosition();
62  const TMatrixDSym posErr = (*beamSpotDB).getIPPositionCovMatrix();
63  const B2Vector3D BeamSpotPositionError(sqrt(posErr[0][0]), sqrt(posErr[1][1]), sqrt(posErr[2][2]));
64  m_virtualIPSpacePoint = SpacePoint(BeamSpotPosition, BeamSpotPositionError, {0.5, 0.5}, {false, false}, VxdID(0),
66  } else {
67  m_virtualIPSpacePoint = SpacePoint(B2Vector3D(0., 0., 0.), B2Vector3D(0.1, 0.1, 0.5), {0.5, 0.5}, {false, false}, VxdID(0),
69  }
70 
71 }
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 setClustersNames(const std::string &svdClustersName, const std::string &pxdClustersName)
Setter for StoreArray names of SVD and PXD clusters.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
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_param_EstimationMethod
Identifier which estimation methsod to use.
std::string m_param_MCRecoTracksStoreArrayName
sets the name of the expected StoreArray containing MCRecoTracks. Only required for MCInfo method
std::unique_ptr< QualityEstimatorBase > m_estimator
pointer to the selected QualityEstimator
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:493
static void getField(const double *pos, double *field)
return the magnetic field at a given position.

◆ 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 87 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_param_EstimationMethod

std::string m_param_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: