Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::IterativeVertexFinder< vfitter_t, sfinder_t > Class Template Reference

Implements an iterative vertex finder. More...

#include <acts/blob/sPHENIX/Core/include/Acts/Vertexing/IterativeVertexFinder.hpp>

+ Collaboration diagram for Acts::IterativeVertexFinder< vfitter_t, sfinder_t >:

Classes

struct  Config
 Configuration struct. More...
 
struct  State
 State struct. More...
 

Public Types

using InputTrack_t = typename vfitter_t::InputTrack_t
 
using IPEstimator = ImpactPointEstimator< InputTrack_t, Propagator_t >
 

Public Member Functions

template<typename T = InputTrack_t, std::enable_if_t< std::is_same< T, BoundTrackParameters >::value, int > = 0>
 IterativeVertexFinder (Config &cfg, std::unique_ptr< const Logger > logger=getDefaultLogger("IterativeVertexFinder", Logging::INFO))
 Constructor used if InputTrack_t type == BoundTrackParameters.
 
 m_logger (std::move(logger))
 
 IterativeVertexFinder (Config &cfg, std::function< BoundTrackParameters(InputTrack_t)> func, std::unique_ptr< const Logger > logger=getDefaultLogger("IterativeVertexFinder", Logging::INFO))
 Constructor for user-defined InputTrack_t type =! BoundTrackParameters.
 
Result< std::vector< Vertex
< InputTrack_t > > > 
find (const std::vector< const InputTrack_t * > &trackVector, const VertexingOptions< InputTrack_t > &vertexingOptions, State &state) const
 Finds vertices corresponding to input trackVector.
 

Private Types

using Propagator_t = typename vfitter_t::Propagator_t
 
using Linearizer_t = typename vfitter_t::Linearizer_t
 

Private Member Functions

const Loggerlogger () const
 Private access to logging instance.
 
Result< Vertex< InputTrack_t > > getVertexSeed (const std::vector< const InputTrack_t * > &seedTracks, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Method that calls seed finder to retrieve a vertex seed.
 
void removeTracks (const std::vector< const InputTrack_t * > &tracksToRemove, std::vector< const InputTrack_t * > &seedTracks) const
 Removes all tracks in tracksToRemove from seedTracks.
 
Result< doublegetCompatibility (const BoundTrackParameters &params, const Vertex< InputTrack_t > &vertex, const Surface &perigeeSurface, const VertexingOptions< InputTrack_t > &vertexingOptions, State &state) const
 Function for calculating how compatible a given track is to a given vertex.
 
Result< void > removeUsedCompatibleTracks (Vertex< InputTrack_t > &vertex, std::vector< const InputTrack_t * > &tracksToFit, std::vector< const InputTrack_t * > &seedTracks, const VertexingOptions< InputTrack_t > &vertexingOptions, State &state) const
 Function that removes used tracks compatible with current vertex (vertex) from tracksToFit and seedTracks as well as outliers from vertex.tracksAtVertex.
 
Result< void > fillTracksToFit (const std::vector< const InputTrack_t * > &seedTracks, const Vertex< InputTrack_t > &seedVertex, std::vector< const InputTrack_t * > &tracksToFitOut, std::vector< const InputTrack_t * > &tracksToFitSplitVertexOut, const VertexingOptions< InputTrack_t > &vertexingOptions, State &state) const
 Function that fills vector with tracks compatible with seed vertex.
 
Result< bool > reassignTracksToNewVertex (std::vector< Vertex< InputTrack_t >> &vertexCollection, Vertex< InputTrack_t > &currentVertex, std::vector< const InputTrack_t * > &tracksToFit, std::vector< const InputTrack_t * > &seedTracks, const std::vector< const InputTrack_t * > &origTracks, const VertexingOptions< InputTrack_t > &vertexingOptions, State &state) const
 Function that reassigns tracks from other vertices to the current vertex if they are more compatible.
 
int countSignificantTracks (const Vertex< InputTrack_t > &vtx) const
 Counts all tracks that are significant for a vertex.
 

Private Attributes

const Config m_cfg
 Configuration object.
 
std::function
< BoundTrackParameters(InputTrack_t)> 
m_extractParameters
 Function to extract track parameters, InputTrack_t objects are BoundTrackParameters by default, function to be overwritten to return BoundTrackParameters for other InputTrack_t objects.
 
std::unique_ptr< const Loggerm_logger
 Logging instance.
 

Detailed Description

template<typename vfitter_t, typename sfinder_t>
class Acts::IterativeVertexFinder< vfitter_t, sfinder_t >

Implements an iterative vertex finder.

Brief description of the algorithm implemented: Iterative vertex finder which iteratively finds and fits vertices:

  1. 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.
  2. 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.
  3. 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.
  4. Add vertex to vertexCollection
  5. Repeat until no seedTracks are left or max. number of vertices found
Template Parameters
vfitter_tVertex fitter type
sfinder_tSeed finder type

Definition at line 60 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 60 of file IterativeVertexFinder.hpp

Member Typedef Documentation

template<typename vfitter_t , typename sfinder_t >
using Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::InputTrack_t = typename vfitter_t::InputTrack_t

Definition at line 67 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 67 of file IterativeVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
using Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::IPEstimator = ImpactPointEstimator<InputTrack_t, Propagator_t>

Definition at line 68 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 68 of file IterativeVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
using Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::Linearizer_t = typename vfitter_t::Linearizer_t
private

Definition at line 64 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 64 of file IterativeVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
using Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::Propagator_t = typename vfitter_t::Propagator_t
private

Definition at line 63 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 63 of file IterativeVertexFinder.hpp

Constructor & Destructor Documentation

template<typename vfitter_t , typename sfinder_t >
template<typename T = InputTrack_t, std::enable_if_t< std::is_same< T, BoundTrackParameters >::value, int > = 0>
Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::IterativeVertexFinder ( Config cfg,
std::unique_ptr< const Logger logger = getDefaultLogger(                            "IterativeVertexFinder< vfitter_t, sfinder_t >", Logging::INFO) 
)
inline

Constructor used if InputTrack_t type == BoundTrackParameters.

Parameters
cfgConfiguration object
loggerThe logging instance

Definition at line 145 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 145 of file IterativeVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::IterativeVertexFinder ( Config cfg,
std::function< BoundTrackParameters(InputTrack_t)>  func,
std::unique_ptr< const Logger logger = getDefaultLogger(                            "IterativeVertexFinder< vfitter_t, sfinder_t >", Logging::INFO) 
)
inline

Constructor for user-defined InputTrack_t type =! BoundTrackParameters.

Parameters
cfgConfiguration object
funcFunction extracting BoundTrackParameters from InputTrack_t object
loggerThe logging instance

Definition at line 159 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 159 of file IterativeVertexFinder.hpp

Member Function Documentation

template<typename vfitter_t , typename sfinder_t >
int Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::countSignificantTracks ( const Vertex< InputTrack_t > &  vtx) const
private

Counts all tracks that are significant for a vertex.

Parameters
vtxThe vertex
Returns
Number of significant tracks

Definition at line 561 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 561 of file IterativeVertexFinder.ipp

References m_cfg(), and Acts::Vertex< input_track_t >::tracks().

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
Acts::Result< void > Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::fillTracksToFit ( const std::vector< const InputTrack_t * > &  seedTracks,
const Vertex< InputTrack_t > &  seedVertex,
std::vector< const InputTrack_t * > &  tracksToFitOut,
std::vector< const InputTrack_t * > &  tracksToFitSplitVertexOut,
const VertexingOptions< InputTrack_t > &  vertexingOptions,
State state 
) const
private

Function that fills vector with tracks compatible with seed vertex.

Parameters
seedTracksList of all available tracks used for seeding
seedVertexSeed vertex
tracksToFitOutTracks to fit
tracksToFitSplitVertexOutTracks to fit to split vertex
vertexingOptionsVertexing options
stateThe state object

Definition at line 350 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 350 of file IterativeVertexFinder.ipp

References ACTS_WARNING, test_fpe::count, Acts::GenericBoundTrackParameters< particle_hypothesis_t >::covariance(), Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::VertexingOptions< input_track_t >::geoContext, Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::State::ipState, m_cfg(), and Acts::Vertex< input_track_t >::position().

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::find ( const std::vector< const InputTrack_t * > &  trackVector,
const VertexingOptions< InputTrack_t > &  vertexingOptions,
State state 
) const

Finds vertices corresponding to input trackVector.

Parameters
trackVectorInput tracks
vertexingOptionsVertexing options
stateState for fulfilling interfaces
Returns
Collection of vertices found by finder

Do seeding

End seeding Now take only tracks compatible with current seed

Begin vertex fit

End vertex fit

Definition at line 10 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 10 of file IterativeVertexFinder.ipp

References ACTS_DEBUG, eZ, Acts::Vertex< input_track_t >::fitQuality(), m_cfg(), testing::internal::move(), and filter::state.

Referenced by ActsExamples::IterativeVertexFinderAlgorithm::execute().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename vfitter_t , typename sfinder_t >
Acts::Result< double > Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::getCompatibility ( const BoundTrackParameters params,
const Vertex< InputTrack_t > &  vertex,
const Surface perigeeSurface,
const VertexingOptions< InputTrack_t > &  vertexingOptions,
State state 
) const
private

Function for calculating how compatible a given track is to a given vertex.

Parameters
paramsTrack parameters
vertexThe vertex
perigeeSurfaceThe perigee surface at vertex position
vertexingOptionsVertexing options
stateThe state object

Definition at line 218 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 218 of file IterativeVertexFinder.ipp

References Acts::Vertex< input_track_t >::fullCovariance(), Acts::Vertex< input_track_t >::fullPosition(), Acts::VertexingOptions< input_track_t >::geoContext, Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::State::linearizerState, m_cfg(), Acts::VertexingOptions< input_track_t >::magFieldContext, and testing::internal::move().

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::getVertexSeed ( const std::vector< const InputTrack_t * > &  seedTracks,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

Method that calls seed finder to retrieve a vertex seed.

Parameters
seedTracksSeeding tracks
vertexingOptionsVertexing options

Definition at line 159 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 159 of file IterativeVertexFinder.ipp

References ACTS_DEBUG, Acts::eX, Acts::eY, eZ, and m_cfg().

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
const Logger& Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::logger ( ) const
inlineprivate

Private access to logging instance.

Definition at line 192 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 192 of file IterativeVertexFinder.hpp

References Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::m_logger.

template<typename vfitter_t , typename sfinder_t >
Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::m_logger ( std::  movelogger)
inline

Definition at line 150 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 150 of file IterativeVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
Acts::Result< bool > Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::reassignTracksToNewVertex ( std::vector< Vertex< InputTrack_t >> &  vertexCollection,
Vertex< InputTrack_t > &  currentVertex,
std::vector< const InputTrack_t * > &  tracksToFit,
std::vector< const InputTrack_t * > &  seedTracks,
const std::vector< const InputTrack_t * > &  origTracks,
const VertexingOptions< InputTrack_t > &  vertexingOptions,
State state 
) const
private

Function that reassigns tracks from other vertices to the current vertex if they are more compatible.

Parameters
vertexCollectionCollection of vertices
currentVertexCurrent vertex to assign tracks to
tracksToFitTracks to fit vector
seedTracksSeed tracks vector
origTracksVector of original track objects
vertexingOptionsVertexing options
stateThe state object
Returns
Bool if currentVertex is still a good vertex

Definition at line 425 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 425 of file IterativeVertexFinder.ipp

References ACTS_DEBUG, Acts::Vertex< input_track_t >::fitQuality(), Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::State::fitterState, Acts::Vertex< input_track_t >::fullPosition(), m_cfg(), testing::internal::move(), position, and Acts::VertexingOptions< input_track_t >::useConstraintInFit.

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
void Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::removeTracks ( const std::vector< const InputTrack_t * > &  tracksToRemove,
std::vector< const InputTrack_t * > &  seedTracks 
) const
private

Removes all tracks in tracksToRemove from seedTracks.

Parameters
tracksToRemoveTracks to be removed from seedTracks
seedTracksList to remove tracks from

Definition at line 196 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 196 of file IterativeVertexFinder.ipp

References ACTS_WARNING.

template<typename vfitter_t , typename sfinder_t >
Acts::Result< void > Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::removeUsedCompatibleTracks ( Vertex< InputTrack_t > &  vertex,
std::vector< const InputTrack_t * > &  tracksToFit,
std::vector< const InputTrack_t * > &  seedTracks,
const VertexingOptions< InputTrack_t > &  vertexingOptions,
State state 
) const
private

Function that removes used tracks compatible with current vertex (vertex) from tracksToFit and seedTracks as well as outliers from vertex.tracksAtVertex.

Parameters
vertexCurrent vertex
tracksToFitTracks used to fit vertex
seedTracksTracks used for vertex seeding
vertexingOptionsVertexing options
stateThe state object

Definition at line 256 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 256 of file IterativeVertexFinder.ipp

References ACTS_DEBUG, ACTS_WARNING, Acts::Vertex< input_track_t >::fullPosition(), m_cfg(), position, Acts::Vertex< input_track_t >::setTracksAtVertex(), and Acts::Vertex< input_track_t >::tracks().

+ Here is the call graph for this function:

Member Data Documentation

template<typename vfitter_t , typename sfinder_t >
const Config Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::m_cfg
private

Configuration object.

Definition at line 181 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 181 of file IterativeVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
std::function<BoundTrackParameters(InputTrack_t)> Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::m_extractParameters
private

Function to extract track parameters, InputTrack_t objects are BoundTrackParameters by default, function to be overwritten to return BoundTrackParameters for other InputTrack_t objects.

Definition at line 186 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 186 of file IterativeVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
std::unique_ptr<const Logger> Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::m_logger
private

Logging instance.

Definition at line 189 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 189 of file IterativeVertexFinder.hpp

Referenced by Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::logger().


The documentation for this class was generated from the following files: