ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t > Class Template Reference

Implements an iterative vertex finder. More...

#include <acts/blob/master/Core/include/Acts/Vertexing/AdaptiveMultiVertexFinder.hpp>

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

Classes

struct  Config
 

Public Member Functions

template<typename T = InputTrack_t, std::enable_if_t< std::is_same< T, BoundParameters >::value, int > = 0>
 AdaptiveMultiVertexFinder (Config &cfg, std::unique_ptr< const Logger > logger=getDefaultLogger("AdaptiveMultiVertexFinder", Logging::INFO))
 Constructor used if InputTrack_t type == BoundParameters.
 
 m_logger (std::move(logger))
 
 AdaptiveMultiVertexFinder (Config &cfg, std::function< BoundParameters(InputTrack_t)> func, std::unique_ptr< const Logger > logger=getDefaultLogger("AdaptiveMultiVertexFinder", Logging::INFO))
 Constructor for user-defined InputTrack_t type != BoundParameters.
 
Result< std::vector< Vertex
< InputTrack_t > > > 
find (const std::vector< const InputTrack_t * > &allTracks, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Function that performs the adaptive multi-vertex finding.
 

Private Types

using Propagator_t = typename vfitter_t::Propagator_t
 
using InputTrack_t = typename vfitter_t::InputTrack_t
 
using Linearizer_t = typename vfitter_t::Linearizer_t
 
using FitterState_t = typename vfitter_t::State
 

Private Member Functions

const Loggerlogger () const
 Private access to logging instance.
 
Result< Vertex< InputTrack_t > > doSeeding (const std::vector< const InputTrack_t * > &trackVector, Vertex< InputTrack_t > &currentConstraint, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Calls the seed finder and sets constraints on the found seed vertex if desired.
 
double estimateDeltaZ (const BoundParameters &track, const Vector3D &vtxPos) const
 Estimates delta Z between a track and a vertex position.
 
Result< double > getIPSignificance (const InputTrack_t *track, const Vertex< InputTrack_t > &vtx, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Calculates the IP significance of a track to a given vertex.
 
Result< voidaddCompatibleTracksToVertex (const std::vector< const InputTrack_t * > &tracks, Vertex< InputTrack_t > &vtx, FitterState_t &fitterState, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Adds compatible track to vertex candidate.
 
Result< bool > canRecoverFromNoCompatibleTracks (const std::vector< const InputTrack_t * > &allTracks, const std::vector< const InputTrack_t * > &seedTracks, Vertex< InputTrack_t > &vtx, const Vertex< InputTrack_t > &currentConstraint, FitterState_t &fitterState, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Method that tries to recover from cases where no tracks were added to the vertex candidate after seeding.
 
Result< bool > canPrepareVertexForFit (const std::vector< const InputTrack_t * > &allTracks, const std::vector< const InputTrack_t * > &seedTracks, Vertex< InputTrack_t > &vtx, const Vertex< InputTrack_t > &currentConstraint, FitterState_t &fitterState, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Method that tries to prepare the vertex for the fit.
 
std::pair< int, bool > checkVertexAndCompatibleTracks (Vertex< InputTrack_t > &vtx, const std::vector< const InputTrack_t * > &seedTracks, FitterState_t &fitterState) const
 Method that checks if vertex is a good vertex and if compatible tracks are available.
 
void removeCompatibleTracksFromSeedTracks (Vertex< InputTrack_t > &vtx, std::vector< const InputTrack_t * > &seedTracks, FitterState_t &fitterState) const
 Method that removes all tracks that are compatible with current vertex from seedTracks.
 
bool canRemoveNonCompatibleTrackFromSeedTracks (Vertex< InputTrack_t > &vtx, std::vector< const InputTrack_t * > &seedTracks, FitterState_t &fitterState) const
 Method that tries to remove a non-compatible track from seed tracks after removing a compatible track failed.
 
bool keepNewVertex (Vertex< InputTrack_t > &vtx, const std::vector< Vertex< InputTrack_t > * > &allVertices, FitterState_t &fitterState) const
 Method that evaluates if the new vertex candidate should be kept, i.e. saved, or not.
 
bool isMergedVertex (const Vertex< InputTrack_t > &vtx, const std::vector< Vertex< InputTrack_t > * > &allVertices) const
 Method that evaluates if the new vertex candidate is merged with one of the previously found vertices.
 
Result< voiddeleteLastVertex (Vertex< InputTrack_t > &vtx, std::vector< std::unique_ptr< Vertex< InputTrack_t >>> &allVertices, std::vector< Vertex< InputTrack_t > * > &allVerticesPtr, FitterState_t &fitterState, FitterState_t &oldFitterState, const VertexingOptions< InputTrack_t > &vertexingOptions) const
 Method that deletes last vertex from list of all vertices and either refits all vertices afterwards (if refitAfterBadVertex) of reverts to the old state of the vertex fitter before the bad vertex was added to the fit (if not refitAfterBadVertex).
 
std::vector< Vertex
< InputTrack_t > > 
getVertexOutputList (const std::vector< Vertex< InputTrack_t > * > &allVerticesPtr, FitterState_t &fitterState) const
 Prepares the output vector of vertices.
 

Private Attributes

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::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >

Implements an iterative vertex finder.

Brief description of the algorithm implemented: TODO

Template Parameters
vfitter_tVertex fitter type
sfinder_tSeed finder type

Definition at line 35 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 35 of file AdaptiveMultiVertexFinder.hpp

Member Typedef Documentation

template<typename vfitter_t , typename sfinder_t >
using Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::FitterState_t = typename vfitter_t::State
private

Definition at line 39 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 39 of file AdaptiveMultiVertexFinder.hpp

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

Definition at line 37 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 37 of file AdaptiveMultiVertexFinder.hpp

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

Definition at line 38 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 38 of file AdaptiveMultiVertexFinder.hpp

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

Definition at line 36 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 36 of file AdaptiveMultiVertexFinder.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::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::AdaptiveMultiVertexFinder ( Config cfg,
std::unique_ptr< const Logger logger = getDefaultLogger("AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >",                                                 Logging::INFO) 
)
inline

Constructor used if InputTrack_t type == BoundParameters.

Parameters
cfgConfiguration object
loggerThe logging instance

Definition at line 165 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 165 of file AdaptiveMultiVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::AdaptiveMultiVertexFinder ( Config cfg,
std::function< BoundParameters(InputTrack_t)>  func,
std::unique_ptr< const Logger logger = getDefaultLogger("AdaptiveMultiVertexFinder< 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 178 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 178 of file AdaptiveMultiVertexFinder.hpp

Member Function Documentation

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::addCompatibleTracksToVertex ( const std::vector< const InputTrack_t * > &  tracks,
Vertex< InputTrack_t > &  vtx,
FitterState_t fitterState,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

Adds compatible track to vertex candidate.

Parameters
tracksThe tracks
vtxThe vertex candidate
[out]fitterStateThe vertex fitter state
vertexingOptionsVertexing options

Definition at line 217 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 217 of file AdaptiveMultiVertexFinder.ipp

References kdfinder::abs().

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::canPrepareVertexForFit ( const std::vector< const InputTrack_t * > &  allTracks,
const std::vector< const InputTrack_t * > &  seedTracks,
Vertex< InputTrack_t > &  vtx,
const Vertex< InputTrack_t > &  currentConstraint,
FitterState_t fitterState,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

Method that tries to prepare the vertex for the fit.

Parameters
allTracksThe tracks to be considered (either origTrack or seedTracks)
seedTracksThe seed tracks
[out]vtxThe vertex candidate
currentConstraintVertex constraint
[out]fitterStateThe vertex fitter state
vertexingOptionsVertexing options
Returns
True if preparation was successful, false otherwise

Definition at line 305 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 305 of file AdaptiveMultiVertexFinder.ipp

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::canRecoverFromNoCompatibleTracks ( const std::vector< const InputTrack_t * > &  allTracks,
const std::vector< const InputTrack_t * > &  seedTracks,
Vertex< InputTrack_t > &  vtx,
const Vertex< InputTrack_t > &  currentConstraint,
FitterState_t fitterState,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

Method that tries to recover from cases where no tracks were added to the vertex candidate after seeding.

Parameters
allTracksThe tracks to be considered (either origTrack or seedTracks)
seedTracksThe seed tracks
[out]vtxThe vertex candidate
currentConstraintVertex constraint
[out]fitterStateThe vertex fitter state
vertexingOptionsVertexing options

return True if recovery was successful, false otherwise

Definition at line 246 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 246 of file AdaptiveMultiVertexFinder.ipp

References kdfinder::abs(), ACTS_DEBUG, Acts::eZ, and max.

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::canRemoveNonCompatibleTrackFromSeedTracks ( Vertex< InputTrack_t > &  vtx,
std::vector< const InputTrack_t * > &  seedTracks,
FitterState_t fitterState 
) const
private

Method that tries to remove a non-compatible track from seed tracks after removing a compatible track failed.

Parameters
vtxThe vertex candidate
[out]seedTracksThe seed tracks
fitterStateThe vertex fitter state
Returns
Non-compatible track was removed

Definition at line 401 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 401 of file AdaptiveMultiVertexFinder.ipp

References kdfinder::abs(), ACTS_DEBUG, Acts::eZ, and max.

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::checkVertexAndCompatibleTracks ( Vertex< InputTrack_t > &  vtx,
const std::vector< const InputTrack_t * > &  seedTracks,
FitterState_t fitterState 
) const
private

Method that checks if vertex is a good vertex and if compatible tracks are available.

Parameters
vtxThe vertex candidate
seedTracksThe seed tracks
fitterStateThe vertex fitter state
Returns
pair(nCompatibleTracks, isGoodVertex)

Definition at line 337 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 337 of file AdaptiveMultiVertexFinder.ipp

References ACTS_DEBUG.

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::deleteLastVertex ( Vertex< InputTrack_t > &  vtx,
std::vector< std::unique_ptr< Vertex< InputTrack_t >>> &  allVertices,
std::vector< Vertex< InputTrack_t > * > &  allVerticesPtr,
FitterState_t fitterState,
FitterState_t oldFitterState,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

Method that deletes last vertex from list of all vertices and either refits all vertices afterwards (if refitAfterBadVertex) of reverts to the old state of the vertex fitter before the bad vertex was added to the fit (if not refitAfterBadVertex).

Parameters
vtxThe last added vertex which will be removed
allVerticesVector containing the unique_ptr to vertices
allVerticesPtrVector containing the actual addresses
fitterStateThe current vertex fitter state
oldFitterStateThe old vertex fitter state
vertexingOptionsVertexing options

Definition at line 524 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 524 of file AdaptiveMultiVertexFinder.ipp

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::doSeeding ( const std::vector< const InputTrack_t * > &  trackVector,
Vertex< InputTrack_t > &  currentConstraint,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

Calls the seed finder and sets constraints on the found seed vertex if desired.

Parameters
trackVectorAll tracks to be used for seeding
currentConstraintVertex constraint
vertexingOptionsVertexing options
Returns
The seed vertex

Definition at line 130 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 130 of file AdaptiveMultiVertexFinder.ipp

References ACTS_WARNING, Acts::Vertex< input_track_t >::fullCovariance(), Acts::Vertex< input_track_t >::fullPosition(), and Acts::VertexingOptions< input_track_t >::vertexConstraint.

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::estimateDeltaZ ( const BoundParameters track,
const Vector3D vtxPos 
) const
private

Estimates delta Z between a track and a vertex position.

Parameters
trackThe track
vtxPosThe vertex position
Returns
The delta Z estimate

Definition at line 166 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 166 of file AdaptiveMultiVertexFinder.ipp

References Acts::ePHI, Acts::eTHETA, Acts::eX, Acts::eY, Acts::eZ, phi, track, X, and Y.

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::find ( const std::vector< const InputTrack_t * > &  allTracks,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const

Function that performs the adaptive multi-vertex finding.

Parameters
allTracksInput track collection
vertexingOptionsVertexing options
Returns
Vector of all reconstructed vertices

Definition at line 12 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 12 of file AdaptiveMultiVertexFinder.ipp

References ACTS_DEBUG, Acts::Vertex< input_track_t >::fullPosition(), G4Analysis::make_unique(), and Acts::Vertex< input_track_t >::position().

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::getIPSignificance ( const InputTrack_t track,
const Vertex< InputTrack_t > &  vtx,
const VertexingOptions< InputTrack_t > &  vertexingOptions 
) const
private

Calculates the IP significance of a track to a given vertex.

Parameters
trackThe track
vtxThe vertex
vertexingOptionsVertexing options
Returns
The IP significance

Definition at line 183 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 183 of file AdaptiveMultiVertexFinder.ipp

References Acts::ImpactParametersAndSigma::IPd0, Acts::ImpactParametersAndSigma::IPz0, Acts::Vertex< input_track_t >::setFullCovariance(), Acts::ImpactParametersAndSigma::sigmad0, Acts::ImpactParametersAndSigma::sigmaz0, and track.

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::getVertexOutputList ( const std::vector< Vertex< InputTrack_t > * > &  allVerticesPtr,
FitterState_t fitterState 
) const
private

Prepares the output vector of vertices.

Parameters
allVerticesPtrVector of pointers to vertices
fitterStateThe vertex fitter state
Returns
The output vertex collection

Definition at line 563 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 563 of file AdaptiveMultiVertexFinder.ipp

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::isMergedVertex ( const Vertex< InputTrack_t > &  vtx,
const std::vector< Vertex< InputTrack_t > * > &  allVertices 
) const
private

Method that evaluates if the new vertex candidate is merged with one of the previously found vertices.

Parameters
vtxThe vertex candidate
allVerticesAll so far found vertices
Returns
Vertex is merged

Definition at line 481 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 481 of file AdaptiveMultiVertexFinder.ipp

References kdfinder::abs(), Acts::eZ, Acts::Vertex< input_track_t >::fullCovariance(), and Acts::Vertex< input_track_t >::fullPosition().

+ Here is the call graph for this function:

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::keepNewVertex ( Vertex< InputTrack_t > &  vtx,
const std::vector< Vertex< InputTrack_t > * > &  allVertices,
FitterState_t fitterState 
) const
private

Method that evaluates if the new vertex candidate should be kept, i.e. saved, or not.

Parameters
vtxThe vertex candidate
allVerticesAll so far found vertices
fitterStateThe vertex fitter state
Returns
Keep new vertex

Definition at line 452 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 452 of file AdaptiveMultiVertexFinder.ipp

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

Private access to logging instance.

Definition at line 213 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 213 of file AdaptiveMultiVertexFinder.hpp

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

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

Definition at line 171 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 171 of file AdaptiveMultiVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
auto Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::removeCompatibleTracksFromSeedTracks ( Vertex< InputTrack_t > &  vtx,
std::vector< const InputTrack_t * > &  seedTracks,
FitterState_t fitterState 
) const
private

Method that removes all tracks that are compatible with current vertex from seedTracks.

Parameters
vtxThe vertex candidate
[out]seedTracksThe seed tracks
fitterStateThe vertex fitter state

Definition at line 377 of file AdaptiveMultiVertexFinder.ipp.

View newest version in sPHENIX GitHub at line 377 of file AdaptiveMultiVertexFinder.ipp

Member Data Documentation

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

Configuration object.

Definition at line 200 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 200 of file AdaptiveMultiVertexFinder.hpp

template<typename vfitter_t , typename sfinder_t >
std::function<BoundParameters(InputTrack_t)> Acts::AdaptiveMultiVertexFinder< 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 207 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 207 of file AdaptiveMultiVertexFinder.hpp

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

Logging instance.

Definition at line 210 of file AdaptiveMultiVertexFinder.hpp.

View newest version in sPHENIX GitHub at line 210 of file AdaptiveMultiVertexFinder.hpp

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


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