#include <G4RPGAntiXiZeroInelastic.hh>
Inheritance diagram for G4RPGAntiXiZeroInelastic:
Public Member Functions | |
G4RPGAntiXiZeroInelastic () | |
~G4RPGAntiXiZeroInelastic () | |
G4HadFinalState * | ApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus) |
Definition at line 44 of file G4RPGAntiXiZeroInelastic.hh.
G4RPGAntiXiZeroInelastic::G4RPGAntiXiZeroInelastic | ( | ) | [inline] |
Definition at line 48 of file G4RPGAntiXiZeroInelastic.hh.
References G4HadronicInteraction::SetMaxEnergy(), and G4HadronicInteraction::SetMinEnergy().
00048 : G4RPGInelastic("G4RPGAntiXiZeroInelastic") 00049 { 00050 SetMinEnergy( 0.0 ); 00051 SetMaxEnergy( 25.*CLHEP::GeV ); 00052 }
G4RPGAntiXiZeroInelastic::~G4RPGAntiXiZeroInelastic | ( | ) | [inline] |
G4HadFinalState * G4RPGAntiXiZeroInelastic::ApplyYourself | ( | const G4HadProjectile & | aTrack, | |
G4Nucleus & | targetNucleus | |||
) | [virtual] |
Implements G4HadronicInteraction.
Definition at line 39 of file G4RPGAntiXiZeroInelastic.cc.
References G4RPGInelastic::CalculateMomenta(), G4Nucleus::Cinema(), G4Nucleus::EvaporationEffects(), G4cout, G4endl, G4UniformRand, G4HadProjectile::GetDefinition(), G4DynamicParticle::GetDefinition(), G4ReactionProduct::GetKineticEnergy(), G4HadProjectile::GetKineticEnergy(), G4HadProjectile::GetMaterial(), G4ReactionProduct::GetMomentum(), G4Material::GetName(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGMass(), G4ReactionProduct::GetTotalMomentum(), G4FastVector< Type, N >::Initialize(), G4InuclParticleNames::pp, G4Nucleus::ReturnTargetParticle(), G4ReactionProduct::SetKineticEnergy(), G4ReactionProduct::SetMomentum(), G4ReactionProduct::SetSide(), G4RPGInelastic::SetUpChange(), G4HadronicInteraction::theParticleChange, and G4HadronicInteraction::verboseLevel.
00041 { 00042 const G4HadProjectile *originalIncident = &aTrack; 00043 00044 // Choose the target particle 00045 00046 G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle(); 00047 00048 if( verboseLevel > 1 ) 00049 { 00050 const G4Material *targetMaterial = aTrack.GetMaterial(); 00051 G4cout << "G4RPGAntiXiZeroInelastic::ApplyYourself called" << G4endl; 00052 G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, "; 00053 G4cout << "target material = " << targetMaterial->GetName() << ", "; 00054 G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName() 00055 << G4endl; 00056 } 00057 00058 // Fermi motion and evaporation 00059 // As of Geant3, the Fermi energy calculation had not been Done 00060 00061 G4double ek = originalIncident->GetKineticEnergy()/MeV; 00062 G4double amas = originalIncident->GetDefinition()->GetPDGMass()/MeV; 00063 G4ReactionProduct modifiedOriginal; 00064 modifiedOriginal = *originalIncident; 00065 00066 G4double tkin = targetNucleus.Cinema( ek ); 00067 ek += tkin; 00068 modifiedOriginal.SetKineticEnergy( ek*MeV ); 00069 G4double et = ek + amas; 00070 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) ); 00071 G4double pp = modifiedOriginal.GetMomentum().mag()/MeV; 00072 if( pp > 0.0 ) 00073 { 00074 G4ThreeVector momentum = modifiedOriginal.GetMomentum(); 00075 modifiedOriginal.SetMomentum( momentum * (p/pp) ); 00076 } 00077 // 00078 // calculate black track energies 00079 // 00080 tkin = targetNucleus.EvaporationEffects( ek ); 00081 ek -= tkin; 00082 modifiedOriginal.SetKineticEnergy( ek*MeV ); 00083 et = ek + amas; 00084 p = std::sqrt( std::abs((et-amas)*(et+amas)) ); 00085 pp = modifiedOriginal.GetMomentum().mag()/MeV; 00086 if( pp > 0.0 ) 00087 { 00088 G4ThreeVector momentum = modifiedOriginal.GetMomentum(); 00089 modifiedOriginal.SetMomentum( momentum * (p/pp) ); 00090 } 00091 G4ReactionProduct currentParticle = modifiedOriginal; 00092 G4ReactionProduct targetParticle; 00093 targetParticle = *originalTarget; 00094 currentParticle.SetSide( 1 ); // incident always goes in forward hemisphere 00095 targetParticle.SetSide( -1 ); // target always goes in backward hemisphere 00096 G4bool incidentHasChanged = false; 00097 G4bool targetHasChanged = false; 00098 G4bool quasiElastic = false; 00099 G4FastVector<G4ReactionProduct,GHADLISTSIZE> vec; // vec will contain the secondary particles 00100 G4int vecLen = 0; 00101 vec.Initialize( 0 ); 00102 00103 const G4double cutOff = 0.1; 00104 const G4double anni = std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 ); 00105 if( (currentParticle.GetKineticEnergy()/MeV > cutOff) || (G4UniformRand() > anni) ) 00106 Cascade( vec, vecLen, 00107 originalIncident, currentParticle, targetParticle, 00108 incidentHasChanged, targetHasChanged, quasiElastic ); 00109 00110 CalculateMomenta( vec, vecLen, 00111 originalIncident, originalTarget, modifiedOriginal, 00112 targetNucleus, currentParticle, targetParticle, 00113 incidentHasChanged, targetHasChanged, quasiElastic ); 00114 00115 SetUpChange( vec, vecLen, 00116 currentParticle, targetParticle, 00117 incidentHasChanged ); 00118 00119 delete originalTarget; 00120 return &theParticleChange; 00121 }