Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ReactionKinematics Class Reference

#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)
 

Detailed Description

Definition at line 48 of file G4ReactionKinematics.hh.

Member Function Documentation

◆ BreakupMomentum()

G4double G4ReactionKinematics::BreakupMomentum ( G4double  totalMass,
G4double  m1,
G4double  m2 
)
inline

Definition at line 57 of file G4ReactionKinematics.hh.

58 {
59
60// is aequivalent to G4double G4PhaseSpaceDecayChannel::Pmx !!
61
62 G4double m0squared=totalMass*totalMass;
63 G4double breakupMomentumSquared=
64 (m0squared-(massA+massB)*(massA+massB))*
65 (m0squared-(massA-massB)*(massA-massB))/
66 (4*m0squared);
67 if (breakupMomentumSquared>0) return std::sqrt(breakupMomentumSquared);
68 else return -1.;
69}
double G4double
Definition: G4Types.hh:64

Referenced by TwoBodyScattering().

◆ TwoBodyScattering()

void G4ReactionKinematics::TwoBodyScattering ( const G4DynamicParticle pIn1,
const G4DynamicParticle pIn2,
G4DynamicParticle pOut1,
G4DynamicParticle pOut2 
)

Definition at line 41 of file G4ReactionKinematics.cc.

45{
46// initial particles:
47
48// - total invariant mass
49 G4LorentzVector sumIn(pIn1->Get4Momentum()+pIn2->Get4Momentum());
50 G4double invariantMass=sumIn.mag();
51
52// - beta of center-of-mass system
53 G4ThreeVector betaCMS=sumIn.boostVector();
54
55// final particles:
56
57// - get final particle masses
58 G4double massOut1=pOut1->GetMass();
59 G4double massOut2=pOut2->GetMass();
60
61// - calculate breakup momentum:
62 G4double breakupMomentum=BreakupMomentum(invariantMass, massOut1, massOut2);
63
64// - isotropic decay angle
65 G4double costheta = 2.0*G4UniformRand() - 1.0;
66 G4double sintheta = std::sqrt(1.0 - costheta*costheta);
67 G4double phi = 2.0*pi*G4UniformRand();
68
69// - setup LorentzVectors
70 G4double pz=costheta*breakupMomentum;
71 G4double px=sintheta*std::cos(phi)*breakupMomentum;
72 G4double py=sintheta*std::sin(phi)*breakupMomentum;
73
74 G4double breakupMomentumSquared=breakupMomentum*breakupMomentum;
75 G4double energy1=std::sqrt(breakupMomentumSquared+massOut1*massOut1);
76 G4double energy2=std::sqrt(breakupMomentumSquared+massOut2*massOut2);
77
78 G4LorentzVector lorentz1(px, py, pz, energy1);
79 G4LorentzVector lorentz2(px, py, pz, energy2);
80
81// - back into lab system
82
83 lorentz1.boost(betaCMS);
84 lorentz2.boost(betaCMS);
85
86// fill in new particles:
87
88 pOut1->Set4Momentum(lorentz1);
89 pOut2->Set4Momentum(lorentz2);
90
91 return;
92}
#define G4UniformRand()
Definition: Randomize.hh:53
G4double GetMass() const
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double BreakupMomentum(G4double totalMass, G4double m1, G4double m2)
const G4double pi

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