00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // INCL++ intra-nuclear cascade model 00027 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics 00028 // Davide Mancusi, CEA 00029 // Alain Boudard, CEA 00030 // Sylvie Leray, CEA 00031 // Joseph Cugnon, University of Liege 00032 // 00033 #define INCLXX_IN_GEANT4_MODE 1 00034 00035 #include "globals.hh" 00036 00037 #include "G4INCLFinalState.hh" 00038 00039 namespace G4INCL { 00040 00041 FinalState::FinalState() : 00042 totalEnergyBeforeInteraction(0.0), validity(ValidFS), 00043 blockedDelta(NULL) 00044 { 00045 } 00046 00047 FinalState::~FinalState() 00048 { 00049 } 00050 00051 void FinalState::addModifiedParticle(Particle *p) 00052 { 00053 modified.push_back(p); 00054 } 00055 00056 void FinalState::addOutgoingParticle(Particle *p) 00057 { 00058 outgoing.push_back(p); 00059 } 00060 00061 void FinalState::addDestroyedParticle(Particle *p) 00062 { 00063 destroyed.push_back(p); 00064 } 00065 00066 void FinalState::addCreatedParticle(Particle *p) 00067 { 00068 created.push_back(p); 00069 } 00070 00071 void FinalState::addEnteringParticle(Particle *p) 00072 { 00073 entering.push_back(p); 00074 } 00075 00076 ParticleList const &FinalState::getModifiedParticles() const 00077 { 00078 return modified; 00079 } 00080 00081 ParticleList const &FinalState::getOutgoingParticles() const 00082 { 00083 return outgoing; 00084 } 00085 00086 ParticleList const &FinalState::getDestroyedParticles() const 00087 { 00088 return destroyed; 00089 } 00090 00091 ParticleList const &FinalState::getCreatedParticles() const 00092 { 00093 return created; 00094 } 00095 00096 ParticleList const &FinalState::getEnteringParticles() const 00097 { 00098 return entering; 00099 } 00100 00101 std::string FinalState::print() const { 00102 std::stringstream ss; 00103 ss << "Modified particles:" << std::endl; 00104 for(ParticleIter iter = modified.begin(); iter != modified.end(); ++iter) 00105 ss << (*iter)->print(); 00106 ss << "Outgoing particles:" << std::endl; 00107 for(ParticleIter iter = outgoing.begin(); iter != outgoing.end(); ++iter) 00108 ss << (*iter)->print(); 00109 ss << "Destroyed particles:" << std::endl; 00110 for(ParticleIter iter = destroyed.begin(); iter != destroyed.end(); ++iter) 00111 ss << (*iter)->print(); 00112 ss << "Created particles:" << std::endl; 00113 for(ParticleIter iter = created.begin(); iter != created.end(); ++iter) 00114 ss << (*iter)->print(); 00115 ss << "Entering particles:" << std::endl; 00116 for(ParticleIter iter = entering.begin(); iter != entering.end(); ++iter) 00117 ss << (*iter)->print(); 00118 return ss.str(); 00119 } 00120 00121 }