00001 #include "GenDecay/NucDecay.h" 00002 #include "GenDecay/NucState.h" 00003 00004 #include <more/phys/ens.h> 00005 #include "CLHEP/Units/SystemOfUnits.h" 00006 00007 using namespace std; 00008 using namespace GenDecay; 00009 using namespace more::phys; 00010 00011 NucDecay::NucDecay(NucState* mo, NucState* da, 00012 const string& typ, double e, double f) 00013 : mother(mo), daughter(da), type(typ), energy(e), fraction(f) 00014 { 00015 mother->decays().push_back(this); 00016 } 00017 00018 double NucDecay::clhep_energy() const 00019 { 00020 return energy/SI::MeV*CLHEP::MeV; 00021 } 00022 00023 00024 ostream& operator<<(ostream& o, const NucDecay& ns) 00025 { 00026 o << ns.type << " E=" << ns.clhep_energy()/CLHEP::MeV << " MeV br=" << ns.fraction*100 << "%"; 00027 return o; 00028 }