Class Particle

Class Documentation

class ActsFatras::Particle

Simulation particle information and kinematic state.

Public Types

using Scalar = double
using Vector3 = Acts::ActsVector<Scalar, 3>
using Vector4 = Acts::ActsVector<Scalar, 4>

Public Functions

Particle() = default

Construct a default particle with invalid identity.

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

Construct a particle at rest with explicit mass and charge.

Warning

It is the users responsibility that charge and mass match the PDG particle number.

Parameters
  • particleId: Particle identifier within an event

  • pdg: PDG id

  • charge: Particle charge in native units

  • mass: Particle mass in native units

Particle(Barcode particleId, Acts::PdgParticle pdg)

Construct a particle at rest from a PDG particle number.

Charge and mass are retrieved from the particle data table.

Parameters
  • particleId: Particle identifier within an event

  • pdg: PDG particle number

Particle(const Particle&) = default
Particle(Particle&&) = default
constexpr Scalar absMomentum() const

Absolute momentum.

constexpr Scalar charge() const

Particle charge.

Particle &correctEnergy(Scalar 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.

Scalar energy() const

Total energy, i.e. norm of the four-momentum.

constexpr Scalar mass() const

Particle mass.

Vector4 momentum4() const

Energy-momentum four-vector.

The component order is [px,py,pz,E].

constexpr operator bool() const

Check if the particle is alive, i.e. is not at rest.

constexpr bool operator!() const

Check if the particle is dead, i.e is at rest.

Particle &operator=(const Particle&) = default
Particle &operator=(Particle&&) = default
constexpr Barcode particleId() const

Particle identifier within an event.

constexpr Scalar pathInL0() const

The passed material measured in interaction lengths.

constexpr Scalar pathInX0() const

The passed material measured in radiation lengths.

constexpr Scalar pathLimitL0() const

The maximum interaction length the particle is allowed to pass.

constexpr Scalar pathLimitX0() const

The maximum radation length the particle is allowed to pass.

constexpr Acts::PdgParticle pdg() const

PDG particle number that identifies the type.

auto position() const

Three-position, i.e. spatial coordinates without the time.

constexpr const Vector4 &position4() const

Space-time position four-vector.

The component order is [x,y,z,t].

constexpr ProcessType process() const

Which type of process generated this particle.

Particle &setAbsMomentum(Scalar absMomentum)

Set the absolute momentum.

Particle &setDirection(const Vector3 &direction)

Set the direction three-vector.

Particle &setDirection(Scalar dx, Scalar dy, Scalar dz)

Set the direction three-vector from scalar components.

constexpr Particle &setMaterialLimits(Scalar limitX0, Scalar limitL0)

Set the material limits.

Parameters
  • limitX0: maximum radiation lengths the particle can pass

  • limitL0: maximum interaction lengths the particle can pass

constexpr Particle &setMaterialPassed(Scalar pathX0, Scalar pathL0)

Set the material that the particle has passed.

Parameters
  • pathX0: passed material measured in radiation lengths

  • pathL0: passed thickness measured in interaction lengths

Particle &setPosition4(const Vector4 &pos4)

Set the space-time position four-vector.

The component order is [x,y,z,t].

Particle &setPosition4(const Vector3 &position, Scalar time)

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

Particle &setPosition4(Scalar x, Scalar y, Scalar z, Scalar time)

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

Particle &setProcess(ProcessType proc)

Set the process type that generated this particle.

Scalar time() const

Time coordinate.

Scalar transverseMomentum() const

Absolute momentum in the x-y plane.

const Vector3 &unitDirection() const

Unit three-direction, i.e. the normalized momentum three-vector.

Particle withParticleId(Barcode particleId) const

Construct a new particle with a new 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.