Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

final_state.cxx

Go to the documentation of this file.
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 

Generated on Mon Feb 15 11:06:43 2010 for loon by  doxygen 1.3.9.1