ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::TrackDensity Class 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/master/Core/include/Acts/Vertexing/TrackDensity.hpp>

+ Collaboration diagram for Acts::TrackDensity:

Classes

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

Public Member Functions

 TrackDensity ()=default
 Default constructor.
 
 TrackDensity (const Config &cfg)
 Constructor with config.
 
void addTrack (State &state, const BoundParameters &trk, double d0SignificanceCut, double z0SignificanceCut) const
 Add a track to the set being considered.
 
std::pair< double, double > globalMaximumWithWidth (State &state) 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
 Calculates the z position of the global maximum.
 
double trackDensity (State &state, double z) const
 Evaluate the density function at the specified coordinate along the beamline.
 
double trackDensity (State &state, double z, double &firstDerivative, double &secondDerivative) const
 Evaluate the density function and its two first derivatives at the specified coordinate along the beamline.
 

Private Member Functions

void 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

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 22 of file TrackDensity.hpp.

View newest version in sPHENIX GitHub at line 22 of file TrackDensity.hpp

Constructor & Destructor Documentation

Acts::TrackDensity::TrackDensity ( )
default

Default constructor.

Acts::TrackDensity::TrackDensity ( const Config cfg)
inline

Constructor with config.

Definition at line 71 of file TrackDensity.hpp.

View newest version in sPHENIX GitHub at line 71 of file TrackDensity.hpp

Member Function Documentation

void Acts::TrackDensity::addTrack ( State state,
const BoundParameters trk,
double  d0SignificanceCut,
double  z0SignificanceCut 
) const

Add a track to the set being considered.

Parameters
stateThe track density state
trkTrack parameters.
d0SignificanceCutSignificance cut on d0.
z0SignificanceCutSignificance cut on z0.

Definition at line 12 of file TrackDensity.cpp.

View newest version in sPHENIX GitHub at line 12 of file TrackDensity.cpp

References Acts::SingleTrackParameters< ChargePolicy >::covariance(), Acts::eLOC_D0, Acts::eLOC_Z0, M_PI, Acts::SingleTrackParameters< ChargePolicy >::parameters(), Acts::TrackDensity::State::trackEntries, and G4InuclParticleNames::z0.

Referenced by Acts::GaussianTrackDensity::addTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Acts::TrackDensity::globalMaximum ( State state) const

Calculates the z position of the global maximum.

Parameters
stateThe track density state
Returns
z position of the global maximum

Definition at line 92 of file TrackDensity.cpp.

View newest version in sPHENIX GitHub at line 92 of file TrackDensity.cpp

Referenced by Acts::GaussianTrackDensity::globalMaximum().

+ Here is the caller graph for this function:

std::pair< double, double > Acts::TrackDensity::globalMaximumWithWidth ( State state) 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
Returns
Pair of position of global maximum and Gaussian width

Definition at line 55 of file TrackDensity.cpp.

View newest version in sPHENIX GitHub at line 55 of file TrackDensity.cpp

References track, and Acts::TrackDensity::State::trackEntries.

Referenced by Acts::GaussianTrackDensity::globalMaximumWithWidth().

+ Here is the caller graph for this function:

double Acts::TrackDensity::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 126 of file TrackDensity.cpp.

View newest version in sPHENIX GitHub at line 126 of file TrackDensity.cpp

double Acts::TrackDensity::trackDensity ( State state,
double  z 
) const

Evaluate the density function at the specified coordinate along the beamline.

Parameters
stateThe track density state
zz-position along the beamline
Returns
The track density value

Definition at line 96 of file TrackDensity.cpp.

View newest version in sPHENIX GitHub at line 96 of file TrackDensity.cpp

double Acts::TrackDensity::trackDensity ( State state,
double  z,
double &  firstDerivative,
double &  secondDerivative 
) const

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
[out]firstDerivativeThe first derivative
[out]secondDerivativeThe second derivative
Returns
The track density value

Definition at line 102 of file TrackDensity.cpp.

View newest version in sPHENIX GitHub at line 102 of file TrackDensity.cpp

References Acts::TrackDensity::TrackDensityStore::addTrackToDensity(), Acts::TrackDensity::TrackDensityStore::density(), Acts::TrackDensity::TrackDensityStore::firstDerivative(), Acts::TrackDensity::TrackDensityStore::secondDerivative(), and Acts::TrackDensity::State::trackEntries.

+ Here is the call graph for this function:

void Acts::TrackDensity::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
[out]maxZThe max z value
[out]maxValueThe max value at z position
[out]maxSecondDerivativeThe max second derivative

Definition at line 115 of file TrackDensity.cpp.

View newest version in sPHENIX GitHub at line 115 of file TrackDensity.cpp

Member Data Documentation

Config Acts::TrackDensity::m_cfg
private

The configuration.

Definition at line 152 of file TrackDensity.hpp.

View newest version in sPHENIX GitHub at line 152 of file TrackDensity.hpp


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