diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackFitter.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackFitter.cxx index 97c937be6d4229decc0655b75ecc17c74d564875..1aeb506fc9ac5411abe8dd2cb605692189fb8661 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackFitter.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackFitter.cxx @@ -497,6 +497,12 @@ namespace Muon { const Identifier& id = hit.info().id; if( hit.info().status != MuPatHit::OnTrack || !id.is_valid() ) continue; + + // in theory, there are only MuPatHit objects for MS hits + if (!m_idHelperSvc->isMuon(id)) { + ATH_MSG_WARNING("given Identifier "<<id.get_compact()<<" ("<<m_idHelperSvc->mdtIdHelper().print_to_string(id)<<") is not a muon Identifier, continuing"); + continue; + } MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(id); MuonStationIndex::StIndex stIndex = MuonStationIndex::toStationIndex( chIndex );