ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsFatras::Particle Class Reference

Particle identity information and kinematic state. More...

#include <ActsFatras/EventData/Particle.hpp>

Public Member Functions

 Particle ()=default
 Construct a default particle with invalid identity.
 Particle (Barcode particleId, Acts::PdgParticle pdg)
 Construct a particle at rest from a PDG particle number.
 Particle (Barcode particleId, Acts::PdgParticle pdg, double charge, double mass)
 Construct a particle at rest with explicit mass and charge.
 Particle (const Particle &)=default
 Copy constructor.
 Particle (Particle &&)=default
 Move constructor.
double absoluteCharge () const
 Particle absolute charge.
double absoluteMomentum () const
 Absolute momentum.
Acts::PdgParticle absolutePdg () const
 Absolute PDG particle number that identifies the type.
Acts::Result< Acts::BoundTrackParametersboundParameters (const Acts::GeometryContext &gctx) const
 Bound track parameters.
double charge () const
 Particle charge.
ParticlecorrectEnergy (double delta)
 Change the energy by the given amount.
Acts::BoundTrackParameters curvilinearParameters () const
const Acts::Vector3direction () const
 Unit three-direction, i.e.
double energy () const
 Total energy, i.e.
Acts::Vector4 fourMomentum () const
 Energy-momentum four-vector.
const Acts::Vector4fourPosition () const
 Space-time position four-vector.
bool hasReferenceSurface () const
 Check if the particle has a reference surface.
Acts::ParticleHypothesis hypothesis () const
 Particle hypothesis.
bool isAlive () const
 Check if the particle is alive, i.e.
bool isSecondary () const
 Check if this is a secondary particle.
double mass () const
 Particle mass.
Acts::Vector3 momentum () const
 Absolute momentum.
std::uint32_t numberOfHits () const
 Number of hits.
Particleoperator= (const Particle &)=default
 Copy assignment operator.
Particleoperator= (Particle &&)=default
 Move assignment operator.
ParticleOutcome outcome () const
 Particle outcome.
Barcode particleId () const
 Particle identifier within an event.
double pathInL0 () const
 Accumulated path within material measured in interaction lengths.
double pathInX0 () const
 Accumulated path within material measured in radiation lengths.
Acts::PdgParticle pdg () const
 PDG particle number that identifies the type.
double phi () const
 Azimuthal angle.
auto position () const
 Three-position, i.e.
ProcessType process () const
 Which type of process generated this particle.
double properTime () const
 Proper time in the particle rest frame.
double qOverP () const
 Particl qOverP.
const Acts::SurfacereferenceSurface () const
 Reference surface.
ParticlesetAbsoluteMomentum (double absMomentum)
 Set the absolute momentum.
Particle setCharge (double charge)
 Set the charge.
ParticlesetDirection (const Acts::Vector3 &direction)
 Set the direction three-vector.
ParticlesetDirection (double dx, double dy, double dz)
 Set the direction three-vector from scalar components.
Particle setMass (double mass)
 Set the mass.
ParticlesetMaterialPassed (double pathInX0, double pathInL0)
 Set the accumulated material measured in radiation/interaction lengths.
ParticlesetNumberOfHits (std::uint32_t nHits)
 Set the number of hits.
ParticlesetOutcome (ParticleOutcome outcome)
 Set the outcome of particle.
ParticlesetParticleId (Barcode barcode)
 Set the particle ID.
Particle setPdg (Acts::PdgParticle pdg)
 Set the pdg.
ParticlesetPosition4 (const Acts::Vector3 &position, double time)
 Set the space-time position four-vector from three-position and time.
ParticlesetPosition4 (const Acts::Vector4 &pos4)
 Set the space-time position four-vector.
ParticlesetPosition4 (double x, double y, double z, double time)
 Set the space-time position four-vector from scalar components.
ParticlesetProcess (ProcessType proc)
 Set the process type that generated this particle.
ParticlesetProperTime (double properTime)
 Set the proper time in the particle rest frame.
ParticlesetReferenceSurface (const Acts::Surface *surface)
 Set the reference surface.
double theta () const
 Polar angle.
double time () const
 Time coordinate.
double transverseMomentum () const
 Absolute momentum in the x-y plane.
Particle withParticleId (Barcode particleId) const
 Construct a new particle with a new identifier but same kinematics.

Detailed Description

Particle identity information and kinematic state.

Also stores some simulation-specific properties.

Constructor & Destructor Documentation

◆ Particle() [1/5]

ActsFatras::Particle::Particle ( )
default

Construct a default particle with invalid identity.

◆ Particle() [2/5]

ActsFatras::Particle::Particle ( Barcode particleId,
Acts::PdgParticle pdg,
double charge,
double mass )

Construct a particle at rest with explicit mass and charge.

Parameters
particleIdParticle identifier within an event
pdgPDG id
chargeParticle charge in native units
massParticle mass in native units
Warning
It is the users responsibility that charge and mass match the PDG particle number.

◆ Particle() [3/5]

ActsFatras::Particle::Particle ( Barcode particleId,
Acts::PdgParticle pdg )

Construct a particle at rest from a PDG particle number.

Parameters
particleIdParticle identifier within an event
pdgPDG particle number

Charge and mass are retrieved from the particle data table.

◆ Particle() [4/5]

ActsFatras::Particle::Particle ( const Particle & )
default

Copy constructor.

◆ Particle() [5/5]

ActsFatras::Particle::Particle ( Particle && )
default

Move constructor.

Member Function Documentation

◆ absoluteCharge()

double ActsFatras::Particle::absoluteCharge ( ) const

Particle absolute charge.

Returns
The absolute particle charge (positive value)

◆ absoluteMomentum()

double ActsFatras::Particle::absoluteMomentum ( ) const

Absolute momentum.

Returns
The absolute momentum magnitude

◆ absolutePdg()

Acts::PdgParticle ActsFatras::Particle::absolutePdg ( ) const

Absolute PDG particle number that identifies the type.

Returns
The absolute PDG particle identifier (positive value)

◆ boundParameters()

Acts::Result< Acts::BoundTrackParameters > ActsFatras::Particle::boundParameters ( const Acts::GeometryContext & gctx) const

Bound track parameters.

Parameters
gctxGeometry context for coordinate transformations
Returns
Result containing bound track parameters or error if no reference surface

◆ charge()

double ActsFatras::Particle::charge ( ) const

Particle charge.

Returns
The particle charge in native units

◆ correctEnergy()

Particle & ActsFatras::Particle::correctEnergy ( double delta)

Change the energy by the given amount.

Energy loss corresponds to a negative change. If the updated energy would result in an unphysical value, the particle is put to rest, i.e. its absolute momentum is set to zero.

Parameters
deltaEnergy change (negative for energy loss)
Returns
Reference to this particle for method chaining

◆ curvilinearParameters()

Acts::BoundTrackParameters ActsFatras::Particle::curvilinearParameters ( ) const
Returns
Curvilinear track parameters representation

◆ direction()

const Acts::Vector3 & ActsFatras::Particle::direction ( ) const

Unit three-direction, i.e.

the normalized momentum three-vector.

Returns
Reference to the normalized direction vector

◆ energy()

double ActsFatras::Particle::energy ( ) const

Total energy, i.e.

norm of the four-momentum.

Returns
The total energy calculated from mass and momentum

◆ fourMomentum()

Acts::Vector4 ActsFatras::Particle::fourMomentum ( ) const

Energy-momentum four-vector.

Returns
Four-dimensional momentum vector (px, py, pz, E)

◆ fourPosition()

const Acts::Vector4 & ActsFatras::Particle::fourPosition ( ) const

Space-time position four-vector.

Returns
Reference to the four-dimensional position vector (x, y, z, t)

◆ hasReferenceSurface()

bool ActsFatras::Particle::hasReferenceSurface ( ) const

Check if the particle has a reference surface.

Returns
True if reference surface is set, false otherwise

◆ hypothesis()

Acts::ParticleHypothesis ActsFatras::Particle::hypothesis ( ) const

Particle hypothesis.

Returns
Particle hypothesis containing PDG, mass, and charge information

◆ isAlive()

bool ActsFatras::Particle::isAlive ( ) const

Check if the particle is alive, i.e.

is not at rest.

Returns
True if particle has non-zero momentum, false otherwise

◆ isSecondary()

bool ActsFatras::Particle::isSecondary ( ) const

Check if this is a secondary particle.

Returns
True if particle is a secondary (has non-zero vertex secondary, generation, or sub-particle), false otherwise

◆ mass()

double ActsFatras::Particle::mass ( ) const

Particle mass.

Returns
The particle mass in native units

◆ momentum()

Acts::Vector3 ActsFatras::Particle::momentum ( ) const

Absolute momentum.

Returns
Three-dimensional momentum vector

◆ numberOfHits()

std::uint32_t ActsFatras::Particle::numberOfHits ( ) const

Number of hits.

Returns
The number of hits associated with this particle

◆ operator=() [1/2]

Particle & ActsFatras::Particle::operator= ( const Particle & )
default

Copy assignment operator.

Returns
Reference to this particle after copying

◆ operator=() [2/2]

Particle & ActsFatras::Particle::operator= ( Particle && )
default

Move assignment operator.

Returns
Reference to this particle after moving

◆ outcome()

ParticleOutcome ActsFatras::Particle::outcome ( ) const

Particle outcome.

Returns
The outcome status of this particle

◆ particleId()

Barcode ActsFatras::Particle::particleId ( ) const

Particle identifier within an event.

Returns
The unique particle identifier barcode

◆ pathInL0()

double ActsFatras::Particle::pathInL0 ( ) const

Accumulated path within material measured in interaction lengths.

Returns
The accumulated path in interaction lengths

◆ pathInX0()

double ActsFatras::Particle::pathInX0 ( ) const

Accumulated path within material measured in radiation lengths.

Returns
The accumulated path in radiation lengths

◆ pdg()

Acts::PdgParticle ActsFatras::Particle::pdg ( ) const

PDG particle number that identifies the type.

Returns
The PDG particle identifier

◆ phi()

double ActsFatras::Particle::phi ( ) const

Azimuthal angle.

Returns
The azimuthal angle (phi) in radians

◆ position()

auto ActsFatras::Particle::position ( ) const

Three-position, i.e.

spatial coordinates without the time.

Returns
Three-dimensional position vector (x, y, z)

◆ process()

ProcessType ActsFatras::Particle::process ( ) const

Which type of process generated this particle.

Returns
The process type that generated this particle

◆ properTime()

double ActsFatras::Particle::properTime ( ) const

Proper time in the particle rest frame.

Returns
The proper time in the rest frame

◆ qOverP()

double ActsFatras::Particle::qOverP ( ) const

Particl qOverP.

Returns
The charge over momentum ratio

◆ referenceSurface()

const Acts::Surface * ActsFatras::Particle::referenceSurface ( ) const

Reference surface.

Returns
Pointer to the reference surface, or nullptr if not set

◆ setAbsoluteMomentum()

Particle & ActsFatras::Particle::setAbsoluteMomentum ( double absMomentum)

Set the absolute momentum.

Parameters
absMomentumAbsolute momentum magnitude
Returns
Reference to this particle for method chaining

◆ setCharge()

Particle ActsFatras::Particle::setCharge ( double charge)

Set the charge.

Parameters
chargeParticle charge in native units
Returns
Particle instance with updated charge

◆ setDirection() [1/2]

Particle & ActsFatras::Particle::setDirection ( const Acts::Vector3 & direction)

Set the direction three-vector.

Parameters
directionThree-dimensional direction vector (will be normalized)
Returns
Reference to this particle for method chaining

◆ setDirection() [2/2]

Particle & ActsFatras::Particle::setDirection ( double dx,
double dy,
double dz )

Set the direction three-vector from scalar components.

Parameters
dxX component of direction
dyY component of direction
dzZ component of direction
Returns
Reference to this particle for method chaining

◆ setMass()

Particle ActsFatras::Particle::setMass ( double mass)

Set the mass.

Parameters
massParticle mass in native units
Returns
Particle instance with updated mass

◆ setMaterialPassed()

Particle & ActsFatras::Particle::setMaterialPassed ( double pathInX0,
double pathInL0 )

Set the accumulated material measured in radiation/interaction lengths.

Parameters
pathInX0accumulated material measured in radiation lengths
pathInL0accumulated material measured in interaction lengths
Returns
Reference to this particle for method chaining

◆ setNumberOfHits()

Particle & ActsFatras::Particle::setNumberOfHits ( std::uint32_t nHits)

Set the number of hits.

Parameters
nHitsnumber of hits
Returns
Reference to this particle for method chaining

◆ setOutcome()

Particle & ActsFatras::Particle::setOutcome ( ParticleOutcome outcome)

Set the outcome of particle.

Parameters
outcomeoutcome code
Returns
Reference to this particle for method chaining

◆ setParticleId()

Particle & ActsFatras::Particle::setParticleId ( Barcode barcode)

Set the particle ID.

Parameters
barcodeNew particle identifier barcode
Returns
Reference to this particle for method chaining

◆ setPdg()

Particle ActsFatras::Particle::setPdg ( Acts::PdgParticle pdg)

Set the pdg.

Parameters
pdgPDG particle identifier
Returns
Particle instance with updated PDG identifier

◆ setPosition4() [1/3]

Particle & ActsFatras::Particle::setPosition4 ( const Acts::Vector3 & position,
double time )

Set the space-time position four-vector from three-position and time.

Parameters
positionThree-dimensional spatial position vector
timeTime coordinate
Returns
Reference to this particle for method chaining

◆ setPosition4() [2/3]

Particle & ActsFatras::Particle::setPosition4 ( const Acts::Vector4 & pos4)

Set the space-time position four-vector.

Parameters
pos4Four-vector containing spatial position and time
Returns
Reference to this particle for method chaining

◆ setPosition4() [3/3]

Particle & ActsFatras::Particle::setPosition4 ( double x,
double y,
double z,
double time )

Set the space-time position four-vector from scalar components.

Parameters
xX coordinate
yY coordinate
zZ coordinate
timeTime coordinate
Returns
Reference to this particle for method chaining

◆ setProcess()

Particle & ActsFatras::Particle::setProcess ( ProcessType proc)

Set the process type that generated this particle.

Parameters
procProcess type that generated this particle
Returns
Reference to this particle for method chaining

◆ setProperTime()

Particle & ActsFatras::Particle::setProperTime ( double properTime)

Set the proper time in the particle rest frame.

Parameters
properTimepassed proper time in the rest frame
Returns
Reference to this particle for method chaining

◆ setReferenceSurface()

Particle & ActsFatras::Particle::setReferenceSurface ( const Acts::Surface * surface)

Set the reference surface.

Parameters
surfaceReference surface for bound track parameters
Returns
Reference to this particle for method chaining

◆ theta()

double ActsFatras::Particle::theta ( ) const

Polar angle.

Returns
The polar angle (theta) in radians

◆ time()

double ActsFatras::Particle::time ( ) const

Time coordinate.

Returns
The time coordinate value

◆ transverseMomentum()

double ActsFatras::Particle::transverseMomentum ( ) const

Absolute momentum in the x-y plane.

Returns
The transverse momentum magnitude

◆ withParticleId()

Particle ActsFatras::Particle::withParticleId ( Barcode particleId) const

Construct a new particle with a new identifier but same kinematics.

Parameters
particleIdNew particle identifier to assign
Returns
New particle instance with updated identifier but same kinematics
Note
This is intentionally not a regular setter. The particle id is used to identify the whole particle. Setting it on an existing particle is usually a mistake.