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

Particle hypothesis used in reconstruction. More...

#include <Acts/EventData/ParticleHypothesis.hpp>

Public Member Functions

constexpr ParticleHypothesis (PdgParticle absPdg, float mass, ChargeHypothesis charge, std::optional< double > momentum=std::nullopt)
 Creates a particle hypothesis using absolute PDG, mass and the charge type.
constexpr ParticleHypothesis (PdgParticle absPdg, float mass, float absCharge, std::optional< double > momentum=std::nullopt)
 Creates a particle hypothesis using absolute PDG, mass and the charge type.
 ParticleHypothesis (PdgParticle absPdg, std::optional< double > momentum=std::nullopt)
 Creates a particle hypothesis using the absolute PDG.
float absoluteCharge () const noexcept
 Get the hypothesized absolute charge.
constexpr PdgParticle absolutePdg () const noexcept
 Get the hypothesized absolute PDG.
constexpr const ChargeHypothesischarge () const noexcept
 Get the hypothesized charge.
constexpr float extractCharge (double qOverP) const noexcept
 Extracts the signed charge from the q over p track parameter using the charge hypothesis.
constexpr double extractMomentum (double qOverP) const noexcept
 Extracts the particle momentum from the q over p track parameter using the charge hypothesis.
bool hasMomentumHypothesis () const noexcept
 Check if the particle hypothesis has a hypothesized momentum.
constexpr float mass () const noexcept
 Get the hypothesized mass.
double momentumHypothesis () const
 Get the hypothesized momentum.
constexpr double qOverP (double momentum, float 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.
ParticleHypothesis withAlteredAbsoluteCharge (float absoluteCharge) const
 Create a new particle hypothesis with the same absolute PDG and mass but a different charge.
ParticleHypothesis withAlteredMass (float mass) const
 Create a new particle hypothesis with the same absolute PDG and charge but a different mass.
ParticleHypothesis withAlteredPdg (PdgParticle absPdg) const
 Create a new particle hypothesis with the same mass and charge but a different absolute PDG.
ParticleHypothesis withMomentumHypothesis (double momentum) const
 Create a new particle hypothesis with the same absolute PDG and mass but a different momentum hypothesis.
ParticleHypothesis withMomentumHypothesis (std::optional< double > momentum) const
 Create a new particle hypothesis with the same absolute PDG and mass but a different momentum hypothesis.
ParticleHypothesis withoutMomentumHypothesis () const
 Create a new particle hypothesis with the same absolute PDG and mass but no momentum hypothesis.

Static Public Member Functions

static ParticleHypothesis chargedGeantino ()
 Create a charged geantino particle hypothesis with unit charge.
static ParticleHypothesis chargedGeantino (float absoluteCharge)
 Create a charged geantino particle hypothesis with custom charge.
static ParticleHypothesis electron ()
 Create an electron particle hypothesis.
static ParticleHypothesis geantino ()
 Create a neutral geantino particle hypothesis (massless neutral particle).
static ParticleHypothesis kaon ()
 Create a charged kaon particle hypothesis.
static ParticleHypothesis muon ()
 Create a muon particle hypothesis.
static ParticleHypothesis photon ()
 Create a photon particle hypothesis.
static ParticleHypothesis pion ()
 Create a charged pion particle hypothesis.
static ParticleHypothesis pion0 ()
 Create a neutral pion particle hypothesis.
static ParticleHypothesis pionLike (float absoluteCharge)
 Create a pion-like particle hypothesis with custom charge.
static ParticleHypothesis proton ()
 Create a proton particle hypothesis.

Detailed Description

Particle hypothesis used in reconstruction.

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

Constructor & Destructor Documentation

◆ ParticleHypothesis() [1/3]

Acts::ParticleHypothesis::ParticleHypothesis ( PdgParticle absPdg,
float mass,
float absCharge,
std::optional< double > momentum = std::nullopt )
constexpr

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

Parameters
absPdgthe absolute PDG
massthe particle mass
absChargethe absolute charge
momentumthe optional particle momentum

◆ ParticleHypothesis() [2/3]

Acts::ParticleHypothesis::ParticleHypothesis ( PdgParticle absPdg,
float mass,
ChargeHypothesis charge,
std::optional< double > momentum = std::nullopt )
constexpr

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

Parameters
absPdgthe absolute PDG
massthe particle mass
chargethe charge type
momentumthe optional particle momentum

◆ ParticleHypothesis() [3/3]

Acts::ParticleHypothesis::ParticleHypothesis ( PdgParticle absPdg,
std::optional< double > momentum = std::nullopt )
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
momentumthe optional particle momentum

Member Function Documentation

◆ absoluteCharge()

float Acts::ParticleHypothesis::absoluteCharge ( ) const
nodiscardnoexcept

Get the hypothesized absolute charge.

Returns
The absolute charge magnitude

◆ absolutePdg()

PdgParticle Acts::ParticleHypothesis::absolutePdg ( ) const
nodiscardconstexprnoexcept

Get the hypothesized absolute PDG.

Returns
The absolute PDG particle identifier

◆ charge()

const ChargeHypothesis & Acts::ParticleHypothesis::charge ( ) const
nodiscardconstexprnoexcept

Get the hypothesized charge.

Returns
Reference to the charge type object

◆ chargedGeantino() [1/2]

ParticleHypothesis Acts::ParticleHypothesis::chargedGeantino ( )
staticnodiscard

Create a charged geantino particle hypothesis with unit charge.

Returns
Charged geantino particle hypothesis with any charge type

◆ chargedGeantino() [2/2]

ParticleHypothesis Acts::ParticleHypothesis::chargedGeantino ( float absoluteCharge)
staticnodiscard

Create a charged geantino particle hypothesis with custom charge.

Parameters
absoluteChargeThe absolute charge value
Returns
Charged geantino particle hypothesis with any charge type

◆ electron()

ParticleHypothesis Acts::ParticleHypothesis::electron ( )
staticnodiscard

Create an electron particle hypothesis.

Returns
Electron particle hypothesis with any charge type

◆ extractCharge()

float Acts::ParticleHypothesis::extractCharge ( double qOverP) const
nodiscardconstexprnoexcept

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()

double Acts::ParticleHypothesis::extractMomentum ( double qOverP) const
nodiscardconstexprnoexcept

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

◆ geantino()

ParticleHypothesis Acts::ParticleHypothesis::geantino ( )
staticnodiscard

Create a neutral geantino particle hypothesis (massless neutral particle).

Returns
Neutral geantino particle hypothesis with any charge type

◆ hasMomentumHypothesis()

bool Acts::ParticleHypothesis::hasMomentumHypothesis ( ) const
nodiscardnoexcept

Check if the particle hypothesis has a hypothesized momentum.

Returns
True if a momentum hypothesis is present, false otherwise

◆ kaon()

ParticleHypothesis Acts::ParticleHypothesis::kaon ( )
staticnodiscard

Create a charged kaon particle hypothesis.

Returns
Charged kaon particle hypothesis with any charge type

◆ mass()

float Acts::ParticleHypothesis::mass ( ) const
nodiscardconstexprnoexcept

Get the hypothesized mass.

Returns
The particle mass

◆ momentumHypothesis()

double Acts::ParticleHypothesis::momentumHypothesis ( ) const
nodiscard

Get the hypothesized momentum.

Returns
The particle momentum

◆ muon()

ParticleHypothesis Acts::ParticleHypothesis::muon ( )
staticnodiscard

Create a muon particle hypothesis.

Returns
Muon particle hypothesis with any charge type

◆ photon()

ParticleHypothesis Acts::ParticleHypothesis::photon ( )
staticnodiscard

Create a photon particle hypothesis.

Returns
Photon particle hypothesis with any charge type

◆ pion()

ParticleHypothesis Acts::ParticleHypothesis::pion ( )
staticnodiscard

Create a charged pion particle hypothesis.

Returns
Charged pion particle hypothesis with any charge type

◆ pion0()

ParticleHypothesis Acts::ParticleHypothesis::pion0 ( )
staticnodiscard

Create a neutral pion particle hypothesis.

Returns
Neutral pion particle hypothesis with any charge type

◆ pionLike()

ParticleHypothesis Acts::ParticleHypothesis::pionLike ( float absoluteCharge)
staticnodiscard

Create a pion-like particle hypothesis with custom charge.

Parameters
absoluteChargeThe absolute charge value
Returns
Pion-like particle hypothesis with any charge type

◆ proton()

ParticleHypothesis Acts::ParticleHypothesis::proton ( )
staticnodiscard

Create a proton particle hypothesis.

Returns
Proton particle hypothesis with any charge type

◆ qOverP()

double Acts::ParticleHypothesis::qOverP ( double momentum,
float signedQ ) const
nodiscardconstexprnoexcept

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()

std::ostream & Acts::ParticleHypothesis::toStream ( std::ostream & os) const

Output stream representation of the particle hypothesis.

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

◆ withAlteredAbsoluteCharge()

ParticleHypothesis Acts::ParticleHypothesis::withAlteredAbsoluteCharge ( float absoluteCharge) const
nodiscard

Create a new particle hypothesis with the same absolute PDG and mass but a different charge.

Parameters
absoluteChargeThe new absolute charge value
Returns
A new ParticleHypothesis with the updated charge

◆ withAlteredMass()

ParticleHypothesis Acts::ParticleHypothesis::withAlteredMass ( float mass) const
nodiscard

Create a new particle hypothesis with the same absolute PDG and charge but a different mass.

Parameters
massThe new mass value
Returns
A new ParticleHypothesis with the updated mass

◆ withAlteredPdg()

ParticleHypothesis Acts::ParticleHypothesis::withAlteredPdg ( PdgParticle absPdg) const
nodiscard

Create a new particle hypothesis with the same mass and charge but a different absolute PDG.

Parameters
absPdgThe new absolute PDG value
Returns
A new ParticleHypothesis with the updated absolute PDG

◆ withMomentumHypothesis() [1/2]

ParticleHypothesis Acts::ParticleHypothesis::withMomentumHypothesis ( double momentum) const
nodiscard

Create a new particle hypothesis with the same absolute PDG and mass but a different momentum hypothesis.

Parameters
momentumThe new momentum hypothesis value
Returns
A new ParticleHypothesis with the updated momentum

◆ withMomentumHypothesis() [2/2]

ParticleHypothesis Acts::ParticleHypothesis::withMomentumHypothesis ( std::optional< double > momentum) const
nodiscard

Create a new particle hypothesis with the same absolute PDG and mass but a different momentum hypothesis.

Parameters
momentumThe new optional momentum hypothesis value
Returns
A new ParticleHypothesis with the updated momentum

◆ withoutMomentumHypothesis()

ParticleHypothesis Acts::ParticleHypothesis::withoutMomentumHypothesis ( ) const
nodiscard

Create a new particle hypothesis with the same absolute PDG and mass but no momentum hypothesis.

Returns
A new ParticleHypothesis with no momentum hypothesis