EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize > Class Template Reference

Implements a 1-dim density grid to be filled with track Gaussian distributions. Each single track is modelled as a 2(!)-dim Gaussian distribution grid in the d0-z0 plane, but only the overlap with the z-axis (i.e. a 1-dim density vector) needs to be calculated. The position of the highest track density (of either a single bin or the sum of a certain region) can be determined. Single tracks can be cached and removed from the overall density. More...

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

+ Collaboration diagram for Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >:

Classes

struct  Config
 struct More...
 

Public Member Functions

 GaussianGridTrackDensity (const Config &cfg)
 
Result< float > getMaxZPosition (ActsVectorF< mainGridSize > &mainGrid) const
 Returns the z position of maximum track density.
 
Result< std::pair< float, float > > getMaxZPositionAndWidth (ActsVectorF< mainGridSize > &mainGrid) const
 Returns the z position of maximum track density and the estimated width.
 
std::pair< int, ActsVectorF
< trkGridSize > > 
addTrack (const BoundTrackParameters &trk, ActsVectorF< mainGridSize > &mainGrid) const
 Adds a single track to the overall grid density.
 
void removeTrackGridFromMainGrid (int zBin, const ActsVectorF< trkGridSize > &trkGrid, ActsVectorF< mainGridSize > &mainGrid) const
 Removes a track from the overall grid density.
 

Private Member Functions

void addTrackGridToMainGrid (int zBin, const ActsVectorF< trkGridSize > &trkGrid, ActsVectorF< mainGridSize > &mainGrid) const
 Helper function that acutally adds the track to the main density grid.
 
void modifyMainGridWithTrackGrid (int zBin, const ActsVectorF< trkGridSize > &trkGrid, ActsVectorF< mainGridSize > &mainGrid, int modifyModeSign) const
 Helper function that modifies the main density grid (either adds or removes a track)
 
ActsVectorF< trkGridSize > createTrackGrid (int offset, const SymMatrix2D &cov, float distCtrD, float distCtrZ) const
 Function that creates a 1-dim track grid (i.e. a vector) with the correct density contribution of a track along the z-axis.
 
Result< float > estimateSeedWidth (ActsVectorF< mainGridSize > &mainGrid, float maxZ) const
 Function that estimates the seed width based on the FWHM of the maximum density peak.
 
float normal2D (float d, float z, const SymMatrix2D &cov) const
 Helper to retrieve values according to a 2-dim normal distribution.
 
int getHighestSumZPosition (ActsVectorF< mainGridSize > &mainGrid) const
 Checks the (up to) first three density maxima (only those that have a maximum relative deviation of 'relativeDensityDev' from the main maximum) and take the z-bin of the maximum with the highest surrounding density.
 
double getDensitySum (const ActsVectorF< mainGridSize > &mainGrid, int pos) const
 Calculates the density sum of a z-bin and its two neighboring bins as needed for 'getHighestSumZPosition'.
 

Private Attributes

Config m_cfg
 

Detailed Description

template<int mainGridSize = 2000, int trkGridSize = 15>
class Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >

Implements a 1-dim density grid to be filled with track Gaussian distributions. Each single track is modelled as a 2(!)-dim Gaussian distribution grid in the d0-z0 plane, but only the overlap with the z-axis (i.e. a 1-dim density vector) needs to be calculated. The position of the highest track density (of either a single bin or the sum of a certain region) can be determined. Single tracks can be cached and removed from the overall density.

Template Parameters
mainGridSizeThe size of the z-axis 1-dim main density grid
trkGridSizeThe 2(!)-dim grid size of a single track, i.e. a single track is modelled as a (trkGridSize x trkGridSize) grid in the d0-z0 plane. Note: trkGridSize has to be an odd value.

Definition at line 30 of file GaussianGridTrackDensity.hpp.

View newest version in sPHENIX GitHub at line 30 of file GaussianGridTrackDensity.hpp

Constructor & Destructor Documentation

template<int mainGridSize = 2000, int trkGridSize = 15>
Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::GaussianGridTrackDensity ( const Config cfg)
inline

Definition at line 66 of file GaussianGridTrackDensity.hpp.

View newest version in sPHENIX GitHub at line 66 of file GaussianGridTrackDensity.hpp

Member Function Documentation

template<int mainGridSize, int trkGridSize>
std::pair< int, Acts::ActsVectorF< trkGridSize > > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::addTrack ( const BoundTrackParameters trk,
Acts::ActsVectorF< mainGridSize > &  mainGrid 
) const

Adds a single track to the overall grid density.

Parameters
trkThe track to be added
mainGridThe main 1-dim density grid along the z-axis
Returns
A pair storing information about the z-bin position the track was added (int) and the 1-dim density contribution of the track itself

Definition at line 57 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 57 of file GaussianGridTrackDensity.ipp

References kdfinder::abs(), Acts::Test::cov, Acts::SingleBoundTrackParameters< charge_t >::covariance(), and Acts::SingleBoundTrackParameters< charge_t >::parameters().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<int mainGridSize, int trkGridSize>
void Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::addTrackGridToMainGrid ( int  zBin,
const ActsVectorF< trkGridSize > &  trkGrid,
Acts::ActsVectorF< mainGridSize > &  mainGrid 
) const
private

Helper function that acutally adds the track to the main density grid.

Parameters
zBinThe center z-bin position the track
trkGridThe 1-dim density contribution of the track
mainGridThe main 1-dim density grid along the z-axis

Definition at line 100 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 100 of file GaussianGridTrackDensity.ipp

template<int mainGridSize, int trkGridSize>
Acts::ActsVectorF< trkGridSize > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::createTrackGrid ( int  offset,
const SymMatrix2D cov,
float  distCtrD,
float  distCtrZ 
) const
private

Function that creates a 1-dim track grid (i.e. a vector) with the correct density contribution of a track along the z-axis.

Parameters
offsetOffset in d0 direction, to account for the 2-dim part of the Gaussian track distribution
covThe track covariance matrix
distCtrDThe distance in d0 from the track position to its bin center in the 2-dim grid
distCtrZThe distance in z0 from the track position to its bin center in the 2-dim grid

Definition at line 143 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 143 of file GaussianGridTrackDensity.ipp

References d, and z.

template<int mainGridSize, int trkGridSize>
Acts::Result< float > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::estimateSeedWidth ( Acts::ActsVectorF< mainGridSize > &  mainGrid,
float  maxZ 
) const
private

Function that estimates the seed width based on the FWHM of the maximum density peak.

Parameters
mainGridThe main 1-dim density grid along the z-axis z-position of the maximum density value
Returns
The width

Definition at line 161 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 161 of file GaussianGridTrackDensity.ipp

References width().

+ Here is the call graph for this function:

template<int mainGridSize, int trkGridSize>
double Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getDensitySum ( const ActsVectorF< mainGridSize > &  mainGrid,
int  pos 
) const
private

Calculates the density sum of a z-bin and its two neighboring bins as needed for 'getHighestSumZPosition'.

mainGrid The main 1-dim density grid along the z-axis

Parameters
posThe center z-bin positon
Returns
The sum

Definition at line 266 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 266 of file GaussianGridTrackDensity.ipp

template<int mainGridSize, int trkGridSize>
int Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getHighestSumZPosition ( Acts::ActsVectorF< mainGridSize > &  mainGrid) const
private

Checks the (up to) first three density maxima (only those that have a maximum relative deviation of 'relativeDensityDev' from the main maximum) and take the z-bin of the maximum with the highest surrounding density.

Parameters
mainGridThe main 1-dim density grid along the z-axis
Returns
The z-bin position

Definition at line 218 of file GaussianGridTrackDensity.ipp.

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

template<int mainGridSize, int trkGridSize>
Acts::Result< float > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getMaxZPosition ( Acts::ActsVectorF< mainGridSize > &  mainGrid) const

Returns the z position of maximum track density.

Parameters
mainGridThe main 1-dim density grid along the z-axis
Returns
The z position of maximum track density

Definition at line 14 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 14 of file GaussianGridTrackDensity.ipp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

template<int mainGridSize, int trkGridSize>
Acts::Result< std::pair< float, float > > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getMaxZPositionAndWidth ( Acts::ActsVectorF< mainGridSize > &  mainGrid) const

Returns the z position of maximum track density and the estimated width.

Parameters
mainGridThe main 1-dim density grid along the z-axis
Returns
The z position of maximum track density and width

Definition at line 37 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 37 of file GaussianGridTrackDensity.ipp

References width().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<int mainGridSize, int trkGridSize>
void Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::modifyMainGridWithTrackGrid ( int  zBin,
const ActsVectorF< trkGridSize > &  trkGrid,
Acts::ActsVectorF< mainGridSize > &  mainGrid,
int  modifyModeSign 
) const
private

Helper function that modifies the main density grid (either adds or removes a track)

Parameters
zBinThe center z-bin position the track
trkGridThe 1-dim density contribution of the track
mainGridThe main 1-dim density grid along the z-axis
modifyModeSignSign that determines the mode of modification, +1 for adding a track, -1 for removing a track

Definition at line 116 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 116 of file GaussianGridTrackDensity.ipp

References width().

+ Here is the call graph for this function:

template<int mainGridSize, int trkGridSize>
float Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::normal2D ( float  d,
float  z,
const SymMatrix2D cov 
) const
private

Helper to retrieve values according to a 2-dim normal distribution.

Definition at line 206 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 206 of file GaussianGridTrackDensity.ipp

References Acts::Test::cov, M_PI, and z.

template<int mainGridSize, int trkGridSize>
void Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::removeTrackGridFromMainGrid ( int  zBin,
const ActsVectorF< trkGridSize > &  trkGrid,
Acts::ActsVectorF< mainGridSize > &  mainGrid 
) const

Removes a track from the overall grid density.

Parameters
zBinThe center z-bin position the track needs to be removed from
trkGridThe 1-dim density contribution of the track
mainGridThe main 1-dim density grid along the z-axis

Definition at line 108 of file GaussianGridTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 108 of file GaussianGridTrackDensity.ipp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

Member Data Documentation

template<int mainGridSize = 2000, int trkGridSize = 15>
Config Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::m_cfg
private

Definition at line 176 of file GaussianGridTrackDensity.hpp.

View newest version in sPHENIX GitHub at line 176 of file GaussianGridTrackDensity.hpp


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