15 #include <corsika/framework/geometry/Point.hpp> 16 #include <corsika/framework/geometry/Vector.hpp> 17 #include <corsika/framework/geometry/PhysicalGeometry.hpp> 29 template <
typename TStackIterator>
36 typedef std::tuple<Code, HEPEnergyType, DirectionVector, Point, TimeType>
39 typedef std::tuple<Code, MomentumVector, Point, TimeType> particle_data_momentum_type;
41 std::string asString()
const;
63 particle_data_type
const& v);
81 particle_data_momentum_type
const& v);
107 super_type::getStackData().setDirection(
110 super_type::getStackData().setKineticEnergy(
189 typedef std::vector<Code> code_vector_type;
190 typedef std::vector<HEPEnergyType> kinetic_energy_vector_type;
191 typedef std::vector<Point> point_vector_type;
192 typedef std::vector<TimeType> time_vector_type;
193 typedef std::vector<DirectionVector> direction_vector_type;
209 unsigned int getSize()
const {
return dataPID_.size(); }
210 unsigned int getCapacity()
const {
return dataPID_.size(); }
212 void setPID(
size_t i, Code
const id) { dataPID_[i] = id; }
218 Code
getPID(
size_t i)
const {
return dataPID_[i]; }
227 void copy(
size_t i1,
size_t i2);
232 void swap(
size_t i1,
size_t i2);
234 void incrementSize();
235 void decrementSize();
239 code_vector_type dataPID_;
240 kinetic_energy_vector_type dataEkin_;
241 direction_vector_type direction_;
242 point_vector_type position_;
243 time_vector_type time_;
251 #include <corsika/detail/stack/VectorStack.inl> Memory implementation of the most simple (stupid) particle stack object.
int16_t getChargeNumber() const
Get charge number.
Import and extend the phys::units package.
void setKineticEnergy(HEPEnergyType const &ekin)
! Set kinetic energy
The Stack class provides (and connects) the main particle data storage machinery. ...
void setDirection(DirectionVector const &v)
Set direction.
void setTime(TimeType const &v)
Set time.
Point getPosition() const
Get position.
HEPMassType getMass() const
Get mass of particle.
DirectionVector getDirection() const
Get direction.
Description of particle stacks.
Code getPID() const
Get corsika::Code.
Example of a particle object on the stack.
constexpr detail::Power< D, 2, X > square(quantity< D, X > const &x)
square.
The cascade namespace assembles all objects needed to simulate full particles cascades.
Vector< dimensionless_d > DirectionVector
A 3D vector defined in a specific coordinate system with no units.
std::size_t getIndex() const
return the index number of the underlying iterator object
void setPID(Code const id)
! Set particle corsika::Code
ElectricChargeType constexpr get_charge(Code const)
electric charge
HEPEnergyType getEnergy() const
Get kinetic energy.
ElectricChargeType getCharge() const
Get electric charge.
TimeType getTime() const
Get time.
PDGCode getPDG() const
Get PDG code.
void setParticleData(particle_data_type const &v)
Set data of new particle.
int16_t constexpr get_charge_number(Code const)
electric charge in units of e
quantity_type getNorm() const
void setEnergy(HEPEnergyType const &e)
! Set energy
HEPMassType constexpr get_mass(Code const)
mass
Interface to particle properties.
void setPosition(Point const &v)
Set position.
PDGCode constexpr get_PDG(Code const)
Particle code according to PDG, "Monte Carlo Particle Numbering Scheme".
HEPEnergyType getKineticEnergy() const
Get kinetic energy.
The base class to define the readout of particle properties from a particle stack.
VelocityVector getVelocity() const
Get velocity.
MomentumVector getMomentum() const
Get momentum.
void setMomentum(MomentumVector const &v)
The MomentumVector v is used to determine the DirectionVector, and to update the particle energy...
detail::Root< D, 2, X > sqrt(quantity< D, X > const &x)
square root.