Implements an iterative vertex finder.
Brief description of the algorithm implemented: Iterative vertex finder which iteratively finds and fits vertices:
- A list of seed tracks (seedTracks, which is the same as the input track list to the finder at the very first iteration) is used to retrieve a single vertex seed using the ZScanVertexFinder.
- All tracks compatible with the current vertex seed are kept and used for fitting the single vertex. 3.1 If the vertex is a 'good' vertex (i.e. meets requirements) and no track reassignment after first fit is required, go to step 4. If vertex is not a good vertex, remove all tracks in tracksToFit from seedTracks. 3.2 If vertex meets requirements and track reassignment after first fit is required, iterate over all previously found vertices ("old vertex") and over all their tracksAtVertex. Compare compatibility of each track with old vertex and current vertex. If track is more compatible with current vertex, remove track from old vertex, put track back to tracksToFit and refit current vertex with additional track.
- If good vertex, removeUsedCompatibleTracks method is called, which removes all used tracks that are compatible with the fitted vertex from tracksToFit and seedTracks. It also removes outliers tracks from tracksAtVertex if not compatible.
- Add vertex to vertexCollection
- Repeat until no seedTracks are left or max. number of vertices found