ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsFatras::Particle Class Reference

Simulation particle information and kinematic state. More...

#include <acts/blob/master/Fatras/include/ActsFatras/EventData/Particle.hpp>

+ Collaboration diagram for ActsFatras::Particle:

Public Types

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

Public Member Functions

 Particle ()=default
 Construct a default particle with invalid identity.
 
 Particle (Barcode particleId, Acts::PdgParticle pdg, Scalar charge, Scalar mass)
 
 Particle (Barcode particleId, Acts::PdgParticle pdg)
 
 Particle (const Particle &)=default
 
 Particle (Particle &&)=default
 
Particleoperator= (const Particle &)=default
 
Particleoperator= (Particle &&)=default
 
Particle withParticleId (Barcode particleId) const
 
ParticlesetProcess (ProcessType proc)
 Set the process type that generated this particle.
 
ParticlesetPosition4 (const Vector4 &pos4)
 
ParticlesetPosition4 (const Vector3 &position, Scalar time)
 Set the space-time position four-vector from three-position and time.
 
ParticlesetPosition4 (Scalar x, Scalar y, Scalar z, Scalar time)
 Set the space-time position four-vector from scalar components.
 
ParticlesetDirection (const Vector3 &direction)
 Set the direction three-vector.
 
ParticlesetDirection (Scalar dx, Scalar dy, Scalar dz)
 Set the direction three-vector from scalar components.
 
ParticlesetAbsMomentum (Scalar absMomentum)
 Set the absolute momentum.
 
ParticlecorrectEnergy (Scalar delta)
 
constexpr Barcode particleId () const
 Particle identifier within an event.
 
constexpr ProcessType process () const
 Which type of process generated this particle.
 
constexpr Acts::PdgParticle pdg () const
 PDG particle number that identifies the type.
 
constexpr Scalar charge () const
 Particle charge.
 
constexpr Scalar mass () const
 Particle mass.
 
constexpr const Vector4position4 () const
 
auto position () const
 Three-position, i.e. spatial coordinates without the time.
 
Scalar time () const
 Time coordinate.
 
Vector4 momentum4 () const
 
const Vector3unitDirection () const
 Unit three-direction, i.e. the normalized momentum three-vector.
 
Scalar transverseMomentum () const
 Absolute momentum in the x-y plane.
 
constexpr Scalar absMomentum () const
 Absolute momentum.
 
Scalar energy () const
 Total energy, i.e. norm of the four-momentum.
 
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.
 
constexpr ParticlesetMaterialPassed (Scalar pathX0, Scalar pathL0)
 
constexpr ParticlesetMaterialLimits (Scalar limitX0, Scalar limitL0)
 
constexpr Scalar pathInX0 () const
 The passed material measured in radiation lengths.
 
constexpr Scalar pathInL0 () const
 The passed material measured in interaction lengths.
 
constexpr Scalar pathLimitX0 () const
 The maximum radation length the particle is allowed to pass.
 
constexpr Scalar pathLimitL0 () const
 The maximum interaction length the particle is allowed to pass.
 

Private Attributes

Barcode m_particleId
 Particle identifier within the event.
 
ProcessType m_process = ProcessType::eUndefined
 Process type specifier.
 
Acts::PdgParticle m_pdg = Acts::PdgParticle::eInvalid
 PDG particle number.
 
Scalar m_charge = Scalar(0)
 
Scalar m_mass = Scalar(0)
 
Vector3 m_unitDirection = Vector3::UnitZ()
 
Scalar m_absMomentum = Scalar(0)
 
Vector4 m_position4 = Vector4::Zero()
 
Scalar m_pathX0 = Scalar(0)
 
Scalar m_pathL0 = Scalar(0)
 
Scalar m_limitX0 = std::numeric_limits<Scalar>::max()
 
Scalar m_limitL0 = std::numeric_limits<Scalar>::max()
 

Detailed Description

Simulation particle information and kinematic state.

Definition at line 23 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 23 of file Particle.hpp

Member Typedef Documentation

Definition at line 25 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 25 of file Particle.hpp

Definition at line 26 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 26 of file Particle.hpp

Definition at line 27 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 27 of file Particle.hpp

Constructor & Destructor Documentation

ActsFatras::Particle::Particle ( )
default

Construct a default particle with invalid identity.

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

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.

Definition at line 40 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 40 of file Particle.hpp

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.

Definition at line 13 of file Particle.cpp.

View newest version in sPHENIX GitHub at line 13 of file Particle.cpp

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

Member Function Documentation

constexpr Scalar ActsFatras::Particle::absMomentum ( ) const
inline

Absolute momentum.

Definition at line 161 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 161 of file Particle.hpp

References m_absMomentum.

Referenced by BOOST_DATA_TEST_CASE(), FW::ResPlotTool::fill(), ActsFatras::detail::Highland::operator()(), ActsFatras::BetheBloch::operator()(), ActsFatras::detail::GaussianMixture::operator()(), ActsFatras::detail::GeneralMixture::operator()(), ActsFatras::Casts::Pt::operator()(), ActsFatras::Casts::P::operator()(), setAbsMomentum(), and ActsFatras::ParticleSimulator< propagator_t, physics_list_t, hit_surface_selector_t >::simulate().

+ Here is the caller graph for this function:

Particle& ActsFatras::Particle::correctEnergy ( Scalar  delta)
inline

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.

Definition at line 113 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 113 of file Particle.hpp

References Acts::Test::delta, m_absMomentum, and m_mass.

Referenced by ActsFatras::BetheHeitler::operator()(), and ActsFatras::BetheBloch::operator()().

+ Here is the caller graph for this function:

Scalar ActsFatras::Particle::energy ( ) const
inline

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

Definition at line 163 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 163 of file Particle.hpp

References m_absMomentum, and m_mass.

Referenced by BOOST_DATA_TEST_CASE(), momentum4(), ActsFatras::BetheHeitler::operator()(), and ActsFatras::Casts::E::operator()().

+ Here is the caller graph for this function:

constexpr Scalar ActsFatras::Particle::mass ( ) const
inline

Particle mass.

Definition at line 132 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 132 of file Particle.hpp

References m_mass.

Referenced by ActsFatras::detail::Highland::operator()(), ActsFatras::BetheBloch::operator()(), ActsFatras::detail::GeneralMixture::operator()(), ActsFatras::detail::GaussianMixture::operator()(), ActsFatras::operator<<(), and ActsFatras::ParticleSimulator< propagator_t, physics_list_t, hit_surface_selector_t >::simulate().

+ Here is the caller graph for this function:

Vector4 ActsFatras::Particle::momentum4 ( ) const
inline

Energy-momentum four-vector.

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

Definition at line 145 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 145 of file Particle.hpp

References energy(), m_absMomentum, and m_unitDirection.

+ Here is the call graph for this function:

constexpr ActsFatras::Particle::operator bool ( ) const
inline

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

Definition at line 166 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 166 of file Particle.hpp

References m_absMomentum.

constexpr bool ActsFatras::Particle::operator! ( ) const
inline

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

Definition at line 168 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 168 of file Particle.hpp

References m_absMomentum.

Particle& ActsFatras::Particle::operator= ( const Particle )
default
Particle& ActsFatras::Particle::operator= ( Particle &&  )
default
constexpr Barcode ActsFatras::Particle::particleId ( ) const
inline

Particle identifier within an event.

Definition at line 124 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 124 of file Particle.hpp

References m_particleId.

Referenced by FW::detail::CompareParticleId::operator()(), ActsFatras::operator<<(), and withParticleId().

+ Here is the caller graph for this function:

constexpr Scalar ActsFatras::Particle::pathInL0 ( ) const
inline

The passed material measured in interaction lengths.

Definition at line 191 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 191 of file Particle.hpp

References m_pathL0.

Referenced by ActsFatras::PathLimitL0::operator()(), and ActsFatras::Interactor< generator_t, physics_list_t, hit_surface_selector_t >::operator()().

+ Here is the caller graph for this function:

constexpr Scalar ActsFatras::Particle::pathInX0 ( ) const
inline

The passed material measured in radiation lengths.

Definition at line 189 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 189 of file Particle.hpp

References m_pathX0.

Referenced by ActsFatras::PathLimitX0::operator()(), and ActsFatras::Interactor< generator_t, physics_list_t, hit_surface_selector_t >::operator()().

+ Here is the caller graph for this function:

constexpr Scalar ActsFatras::Particle::pathLimitL0 ( ) const
inline

The maximum interaction length the particle is allowed to pass.

Definition at line 195 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 195 of file Particle.hpp

References m_limitL0.

Referenced by ActsFatras::PathLimitL0::operator()().

+ Here is the caller graph for this function:

constexpr Scalar ActsFatras::Particle::pathLimitX0 ( ) const
inline

The maximum radation length the particle is allowed to pass.

Definition at line 193 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 193 of file Particle.hpp

References m_limitX0.

Referenced by ActsFatras::PathLimitX0::operator()().

+ Here is the caller graph for this function:

constexpr Acts::PdgParticle ActsFatras::Particle::pdg ( ) const
inline
auto ActsFatras::Particle::position ( ) const
inline

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

Definition at line 139 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 139 of file Particle.hpp

References m_position4.

Referenced by FW::ResPlotTool::fill(), ActsFatras::Casts::Vrho::operator()(), ActsFatras::Casts::Vz::operator()(), ActsFatras::Casts::AbsVz::operator()(), and ActsFatras::ParticleSimulator< propagator_t, physics_list_t, hit_surface_selector_t >::simulate().

+ Here is the caller graph for this function:

constexpr const Vector4& ActsFatras::Particle::position4 ( ) const
inline

Space-time position four-vector.

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

Definition at line 137 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 137 of file Particle.hpp

References m_position4.

constexpr ProcessType ActsFatras::Particle::process ( ) const
inline

Which type of process generated this particle.

Definition at line 126 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 126 of file Particle.hpp

References m_process.

Referenced by ActsFatras::operator<<().

+ Here is the caller graph for this function:

Particle& ActsFatras::Particle::setAbsMomentum ( Scalar  absMomentum)
inline

Set the absolute momentum.

Definition at line 104 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 104 of file Particle.hpp

References absMomentum(), and m_absMomentum.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_DATA_TEST_CASE(), Dataset::makeParticle(), FW::ParametricProcessGenerator::operator()(), FW::HepMC3Particle::particle(), and FW::CsvParticleReader::read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Set the direction three-vector.

Definition at line 90 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 90 of file Particle.hpp

References m_unitDirection.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_DATA_TEST_CASE(), Dataset::makeParticle(), ActsFatras::detail::Scattering< scattering_model_t >::operator()(), FW::ParametricProcessGenerator::operator()(), FW::HepMC3Particle::particle(), and FW::CsvParticleReader::read().

+ Here is the caller graph for this function:

Particle& ActsFatras::Particle::setDirection ( Scalar  dx,
Scalar  dy,
Scalar  dz 
)
inline

Set the direction three-vector from scalar components.

Definition at line 96 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 96 of file Particle.hpp

References dx, dy, dz, and m_unitDirection.

constexpr Particle& ActsFatras::Particle::setMaterialLimits ( Scalar  limitX0,
Scalar  limitL0 
)
inline

Set the material limits.

Parameters
limitX0maximum radiation lengths the particle can pass
limitL0maximum interaction lengths the particle can pass

Definition at line 183 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 183 of file Particle.hpp

References m_limitL0, and m_limitX0.

constexpr Particle& ActsFatras::Particle::setMaterialPassed ( Scalar  pathX0,
Scalar  pathL0 
)
inline

Set the material that the particle has passed.

Parameters
pathX0passed material measured in radiation lengths
pathL0passed thickness measured in interaction lengths

Definition at line 174 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 174 of file Particle.hpp

References m_pathL0, and m_pathX0.

Referenced by ActsFatras::Interactor< generator_t, physics_list_t, hit_surface_selector_t >::operator()().

+ Here is the caller graph for this function:

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

Set the space-time position four-vector.

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

Definition at line 71 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 71 of file Particle.hpp

References m_position4.

Referenced by Dataset::makeParticle(), FW::ParametricProcessGenerator::operator()(), and FW::CsvParticleReader::read().

+ Here is the caller graph for this function:

Particle& ActsFatras::Particle::setPosition4 ( const Vector3 position,
Scalar  time 
)
inline

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

Definition at line 76 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 76 of file Particle.hpp

References m_position4, and time().

+ Here is the call graph for this function:

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

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

Definition at line 82 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 82 of file Particle.hpp

References m_position4, time(), x, y, and z.

+ Here is the call graph for this function:

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

Set the process type that generated this particle.

Definition at line 67 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 67 of file Particle.hpp

References m_process.

Referenced by FW::CsvParticleReader::read().

+ Here is the caller graph for this function:

Scalar ActsFatras::Particle::time ( ) const
inline

Time coordinate.

Definition at line 141 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 141 of file Particle.hpp

References m_position4.

Referenced by FW::ResPlotTool::fill(), setPosition4(), and ActsFatras::ParticleSimulator< propagator_t, physics_list_t, hit_surface_selector_t >::simulate().

+ Here is the caller graph for this function:

Scalar ActsFatras::Particle::transverseMomentum ( ) const
inline

Absolute momentum in the x-y plane.

Definition at line 157 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 157 of file Particle.hpp

References m_absMomentum, m_unitDirection, and norm.

Referenced by FW::EffPlotTool::fill(), FW::FakeRatePlotTool::fill(), FW::TrackSummaryPlotTool::fill(), and FW::ResPlotTool::fill().

+ Here is the caller graph for this function:

const Vector3& ActsFatras::Particle::unitDirection ( ) const
inline

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

Definition at line 155 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 155 of file Particle.hpp

References m_unitDirection.

Referenced by FW::EffPlotTool::fill(), FW::FakeRatePlotTool::fill(), FW::TrackSummaryPlotTool::fill(), FW::ResPlotTool::fill(), ActsFatras::detail::Scattering< scattering_model_t >::operator()(), ActsFatras::Casts::Eta::operator()(), ActsFatras::Casts::AbsEta::operator()(), ActsFatras::Casts::Pt::operator()(), and ActsFatras::ParticleSimulator< propagator_t, physics_list_t, hit_surface_selector_t >::simulate().

+ Here is the caller graph for this function:

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

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.

Definition at line 60 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 60 of file Particle.hpp

References m_particleId, and particleId().

+ Here is the call graph for this function:

Member Data Documentation

Scalar ActsFatras::Particle::m_absMomentum = Scalar(0)
private

Definition at line 210 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 210 of file Particle.hpp

Referenced by absMomentum(), correctEnergy(), energy(), momentum4(), operator bool(), operator!(), setAbsMomentum(), and transverseMomentum().

Scalar ActsFatras::Particle::m_charge = Scalar(0)
private

Definition at line 206 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 206 of file Particle.hpp

Referenced by charge().

Scalar ActsFatras::Particle::m_limitL0 = std::numeric_limits<Scalar>::max()
private

Definition at line 223 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 223 of file Particle.hpp

Referenced by pathLimitL0(), and setMaterialLimits().

Scalar ActsFatras::Particle::m_limitX0 = std::numeric_limits<Scalar>::max()
private

Definition at line 222 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 222 of file Particle.hpp

Referenced by pathLimitX0(), and setMaterialLimits().

Scalar ActsFatras::Particle::m_mass = Scalar(0)
private

Definition at line 207 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 207 of file Particle.hpp

Referenced by correctEnergy(), energy(), and mass().

Barcode ActsFatras::Particle::m_particleId
private

Particle identifier within the event.

Definition at line 200 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 200 of file Particle.hpp

Referenced by particleId(), and withParticleId().

Scalar ActsFatras::Particle::m_pathL0 = Scalar(0)
private

Definition at line 221 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 221 of file Particle.hpp

Referenced by pathInL0(), and setMaterialPassed().

Scalar ActsFatras::Particle::m_pathX0 = Scalar(0)
private

Definition at line 220 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 220 of file Particle.hpp

Referenced by pathInX0(), and setMaterialPassed().

Acts::PdgParticle ActsFatras::Particle::m_pdg = Acts::PdgParticle::eInvalid
private

PDG particle number.

Definition at line 204 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 204 of file Particle.hpp

Referenced by pdg().

Vector4 ActsFatras::Particle::m_position4 = Vector4::Zero()
private

Definition at line 211 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 211 of file Particle.hpp

Referenced by position(), position4(), setPosition4(), and time().

ProcessType ActsFatras::Particle::m_process = ProcessType::eUndefined
private

Process type specifier.

Definition at line 202 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 202 of file Particle.hpp

Referenced by process(), and setProcess().

Vector3 ActsFatras::Particle::m_unitDirection = Vector3::UnitZ()
private

Definition at line 209 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 209 of file Particle.hpp

Referenced by momentum4(), setDirection(), transverseMomentum(), and unitDirection().


The documentation for this class was generated from the following files: