Selection of clusters from primary vertex moved into the separate loop