#include <G4ReactionKinematics.hh>
Public Member Functions | |
void | TwoBodyScattering (const G4DynamicParticle *pIn1, const G4DynamicParticle *pIn2, G4DynamicParticle *pOut1, G4DynamicParticle *pOut2) |
G4double | BreakupMomentum (G4double totalMass, G4double m1, G4double m2) |
Definition at line 48 of file G4ReactionKinematics.hh.
G4double G4ReactionKinematics::BreakupMomentum | ( | G4double | totalMass, | |
G4double | m1, | |||
G4double | m2 | |||
) | [inline] |
Definition at line 57 of file G4ReactionKinematics.hh.
Referenced by TwoBodyScattering().
00058 { 00059 00060 // is aequivalent to G4double G4PhaseSpaceDecayChannel::Pmx !! 00061 00062 G4double m0squared=totalMass*totalMass; 00063 G4double breakupMomentumSquared= 00064 (m0squared-(massA+massB)*(massA+massB))* 00065 (m0squared-(massA-massB)*(massA-massB))/ 00066 (4*m0squared); 00067 if (breakupMomentumSquared>0) return std::sqrt(breakupMomentumSquared); 00068 else return -1.; 00069 }
void G4ReactionKinematics::TwoBodyScattering | ( | const G4DynamicParticle * | pIn1, | |
const G4DynamicParticle * | pIn2, | |||
G4DynamicParticle * | pOut1, | |||
G4DynamicParticle * | pOut2 | |||
) |
Definition at line 41 of file G4ReactionKinematics.cc.
References BreakupMomentum(), G4UniformRand, G4DynamicParticle::Get4Momentum(), G4DynamicParticle::GetMass(), G4INCL::Math::pi, and G4DynamicParticle::Set4Momentum().
00045 { 00046 // initial particles: 00047 00048 // - total invariant mass 00049 G4LorentzVector sumIn(pIn1->Get4Momentum()+pIn2->Get4Momentum()); 00050 G4double invariantMass=sumIn.mag(); 00051 00052 // - beta of center-of-mass system 00053 G4ThreeVector betaCMS=sumIn.boostVector(); 00054 00055 // final particles: 00056 00057 // - get final particle masses 00058 G4double massOut1=pOut1->GetMass(); 00059 G4double massOut2=pOut2->GetMass(); 00060 00061 // - calculate breakup momentum: 00062 G4double breakupMomentum=BreakupMomentum(invariantMass, massOut1, massOut2); 00063 00064 // - isotropic decay angle 00065 G4double costheta = 2.0*G4UniformRand() - 1.0; 00066 G4double sintheta = std::sqrt(1.0 - costheta*costheta); 00067 G4double phi = 2.0*pi*G4UniformRand(); 00068 00069 // - setup LorentzVectors 00070 G4double pz=costheta*breakupMomentum; 00071 G4double px=sintheta*std::cos(phi)*breakupMomentum; 00072 G4double py=sintheta*std::sin(phi)*breakupMomentum; 00073 00074 G4double breakupMomentumSquared=breakupMomentum*breakupMomentum; 00075 G4double energy1=std::sqrt(breakupMomentumSquared+massOut1*massOut1); 00076 G4double energy2=std::sqrt(breakupMomentumSquared+massOut2*massOut2); 00077 00078 G4LorentzVector lorentz1(px, py, pz, energy1); 00079 G4LorentzVector lorentz2(px, py, pz, energy2); 00080 00081 // - back into lab system 00082 00083 lorentz1.boost(betaCMS); 00084 lorentz2.boost(betaCMS); 00085 00086 // fill in new particles: 00087 00088 pOut1->Set4Momentum(lorentz1); 00089 pOut2->Set4Momentum(lorentz2); 00090 00091 return; 00092 }