CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface > Struct Template Reference

Define ParticleInterface for NuclearStackExtension Stack derived from ParticleInterface of Inner stack class. More...

#include <NuclearStackExtension.hpp>

Inheritance diagram for corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >:

Public Types

typedef InnerParticleInterface< StackIteratorInterfacesuper_type
 
typedef std::tuple< Code, HEPEnergyType, DirectionVector, Point, TimeType, unsigned short, unsigned short > nuclear_particle_data_type
 
typedef std::tuple< Code, MomentumVector, Point, TimeType, unsigned short, unsigned short > nuclear_particle_data_momentum_type
 

Public Member Functions

void setParticleData (typename super_type::particle_data_type const &v)
 
void setParticleData (nuclear_particle_data_type const &v)
 
void setParticleData (super_type &p, typename super_type::particle_data_type const &v)
 
void setParticleData (super_type &p, nuclear_particle_data_type const &v)
 
void setParticleData (typename super_type::particle_data_momentum_type const &v)
 
void setParticleData (nuclear_particle_data_momentum_type const &v)
 
void setParticleData (super_type &p, typename super_type::particle_data_momentum_type const &v)
 
void setParticleData (super_type &p, nuclear_particle_data_momentum_type const &v)
 
std::string asString () const
 
PDGCode getPDG () const
 Overwrite normal getPDG function with nuclear version.
 
void setMomentum (MomentumVector const &v)
 Overwrite normal setMomentum function with nuclear version.
 
MomentumVector getMomentum () const
 Overwrite normal getMomentum function with nuclear version.
 
void setEnergy (HEPEnergyType const &e)
 Overwrite normal getEnergy function with nuclear version.
 
VelocityVector getVelocity () const
 Overwrite normal getVelocity function with nuclear version.
 
HEPMassType getMass () const
 Overwrite normal getMass function with nuclear version.
 
ElectricChargeType getCharge () const
 Overwrite normal getParticleCharge function with nuclear version.
 
HEPEnergyType getEnergy () const
 Overwrite normal getEnergy function with nuclear version.
 
int16_t getChargeNumber () const
 Overwirte normal getChargeNumber function with nuclear version.
 
int getNucleusRef () const
 
individual setters
void setNuclearA (const unsigned short vA)
 
void setNuclearZ (const unsigned short vZ)
 
individual getters
int getNuclearA () const
 
int getNuclearZ () const
 

Protected Member Functions

void setNucleusRef (const int vR)
 
bool isNucleus () const
 

Detailed Description

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface>
struct corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >

Define ParticleInterface for NuclearStackExtension Stack derived from ParticleInterface of Inner stack class.

Add A and Z data to existing stack (currently VectorStack) of particle properties. This is done via inheritance, not via CombinedStack since the nuclear data is stored ONLY when needed (for nuclei) and not for all particles. Thus, this is a new, derived Stack object.

Only for Code::Nucleus particles A and Z are stored, not for all normal elementary particles.

Thus in your code, make sure to always check particle.getPID()==Code::Nucleus before attempting to read any nuclear information.

Definition at line 44 of file NuclearStackExtension.hpp.

Member Function Documentation

◆ setParticleData() [1/8]

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface >
void corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >::setParticleData ( typename super_type::particle_data_type const &  v)
Parameters
vwhich is a tuple containing: PID, kinetic Energy, DirectionVector, Position, Time

◆ setParticleData() [2/8]

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface >
void corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >::setParticleData ( nuclear_particle_data_type const &  v)
Parameters
vwhich is a tuple containing: PID, kinetic Energy, DirectionVector, Position, Time, A, Z

◆ setParticleData() [3/8]

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface >
void corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >::setParticleData ( super_type &  p,
typename super_type::particle_data_type const &  v 
)
Parameters
pthe parent particle
vwhich is a tuple containing: PID, Momentum Vector, Position, Time

◆ setParticleData() [4/8]

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface >
void corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >::setParticleData ( super_type &  p,
nuclear_particle_data_type const &  v 
)
Parameters
pthe parent particle
vwhich is a tuple containing: PID, Momentum Vector, Position, Time, A, Z

◆ setParticleData() [5/8]

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface >
void corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >::setParticleData ( typename super_type::particle_data_momentum_type const &  v)
Parameters
vwhich is a tuple containing: PID, Total Energy, MomentumVector, Position, Time

◆ setParticleData() [6/8]

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface >
void corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >::setParticleData ( nuclear_particle_data_momentum_type const &  v)
Parameters
vwhich is a tuple containing: PID, Total Energy, MomentumVector, Position, Time, A, Z

◆ setParticleData() [7/8]

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface >
void corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >::setParticleData ( super_type &  p,
typename super_type::particle_data_momentum_type const &  v 
)
Parameters
pparent particle
vwhich is a tuple containing: PID, Total Energy, MomentumVector, Position, Time

◆ setParticleData() [8/8]

template<template< typename > class InnerParticleInterface, typename StackIteratorInterface >
void corsika::nuclear_stack::NuclearParticleInterface< InnerParticleInterface, StackIteratorInterface >::setParticleData ( super_type &  p,
nuclear_particle_data_momentum_type const &  v 
)
Parameters
pparent particle
vwhich is a tuple containing: PID, Total Energy, MomentumVector, Position, Time, A, Z

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