CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
QGSJetIIStack.hpp
1 /*
2  * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
13 #include <corsika/framework/geometry/Vector.hpp>
14 #include <corsika/framework/geometry/PhysicalGeometry.hpp>
16 #include <corsika/modules/qgsjetII/ParticleConversion.hpp>
17 
18 #include <qgsjet-II-04.hpp>
19 
20 namespace corsika::qgsjetII {
21 
23 
24  public:
25  void dump() const {}
26 
27  void clear();
28  unsigned int getSize() const;
29  unsigned int getCapacity() const;
30 
31  void setId(const unsigned int i, const int v);
32  void setEnergy(const unsigned int i, const HEPEnergyType v);
33 
34  void setMomentum(const unsigned int i, const MomentumVector& v);
35 
36  int getId(const unsigned int i) const;
37  HEPEnergyType getEnergy(const int i) const;
38  MomentumVector getMomentum(const unsigned int i, const CoordinateSystemPtr& CS) const;
39 
40  void copy(const unsigned int i1, const unsigned int i2);
41  void swap(const unsigned int i1, const unsigned int i2);
42 
43  void incrementSize();
44  void decrementSize();
45  };
46 
47  template <typename TStackIterator>
48  class ParticleInterface : public corsika::ParticleBase<TStackIterator> {
49 
52 
53  public:
54  void setParticleData(const int vID, const HEPEnergyType vE, const MomentumVector& vP,
55  const HEPMassType);
56  void setParticleData(ParticleInterface<TStackIterator>& /*parent*/, const int vID,
57  const HEPEnergyType vE, const MomentumVector& vP,
58  const HEPMassType);
59 
60  void setEnergy(const HEPEnergyType v);
61  HEPEnergyType getEnergy() const;
62 
63  void setPID(const int v);
64  corsika::qgsjetII::QgsjetIICode getPID() const;
65 
66  MomentumVector getMomentum(const CoordinateSystemPtr& CS) const;
67  void setMomentum(const MomentumVector& v);
68  };
69 
71 
72 } // end namespace corsika::qgsjetII
73 
74 #include <corsika/detail/modules/qgsjetII/QGSJetIIStack.inl>
Import and extend the phys::units package.
The Stack class provides (and connects) the main particle data storage machinery. ...
Definition: Stack.hpp:77
Description of particle stacks.
std::shared_ptr< CoordinateSystem const > CoordinateSystemPtr
To refer to CoordinateSystems, only the CoordinateSystemPtr must be used.
The base class to define the readout of particle properties from a particle stack.