ECCE @ EIC 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/master/Core/include/Acts/Vertexing/IterativeVertexFinder.hpp>

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

Classes

struct  Config
 

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, BoundParameters >::value, int > = 0>
 IterativeVertexFinder (Config &cfg, std::unique_ptr< const Logger > logger=getDefaultLogger("IterativeVertexFinder", Logging::INFO))
 Constructor used if InputTrack_t type == BoundParameters.
 
 m_logger (std::move(logger))
 
 IterativeVertexFinder (Config &cfg, std::function< BoundParameters(InputTrack_t)> func, std::unique_ptr< const Logger > logger=getDefaultLogger("IterativeVertexFinder", Logging::INFO))
 Constructor for user-defined InputTrack_t type =! BoundParameters.
 
Result< std::vector< Vertex
< InputTrack_t > > > 
find (const std::vector< const InputTrack_t * > &trackVector, const VertexingOptions< InputTrack_t > &vertexingOptions) 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 removeAllTracks (const std::vector< const InputTrack_t * > &perigeesToFit, std::vector< const InputTrack_t * > &seedTracks) const
 Removes all tracks in perigeesToFit from seedTracks.
 
Result< double > getCompatibility (const BoundParameters &params, const Vertex< InputTrack_t > &vertex, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Function for calculating how compatible a given track is to a given vertex.
 
Result< voidremoveUsedCompatibleTracks (Vertex< InputTrack_t > &myVertex, std::vector< const InputTrack_t * > &perigeesToFit, std::vector< const InputTrack_t * > &seedTracks, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Function that removes used tracks compatible with current vertex (myVertex) from perigeesToFit and seedTracks as well as outliers from myVertex.tracksAtVertex.
 
Result< voidfillPerigeesToFit (const std::vector< const InputTrack_t * > &perigeeList, const Vertex< InputTrack_t > &seedVertex, std::vector< const InputTrack_t * > &perigeesToFitOut, std::vector< const InputTrack_t * > &perigeesToFitSplitVertexOut, const VertexingOptions< InputTrack_t > &vertexingOptions) 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 * > &perigeesToFit, std::vector< const InputTrack_t * > &seedTracks, const std::vector< const InputTrack_t * > &origTracks, const VertexingOptions< InputTrack_t > &vertexingOptions) 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< BoundParameters(InputTrack_t)> m_extractParameters
 Function to extract track parameters, InputTrack_t objects are BoundParameters by default, function to be overwritten to return BoundParameters 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 perigeesToFit 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 perigeesToFit 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 perigeesToFit 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, BoundParameters >::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 == BoundParameters.

Parameters
cfgConfiguration object
loggerThe logging instance

Definition at line 116 of file IterativeVertexFinder.hpp.

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

template<typename vfitter_t , typename sfinder_t >
Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::IterativeVertexFinder ( Config cfg,
std::function< BoundParameters(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 =! BoundParameters.

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

Definition at line 128 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 128 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
weightThresholdThreshold to count all tracks with weights > weightThreshold
Returns
Number of significant tracks

Definition at line 519 of file IterativeVertexFinder.ipp.

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

References 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 >::fillPerigeesToFit ( const std::vector< const InputTrack_t * > &  perigeeList,
const Vertex< InputTrack_t > &  seedVertex,
std::vector< const InputTrack_t * > &  perigeesToFitOut,
std::vector< const InputTrack_t * > &  perigeesToFitSplitVertexOut,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

Function that fills vector with tracks compatible with seed vertex.

Parameters
perigeeListList of all available tracks used for seeding
seedVertexSeed vertex
perigeesToFitOutPerigees to fit
perigeesToFitSplitVertexOutPerigees to fit split vertex
vertexingOptionsVertexing options

Definition at line 327 of file IterativeVertexFinder.ipp.

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

References ACTS_WARNING, Acts::SingleTrackParameters< ChargePolicy >::covariance(), Acts::eLOC_D0, Acts::eLOC_Z0, error, Acts::VertexingOptions< input_track_t >::geoContext, 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 
) const

Finds vertices corresponding to input trackVector.

Parameters
trackVectorInput tracks
vertexingOptionsVertexing options
Returns
Collection of vertices found by finder

Begin 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, and Acts::Vertex< input_track_t >::fitQuality().

+ Here is the call graph for this function:

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

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

Parameters
paramsTrack parameters
vertexThe vertex
vertexingOptionsVertexing options

Definition at line 199 of file IterativeVertexFinder.ipp.

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

References Acts::Vertex< input_track_t >::fullCovariance(), Acts::Vertex< input_track_t >::fullPosition(), Acts::VertexingOptions< input_track_t >::geoContext, and Acts::VertexingOptions< input_track_t >::magFieldContext.

+ 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 150 of file IterativeVertexFinder.ipp.

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

References ACTS_DEBUG, Acts::eX, Acts::eY, Acts::eZ, Acts::Vertex< input_track_t >::fullPosition(), and Acts::Vertex< input_track_t >::time().

+ 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 161 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 161 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 121 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 121 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 * > &  perigeesToFit,
std::vector< const InputTrack_t * > &  seedTracks,
const std::vector< const InputTrack_t * > &  origTracks,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) 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
perigeesToFitPerigees to fit vector
seedTracksSeed tracks vector
origTracksVector of original track objects
vertexingOptionsVertexing options
Returns
Bool if currentVertex is still a good vertex

Definition at line 395 of file IterativeVertexFinder.ipp.

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

References ACTS_DEBUG, and Acts::Vertex< input_track_t >::fitQuality().

+ Here is the call graph for this function:

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

Removes all tracks in perigeesToFit from seedTracks.

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

Definition at line 177 of file IterativeVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 177 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 > &  myVertex,
std::vector< const InputTrack_t * > &  perigeesToFit,
std::vector< const InputTrack_t * > &  seedTracks,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

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

Parameters
myVertexCurrent vertex
perigeesToFitTracks used to fit myVertex
seedTracksTracks used for vertex seeding
vertexingOptionsVertexing options

Definition at line 234 of file IterativeVertexFinder.ipp.

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

References ACTS_DEBUG, ACTS_WARNING, 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 148 of file IterativeVertexFinder.hpp.

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

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

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

Parameters
InputTrack_tobject to extract track parameters from

Definition at line 155 of file IterativeVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 155 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 158 of file IterativeVertexFinder.hpp.

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

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


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