CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
corsika::ParticleInterface< TStackIterator > Class Template Reference

Example of a particle object on the stack. More...

#include <VectorStack.hpp>

Inheritance diagram for corsika::ParticleInterface< TStackIterator >:

Public Types

typedef std::tuple< Code, HEPEnergyType, DirectionVector, Point, TimeTypeparticle_data_type
 
typedef std::tuple< Code, MomentumVector, Point, TimeTypeparticle_data_momentum_type
 
- Public Types inherited from corsika::ParticleBase< TStackIterator >
typedef TStackIterator stack_iterator_type
 

Public Member Functions

std::string asString () const
 
void setParticleData (particle_data_type const &v)
 Set data of new particle. More...
 
void setParticleData (ParticleInterface< TStackIterator > const &p, particle_data_type const &v)
 Set data of new particle. More...
 
void setParticleData (particle_data_momentum_type const &v)
 Set data of new particle. More...
 
void setParticleData (ParticleInterface< TStackIterator > const &p, particle_data_momentum_type const &v)
 Set data of new particle. More...
 
void setPID (Code const id)
 ! Set particle corsika::Code
 
void setEnergy (HEPEnergyType const &e)
 ! Set energy
 
void setKineticEnergy (HEPEnergyType const &ekin)
 ! Set kinetic energy
 
void setMomentum (MomentumVector const &v)
 The MomentumVector v is used to determine the DirectionVector, and to update the particle energy.
 
void setDirection (DirectionVector const &v)
 Set direction.
 
void setPosition (Point const &v)
 Set position.
 
void setTime (TimeType const &v)
 Set time.
 
Code getPID () const
 Get corsika::Code.
 
PDGCode getPDG () const
 Get PDG code.
 
HEPEnergyType getKineticEnergy () const
 Get kinetic energy.
 
DirectionVector getDirection () const
 Get direction.
 
Point getPosition () const
 Get position.
 
TimeType getTime () const
 Get time.
 
derived quantities
VelocityVector getVelocity () const
 Get velocity.
 
MomentumVector getMomentum () const
 Get momentum.
 
HEPMassType getMass () const
 Get mass of particle.
 
ElectricChargeType getCharge () const
 Get electric charge.
 
HEPEnergyType getEnergy () const
 Get kinetic energy.
 
int16_t getChargeNumber () const
 Get charge number.
 
- Public Member Functions inherited from corsika::ParticleBase< TStackIterator >
 ParticleBase (ParticleBase &&)=delete
 
 ParticleBase (ParticleBase const &)=delete
 
ParticleBase operator= (ParticleBase &&)=delete
 
ParticleBase operator= (ParticleBase const &)=delete
 
void erase ()
 Delete this particle on the stack. More...
 
bool isErased () const
 Method to retrieve the status of the Particle. More...
 
template<typename... TArgs>
stack_iterator_type addSecondary (const TArgs... args)
 Add a secondary particle based on *this on the stack. More...
 
stack_iterator_type & getIterator ()
 return the corresponding TStackIterator for this particle
 
const stack_iterator_type & getIterator () const
 

Additional Inherited Members

- Protected Member Functions inherited from corsika::ParticleBase< TStackIterator >
auto & getStackData ()
 
const auto & getStackData () const
 
auto & getStack ()
 
const auto & getStack () const
 
std::size_t getIndex () const
 return the index number of the underlying iterator object
 

Detailed Description

template<typename TStackIterator>
class corsika::ParticleInterface< TStackIterator >

Example of a particle object on the stack.

Definition at line 30 of file VectorStack.hpp.

Member Function Documentation

◆ setParticleData() [1/4]

template<typename TStackIterator>
void corsika::ParticleInterface< TStackIterator >::setParticleData ( particle_data_type const &  v)

Set data of new particle.

Parameters
vtuple containing: PID, Momentum Vector, Position, Time

MomentumVector is only used to determine the DirectionVector, the normalization is lost.

◆ setParticleData() [2/4]

template<typename TStackIterator>
void corsika::ParticleInterface< TStackIterator >::setParticleData ( ParticleInterface< TStackIterator > const &  p,
particle_data_type const &  v 
)

Set data of new particle.

Parameters
pparent particle
vtuple containing: PID, Momentum Vector, Position, Time

MomentumVector is only used to determine the DirectionVector, the normalization is lost.

◆ setParticleData() [3/4]

template<typename TStackIterator>
void corsika::ParticleInterface< TStackIterator >::setParticleData ( particle_data_momentum_type const &  v)

Set data of new particle.

Parameters
vtuple containing: PID, kinetic Energy, Direction Vector, Position, Time

◆ setParticleData() [4/4]

template<typename TStackIterator>
void corsika::ParticleInterface< TStackIterator >::setParticleData ( ParticleInterface< TStackIterator > const &  p,
particle_data_momentum_type const &  v 
)

Set data of new particle.

Parameters
pparent particle
vtuple containing: PID, kinetic Energy, Direction Vector, Position, Time

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