00001
00013 #include "final_state.h"
00014
00015 ClassImp(final_state)
00016
00017 using std::endl;
00018
00019
00020 ostream & operator << (ostream & stream, const final_state & final)
00021 {
00022 final.print(stream);
00023 return stream;
00024 }
00025
00026 final_state::final_state() :
00027 _name("default")
00028 {
00029 _proton = 0;
00030 _neutron = 0;
00031 _piplus = 0;
00032 _piminus = 0;
00033 _pizero = 0;
00034 _neugenID = 0;
00035 _multiplicity = 0;
00036 }
00037
00038 final_state::final_state(const char * name) :
00039 _name(name)
00040 {
00041 _proton = 0;
00042 _neutron = 0;
00043 _piplus = 0;
00044 _piminus = 0;
00045 _pizero = 0;
00046 _neugenID = 0;
00047 _multiplicity = 0;
00048 }
00049
00050 final_state::final_state(
00051 int proton, int neutron, int piplus, int piminus, int pizero) :
00052 _proton (proton ),
00053 _neutron (neutron ),
00054 _piplus (piplus ),
00055 _piminus (piminus ),
00056 _pizero (pizero )
00057 {
00058 _neugenID = 0;
00059 _multiplicity = proton + neutron + piplus + piminus + pizero;
00060 _name = "default";
00061 }
00062
00063 final_state::final_state(int neugenID) :
00064 _neugenID (neugenID )
00065 {
00066 _proton = 0;
00067 _neutron = 0;
00068 _piplus = 0;
00069 _piminus = 0;
00070 _pizero = 0;
00071
00072 _multiplicity = ((neugenID-128)/4) - 20;
00073 _name = "default";
00074 }
00075
00076 final_state::~final_state()
00077 {
00078
00079 }
00080
00081 void final_state::setFinalState(
00082 int proton, int neutron, int piplus, int piminus, int pizero)
00083 {
00084 _proton = proton;
00085 _neutron = neutron;
00086 _piplus = piplus;
00087 _piminus = piminus;
00088 _pizero = pizero;
00089 _multiplicity = proton + neutron + piplus + piminus + pizero;
00090 }
00091
00092 void final_state::setNeugenID(int neugenID)
00093 {
00094 _neugenID = neugenID;
00095 _multiplicity = ((neugenID-128)/4) - 20;
00096 }
00097
00098 void final_state::print(ostream & stream) const
00099 {
00100 stream << "Protons:..........." << _proton << endl;
00101 stream << "Neutrons:.........." << _neutron << endl;
00102 stream << "Piplus:............" << _piplus << endl;
00103 stream << "Piminus:..........." << _piminus << endl;
00104 stream << "Pizero:............" << _pizero << endl;
00105 stream << "Neugen ID:........." << _neugenID << endl;
00106 stream << "Multiplicity......." << _multiplicity << endl;
00107 }
00108
00109