EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::GaussianTrackDensity< input_track_t > Class Template Reference

Class to model tracks as 2D density functions based on their d0 and z0 perigee parameters (mean value) and covariance matrices (determining the width of the function) More...

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

+ Collaboration diagram for Acts::GaussianTrackDensity< input_track_t >:

Classes

struct  Config
 The Config struct. More...
 
class  GaussianTrackDensityStore
 
struct  State
 The State struct. More...
 
struct  TrackEntry
 Struct to store information for a single track. More...
 

Public Member Functions

 GaussianTrackDensity ()=default
 Default constructor.
 
 GaussianTrackDensity (const Config &cfg)
 Constructor with config.
 
std::pair< double, double > globalMaximumWithWidth (State &state, const std::vector< const input_track_t * > &trackList, const std::function< BoundTrackParameters(input_track_t)> &extractParameters) const
 Calculates z position of global maximum with Gaussian width for density function. Strategy: The global maximum must be somewhere near a track. Since we can calculate the first and second derivatives, at each point we can determine a) whether the function is curved up (minimum) or down (maximum) b) the distance to nearest maximum, assuming either Newton (parabolic) or Gaussian local behavior. For each track where the second derivative is negative, find step to nearest maximum, take that step and then do one final refinement. The largest density encountered in this procedure (after checking all tracks) is considered the maximum.
 
double globalMaximum (State &state, const std::vector< const input_track_t * > &trackList, const std::function< BoundTrackParameters(input_track_t)> &extractParameters) const
 Calculates the z position of the global maximum.
 

Private Member Functions

void addTracks (State &state, const std::vector< const input_track_t * > &trackList, const std::function< BoundTrackParameters(input_track_t)> &extractParameters) const
 Add a track to the set being considered.
 
std::tuple< double, double,
double > 
trackDensityAndDerivatives (State &state, double z) const
 Evaluate the density function and its two first derivatives at the specified coordinate along the beamline.
 
std::tuple< double, double,
double > 
updateMaximum (double newZ, double newValue, double newSecondDerivative, double maxZ, double maxValue, double maxSecondDerivative) const
 Update the current maximum values.
 
double stepSize (double y, double dy, double ddy) const
 Calculates the step size.
 

Private Attributes

Config m_cfg
 The configuration.
 

Detailed Description

template<typename input_track_t>
class Acts::GaussianTrackDensity< input_track_t >

Class to model tracks as 2D density functions based on their d0 and z0 perigee parameters (mean value) and covariance matrices (determining the width of the function)

Definition at line 24 of file GaussianTrackDensity.hpp.

View newest version in sPHENIX GitHub at line 24 of file GaussianTrackDensity.hpp

Constructor & Destructor Documentation

template<typename input_track_t >
Acts::GaussianTrackDensity< input_track_t >::GaussianTrackDensity ( )
default

Default constructor.

template<typename input_track_t >
Acts::GaussianTrackDensity< input_track_t >::GaussianTrackDensity ( const Config cfg)
inline

Constructor with config.

Definition at line 93 of file GaussianTrackDensity.hpp.

View newest version in sPHENIX GitHub at line 93 of file GaussianTrackDensity.hpp

Member Function Documentation

template<typename input_track_t >
void Acts::GaussianTrackDensity< input_track_t >::addTracks ( State state,
const std::vector< const input_track_t * > &  trackList,
const std::function< BoundTrackParameters(input_track_t)> &  extractParameters 
) const
private

Add a track to the set being considered.

Parameters
stateThe track density state
trackListAll input tracks
extractParametersFunction extracting BoundTrackParameters from InputTrack

Definition at line 69 of file GaussianTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 69 of file GaussianTrackDensity.ipp

References Acts::SingleBoundTrackParameters< charge_t >::covariance(), Acts::eBoundLoc0, Acts::eBoundLoc1, M_PI, Acts::SingleBoundTrackParameters< charge_t >::parameters(), and Acts::GaussianTrackDensity< input_track_t >::State::trackEntries.

+ Here is the call graph for this function:

template<typename input_track_t >
double Acts::GaussianTrackDensity< input_track_t >::globalMaximum ( State state,
const std::vector< const input_track_t * > &  trackList,
const std::function< BoundTrackParameters(input_track_t)> &  extractParameters 
) const

Calculates the z position of the global maximum.

Parameters
stateThe track density state
trackListAll input tracks
extractParametersFunction extracting BoundTrackParameters from InputTrack
Returns
z position of the global maximum

Definition at line 61 of file GaussianTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 61 of file GaussianTrackDensity.ipp

template<typename input_track_t >
std::pair< double, double > Acts::GaussianTrackDensity< input_track_t >::globalMaximumWithWidth ( State state,
const std::vector< const input_track_t * > &  trackList,
const std::function< BoundTrackParameters(input_track_t)> &  extractParameters 
) const

Calculates z position of global maximum with Gaussian width for density function. Strategy: The global maximum must be somewhere near a track. Since we can calculate the first and second derivatives, at each point we can determine a) whether the function is curved up (minimum) or down (maximum) b) the distance to nearest maximum, assuming either Newton (parabolic) or Gaussian local behavior. For each track where the second derivative is negative, find step to nearest maximum, take that step and then do one final refinement. The largest density encountered in this procedure (after checking all tracks) is considered the maximum.

Parameters
stateThe track density state
trackListAll input tracks
extractParametersFunction extracting BoundTrackParameters from InputTrack
Returns
Pair of position of global maximum and Gaussian width

Definition at line 13 of file GaussianTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 13 of file GaussianTrackDensity.ipp

References Acts::Test::stepSize, and Acts::GaussianTrackDensity< input_track_t >::State::trackEntries.

template<typename input_track_t >
double Acts::GaussianTrackDensity< input_track_t >::stepSize ( double  y,
double  dy,
double  ddy 
) const
private

Calculates the step size.

Parameters
yPosition value
dyFirst derivative
ddySecond derivative
Returns
The step size

Definition at line 145 of file GaussianTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 145 of file GaussianTrackDensity.ipp

template<typename input_track_t >
std::tuple< double, double, double > Acts::GaussianTrackDensity< input_track_t >::trackDensityAndDerivatives ( State state,
double  z 
) const
private

Evaluate the density function and its two first derivatives at the specified coordinate along the beamline.

Parameters
stateThe track density state
zz-position along the beamline
Returns
Track density, first and second derivatives

Definition at line 122 of file GaussianTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 122 of file GaussianTrackDensity.ipp

References Acts::GaussianTrackDensity< input_track_t >::GaussianTrackDensityStore::addTrackToDensity(), Acts::GaussianTrackDensity< input_track_t >::GaussianTrackDensityStore::densityAndDerivatives(), and Acts::GaussianTrackDensity< input_track_t >::State::trackEntries.

+ Here is the call graph for this function:

template<typename input_track_t >
std::tuple< double, double, double > Acts::GaussianTrackDensity< input_track_t >::updateMaximum ( double  newZ,
double  newValue,
double  newSecondDerivative,
double  maxZ,
double  maxValue,
double  maxSecondDerivative 
) const
private

Update the current maximum values.

Parameters
newZThe new z value
newValueThe new value at z position
newSecondDerivativeThe new second derivative
Returns
The max z position, the max value at z position, the max second derivative

Definition at line 133 of file GaussianTrackDensity.ipp.

View newest version in sPHENIX GitHub at line 133 of file GaussianTrackDensity.ipp

Member Data Documentation

template<typename input_track_t >
Config Acts::GaussianTrackDensity< input_track_t >::m_cfg
private

The configuration.

Definition at line 134 of file GaussianTrackDensity.hpp.

View newest version in sPHENIX GitHub at line 134 of file GaussianTrackDensity.hpp


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