Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4DecayStrongResonances Class Reference

#include <G4DecayStrongResonances.hh>

Public Member Functions

 G4DecayStrongResonances ()
 
 ~G4DecayStrongResonances ()
 
G4ReactionProductVectorPropagate (G4KineticTrackVector *theSecondaries, G4V3DNucleus *)
 

Detailed Description

Definition at line 46 of file G4DecayStrongResonances.hh.

Constructor & Destructor Documentation

G4DecayStrongResonances::G4DecayStrongResonances ( )

Definition at line 45 of file G4DecayStrongResonances.cc.

45 {}
G4DecayStrongResonances::~G4DecayStrongResonances ( )

Definition at line 47 of file G4DecayStrongResonances.cc.

47 {}

Member Function Documentation

G4ReactionProductVector * G4DecayStrongResonances::Propagate ( G4KineticTrackVector theSecondaries,
G4V3DNucleus  
)

Definition at line 50 of file G4DecayStrongResonances.cc.

References G4INCL::ClusterDecay::decay(), G4KineticTrack::Get4Momentum(), G4KineticTrack::GetDefinition(), G4ParticleDefinition::GetPDGMass(), G4ReactionProduct::SetDefinition(), G4ReactionProduct::SetMass(), G4ReactionProduct::SetMomentum(), G4ReactionProduct::SetTotalEnergy(), CLHEP::HepLorentzVector::t(), and CLHEP::HepLorentzVector::vect().

Referenced by G4TheoFSGenerator::ApplyYourself().

51  {
52  G4DecayKineticTracks decay(theSecondaries); // Changes input list in situ
53 
54  // translate to ReactionProducts
55  G4ReactionProductVector * theResult;
56  try { theResult = new G4ReactionProductVector; }
57  catch(...) {
58  throw G4HadronicException(__FILE__, __LINE__, "DecayStrongRes: out of memory ");
59  }
60 
61  G4ReactionProduct * it = NULL;
62 
63  G4KineticTrackVector::iterator secIter = theSecondaries->begin();
64  for(; secIter != theSecondaries->end(); ++secIter) {
65  G4KineticTrack* aSecondary = *secIter;
66  if (!aSecondary) continue; // Skip null pointers
67 
68  try { it = new G4ReactionProduct(); }
69  catch(...) {
70  throw G4HadronicException(__FILE__, __LINE__, "DecayStrongRes: out of memory ");
71  }
72 
73  it->SetDefinition(aSecondary->GetDefinition());
74  it->SetMass(aSecondary->GetDefinition()->GetPDGMass());
75  it->SetTotalEnergy(aSecondary->Get4Momentum().t());
76  it->SetMomentum(aSecondary->Get4Momentum().vect());
77  delete aSecondary;
78  try { theResult->push_back(it); }
79  catch(...){
80  throw G4HadronicException(__FILE__, __LINE__, "DecayStrongRes: push to result failed - out of mem.");
81  }
82  }
83  delete theSecondaries;
84 
85  return theResult;
86 }
void SetMomentum(const G4double x, const G4double y, const G4double z)
std::vector< G4ReactionProduct * > G4ReactionProductVector
G4ParticleDefinition * GetDefinition() const
void SetMass(const G4double mas)
Hep3Vector vect() const
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
void SetTotalEnergy(const G4double en)
G4double GetPDGMass() const
void SetDefinition(G4ParticleDefinition *aParticleDefinition)
const G4LorentzVector & Get4Momentum() const

The documentation for this class was generated from the following files: