#include <G4DecayStrongResonances.hh>
Public Member Functions | |
G4DecayStrongResonances () | |
~G4DecayStrongResonances () | |
G4ReactionProductVector * | Propagate (G4KineticTrackVector *theSecondaries, G4V3DNucleus *) |
Definition at line 46 of file G4DecayStrongResonances.hh.
G4DecayStrongResonances::G4DecayStrongResonances | ( | ) |
G4DecayStrongResonances::~G4DecayStrongResonances | ( | ) |
G4ReactionProductVector * G4DecayStrongResonances::Propagate | ( | G4KineticTrackVector * | theSecondaries, | |
G4V3DNucleus * | ||||
) |
Definition at line 50 of file G4DecayStrongResonances.cc.
References G4ReactionProduct::SetDefinition(), G4ReactionProduct::SetMass(), G4ReactionProduct::SetMomentum(), and G4ReactionProduct::SetTotalEnergy().
Referenced by G4TheoFSGenerator::ApplyYourself().
00051 { 00052 G4DecayKineticTracks decay(theSecondaries); // Changes input list in situ 00053 00054 // translate to ReactionProducts 00055 G4ReactionProductVector * theResult; 00056 try { theResult = new G4ReactionProductVector; } 00057 catch(...) { 00058 throw G4HadronicException(__FILE__, __LINE__, "DecayStrongRes: out of memory "); 00059 } 00060 00061 G4ReactionProduct * it = NULL; 00062 00063 G4KineticTrackVector::iterator secIter = theSecondaries->begin(); 00064 for(; secIter != theSecondaries->end(); ++secIter) { 00065 G4KineticTrack* aSecondary = *secIter; 00066 if (!aSecondary) continue; // Skip null pointers 00067 00068 try { it = new G4ReactionProduct(); } 00069 catch(...) { 00070 throw G4HadronicException(__FILE__, __LINE__, "DecayStrongRes: out of memory "); 00071 } 00072 00073 it->SetDefinition(aSecondary->GetDefinition()); 00074 it->SetMass(aSecondary->GetDefinition()->GetPDGMass()); 00075 it->SetTotalEnergy(aSecondary->Get4Momentum().t()); 00076 it->SetMomentum(aSecondary->Get4Momentum().vect()); 00077 delete aSecondary; 00078 try { theResult->push_back(it); } 00079 catch(...){ 00080 throw G4HadronicException(__FILE__, __LINE__, "DecayStrongRes: push to result failed - out of mem."); 00081 } 00082 } 00083 delete theSecondaries; 00084 00085 return theResult; 00086 }