File FsmwMode1dFinder.hpp

namespace Acts

Set the Geometry Context PLUGIN.

Set the Calibration Context PLUGIN.

Convenience functions to ease creation of and Acts::InterpolatedMaterialMap and to avoid code duplication.

Set the Mangetic Field Context PLUGIN.

Convenience functions to ease creation of and Acts::InterpolatedBFieldMap and to avoid code duplication.

Currently implemented for the two most common formats: rz and xyz.

class FsmwMode1dFinder
#include <Acts/Vertexing/FsmwMode1dFinder.hpp>

Calculates the mode of a unidimenensional distribution using the Fraction of Sample Mode with Weights algorithm For reference, see: On a Fast, Robust Estimator of the Mode: Comparisons to Other Robust Estimators with Applications, David R.

Bickel, Rudolf Fruehwirth, arXiv:math/0505419 It’s like an iterative “Half Sample Mode”, but the fraction you take at each step can be configured by the user. Configuration possibilities: (1) fraction (default is 50 %) (2) firstFraction (default is 50 %)

Public Functions

FsmwMode1dFinder() = default

Default constructor.

FsmwMode1dFinder(double firstFraction, double fraction)

Overload constructor.

  • firstFraction – first fraction in FSMW algorithm

  • fraction – all other fractions in FSMW algorithm

Result<double> getMode(std::vector<std::pair<double, double>> inputVector) const

Function to calculate mode with FSMW algorithm.


inputVector – Input collection to calculate mode from


mode value

Private Members

double m_firstFraction = 0.5
double m_fraction = 0.5