Analysis Software
Documentation for sPHENIX simulation 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
 The configuration struct. More...
 

Public Types

using MainGridVector = Eigen::Matrix< float, mainGridSize, 1 >
 
using TrackGridVector = Eigen::Matrix< float, trkGridSize, 1 >
 

Public Member Functions

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

Private Member Functions

void addTrackGridToMainGrid (int zBin, const TrackGridVector &trkGrid, MainGridVector &mainGrid) const
 Helper function that actually adds the track to the main density grid.
 
void modifyMainGridWithTrackGrid (int zBin, const TrackGridVector &trkGrid, MainGridVector &mainGrid, int modifyModeSign) const
 Helper function that modifies the main density grid (either adds or removes a track)
 
TrackGridVector createTrackGrid (float d0, float distCtrZ, const Acts::SquareMatrix2 &cov) 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 (MainGridVector &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 SquareMatrix2 &cov) const
 Helper to retrieve values according to a 2-dim normal distribution.
 
int getHighestSumZPosition (MainGridVector &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 MainGridVector &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

Member Typedef Documentation

template<int mainGridSize = 2000, int trkGridSize = 15>
using Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::MainGridVector = Eigen::Matrix<float, mainGridSize, 1>

Definition at line 37 of file GaussianGridTrackDensity.hpp.

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

template<int mainGridSize = 2000, int trkGridSize = 15>
using Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::TrackGridVector = Eigen::Matrix<float, trkGridSize, 1>

Definition at line 38 of file GaussianGridTrackDensity.hpp.

View newest version in sPHENIX GitHub at line 38 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 70 of file GaussianGridTrackDensity.hpp.

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

Member Function Documentation

template<int mainGridSize, int trkGridSize>
std::pair< int, typename Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::TrackGridVector > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::addTrack ( const BoundTrackParameters trk,
MainGridVector 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 59 of file GaussianGridTrackDensity.ipp.

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

References Acts::Test::cov, m_cfg(), Acts::GenericBoundTrackParameters< particle_hypothesis_t >::parameters(), and Acts::GenericBoundTrackParameters< particle_hypothesis_t >::spatialImpactParameterCovariance().

+ Here is the call graph for this function:

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

Helper function that actually 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 98 of file GaussianGridTrackDensity.ipp.

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

template<int mainGridSize, int trkGridSize>
Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::TrackGridVector Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::createTrackGrid ( float  d0,
float  distCtrZ,
const Acts::SquareMatrix2 cov 
) 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
d0Transverse impact parameter
distCtrZThe distance in z0 from the track position to its bin center in the 2-dim grid
covThe track covariance matrix

Definition at line 139 of file GaussianGridTrackDensity.ipp.

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

References f, j, m_cfg(), and physmon_track_finding_ttbar::z.

+ Here is the call graph for this function:

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

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

Note
This only works if the maximum is sufficiently isolated since overlapping neighboring peaks might lead to an overestimation of the seed width.
Parameters
mainGridThe main 1-dim density grid along the z-axis
maxZz-position of the maximum density value
Returns
The width

Definition at line 154 of file GaussianGridTrackDensity.ipp.

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

References m_cfg(), and width.

+ Here is the call graph for this function:

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

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

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

Definition at line 259 of file GaussianGridTrackDensity.ipp.

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

References sum().

+ Here is the call graph for this function:

template<int mainGridSize, int trkGridSize>
int Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getHighestSumZPosition ( MainGridVector 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 211 of file GaussianGridTrackDensity.ipp.

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

References m_cfg().

+ Here is the call graph for this function:

template<int mainGridSize, int trkGridSize>
Acts::Result< float > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getMaxZPosition ( MainGridVector 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 15 of file GaussianGridTrackDensity.ipp.

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

References f, and m_cfg().

+ Here is the call graph for this function:

template<int mainGridSize, int trkGridSize>
Acts::Result< std::pair< float, float > > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getMaxZPositionAndWidth ( MainGridVector 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 maxZ, and width.

template<int mainGridSize, int trkGridSize>
void Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::modifyMainGridWithTrackGrid ( int  zBin,
const TrackGridVector trkGrid,
MainGridVector 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 112 of file GaussianGridTrackDensity.ipp.

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

References width.

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

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

Note
This function is defined in coordinate system centered around d0 and z0

Definition at line 199 of file GaussianGridTrackDensity.ipp.

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

References Acts::Test::cov, Acts::safeExp(), and physmon_track_finding_ttbar::z.

+ Here is the call graph for this function:

template<int mainGridSize, int trkGridSize>
void Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::removeTrackGridFromMainGrid ( int  zBin,
const TrackGridVector trkGrid,
MainGridVector 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 105 of file GaussianGridTrackDensity.ipp.

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

Member Data Documentation

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

Definition at line 175 of file GaussianGridTrackDensity.hpp.

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


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