Newer
Older
ralfulrich
committed
#include <fwk/ParticleProperties.h>
#include <stack/super_stupid/SuperStupidStack.h>
using namespace fwk::literals;
// using namespace fwk::io;
void fill(stack::super_stupid::SuperStupidStack& s) {
ralfulrich
committed
p.SetId(fwk::particle::Code::Electron);
p.SetEnergy(1.5_GeV * i);
void read(stack::super_stupid::SuperStupidStack& s) {
cout << "found Stack with " << s.GetSize() << " particles. " << endl;
fwk::quantity<fwk::energy_d> Etot;
for (auto p : s) {
Etot += p.GetEnergy();
ralfulrich
committed
cout << "particle: " << p.GetId() << " with " << p.GetEnergy() / 1_GeV << " GeV"
<< endl;
}
cout << "Etot=" << Etot << " = " << Etot / 1_GeV << " GeV" << endl;
stack::super_stupid::SuperStupidStack s;