diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx index 436d66b30d781b3648c55f8369017dc01011b115..1a3ccd843abe1fe8beb8b07e6e69d2794050f030 100644 --- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx +++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx @@ -1150,16 +1150,22 @@ bool InDet::SiTrackMaker_xk::newSeed(SiTrackMakerEventData_xk& data, const std:: /// incremenent counter again ++n; } - /// check if at least on cluster is not already used by a track. + /// check if at least on cluster is not already used by any track. /// This works since the multiset allows adding the same track multiple times + /// If this is the case, we accept the seed. if(trackseed.size() < n) return true; /// in the case of HI reco, we accept any 3-cluster (PPP) seed. if( m_heavyion && n==3 ) return true; - /// now we look for the track consuming the largest number of clusters - const Trk::Track* currentTrack = (*trackseed.begin()); + /// Now we look for the track consuming the largest number of clusters + + /// This is done by looping over all tracks using any of our clusters, + /// and counting the appearance of each track in the multiset. + /// If one single track contains all of the clusters (--> is included n times), + /// we reject this seed. + const Trk::Track* currentTrack {nullptr}; size_t clustersOnCurrent = 1; - /// loop over the list + /// loop over the list of tracks for(const Trk::Track* track : trackseed) { /// if this is a new track, reset the counter if(track != currentTrack) {