diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx index dab78419cf8e81ca35aa56d9caaa777f589f477f..7a8a9a8a8e451ccb99284863d8c6c5c5179f27e1 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx @@ -208,16 +208,15 @@ StatusCode ComboHypo::execute(const EventContext& context ) const { for (const ElementLink<DecisionContainer>& dEL : it->second){ uint32_t featureKey = 0, roiKey = 0; uint16_t featureIndex = 0, roiIndex = 0; - // NOTE: roiKey, roiIndex not currently used in this discrimination + // NOTE: roiKey, roiIndex are only currently used in the discrimination for L1 Decision objects (which don't have a 'feature' link) + // NOTE: We should make it configurable to choose either the feature or the ROI here, as done in the InputMaker base class when merging. ATH_CHECK( extractFeatureAndRoI(dEL, featureKey, featureIndex, roiKey, roiIndex) ); - // TODO: move this to InitialRoI for serial merging - const uint32_t featureHash = (featureKey + featureIndex); - if (featureHash == 0) { - ATH_MSG_WARNING("Disregarding feature hash of zero"); - // continue; + const uint32_t uniquenessHash = (featureKey != 0 ? (featureKey + featureIndex) : (roiKey + roiIndex)); + if (uniquenessHash == 0) { + ATH_MSG_ERROR("Object has no feature, and no initialRoI. Cannot get obtain unique element to avoid double-counting."); + return StatusCode::FAILURE; } - uniqueDecisionFeatures.insert( featureHash ); - // TODO - do something with the ROI + uniqueDecisionFeatures.insert( uniquenessHash ); } // save combinations of all legs for the tools