ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::AtlasBetheHeitlerApprox Class Reference

This class approximates the Bethe-Heitler distribution as a gaussian mixture. More...

#include <Acts/TrackFitting/BetheHeitlerApprox.hpp>

Inheritance diagram for Acts::AtlasBetheHeitlerApprox:
[legend]
Collaboration diagram for Acts::AtlasBetheHeitlerApprox:
[legend]

Classes

struct  PolyData

Public Types

using Data = std::vector<PolyData>
 Type alias for array of polynomial data for all components.
Public Types inherited from Acts::BetheHeitlerApprox
using Component = detail::GaussianComponent

Public Member Functions

 AtlasBetheHeitlerApprox (const Data &lowData, const Data &highData, bool lowTransform, bool highTransform, double lowLimit, double highLimit, bool clampToRange, double noChangeLimit, double singleGaussianLimit)
 Construct the Bethe-Heitler approximation description with two parameterizations, one for lower ranges, one for higher ranges.
std::size_t maxComponents () const override
 Returns the number of components the returned mixture will have.
std::span< Componentmixture (double xOverX0, const std::span< Component > mixture) const override
 Generates the mixture from the polynomials and reweights them, so that the sum of all weights is 1.
bool validXOverX0 (const double xOverX0) const override
 Checks if an input is valid for the parameterization.
Public Member Functions inherited from Acts::BetheHeitlerApprox
virtual ~BetheHeitlerApprox ()=default

Static Public Member Functions

static AtlasBetheHeitlerApprox loadFromFiles (const std::string &low_parameters_path, const std::string &high_parameters_path, double lowLimit, double highLimit, bool clampToRange, double noChangeLimit, double singleGaussianLimit)
 Loads a parameterization from a file according to the Atlas file description.

Detailed Description

This class approximates the Bethe-Heitler distribution as a gaussian mixture.

To enable an approximation for continuous input variables, the weights, means and variances are internally parametrized as a Nth order polynomial.

Todo
This class is rather inflexible: It forces two data representations, making it a bit awkward to add a single parameterization. It would be good to generalize this at some point.

Member Typedef Documentation

◆ Data

Type alias for array of polynomial data for all components.

Constructor & Destructor Documentation

◆ AtlasBetheHeitlerApprox()

Acts::AtlasBetheHeitlerApprox::AtlasBetheHeitlerApprox ( const Data & lowData,
const Data & highData,
bool lowTransform,
bool highTransform,
double lowLimit,
double highLimit,
bool clampToRange,
double noChangeLimit,
double singleGaussianLimit )

Construct the Bethe-Heitler approximation description with two parameterizations, one for lower ranges, one for higher ranges.

Is it assumed that the lower limit of the high-x/x0 data is equal to the upper limit of the low-x/x0 data.

Parameters
lowDatadata for the lower x/x0 range
highDatadata for the higher x/x0 range
lowTransformwhether the low data need to be transformed
highTransformwhether the high data need to be transformed
lowLimitthe upper limit for the low data
highLimitthe upper limit for the high data
clampToRangewhether to clamp the input x/x0 to the allowed range
noChangeLimitlimit below which no change is applied
singleGaussianLimitlimit below which a single Gaussian is used

Member Function Documentation

◆ loadFromFiles()

AtlasBetheHeitlerApprox Acts::AtlasBetheHeitlerApprox::loadFromFiles ( const std::string & low_parameters_path,
const std::string & high_parameters_path,
double lowLimit,
double highLimit,
bool clampToRange,
double noChangeLimit,
double singleGaussianLimit )
static

Loads a parameterization from a file according to the Atlas file description.

Parameters
low_parameters_pathPath to the foo.par file that stores the parameterization for low x/x0
high_parameters_pathPath to the foo.par file that stores the parameterization for high x/x0
lowLimitthe upper limit for the low x/x0-data
highLimitthe upper limit for the high x/x0-data
clampToRangeforwarded to constructor
noChangeLimitforwarded to constructor
singleGaussianLimitforwarded to constructor
Returns
AtlasBetheHeitlerApprox instance loaded from parameter files

◆ maxComponents()

std::size_t Acts::AtlasBetheHeitlerApprox::maxComponents ( ) const
overridevirtual

Returns the number of components the returned mixture will have.

Returns
Number of components in the mixture

Implements Acts::BetheHeitlerApprox.

◆ mixture()

std::span< Component > Acts::AtlasBetheHeitlerApprox::mixture ( double xOverX0,
const std::span< Component > mixture ) const
overridevirtual

Generates the mixture from the polynomials and reweights them, so that the sum of all weights is 1.

Parameters
xOverX0pathlength in terms of the radiation length
mixturepreallocated array to store the result
Returns
the potentially modified input span containing the mixture

Implements Acts::BetheHeitlerApprox.

◆ validXOverX0()

bool Acts::AtlasBetheHeitlerApprox::validXOverX0 ( const double xOverX0) const
overridevirtual

Checks if an input is valid for the parameterization.

Parameters
xOverX0pathlength in terms of the radiation length
Returns
True if x/x0 is within valid range for this parameterization

Implements Acts::BetheHeitlerApprox.