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/sPHENIX/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)
 Set the space-time position four-vector.
 
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
 Space-time position four-vector.
 
auto position () const
 Three-position, i.e. spatial coordinates without the time.
 
Scalar time () const
 Time coordinate.
 
Vector4 momentum4 () const
 Energy-momentum four-vector.
 
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

using ActsFatras::Particle::Scalar = double

Definition at line 25 of file Particle.hpp.

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

using ActsFatras::Particle::Vector3 = Acts::ActsVector<Scalar, 3>

Definition at line 26 of file Particle.hpp.

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

using ActsFatras::Particle::Vector4 = Acts::ActsVector<Scalar, 4>

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
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 111 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 111 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 157 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 157 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 130 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 130 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.

Definition at line 139 of file Particle.hpp.

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

References Acts::eEnergy, Acts::eMom0, Acts::eMom1, Acts::eMom2, energy(), Acts::ePos0, Acts::ePos1, Acts::ePos2, 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 160 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 160 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 162 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 162 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 122 of file Particle.hpp.

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

References m_particleId.

Referenced by ActsExamples::detail::CompareParticleId::operator()(), ActsExamples::detail::PrimaryVertexIdGetter::operator()(), ActsExamples::detail::SecondaryVertexIdGetter::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 185 of file Particle.hpp.

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

References m_pathL0.

Referenced by ActsFatras::PathLimitL0::operator()(), and ActsFatras::detail::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 183 of file Particle.hpp.

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

References m_pathX0.

Referenced by ActsFatras::PathLimitX0::operator()(), and ActsFatras::detail::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 189 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 189 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 187 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 187 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 135 of file Particle.hpp.

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

References Acts::ePos0, and m_position4.

Referenced by ActsExamples::ResPlotTool::fill(), ActsFatras::Casts::Vrho::operator()(), ActsFatras::Casts::Vz::operator()(), and ActsFatras::Casts::AbsVz::operator()().

+ Here is the caller graph for this function:

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

Space-time position four-vector.

Definition at line 133 of file Particle.hpp.

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

References m_position4.

Referenced by ActsFatras::ParticleSimulator< propagator_t, physics_list_t, hit_surface_selector_t >::simulate().

+ Here is the caller graph for this function:

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

Which type of process generated this particle.

Definition at line 124 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 124 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 102 of file Particle.hpp.

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

References absMomentum(), and m_absMomentum.

Referenced by ActsExamples::Pythia8Generator::operator()(), ActsExamples::ParametricParticleGenerator::operator()(), and ActsExamples::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 88 of file Particle.hpp.

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

References m_unitDirection.

Referenced by ActsFatras::detail::Scattering< scattering_model_t >::operator()(), ActsExamples::Pythia8Generator::operator()(), ActsExamples::ParametricParticleGenerator::operator()(), and ActsExamples::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 94 of file Particle.hpp.

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

References dx, dy, dz, Acts::ePos0, Acts::ePos1, Acts::ePos2, 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 177 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 177 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 168 of file Particle.hpp.

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

References m_pathL0, and m_pathX0.

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

Set the space-time position four-vector.

Definition at line 69 of file Particle.hpp.

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

References m_position4, and Acts::Test::pos4().

Referenced by ActsExamples::Pythia8Generator::operator()(), ActsExamples::ParametricParticleGenerator::operator()(), and ActsExamples::CsvParticleReader::read().

+ Here is the call graph for this function:

+ 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 74 of file Particle.hpp.

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

References Acts::ePos0, Acts::eTime, 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 80 of file Particle.hpp.

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

References Acts::ePos0, Acts::ePos1, Acts::ePos2, Acts::eTime, 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 ActsExamples::CsvParticleReader::read().

+ Here is the caller graph for this function:

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

Time coordinate.

Definition at line 137 of file Particle.hpp.

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

References Acts::eTime, and m_position4.

Referenced by ActsExamples::ResPlotTool::fill(), and setPosition4().

+ Here is the caller graph for this function:

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

Absolute momentum in the x-y plane.

Definition at line 151 of file Particle.hpp.

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

References Acts::eMom0, m_absMomentum, and m_unitDirection.

Referenced by ActsExamples::EffPlotTool::fill(), ActsExamples::DuplicationPlotTool::fill(), ActsExamples::FakeRatePlotTool::fill(), and ActsExamples::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 149 of file Particle.hpp.

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

References m_unitDirection.

Referenced by ActsExamples::EffPlotTool::fill(), ActsExamples::DuplicationPlotTool::fill(), ActsExamples::FakeRatePlotTool::fill(), ActsExamples::ResPlotTool::fill(), ActsFatras::Casts::Eta::operator()(), ActsFatras::detail::Scattering< scattering_model_t >::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, p, and particleId().

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 204 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 204 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 200 of file Particle.hpp.

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

Referenced by charge().

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

Definition at line 217 of file Particle.hpp.

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

Referenced by pathLimitL0(), and setMaterialLimits().

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

Definition at line 216 of file Particle.hpp.

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

Referenced by pathLimitX0(), and setMaterialLimits().

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

Definition at line 201 of file Particle.hpp.

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

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

Barcode ActsFatras::Particle::m_particleId
private

Particle identifier within the event.

Definition at line 194 of file Particle.hpp.

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

Referenced by particleId(), and withParticleId().

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

Definition at line 215 of file Particle.hpp.

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

Referenced by pathInL0(), and setMaterialPassed().

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

Definition at line 214 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 214 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 198 of file Particle.hpp.

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

Referenced by pdg().

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

Definition at line 205 of file Particle.hpp.

View newest version in sPHENIX GitHub at line 205 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 196 of file Particle.hpp.

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

Referenced by process(), and setProcess().

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

Definition at line 203 of file Particle.hpp.

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

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


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