00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // 00028 // CERN Geneva Switzerland 00029 // 00030 // ------------ G4ReactionDynamics::TwoBody ------ 00031 // new method TwoBodyScattering 00032 // by Christian V"olcker (CERN-Munich), September 1997 00033 // E-mail: Christian.Volcker@cern.ch 00034 // ************************************************************ 00035 //----------------------------------------------------------------------------- 00036 00037 #include "G4ReactionKinematics.hh" 00038 #include "G4PhysicalConstants.hh" 00039 00040 // ************************************************************ 00041 void G4ReactionKinematics::TwoBodyScattering( 00042 const G4DynamicParticle* pIn1, const G4DynamicParticle* pIn2, 00043 G4DynamicParticle* pOut1, G4DynamicParticle* pOut2) 00044 // ************************************************************ 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 }