File GenericParticleHypothesis.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

template<ACTS_CONCEPT charge_t(ChargeConcept)>
class GenericParticleHypothesis
#include <Acts/EventData/GenericParticleHypothesis.hpp>

Particle hypothesis used in reconstruction.

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

Public Types

using ChargeType = charge_t

Public Functions

template<typename other_charge_t>
inline constexpr GenericParticleHypothesis(const GenericParticleHypothesis<other_charge_t> &other)

Copy from another charge hypothesis.

Note

This enables implicit conversion.

inline GenericParticleHypothesis(PdgParticle absPdg)

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

absPdg – the absolute PDG

inline constexpr GenericParticleHypothesis(PdgParticle absPdg, float mass, ChargeType chargeType)

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

Parameters
  • absPdg – the absolute PDG

  • mass – the particle mass

  • chargeType – the type of charge

inline constexpr float absoluteCharge() const noexcept

Get the hypothesized absolute charge.

inline constexpr PdgParticle absolutePdg() const noexcept

Get the hypothesized absolute PDG.

inline constexpr const ChargeType &chargeType() const noexcept

Get the hypothesized charge type.

template<typename T>
inline constexpr auto extractCharge(T qOverP) const noexcept

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

Parameters

qOverP – the q over p track parameter.

template<typename T>
inline constexpr auto extractMomentum(T qOverP) const noexcept

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

Parameters

qOverP – the q over p track parameter.

inline constexpr float mass() const noexcept

Get the hypothesized mass.

template<typename P, typename Q>
inline constexpr auto qOverP(P momentum, Q signedQ) const noexcept

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

Parameters
  • momentum – the absolute momentum.

  • signedQ – the signed charge.

inline std::ostream &toStream(std::ostream &os) const

Private Members

PdgParticle m_absPdg
ChargeType m_chargeType
float m_mass

Friends

inline friend bool operator!=(const GenericParticleHypothesis<ChargeType> &lhs, const GenericParticleHypothesis<ChargeType> &rhs)
inline friend std::ostream &operator<<(std::ostream &os, const GenericParticleHypothesis &particleHypothesis)
inline friend bool operator==(const GenericParticleHypothesis<ChargeType> &lhs, const GenericParticleHypothesis<ChargeType> &rhs)