Newer
Older
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#include <corsika/framework/core/ParticleProperties.hpp>
#include <corsika/framework/geometry/Point.hpp>
#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
#include <cassert>
#include <iomanip>
#include <iostream>
using namespace corsika;
using namespace std;
CoordinateSystemPtr const& rootCS = get_root_CoordinateSystem();
for (int i = 0; i < 11; ++i) {
s.addParticle(std::make_tuple(Code::Electron, 1.5_GeV * i - Electron::mass,
DirectionVector(rootCS, {1, 0, 0}),
assert(s.getEntries() == 11); // stack has 11 particles
HEPEnergyType total_energy;
// particles are electrons with 1.5 GeV energy times i
assert(p.getPID() == Code::Electron);
assert(p.getEnergy() == 1.5_GeV * (i++));
}
}
int main() {
fill(s);
read(s);