File AdaptiveMultiVertexFitter.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

template<typename input_track_t, typename linearizer_t>
class AdaptiveMultiVertexFitter
#include <Acts/Vertexing/AdaptiveMultiVertexFitter.hpp>

Implements an adaptive multi-vertex fitter as described in detail in Section 5.3.5 in: Ref.

(1): CERN-THESIS-2010-027, Author: Piacquadio, Giacinto: Identification of b-jets and investigation of the discovery potential of a Higgs boson in the WH−−>lvbb¯ channel with the ATLAS experiment

Template Parameters
  • input_track_t – Track object type

  • linearizer_t – Track linearizer type

Public Types

using InputTrack_t = input_track_t
using Linearizer_t = linearizer_t
using Propagator_t = typename linearizer_t::Propagator_t

Public Functions

template<typename T = InputTrack_t, std::enable_if_t<std::is_same<T, BoundTrackParameters>::value, int> = 0>
inline AdaptiveMultiVertexFitter(Config &cfg, std::unique_ptr<const Logger> logger = getDefaultLogger("AdaptiveMultiVertexFitter", Logging::INFO))

Constructor used if InputTrack_t type == BoundTrackParameters.

Parameters
  • cfg – Configuration object

  • logger – The logging instance

inline AdaptiveMultiVertexFitter(Config &cfg, std::function<BoundTrackParameters(InputTrack_t)> func, std::unique_ptr<const Logger> logger = getDefaultLogger("AdaptiveMultiVertexFitter", Logging::INFO))

Constructor for user-defined InputTrack_t type != BoundTrackParameters.

Parameters
  • cfg – Configuration object

  • func – Function extracting BoundTrackParameters from InputTrack_t object

  • logger – The logging instance

Result<void> addVtxToFit(State &state, Vertex<InputTrack_t> &newVertex, const Linearizer_t &linearizer, const VertexingOptions<InputTrack_t> &vertexingOptions) const

Adds new vertex to an existing multi-vertex fit and fits everything together (by invoking the fit_impl method):

  1. The new vertex is added to the fit: all associated tracks get initialized, i.e. ParamsAtIP3d are created (from ImpactPointEstimator) to be later able to estimate in a fast way the compatibility of the tracks to their respective vertices.

  2. All tracks belonging to the new vertex are scanned and all the vertices which share tracks with the new vertex to be fit are also added to the fit.

  3. The multivertex fit is performed with all involved vertices.

This has the advantage that only vertices that are affected by adding the new vertex are refitted.

Note: newVertex has to be properly initialized (seed vertex, constraint vertex, list of MAV)

Parameters
  • state – The state object

  • newVertex – New vertex to be added to fit

  • linearizer – The track linearizer

  • vertexingOptions – Vertexing options

Returns

Result<void> object

Result<void> fit(State &state, const std::vector<Vertex<InputTrack_t>*> &verticesToFit, const Linearizer_t &linearizer, const VertexingOptions<InputTrack_t> &vertexingOptions) const

The actual fit function, performs a simultaneous fit of all vertices in verticesToFit by invoking fitImpl

Parameters
  • state – The state object

  • verticesToFit – Vector containing all vertices to be fitted

  • linearizer – The track linearizer

  • vertexingOptions – Vertexing options

Returns

Result<void> object

Private Types

using IPEstimator = ImpactPointEstimator<InputTrack_t, Propagator_t>

Private Functions

bool checkSmallShift(State &state) const

Determines if vertex position has shifted more than m_cfg.maxRelativeShift in last iteration.

Parameters

state – The state object

Returns

False if shift was larger than maxRelativeShift

std::vector<double> collectTrackToVertexCompatibilities(State &state, const InputTrack_t *trk) const

Collects all compatibility values of the track trk at all vertices it is currently attached to and outputs these values in a vector.

Parameters
  • state – The state object

  • trk – The track

Returns

Vector of compatibility values

void doVertexSmoothing(State &state) const

Updates tracks for current vertex with knowledge of current vertex position.

Parameters

state – The state object

Result<void> fitImpl(State &state, const Linearizer_t &linearizer, const VertexingOptions<InputTrack_t> &vertexingOptions) const

The actual fit function, performs a simultaneous fit of all vertices in state.vertexCollection.

Parameters
  • state – The state object

  • linearizer – The track linearizer

  • vertexingOptions – Vertexing options

Returns

Result<void> object

bool isAlreadyInList(Vertex<InputTrack_t> *vtx, const std::vector<Vertex<InputTrack_t>*> &verticesVec) const

Tests if vertex is already in list of vertices or not.

Parameters
  • vtx – Vertex to test

  • verticesVec – Vector of vertices to search

Returns

True if vtx is already in verticesVec

inline const Logger &logger() const

Private access to logging instance.

Result<void> prepareVertexForFit(State &state, Vertex<InputTrack_t> *vtx, const VertexingOptions<InputTrack_t> &vertexingOptions) const

Prepares vertex object for the actual fit, i.e.

all TrackAtVertex objects at current vertex will obtain ip3dParams from ImpactPointEstimator::estimate3DImpactParameters in order to later faster estimate compatibilities of track with different vertices

Parameters
  • state – The state to operate on

  • vtx – The vertex object

  • vertexingOptions – Vertexing options

Result<void> setAllVertexCompatibilities(State &state, Vertex<InputTrack_t> *currentVtx, const VertexingOptions<input_track_t> &vertexingOptions) const

Sets vertexCompatibility for all TrackAtVertex objects at current vertex.

Parameters
  • state – The state object

  • currentVtx – Current vertex

  • vertexingOptions – Vertexing options

Result<void> setWeightsAndUpdate(State &state, const Linearizer_t &linearizer, const VertexingOptions<input_track_t> &vertexingOptions) const

Sets weights to the track according to Eq.

(5.46) in Ref.(1) and updates the vertices by calling the VertexUpdater

Parameters
  • state – The state object

  • linearizer – The track linearizer

  • vertexingOptions – Vertexing options

Private Members

const Config m_cfg

Configuration object.

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

std::unique_ptr<const Logger> m_logger

Logging instance.

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

Public Functions

inline Config(const IPEstimator &est)

Config constructor.

Parameters

est – ImpactPointEstimator

Public Members

AnnealingUtility annealingTool

Annealing tool used for a thermodynamic annealing scheme for the track weight factors in such a way that with high temperature values (at the beginning) only a slight preference is given to tracks compatible with the estimated vertex position.

With lower temperatures the weighting get stricter such that all incompatible tracks will be dropped at the end while keeping all compatible tracks with a weight=1. Ref. (1): CERN-THESIS-2010-027, Author: Piacquadio, Giacinto: Identification of b-jets and investigation of the discovery potential of a Higgs boson in the WH−−>lvbb¯ channel with the ATLAS experiment

bool doSmoothing = {false}
IPEstimator ipEst
double maxDistToLinPoint = {0.5}
unsigned int maxIterations = {30}
double maxRelativeShift = {0.01}
double minWeight = {0.0001}
struct State
#include <Acts/Vertexing/AdaptiveMultiVertexFitter.hpp>

The fitter state.

Public Functions

inline State(const MagneticFieldProvider &field, const Acts::MagneticFieldContext &magContext)
State() = default

Default State constructor.

inline void addVertexToMultiMap(Vertex<InputTrack_t> &vtx)
inline void removeVertexFromMultiMap(Vertex<InputTrack_t> &vtx)

Public Members

AnnealingUtility::State annealingState
IPEstimator::State ipState
Linearizer_t::State linearizerState
std::map<std::pair<const InputTrack_t*, Vertex<InputTrack_t>*>, TrackAtVertex<InputTrack_t>> tracksAtVerticesMap
std::multimap<const InputTrack_t*, Vertex<InputTrack_t>*> trackToVerticesMultiMap
std::vector<Vertex<InputTrack_t>*> vertexCollection
std::map<Vertex<InputTrack_t>*, VertexInfo<InputTrack_t>> vtxInfoMap