Analysis Software
Documentation for sPHENIX simulation software
|
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 |
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, TrackGridVector > | addTrack (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 |
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
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
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
|
inline |
Definition at line 70 of file GaussianGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 70 of file GaussianGridTrackDensity.hpp
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.
trk | The track to be added |
mainGrid | The main 1-dim density grid along the z-axis |
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().
|
private |
Helper function that actually 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 98 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 98 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.
d0 | Transverse impact parameter |
distCtrZ | The distance in z0 from the track position to its bin center in the 2-dim grid |
cov | The 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.
|
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 |
maxZ | z-position of the maximum density value |
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.
|
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 position |
Definition at line 259 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 259 of file GaussianGridTrackDensity.ipp
References sum().
|
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 211 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 211 of file GaussianGridTrackDensity.ipp
References m_cfg().
Acts::Result< float > Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::getMaxZPosition | ( | MainGridVector & | mainGrid | ) | const |
Returns the z position of maximum track density.
mainGrid | The main 1-dim density grid along the z-axis |
Definition at line 15 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 15 of file GaussianGridTrackDensity.ipp
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.
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
|
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 112 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 112 of file GaussianGridTrackDensity.ipp
References width.
|
private |
Helper to retrieve values according to a 2-dim normal distribution.
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.
void Acts::GaussianGridTrackDensity< mainGridSize, trkGridSize >::removeTrackGridFromMainGrid | ( | int | zBin, |
const TrackGridVector & | trkGrid, | ||
MainGridVector & | 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 105 of file GaussianGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 105 of file GaussianGridTrackDensity.ipp
|
private |
Definition at line 175 of file GaussianGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 175 of file GaussianGridTrackDensity.hpp