EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
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>
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 |
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.
mainGridSize | The size of the z-axis 1-dim main density grid |
trkGridSize | The 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
|
inline |
Definition at line 66 of file GaussianGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 66 of file GaussianGridTrackDensity.hpp
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.
trk | The track to be added |
mainGrid | The main 1-dim density grid along the z-axis |
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().
|
private |
Helper function that acutally adds the track to the main density grid.
zBin | The center z-bin position the track |
trkGrid | The 1-dim density contribution of the track |
mainGrid | The 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
|
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.
offset | Offset in d0 direction, to account for the 2-dim part of the Gaussian track distribution |
cov | The track covariance matrix |
distCtrD | The distance in d0 from the track position to its bin center in the 2-dim grid |
distCtrZ | The 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
|
private |
Function that estimates the seed width based on the FWHM of the maximum density peak.
mainGrid | The main 1-dim density grid along the z-axis z-position of the maximum density value |
Definition at line 161 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 161 of file GaussianGridTrackDensity.ipp
References width().
|
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
pos | The center z-bin positon |
Definition at line 266 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 266 of file GaussianGridTrackDensity.ipp
|
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.
mainGrid | The main 1-dim density grid along the z-axis |
Definition at line 218 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 218 of file GaussianGridTrackDensity.ipp
Acts::Result< float > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getMaxZPosition | ( | Acts::ActsVectorF< mainGridSize > & | mainGrid | ) | const |
Returns the z position of maximum track density.
mainGrid | The main 1-dim density grid along the z-axis |
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().
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.
mainGrid | The main 1-dim density grid along the z-axis |
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().
|
private |
Helper function that modifies the main density grid (either adds or removes a track)
zBin | The center z-bin position the track |
trkGrid | The 1-dim density contribution of the track |
mainGrid | The main 1-dim density grid along the z-axis |
modifyModeSign | Sign 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().
|
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.
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.
zBin | The center z-bin position the track needs to be removed from |
trkGrid | The 1-dim density contribution of the track |
mainGrid | The 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().
|
private |
Definition at line 176 of file GaussianGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 176 of file GaussianGridTrackDensity.hpp