#include <G4RPGPiMinusInelastic.hh>
Inheritance diagram for G4RPGPiMinusInelastic:
Public Member Functions | |
G4RPGPiMinusInelastic () | |
~G4RPGPiMinusInelastic () | |
G4HadFinalState * | ApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus) |
Definition at line 41 of file G4RPGPiMinusInelastic.hh.
G4RPGPiMinusInelastic::G4RPGPiMinusInelastic | ( | ) | [inline] |
Definition at line 45 of file G4RPGPiMinusInelastic.hh.
00045 : G4RPGPionInelastic("RPGPiMinusInelastic") 00046 {}
G4RPGPiMinusInelastic::~G4RPGPiMinusInelastic | ( | ) | [inline] |
G4HadFinalState * G4RPGPiMinusInelastic::ApplyYourself | ( | const G4HadProjectile & | aTrack, | |
G4Nucleus & | targetNucleus | |||
) | [virtual] |
Implements G4HadronicInteraction.
Definition at line 34 of file G4RPGPiMinusInelastic.cc.
References G4RPGInelastic::CalculateMomenta(), G4Nucleus::Cinema(), G4Nucleus::EvaporationEffects(), G4HadProjectile::Get4Momentum(), G4HadProjectile::GetDefinition(), G4DynamicParticle::GetDefinition(), G4HadProjectile::GetKineticEnergy(), G4ParticleDefinition::GetPDGMass(), G4FastVector< Type, N >::Initialize(), isAlive, G4InuclParticleNames::pp, G4Nucleus::ReturnTargetParticle(), G4HadFinalState::SetEnergyChange(), G4HadFinalState::SetMomentumChange(), G4HadFinalState::SetStatusChange(), G4RPGInelastic::SetUpChange(), and G4HadronicInteraction::theParticleChange.
00036 { 00037 const G4HadProjectile* originalIncident = &aTrack; 00038 00039 if (originalIncident->GetKineticEnergy()<= 0.1) { 00040 theParticleChange.SetStatusChange(isAlive); 00041 theParticleChange.SetEnergyChange(aTrack.GetKineticEnergy()); 00042 theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit()); 00043 return &theParticleChange; 00044 } 00045 00046 // create the target particle 00047 00048 G4DynamicParticle* originalTarget = targetNucleus.ReturnTargetParticle(); 00049 G4ReactionProduct targetParticle( originalTarget->GetDefinition() ); 00050 00051 G4ReactionProduct currentParticle( 00052 const_cast<G4ParticleDefinition *>(originalIncident->GetDefinition() ) ); 00053 currentParticle.SetMomentum( originalIncident->Get4Momentum().vect() ); 00054 currentParticle.SetKineticEnergy( originalIncident->GetKineticEnergy() ); 00055 00056 // Fermi motion and evaporation 00057 // As of Geant3, the Fermi energy calculation had not been Done 00058 00059 G4double ek = originalIncident->GetKineticEnergy(); 00060 G4double amas = originalIncident->GetDefinition()->GetPDGMass(); 00061 00062 G4double tkin = targetNucleus.Cinema( ek ); 00063 ek += tkin; 00064 currentParticle.SetKineticEnergy( ek ); 00065 G4double et = ek + amas; 00066 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) ); 00067 G4double pp = currentParticle.GetMomentum().mag(); 00068 if( pp > 0.0 ) { 00069 G4ThreeVector momentum = currentParticle.GetMomentum(); 00070 currentParticle.SetMomentum( momentum * (p/pp) ); 00071 } 00072 00073 // calculate black track energies 00074 00075 tkin = targetNucleus.EvaporationEffects( ek ); 00076 ek -= tkin; 00077 currentParticle.SetKineticEnergy( ek ); 00078 et = ek + amas; 00079 p = std::sqrt( std::abs((et-amas)*(et+amas)) ); 00080 pp = currentParticle.GetMomentum().mag(); 00081 if( pp > 0.0 ) { 00082 G4ThreeVector momentum = currentParticle.GetMomentum(); 00083 currentParticle.SetMomentum( momentum * (p/pp) ); 00084 } 00085 00086 G4ReactionProduct modifiedOriginal = currentParticle; 00087 00088 currentParticle.SetSide( 1 ); // incident always goes in forward hemisphere 00089 targetParticle.SetSide( -1 ); // target always goes in backward hemisphere 00090 G4bool incidentHasChanged = false; 00091 G4bool targetHasChanged = false; 00092 G4bool quasiElastic = false; 00093 G4FastVector<G4ReactionProduct,256> vec; // vec will contain the secondary particles 00094 G4int vecLen = 0; 00095 vec.Initialize( 0 ); 00096 00097 const G4double cutOff = 0.1; 00098 if( currentParticle.GetKineticEnergy() > cutOff ) 00099 InitialCollision(vec, vecLen, currentParticle, targetParticle, 00100 incidentHasChanged, targetHasChanged); 00101 00102 CalculateMomenta(vec, vecLen, 00103 originalIncident, originalTarget, modifiedOriginal, 00104 targetNucleus, currentParticle, targetParticle, 00105 incidentHasChanged, targetHasChanged, quasiElastic); 00106 00107 SetUpChange(vec, vecLen, 00108 currentParticle, targetParticle, 00109 incidentHasChanged); 00110 00111 delete originalTarget; 00112 return &theParticleChange; 00113 }