64 const std::vector<AObject*>& froms,
65 const std::vector<AObject*>& tos,
67 unsigned int maximumNumberOfRelations = std::numeric_limits<unsigned int>::max())
69 for (AObject* from : froms) {
70 std::vector<AObject*> possibleTos = relationFilter.getPossibleTos(from, tos);
72 for (AObject* to : possibleTos) {
73 if (from == to)
continue;
75 Weight weight = relationFilter(relation);
76 if (std::isnan(weight))
continue;
77 weightedRelations.emplace_back(from, weight, to);
79 if (weightedRelations.size() == maximumNumberOfRelations) {
80 B2WARNING(
"Relations Creator reached maximal number of items: skipping the event.");
84 if (eventLevelTrackingInfo.
isValid()) {
85 if (std::is_base_of<AObject, CKFToPXDState>::value) {
86 eventLevelTrackingInfo->setPXDCKFAbortionFlag();
87 }
else if (std::is_base_of<AObject, CKFToSVDState>::value) {
88 eventLevelTrackingInfo->setSVDCKFAbortionFlag();
89 }
else if (std::is_base_of<AObject, vxdHoughTracking::VXDHoughState>::value) {
90 B2INFO(
"Skipping processing VXDHoughTracking track candidate, not setting AbortionFlag.");
92 B2WARNING(
"Undefined class used for CKFStates. Could not set AbortionFlag.");
96 weightedRelations.
clear();
102 std::sort(std::begin(weightedRelations), std::end(weightedRelations));