11 #include "tracking/modules/trackSetEvaluatorVXD/BestVXDFamilyCandidateSelectorModule.h"
12 #include <unordered_map>
21 setDescription(
"Module that selects the best candidate for each SPTC family");
22 setPropertyFlags(c_ParallelProcessingCertified);
25 addParam(
"NameSpacePointTrackCands", m_nameSpacePointTrackCands,
"Name of expected StoreArray.", std::string(
""));
36 std::unordered_map<unsigned short, std::pair<int, float>> familyToCand;
40 float qi = sptc.getQualityIndicator();
41 unsigned short family = sptc.getFamily();
42 auto iter = familyToCand.find(family);
43 if (iter != familyToCand.end()) {
44 auto& entry = iter->second;
45 if (entry.second < qi) {
46 entry.first = sptc.getArrayIndex();
50 familyToCand.emplace(std::piecewise_construct, std::forward_as_tuple(family), std::forward_as_tuple(sptc.getArrayIndex(), qi));
55 int bestCandIndex = familyToCand.at(sptc.getFamily()).first;
56 if (sptc.getArrayIndex() != bestCandIndex) {