 |
Belle II Software
release-05-01-25
|
15 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
16 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorBase.h>
17 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorTripletFit.h>
18 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorCircleFit.h>
19 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorRiemannHelixFit.h>
20 #include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorRandom.h>
31 class SPTCSelectorXBestPerFamily {
43 if (estimationMethod ==
"tripletFit") {
44 m_estimator = std::make_unique<QualityEstimatorTripletFit>();
45 }
else if (estimationMethod ==
"circleFit") {
46 m_estimator = std::make_unique<QualityEstimatorCircleFit>();
47 }
else if (estimationMethod ==
"helixFit") {
48 m_estimator = std::make_unique<QualityEstimatorRiemannHelixFit>();
49 }
else if (estimationMethod ==
"random") {
50 m_estimator = std::make_unique<QualityEstimatorRandom>();
52 B2ASSERT(
"QualityEstimator could not be initialized with method: " << estimationMethod,
m_estimator);
84 m_bestPaths.emplace_back(std::multiset<SpacePointTrackCand> { sptc });
92 if (currentSet.size() ==
m_xBest) {
93 std::multiset<SpacePointTrackCand>::iterator iter = currentSet.begin();
97 currentSet.erase(iter);
99 currentSet.emplace_hint(currentSet.cbegin(), sptc);
107 std::vector<SpacePointTrackCand> jointBestPaths;
109 [](
int a,
auto b) { return a + b.size(); }));
112 jointBestPaths.insert(jointBestPaths.end(), set.begin(), set.end());
115 return jointBestPaths;
132 std::vector<std::multiset<SpacePointTrackCand> >
m_bestPaths;
void testNewSPTC(SpacePointTrackCand &sptc)
Test new SPTC if it is better than the least best of the current x best SPTCs of its respective famil...
const std::vector< const Belle2::SpacePoint * > getSortedHits() const
get hits (space points) sorted by their respective sorting parameter
std::unique_ptr< QualityEstimatorBase > m_estimator
Pointer to the Quality Estimator used to evaluate the SPTCs to find the best.
double getQualityIndicator() const
returns the current status of the estimated quality of this track candidate.
void setMagneticFieldForQE(double bFieldZ)
Setting magnetic field for the quality estimator.
unsigned short m_xBest
Number of allowed best SPTCs per family.
void prepareSelector(unsigned short nFamilies)
Preparation of Best Candidate Selector by resetting the vectors.
std::vector< std::multiset< SpacePointTrackCand > > m_bestPaths
Vector containing one vector of the best SPTCs per family.
unsigned short m_currentIndex
Counter for current index used for m_familyToIndex.
Abstract base class for different kinds of events.
SPTCSelectorXBestPerFamily(unsigned short xBest=5, const std::string &estimationMethod=std::string("tripletFit"))
Constructor for the selection of the x best candidates for each family based on the quality index.
std::vector< short > m_familyToIndex
Map of family number to respective index for m_bestPaths.
~SPTCSelectorXBestPerFamily()=default
Destructor.
std::vector< SpacePointTrackCand > returnSelection() const
Return vector containing the best SPTCs; maximal m_xBest per family.
short getFamily() const
return family identifier
Storage for (VXD) SpacePoint-based track candidates.
void setQualityIndicator(const double newIndicator)
sets the new status of the estimated quality of this track candidate.