ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::ChargeHypothesis Class Referencefinal

Charge and momentum interpretation for arbitrarily charged particles. More...

#include <Acts/EventData/ChargeHypothesis.hpp>

Public Member Functions

constexpr ChargeHypothesis (float absoluteCharge) noexcept
 Construct with the magnitude of the input charge.
constexpr float absoluteCharge () const noexcept
 Get the absolute charge magnitude.
constexpr float extractCharge (double qOverP) const noexcept
 Extract the signed charge from q/p.
constexpr double extractMomentum (double qOverP) const noexcept
 Extract momentum magnitude from q/p.
constexpr bool operator== (const ChargeHypothesis &rhs) const noexcept=default
 Compare for equality.
constexpr double qOverP (double momentum, float signedQ) const noexcept
 Compute q/p from momentum and signed charge.

Detailed Description

Charge and momentum interpretation for arbitrarily charged particles.

Only a charge magnitude identical to zero is interpreted as representing a neutral particle. This avoids ambiguities that might arise from using an approximate comparison with an arbitrary epsilon.

Constructor & Destructor Documentation

◆ ChargeHypothesis()

Acts::ChargeHypothesis::ChargeHypothesis ( float absoluteCharge)
explicitconstexprnoexcept

Construct with the magnitude of the input charge.

Parameters
absoluteChargeThe absolute value of the charge magnitude

Member Function Documentation

◆ absoluteCharge()

float Acts::ChargeHypothesis::absoluteCharge ( ) const
constexprnoexcept

Get the absolute charge magnitude.

Returns
Absolute charge magnitude (0 for neutral particles)

◆ extractCharge()

float Acts::ChargeHypothesis::extractCharge ( double qOverP) const
constexprnoexcept

Extract the signed charge from q/p.

Parameters
qOverPCharge over momentum
Returns
Signed charge with correct magnitude (0 for neutral)

◆ extractMomentum()

double Acts::ChargeHypothesis::extractMomentum ( double qOverP) const
constexprnoexcept

Extract momentum magnitude from q/p.

Parameters
qOverPCharge over momentum
Returns
Momentum magnitude (handles both charged and neutral particles)

◆ operator==()

bool Acts::ChargeHypothesis::operator== ( const ChargeHypothesis & rhs) const
constexprdefaultnoexcept

Compare for equality.

Parameters
rhsThe ChargeHypothesis to compare to
Returns
True if the two ChargeHypothesis objects are equal, false otherwise

◆ qOverP()

double Acts::ChargeHypothesis::qOverP ( double momentum,
float signedQ ) const
constexprnoexcept

Compute q/p from momentum and signed charge.

Parameters
momentumParticle momentum magnitude
signedQSigned charge (must match stored charge magnitude)
Returns
Charge over momentum (handles both charged and neutral particles)