ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::GenericParticleHypothesis< charge_t > Class Template Reference

Particle hypothesis used in reconstruction. More...

#include <Acts/EventData/GenericParticleHypothesis.hpp>

Inheritance diagram for Acts::GenericParticleHypothesis< charge_t >:
[legend]

Public Types

using ChargeType = charge_t
 Type alias for charge type used in particle hypothesis.

Public Member Functions

template<typename other_charge_t>
constexpr GenericParticleHypothesis (const GenericParticleHypothesis< other_charge_t > &other)
 Copy from another charge hypothesis.
 GenericParticleHypothesis (PdgParticle absPdg)
 Creates a particle hypothesis using the absolute PDG.
constexpr GenericParticleHypothesis (PdgParticle absPdg, float mass, ChargeType chargeType)
 Creates a particle hypothesis using absolute PDG, mass and the charge type.
constexpr float absoluteCharge () const noexcept
 Get the hypothesized absolute charge.
constexpr PdgParticle absolutePdg () const noexcept
 Get the hypothesized absolute PDG.
constexpr const ChargeTypechargeType () const noexcept
 Get the hypothesized charge type.
template<typename T>
constexpr auto extractCharge (T qOverP) const noexcept
 Extracts the signed charge from the q over p track parameter using the charge hypothesis.
template<typename T>
constexpr auto extractMomentum (T qOverP) const noexcept
 Extracts the particle momentum from the q over p track parameter using the charge hypothesis.
constexpr float mass () const noexcept
 Get the hypothesized mass.
template<typename P, typename Q>
constexpr auto qOverP (P momentum, Q signedQ) const noexcept
 Calculate the q over p track parameter with the given absolute momentum and charge.
std::ostream & toStream (std::ostream &os) const
 Output stream representation of the particle hypothesis.

Detailed Description

template<ChargeConcept charge_t>
class Acts::GenericParticleHypothesis< charge_t >

Particle hypothesis used in reconstruction.

The reconstruction hypothesis consists of absolute PDG code, mass and absolute charge.

Member Typedef Documentation

◆ ChargeType

template<ChargeConcept charge_t>
using Acts::GenericParticleHypothesis< charge_t >::ChargeType = charge_t

Type alias for charge type used in particle hypothesis.

Constructor & Destructor Documentation

◆ GenericParticleHypothesis() [1/3]

template<ChargeConcept charge_t>
Acts::GenericParticleHypothesis< charge_t >::GenericParticleHypothesis ( PdgParticle absPdg,
float mass,
ChargeType chargeType )
constexpr

Creates a particle hypothesis using absolute PDG, mass and the charge type.

Parameters
absPdgthe absolute PDG
massthe particle mass
chargeTypethe type of charge

◆ GenericParticleHypothesis() [2/3]

template<ChargeConcept charge_t>
Acts::GenericParticleHypothesis< charge_t >::GenericParticleHypothesis ( PdgParticle absPdg)
explicit

Creates a particle hypothesis using the absolute PDG.

The mass and charge is looked up using findMass and findCharge. If the lookup fails an exception is thrown.

Parameters
absPdgthe absolute PDG

◆ GenericParticleHypothesis() [3/3]

template<ChargeConcept charge_t>
template<typename other_charge_t>
Acts::GenericParticleHypothesis< charge_t >::GenericParticleHypothesis ( const GenericParticleHypothesis< other_charge_t > & other)
explicitconstexpr

Copy from another charge hypothesis.

Parameters
otherThe other particle hypothesis to copy from

Member Function Documentation

◆ absoluteCharge()

template<ChargeConcept charge_t>
float Acts::GenericParticleHypothesis< charge_t >::absoluteCharge ( ) const
constexprnoexcept

Get the hypothesized absolute charge.

Returns
The absolute charge magnitude

◆ absolutePdg()

template<ChargeConcept charge_t>
PdgParticle Acts::GenericParticleHypothesis< charge_t >::absolutePdg ( ) const
constexprnoexcept

Get the hypothesized absolute PDG.

Returns
The absolute PDG particle identifier

◆ chargeType()

template<ChargeConcept charge_t>
const ChargeType & Acts::GenericParticleHypothesis< charge_t >::chargeType ( ) const
constexprnoexcept

Get the hypothesized charge type.

Returns
Reference to the charge type object

◆ extractCharge()

template<ChargeConcept charge_t>
template<typename T>
auto Acts::GenericParticleHypothesis< charge_t >::extractCharge ( T qOverP) const
constexprnoexcept

Extracts the signed charge from the q over p track parameter using the charge hypothesis.

Parameters
qOverPthe q over p track parameter.
Returns
The extracted signed charge

◆ extractMomentum()

template<ChargeConcept charge_t>
template<typename T>
auto Acts::GenericParticleHypothesis< charge_t >::extractMomentum ( T qOverP) const
constexprnoexcept

Extracts the particle momentum from the q over p track parameter using the charge hypothesis.

Parameters
qOverPthe q over p track parameter.
Returns
The extracted absolute momentum

◆ mass()

template<ChargeConcept charge_t>
float Acts::GenericParticleHypothesis< charge_t >::mass ( ) const
constexprnoexcept

Get the hypothesized mass.

Returns
The particle mass in natural units

◆ qOverP()

template<ChargeConcept charge_t>
template<typename P, typename Q>
auto Acts::GenericParticleHypothesis< charge_t >::qOverP ( P momentum,
Q signedQ ) const
constexprnoexcept

Calculate the q over p track parameter with the given absolute momentum and charge.

Parameters
momentumthe absolute momentum.
signedQthe signed charge.
Returns
The calculated charge over momentum ratio

◆ toStream()

template<ChargeConcept charge_t>
std::ostream & Acts::GenericParticleHypothesis< charge_t >::toStream ( std::ostream & os) const

Output stream representation of the particle hypothesis.

Parameters
osOutput stream to write to
Returns
Modified output stream for chaining