| 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1.4 2008/07/14 20:47:34 sincerti Exp $
|
|---|
| 27 | // GEANT4 tag $Name: geant4-09-02-ref-02 $
|
|---|
| 28 |
|
|---|
| 29 | #include "G4FinalStateElasticScreenedRutherford.hh"
|
|---|
| 30 |
|
|---|
| 31 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 32 |
|
|---|
| 33 | G4FinalStateElasticScreenedRutherford::G4FinalStateElasticScreenedRutherford()
|
|---|
| 34 | {
|
|---|
| 35 | lowEnergyLimit = 200 * eV;
|
|---|
| 36 | highEnergyLimit = 10 * MeV;
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 40 |
|
|---|
| 41 | G4FinalStateElasticScreenedRutherford::~G4FinalStateElasticScreenedRutherford()
|
|---|
| 42 | {}
|
|---|
| 43 |
|
|---|
| 44 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 45 |
|
|---|
| 46 | const G4FinalStateProduct& G4FinalStateElasticScreenedRutherford::GenerateFinalState(const G4Track& track, const G4Step& )
|
|---|
| 47 | {
|
|---|
| 48 | product.Clear();
|
|---|
| 49 |
|
|---|
| 50 | G4double k = track.GetDynamicParticle()->GetKineticEnergy();
|
|---|
| 51 |
|
|---|
| 52 | const G4int z = 10;
|
|---|
| 53 |
|
|---|
| 54 | G4double cosTheta = RandomizeCosTheta(k, z);
|
|---|
| 55 |
|
|---|
| 56 | G4double phi = 2. * pi * G4UniformRand();
|
|---|
| 57 |
|
|---|
| 58 | G4ThreeVector zVers = track.GetDynamicParticle()->GetMomentumDirection();
|
|---|
| 59 | G4ThreeVector xVers = zVers.orthogonal();
|
|---|
| 60 | G4ThreeVector yVers = zVers.cross(xVers);
|
|---|
| 61 |
|
|---|
| 62 | G4double xDir = std::sqrt(1. - cosTheta*cosTheta);
|
|---|
| 63 | G4double yDir = xDir;
|
|---|
| 64 | xDir *= std::cos(phi);
|
|---|
| 65 | yDir *= std::sin(phi);
|
|---|
| 66 |
|
|---|
| 67 | G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
|
|---|
| 68 |
|
|---|
| 69 | product.ModifyPrimaryParticle(zPrimeVers,k);
|
|---|
| 70 |
|
|---|
| 71 | return product;
|
|---|
| 72 | }
|
|---|
| 73 |
|
|---|
| 74 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 75 |
|
|---|
| 76 | G4double G4FinalStateElasticScreenedRutherford::RandomizeCosTheta(G4double k, G4int z) const
|
|---|
| 77 | {
|
|---|
| 78 |
|
|---|
| 79 | // d sigma_el sigma_Ruth(K)
|
|---|
| 80 | // ------------ (K) ~ -----------------------------
|
|---|
| 81 | // d Omega (1 + 2 n(K) - cos(theta))^2
|
|---|
| 82 | //
|
|---|
| 83 | // We extract cos(theta) distributed as (1 + 2 n(K) - cos(theta))^-2
|
|---|
| 84 | //
|
|---|
| 85 | // Maximum is for theta=0: 1/(4 n(K)^2) (When n(K) is positive, that is always satisfied within the validity of the process)
|
|---|
| 86 | //
|
|---|
| 87 | // Phys. Med. Biol. 45 (2000) 3171-3194
|
|---|
| 88 |
|
|---|
| 89 | G4double n = ScreeningFactor(k, z);
|
|---|
| 90 |
|
|---|
| 91 | G4double oneOverMax = (4. * n*n);
|
|---|
| 92 |
|
|---|
| 93 | G4double cosTheta;
|
|---|
| 94 | G4double fCosTheta;
|
|---|
| 95 |
|
|---|
| 96 | do
|
|---|
| 97 | {
|
|---|
| 98 | cosTheta = 2. * G4UniformRand() - 1.;
|
|---|
| 99 | fCosTheta = (1 + 2.*n - cosTheta);
|
|---|
| 100 | fCosTheta = oneOverMax / (fCosTheta*fCosTheta);
|
|---|
| 101 | }
|
|---|
| 102 | while (fCosTheta < G4UniformRand());
|
|---|
| 103 |
|
|---|
| 104 | return cosTheta;
|
|---|
| 105 | }
|
|---|
| 106 |
|
|---|
| 107 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 108 |
|
|---|
| 109 | G4double G4FinalStateElasticScreenedRutherford::ScreeningFactor(G4double k, G4int z) const
|
|---|
| 110 | {
|
|---|
| 111 | //
|
|---|
| 112 | // alpha_1 + beta_1 ln(K/eV) constK Z^(2/3)
|
|---|
| 113 | // n(T) = -------------------------- -----------------
|
|---|
| 114 | // K/(m_e c^2) 2 + K/(m_e c^2)
|
|---|
| 115 | //
|
|---|
| 116 | // Where K is the electron non-relativistic kinetic energy
|
|---|
| 117 | //
|
|---|
| 118 | // n(T) > 0 for T < ~ 400 MeV
|
|---|
| 119 | //
|
|---|
| 120 | // Nucl. Instr. Meth. 155 (1978) 145-156
|
|---|
| 121 |
|
|---|
| 122 | const G4double alpha_1 = 1.64;
|
|---|
| 123 | const G4double beta_1 = -0.0825;
|
|---|
| 124 | const G4double constK = 1.7E-5;
|
|---|
| 125 |
|
|---|
| 126 | G4double numerator = (alpha_1 + beta_1 * std::log(k/eV)) * constK * std::pow(static_cast<double>(z), 2./3.);
|
|---|
| 127 |
|
|---|
| 128 | k /= electron_mass_c2;
|
|---|
| 129 |
|
|---|
| 130 | G4double denominator;
|
|---|
| 131 | denominator = k * (2 + k);
|
|---|
| 132 |
|
|---|
| 133 | G4double result = 0.;
|
|---|
| 134 | if (denominator != 0.)
|
|---|
| 135 | {
|
|---|
| 136 | result = numerator / denominator;
|
|---|
| 137 | }
|
|---|
| 138 | else
|
|---|
| 139 | {
|
|---|
| 140 | G4Exception("G4FinalStateElasticScreenedRutherford::ScreeningFactor - denominator = 0");
|
|---|
| 141 | }
|
|---|
| 142 | return result;
|
|---|
| 143 | }
|
|---|