File AdaptiveGridDensityVertexFinder.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

template<int trkGridSize = 15, typename vfitter_t = DummyVertexFitter<>>
class AdaptiveGridDensityVertexFinder
#include <Acts/Vertexing/AdaptiveGridDensityVertexFinder.hpp>

Vertex finder that makes use of a track density grid.

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. All track contributions along the beam axis (main density vector) are superimposed and the z-value of the bin with the highest track density is returned as a vertex candidate. Unlike the GridDensityVertexFinder, this seeder implements an adaptive version where the density grid grows bigger with added tracks.

Template Parameters

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.

Public Types

using TrackGridVector = typename GridDensity::TrackGridVector

Public Functions

template<typename T = InputTrack_t, std::enable_if_t<std::is_same<T, BoundTrackParameters>::value, int> = 0>
inline AdaptiveGridDensityVertexFinder(const Config &cfg)

Constructor used if InputTrack_t type == BoundTrackParameters.

Parameters

cfg – Configuration object

template<typename T = InputTrack_t, std::enable_if_t<std::is_same<T, BoundTrackParameters>::value, int> = 0>
inline AdaptiveGridDensityVertexFinder()

Default constructor used if InputTrack_t type == BoundTrackParameters.

inline AdaptiveGridDensityVertexFinder(const Config &cfg, const std::function<BoundTrackParameters(InputTrack_t)> &func)

Constructor for user-defined InputTrack_t type =! BoundTrackParameters.

Parameters
  • cfg – Configuration object

  • func – Function extracting BoundTrackParameters from InputTrack_t object

inline AdaptiveGridDensityVertexFinder(const std::function<BoundTrackParameters(InputTrack_t)> &func)

Constructor for user-defined InputTrack_t type =! BoundTrackParameters with default Config object.

Parameters

func – Function extracting BoundTrackParameters from InputTrack_t object

Result<std::vector<Vertex<InputTrack_t>>> find(const std::vector<const InputTrack_t*> &trackVector, const VertexingOptions<InputTrack_t> &vertexingOptions, State &state) const

Function that finds single vertex candidate.

Parameters
  • trackVector – Input track collection

  • vertexingOptions – Vertexing options

  • state – The state object to cache the density grid and density contributions of each track, to be used if cacheGridStateForTrackRemoval == true

Returns

Vector of vertices, filled with a single vertex (for consistent interfaces)

Private Types

using GridDensity = AdaptiveGridTrackDensity<trkGridSize>
using InputTrack_t = typename vfitter_t::InputTrack_t

Private Functions

bool doesPassTrackSelection(const BoundTrackParameters &trk) const

Checks if a track passes the selection criteria for seeding.

Parameters

trk – The track

Returns

Bool track passes selection

Private Members

const Config m_cfg
std::function<BoundTrackParameters(InputTrack_t)> m_extractParameters

Function to extract track parameters, InputTrack_t objects are BoundTrackParameters by default, function to be overwritten to return BoundTrackParameters for other InputTrack_t objects.

Param InputTrack_t

object to extract track parameters from

struct Config
#include <Acts/Vertexing/AdaptiveGridDensityVertexFinder.hpp>

The Config struct.

Public Functions

inline Config(float binSize = 0.1)
Parameters

binSize – Bin size of grid in mm

inline Config(const GridDensity &gDensity)
Parameters

gDensity – The grid density

Public Members

bool cacheGridStateForTrackRemoval = true
double d0SignificanceCut = maxD0TrackSignificance * maxD0TrackSignificance
bool estimateSeedWidth = false
GridDensity gridDensity
double maxD0TrackSignificance = 3.5
double maxZ0TrackSignificance = 12.
double z0SignificanceCut = maxZ0TrackSignificance * maxZ0TrackSignificance
struct State
#include <Acts/Vertexing/AdaptiveGridDensityVertexFinder.hpp>

The State struct.

Only needed if cacheGridStateForTrackRemoval == true

Public Members

std::map<const InputTrack_t*, std::pair<int, TrackGridVector>> binAndTrackGridMap
bool isInitialized = false
std::vector<float> mainGridDensity
std::vector<int> mainGridZValues
std::map<const InputTrack_t*, bool> trackSelectionMap
std::vector<const InputTrack_t*> tracksToRemove