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) {
72 std::vector<AObject*> possibleTos = relationFilter.getPossibleTos(from, tos);
74 for (AObject* to : possibleTos) {
75 if (from == to)
continue;
77 Weight weight = relationFilter(relation);
78 if (std::isnan(weight))
continue;
79 weightedRelations.emplace_back(from, weight, to);
81 if (weightedRelations.size() == maximumNumberOfRelations) {
82 B2WARNING(
"Relations Creator reached maximal number of items: skipping the event.");
83 if (m_eventLevelTrackingInfo.
isValid()) {
84 if (std::is_base_of<AObject, CKFToPXDState>::value) {
85 m_eventLevelTrackingInfo->setPXDCKFAbortionFlag();
86 }
else if (std::is_base_of<AObject, CKFToSVDState>::value) {
87 m_eventLevelTrackingInfo->setSVDCKFAbortionFlag();
88 }
else if (std::is_base_of<AObject, vxdHoughTracking::VXDHoughState>::value) {
89 B2INFO(
"Skipping processing VXDHoughTracking track candidate, not setting AbortionFlag.");
91 B2WARNING(
"Undefined class used for CKFStates. Could not set AbortionFlag.");
95 weightedRelations.clear();
101 std::sort(std::begin(weightedRelations), std::end(weightedRelations));