Changes in general code and added class energyhisto for
This commit is contained in:
@@ -1,22 +1,51 @@
|
||||
//
|
||||
// particle.cpp
|
||||
//
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 13.09.18.
|
||||
// Created by Christian Reiling on 20.09.18.
|
||||
// Copyright © 2018 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "blitz/array.h"
|
||||
#include "blitz/tinyvec2.h"
|
||||
|
||||
#include "particle.h"
|
||||
|
||||
ostream& operator<<(ostream& os, const Particle& partOut)
|
||||
{
|
||||
std::ostream& operator<<(std::ostream& os, const species& SpecOut) {
|
||||
switch (SpecOut) {
|
||||
case electron:
|
||||
os<<"e-";
|
||||
break;
|
||||
case positron:
|
||||
os<<"e+";
|
||||
break;
|
||||
case proton:
|
||||
os<<"p";
|
||||
break;
|
||||
case tritium:
|
||||
os<<"T3";
|
||||
break;
|
||||
case tritium2:
|
||||
os<<"T_2";
|
||||
break;
|
||||
case helium:
|
||||
os<<"He3";
|
||||
break;
|
||||
case deuterium:
|
||||
os<<"D2";
|
||||
break;
|
||||
case DT:
|
||||
os<<"DT";
|
||||
break;
|
||||
default:
|
||||
std::cerr<<"unknown species";
|
||||
exit(1);
|
||||
}
|
||||
return (os);
|
||||
}
|
||||
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Particle& partOut) {
|
||||
os << "(" << partOut.id<<","<<partOut.s<<","<<partOut.m << "," << partOut.q << ","<< partOut.x<<","<< partOut.v <<")";
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user