9 #include <tracking/modules/vxdtfQualityEstimator/QualityEstimatorVXDModule.h>
11 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorTripletFit.h>
12 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorMC.h>
13 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorCircleFit.h>
14 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorRiemannHelixFit.h>
15 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorRandom.h>
17 #include <framework/geometry/BFieldManager.h>
27 setDescription(
"The quality estimator module for SpacePointTrackCandidates.");
28 setPropertyFlags(c_ParallelProcessingCertified);
30 addParam(
"EstimationMethod", m_EstimationMethod,
31 "Identifier which estimation method to use. Valid identifiers are: [mcInfo, circleFit, tripletFit, helixFit, random]",
32 std::string(
"tripletFit"));
34 addParam(
"SpacePointTrackCandsStoreArrayName", m_SpacePointTrackCandsStoreArrayName,
35 "Name of StoreArray containing the SpacePointTrackCandidates to be estimated.", std::string(
""));
37 addParam(
"MCRecoTracksStoreArrayName", m_MCRecoTracksStoreArrayName,
38 "Only required for MCInfo method. Name of StoreArray containing MCRecoTracks.", std::string(
"MCRecoTracks"));
40 addParam(
"MCStrictQualityEstimator", m_MCStrictQualityEstimator,
41 "Only required for MCInfo method. If false combining several MCTracks is allowed.",
bool(
true));
52 m_estimator = std::make_unique<QualityEstimatorTripletFit>();
54 m_estimator = std::make_unique<QualityEstimatorCircleFit>();
56 m_estimator = std::make_unique<QualityEstimatorRiemannHelixFit>();
58 m_estimator = std::make_unique<QualityEstimatorRandom>();
72 std::string svdClustersName =
""; std::string pxdClustersName =
"";
75 svdClustersName = mcRecoTracks[0]->getStoreArrayNameOfSVDHits();
76 pxdClustersName = mcRecoTracks[0]->getStoreArrayNameOfPXDHits();
78 B2WARNING(
"No Entries in mcRecoTracksStoreArray: using empty cluster name for svd and pxd");
91 double qi =
m_estimator->estimateQuality(aTC.getSortedHits());
93 aTC.setQualityIndicator(qi);
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.
Quality estimation module for SpacePointTrackCandidates.
std::string m_SpacePointTrackCandsStoreArrayName
sets the name of the expected StoreArray containing SpacePointTrackCands
bool m_MCStrictQualityEstimator
Only required for MCInfo method.
void initialize() override
Initializes the Module.
void event() override
Applies the selected quality estimation method for a given set of TCs.
std::string m_EstimationMethod
Identifier which estimation method to use.
void beginRun() override
Called when entering a new run.
std::string m_MCRecoTracksStoreArrayName
sets the name of the expected StoreArray containing MCRecoTracks.
std::unique_ptr< QualityEstimatorBase > m_estimator
pointer to the selected QualityEstimator
StoreArray< SpacePointTrackCand > m_spacePointTrackCands
the storeArray for SpacePointTrackCands as member, is faster than recreating link for each event
Storage for (VXD) SpacePoint-based track candidates.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.
static const double T
[tesla]
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Abstract base class for different kinds of events.