// // particle.cpp // mc_electron // // Created by Christian Reiling on 20.09.18. // Copyright © 2018 Christian Reiling. All rights reserved. // #include "particle.hpp" using namespace std; std::string get_species_string(const species &spec) { string res; switch (spec) { case electron: res = "e-"; break; case tritiumI: res = "T+"; break; case tritium2I: res = "T2+"; break; case tritium2: res = "T2"; break; default: stringstream ss; ss<<"get_species_string: Species not defined\n"; throw MyException(ss.str()); } return (res); } double get_species_mass(const species &spec) { double res; switch (spec) { case electron: res = me_eV; break; case tritiumI: res = mT_eV; break; case tritium2I: res = mT2_eV; break; case tritium2: res = mT2_eV; break; default: stringstream ss; ss<<"get_species_mass: Species not defined\n"; throw MyException(ss.str()); } return (res); } ostream& operator<<(ostream& os, const species& spec) { os<