Analysis Software
Documentation for sPHENIX simulation software
|
Implements a 1D (no time seeding) / 2D (time seeding) grid that is filled with track densities. Each track is modelled by a 2D / 3D Gaussian distribution in the d0-z0 / d0-z0-t0 plane, which is evaluated at d0=0. Therefore, each track effectively lives in 1D / 2D. 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. Unlike in the GaussianGridTrackDensity, the overall density map grows adaptively when tracks densities are added to the grid. More...
#include <acts/blob/sPHENIX/Core/include/Acts/Vertexing/AdaptiveGridTrackDensity.hpp>
Classes | |
struct | Config |
The configuration struct. More... | |
Public Types | |
using | Bin = std::pair< int, int > |
using | DensityMap = std::unordered_map< Bin, float, boost::hash< Bin >> |
using | ZTPosition = std::pair< float, float > |
using | ZTPositionAndWidth = std::pair< ZTPosition, float > |
Public Member Functions | |
AdaptiveGridTrackDensity (const Config &cfg) | |
DensityMap::const_iterator | highestDensityEntry (const DensityMap &densityMap) const |
Finds the maximum density of a DensityMap. | |
Result< ZTPosition > | getMaxZTPosition (DensityMap &densityMap) const |
Returns the z and t coordinate of maximum (surrounding) track density. | |
Result< ZTPositionAndWidth > | getMaxZTPositionAndWidth (DensityMap &densityMap) const |
Returns the z-t position of maximum track density and the estimated z-width of the maximum. | |
DensityMap | addTrack (const BoundTrackParameters &trk, DensityMap &mainDensityMap) const |
Adds a single track to the overall grid density. | |
void | subtractTrack (const DensityMap &trackDensityMap, DensityMap &mainDensityMap) const |
Removes a track from the overall grid density. | |
Static Public Member Functions | |
static float | getBinCenter (int bin, float binExtent) |
Calculates the bin center from the bin number. | |
static int | getBin (float value, float binExtent) |
Calculates the bin number corresponding to a d, z, or time value. | |
Private Member Functions | |
DensityMap | createTrackGrid (const Acts::Vector3 &impactParams, const Bin ¢ralBin, const Acts::SquareMatrix3 &cov) const |
Function that creates a track density map, i.e., a map from bins to the corresponding density values for a single track. | |
Result< float > | estimateSeedWidth (const DensityMap &densityMap, const ZTPosition &maxZT) const |
Function that estimates the seed width in z direction based on the full width at half maximum (FWHM) of the maximum density peak. | |
Bin | highestDensitySumBin (DensityMap &densityMap) const |
Checks (up to) first three density maxima that have a maximum relative deviation of 'relativeDensityDev' from the global maximum. Returns the bin of the maximum that has the highest surrounding density in z direction. | |
float | getDensitySum (const DensityMap &densityMap, const Bin &bin) const |
Calculates the density sum of a bin and its two neighboring bins in z direction. | |
Static Private Member Functions | |
template<unsigned int nDim> | |
static float | multivariateGaussian (const Acts::ActsVector< nDim > &args, const Acts::ActsSquareMatrix< nDim > &cov) |
Helper to retrieve values of an nDim-dimensional normal distribution. | |
Private Attributes | |
Config | m_cfg |
Implements a 1D (no time seeding) / 2D (time seeding) grid that is filled with track densities. Each track is modelled by a 2D / 3D Gaussian distribution in the d0-z0 / d0-z0-t0 plane, which is evaluated at d0=0. Therefore, each track effectively lives in 1D / 2D. 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. Unlike in the GaussianGridTrackDensity, the overall density map grows adaptively when tracks densities are added to the grid.
spatialTrkGridSize | Number of bins per track in z direction |
temporalTrkGridSize | Number of bins per track in t direction |
Definition at line 37 of file AdaptiveGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 37 of file AdaptiveGridTrackDensity.hpp
using Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::Bin = std::pair<int, int> |
Definition at line 44 of file AdaptiveGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 44 of file AdaptiveGridTrackDensity.hpp
using Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::DensityMap = std::unordered_map<Bin, float, boost::hash<Bin>> |
Definition at line 46 of file AdaptiveGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 46 of file AdaptiveGridTrackDensity.hpp
using Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::ZTPosition = std::pair<float, float> |
Definition at line 49 of file AdaptiveGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 49 of file AdaptiveGridTrackDensity.hpp
using Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::ZTPositionAndWidth = std::pair<ZTPosition, float> |
Definition at line 51 of file AdaptiveGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 51 of file AdaptiveGridTrackDensity.hpp
|
inline |
Definition at line 99 of file AdaptiveGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 99 of file AdaptiveGridTrackDensity.hpp
Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::DensityMap Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::addTrack | ( | const BoundTrackParameters & | trk, |
DensityMap & | mainDensityMap | ||
) | const |
Adds a single track to the overall grid density.
trk | The track to be added |
mainDensityMap | Map between bins and corresponding density |
Definition at line 98 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 98 of file AdaptiveGridTrackDensity.ipp
References Acts::Test::cov, Acts::GenericBoundTrackParameters< particle_hypothesis_t >::impactParameterCovariance(), Acts::GenericBoundTrackParameters< particle_hypothesis_t >::impactParameters(), and m_cfg().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
private |
Function that creates a track density map, i.e., a map from bins to the corresponding density values for a single track.
impactParams | vector containing d0, z0, and t0 of the track |
centralBin | Central z and t bin of the track (where its density is the highest) |
cov | 3x3 impact parameter covariance matrix |
Definition at line 151 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 151 of file AdaptiveGridTrackDensity.ipp
References Acts::Test::cov, i, j, m_cfg(), t, and physmon_track_finding_ttbar::z.
|
private |
Function that estimates the seed width in z direction based on the full width at half maximum (FWHM) of the maximum density peak.
densityMap | Map from bins to corresponding track density |
maxZT | z-t position of the maximum density value |
Definition at line 193 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 193 of file AdaptiveGridTrackDensity.ipp
References m_cfg(), and width.
|
static |
Calculates the bin number corresponding to a d, z, or time value.
value | d, z, or time value |
binExtent | Bin extent |
Definition at line 22 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 22 of file AdaptiveGridTrackDensity.ipp
|
static |
Calculates the bin center from the bin number.
bin | Bin number |
binExtent | Bin extent |
Definition at line 15 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 15 of file AdaptiveGridTrackDensity.ipp
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
private |
Calculates the density sum of a bin and its two neighboring bins in z direction.
densityMap | Map between bins and corresponding density values |
bin | Bin whose neighbors in z we want to sum up |
Definition at line 328 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 328 of file AdaptiveGridTrackDensity.ipp
References sum().
Acts::Result< typename Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::ZTPosition > Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::getMaxZTPosition | ( | DensityMap & | densityMap | ) | const |
Returns the z and t coordinate of maximum (surrounding) track density.
densityMap | Map between bins and corresponding density values |
Definition at line 44 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 44 of file AdaptiveGridTrackDensity.ipp
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
Acts::Result< typename Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::ZTPositionAndWidth > Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::getMaxZTPositionAndWidth | ( | DensityMap & | densityMap | ) | const |
Returns the z-t position of maximum track density and the estimated z-width of the maximum.
densityMap | Map between bins and corresponding density values |
Definition at line 76 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 76 of file AdaptiveGridTrackDensity.ipp
References width.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::DensityMap::const_iterator Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::highestDensityEntry | ( | const DensityMap & | densityMap | ) | const |
Finds the maximum density of a DensityMap.
densityMap | Map between bins and corresponding density values |
Definition at line 31 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 31 of file AdaptiveGridTrackDensity.ipp
References parse_cmake_options::begin, and end.
|
private |
Checks (up to) first three density maxima that have a maximum relative deviation of 'relativeDensityDev' from the global maximum. Returns the bin of the maximum that has the highest surrounding density in z direction.
densityMap | Map between bins and corresponding density values |
Definition at line 277 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 277 of file AdaptiveGridTrackDensity.ipp
References m_cfg().
|
staticprivate |
Helper to retrieve values of an nDim-dimensional normal distribution.
args | Coordinates where the Gaussian should be evaluated |
cov | Covariance matrix |
Definition at line 266 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 266 of file AdaptiveGridTrackDensity.ipp
References check_smearing_config::args, and Acts::safeExp().
void Acts::AdaptiveGridTrackDensity< spatialTrkGridSize, temporalTrkGridSize >::subtractTrack | ( | const DensityMap & | trackDensityMap, |
DensityMap & | mainDensityMap | ||
) | const |
Removes a track from the overall grid density.
trackDensityMap | Map between bins and corresponding density |
mainDensityMap | Map between bins and corresponding density |
Definition at line 140 of file AdaptiveGridTrackDensity.ipp.
View newest version in sPHENIX GitHub at line 140 of file AdaptiveGridTrackDensity.ipp
References it.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 218 of file AdaptiveGridTrackDensity.hpp.
View newest version in sPHENIX GitHub at line 218 of file AdaptiveGridTrackDensity.hpp