Belle II Software development
|
Class implementing the algorithm used for the MC based quality estimation. More...
#include <QualityEstimatorMC.h>
Public Types | |
typedef int | MCRecoTrackIndex |
typedef for MCRecoTrackIndex | |
typedef unsigned int | NMatches |
typedef for counter of number of matches | |
typedef std::pair< MCRecoTrackIndex, NMatches > | MatchInfo |
typedef for MatchInfo | |
Public Member Functions | |
QualityEstimatorMC (const std::string &mcRecoTracksStoreArrayName="MCRecoTracks", bool strictQualityIndicator=true, bool mva_target=false) | |
Constructor. | |
virtual double | estimateQuality (std::vector< SpacePoint const * > const &measurements) final |
Performing MC based quality estimation. | |
virtual QualityEstimationResults | estimateQualityAndProperties (std::vector< SpacePoint const * > const &measurements) override final |
additionally return momentum_truth if it is a perfect match to a single MCRecoTrack | |
void | setClustersNames (const std::string &svdClustersName, const std::string &pxdClustersName) |
Setter for StoreArray names of SVD and PXD clusters, if those are not set by the user it will be tried to read them from the MCRecoTracks StoreArray. | |
void | forceUpdateClusterNames () |
Setter to force the class to update its cluster names. | |
void | setMagneticFieldStrength (double magneticFieldZ=1.5) |
Setter for z component of magnetic field. | |
Protected Member Functions | |
MatchInfo | getBestMatchToMCClusters (std::vector< SpacePoint const * > const &measurements) |
Get MCRecoTrack index of best matching tracks and number of matched MC clusters which can be matched to the given track candidate. | |
double | calculateQualityIndicator (unsigned int nClusters, MatchInfo &match) |
Calculate MC qualityIndicator based on MatchInfo of best matched MCRecoTrack. | |
double | calcPt (double const radius) const |
Returns a value for the transverse momentum in GeV calculated from a provided radius. | |
Protected Attributes | |
bool | m_strictQualityIndicator |
If true only SPTCs containing SVDClusters corresponding to a single MCRecoTrack get a QI != 0. | |
bool | m_mva_target |
If true the SPTCs containing all the SVDCluster of the corresponding MCRecoTrack and no other SVDCluster receive a Quality Index larger than one. | |
std::string | m_mcRecoTracksStoreArrayName |
MCRecoTracks StoreArray name. | |
std::string | m_svdClustersName = "" |
SVD clusters StoreArray name. | |
std::string | m_pxdClustersName = "" |
PXD clusters StoreArray name. | |
bool | m_clusterNamesNeedSetting |
if true cluster names need to be set, either by calling setClustersNames or read from MCRecoTracks at first call | |
MatchInfo | m_match |
stores the current match for optional return values | |
StoreArray< RecoTrack > | m_mcRecoTracks |
the storeArray for RecoTracks as member | |
double | m_magneticFieldZ = 1.5 |
Member storing the z component of the magnetic field. | |
QualityEstimationResults | m_results |
Result of the quality estimation This is stored as a member variable, because some values may be calculated by 'estimateQuality' anyways. | |
Class implementing the algorithm used for the MC based quality estimation.
Definition at line 22 of file QualityEstimatorMC.h.
typedef std::pair<MCRecoTrackIndex, NMatches> MatchInfo |
typedef for MatchInfo
Definition at line 27 of file QualityEstimatorMC.h.
typedef int MCRecoTrackIndex |
typedef for MCRecoTrackIndex
Definition at line 25 of file QualityEstimatorMC.h.
typedef unsigned int NMatches |
typedef for counter of number of matches
Definition at line 26 of file QualityEstimatorMC.h.
|
inline |
Constructor.
mcRecoTracksStoreArrayName | : Name of the MCRecoTracks StoreArray |
strictQualityIndicator | : boolean whether to perform strict estimation |
mva_target | : Boolean whether to perform quality estimation for MVA QE training. This overwrites the strictQualityIndicator option! |
Definition at line 35 of file QualityEstimatorMC.h.
|
inlineprotectedinherited |
Returns a value for the transverse momentum in GeV calculated from a provided radius.
Utilizing m_magneticFieldZ and hard coded speed of light
Definition at line 80 of file QualityEstimatorBase.h.
|
protected |
Calculate MC qualityIndicator based on MatchInfo of best matched MCRecoTrack.
nClusters | : number of clusters of the track candidate |
match | : MatchInfo for the best match |
Definition at line 66 of file QualityEstimatorMC.cc.
|
finalvirtual |
Performing MC based quality estimation.
measurements | : SPs of the track candidate to be evaluate |
Implements QualityEstimatorBase.
Definition at line 14 of file QualityEstimatorMC.cc.
|
finaloverridevirtual |
additionally return momentum_truth if it is a perfect match to a single MCRecoTrack
Reimplemented from QualityEstimatorBase.
Definition at line 85 of file QualityEstimatorMC.cc.
|
inline |
Setter to force the class to update its cluster names.
The cluster names have to be set either by calling setClustersNames or will be automatically read from first entry of MCRecoTracks when calling one of the functions doing the estimation for the first time
Definition at line 67 of file QualityEstimatorMC.h.
|
protected |
Get MCRecoTrack index of best matching tracks and number of matched MC clusters which can be matched to the given track candidate.
measurements | : SPs to be evaluated |
Definition at line 24 of file QualityEstimatorMC.cc.
|
inline |
Setter for StoreArray names of SVD and PXD clusters, if those are not set by the user it will be tried to read them from the MCRecoTracks StoreArray.
svdClustersName | : SVD cluster StoreArray name |
pxdClustersName | : PXD cluster StoreArray name |
Definition at line 56 of file QualityEstimatorMC.h.
|
inlineinherited |
Setter for z component of magnetic field.
magneticFieldZ | : value to set it to |
Definition at line 53 of file QualityEstimatorBase.h.
|
protected |
if true cluster names need to be set, either by calling setClustersNames or read from MCRecoTracks at first call
Definition at line 100 of file QualityEstimatorMC.h.
|
protectedinherited |
Member storing the z component of the magnetic field.
Definition at line 84 of file QualityEstimatorBase.h.
|
protected |
stores the current match for optional return values
Definition at line 104 of file QualityEstimatorMC.h.
|
protected |
the storeArray for RecoTracks as member
Definition at line 107 of file QualityEstimatorMC.h.
|
protected |
MCRecoTracks StoreArray name.
Definition at line 97 of file QualityEstimatorMC.h.
|
protected |
If true the SPTCs containing all the SVDCluster of the corresponding MCRecoTrack and no other SVDCluster receive a Quality Index larger than one.
To be used for MVA QE training if both high hit purity and hit efficiency is desired.
Definition at line 94 of file QualityEstimatorMC.h.
|
protected |
PXD clusters StoreArray name.
Definition at line 99 of file QualityEstimatorMC.h.
|
protectedinherited |
Result of the quality estimation This is stored as a member variable, because some values may be calculated by 'estimateQuality' anyways.
Therefore they don't need to be calculated explicitly in 'estimateQualityAndProperties'.
Definition at line 90 of file QualityEstimatorBase.h.
|
protected |
If true only SPTCs containing SVDClusters corresponding to a single MCRecoTrack get a QI != 0.
If a SVDCluster corresponds to several MCRecoTracks it is still valid as long as the correct MCRecoTrack is one of them.
Definition at line 88 of file QualityEstimatorMC.h.
|
protected |
SVD clusters StoreArray name.
Definition at line 98 of file QualityEstimatorMC.h.