[819] | 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 | // |
---|
| 27 | // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1.2 2007/10/12 23:10:33 pia Exp $ |
---|
| 28 | // GEANT4 tag $Name: $ |
---|
| 29 | // |
---|
| 30 | // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) |
---|
| 31 | // |
---|
| 32 | // Reference: TNS Geant4-DNA paper |
---|
| 33 | // Reference for implementation model: NIM. 155, pp. 145-156, 1978 |
---|
| 34 | |
---|
| 35 | // History: |
---|
| 36 | // ----------- |
---|
| 37 | // Date Name Modification |
---|
| 38 | // 28 Apr 2007 M.G. Pia Created in compliance with design described in TNS paper |
---|
| 39 | // |
---|
| 40 | // ------------------------------------------------------------------- |
---|
| 41 | |
---|
| 42 | // Class description: |
---|
| 43 | // Reference: TNS Geant4-DNA paper |
---|
| 44 | // S. Chauvie et al., Geant4 physics processes for microdosimetry simulation: |
---|
| 45 | // design foundation and implementation of the first set of models, |
---|
| 46 | // IEEE Trans. Nucl. Sci., vol. 54, no. 6, Dec. 2007. |
---|
| 47 | // Further documentation available from http://www.ge.infn.it/geant4/dna |
---|
| 48 | |
---|
| 49 | // ------------------------------------------------------------------- |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | #include "G4FinalStateElasticScreenedRutherford.hh" |
---|
| 53 | #include "G4Track.hh" |
---|
| 54 | #include "G4Step.hh" |
---|
| 55 | #include "G4DynamicParticle.hh" |
---|
| 56 | #include "Randomize.hh" |
---|
| 57 | |
---|
| 58 | #include "G4ParticleTypes.hh" |
---|
| 59 | #include "G4ParticleDefinition.hh" |
---|
| 60 | #include "G4Electron.hh" |
---|
| 61 | #include "G4SystemOfUnits.hh" |
---|
| 62 | #include "G4ParticleMomentum.hh" |
---|
| 63 | |
---|
| 64 | G4FinalStateElasticScreenedRutherford::G4FinalStateElasticScreenedRutherford() |
---|
| 65 | { |
---|
| 66 | // These data members will be used in the next implementation iteration, |
---|
| 67 | // when the enriched PhysicsModel policy is implemented |
---|
| 68 | name = "FinalStateElasticScreenedRutherford"; |
---|
| 69 | lowEnergyLimit = 7.4 * eV; |
---|
| 70 | highEnergyLimit = 10 * MeV; |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | G4FinalStateElasticScreenedRutherford::~G4FinalStateElasticScreenedRutherford() |
---|
| 75 | { |
---|
| 76 | // empty |
---|
| 77 | // G4DynamicParticle objects produced are owned by client |
---|
| 78 | } |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | const G4FinalStateProduct& G4FinalStateElasticScreenedRutherford::GenerateFinalState(const G4Track& track, const G4Step& step) |
---|
| 82 | { |
---|
| 83 | // Clear previous secondaries, energy deposit and particle kill status |
---|
| 84 | product.Clear(); |
---|
| 85 | |
---|
| 86 | // Kinetic energy of primary particle |
---|
| 87 | G4double k = track.GetDynamicParticle()->GetKineticEnergy(); |
---|
| 88 | |
---|
| 89 | // Assume material = water; H2O number of electrons |
---|
| 90 | // ---- MGP ---- To be generalized later |
---|
| 91 | const G4int z = 10; |
---|
| 92 | |
---|
| 93 | G4double cosTheta = RandomizeCosTheta(k, z); |
---|
| 94 | |
---|
| 95 | G4double phi = 2. * pi * G4UniformRand(); |
---|
| 96 | |
---|
| 97 | // G4cout << "cosTheta in GenerateFinalState = " << cosTheta << ", phi = " << phi << G4endl; |
---|
| 98 | |
---|
| 99 | G4ThreeVector zVers = track.GetDynamicParticle()->GetMomentumDirection(); |
---|
| 100 | G4ThreeVector xVers = zVers.orthogonal(); |
---|
| 101 | G4ThreeVector yVers = zVers.cross(xVers); |
---|
| 102 | |
---|
| 103 | G4double xDir = std::sqrt(1. - cosTheta*cosTheta); |
---|
| 104 | G4double yDir = xDir; |
---|
| 105 | xDir *= std::cos(phi); |
---|
| 106 | yDir *= std::sin(phi); |
---|
| 107 | |
---|
| 108 | // G4cout << "xDir, yDir = " << xDir <<", " << yDir << G4endl; |
---|
| 109 | |
---|
| 110 | // G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers).unit()); |
---|
| 111 | G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers)); |
---|
| 112 | |
---|
| 113 | // G4cout << "zPrimeVers = (" << zPrimeVers.x() << ", "<< zPrimeVers.y() << ", "<< zPrimeVers.z() << ") " << G4endl; |
---|
| 114 | |
---|
| 115 | // product.ModifyPrimaryParticle(zPrimeVers.x(),zPrimeVers.y(),zPrimeVers.z(),k); |
---|
| 116 | product.ModifyPrimaryParticle(zPrimeVers,k); |
---|
| 117 | |
---|
| 118 | // this->aParticleChange.ProposeEnergy(k); |
---|
| 119 | // this->aParticleChange.ProposeMomentumDirection(zPrimeVers); |
---|
| 120 | // this->aParticleChange.SetNumberOfSecondaries(0); |
---|
| 121 | |
---|
| 122 | return product; |
---|
| 123 | } |
---|
| 124 | |
---|
| 125 | G4double G4FinalStateElasticScreenedRutherford::RandomizeCosTheta(G4double k, G4int z) const |
---|
| 126 | { |
---|
| 127 | |
---|
| 128 | // d sigma_el sigma_Ruth(K) |
---|
| 129 | // ------------ (K) ~ ----------------------------- |
---|
| 130 | // d Omega (1 + 2 n(K) - cos(theta))^2 |
---|
| 131 | // |
---|
| 132 | // We extract cos(theta) distributed as (1 + 2 n(K) - cos(theta))^-2 |
---|
| 133 | // |
---|
| 134 | // 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) |
---|
| 135 | // |
---|
| 136 | // Phys. Med. Biol. 45 (2000) 3171-3194 |
---|
| 137 | |
---|
| 138 | G4double n = ScreeningFactor(k, z); |
---|
| 139 | |
---|
| 140 | G4double oneOverMax = (4. * n*n); |
---|
| 141 | |
---|
| 142 | G4double cosTheta; |
---|
| 143 | G4double fCosTheta; |
---|
| 144 | |
---|
| 145 | do |
---|
| 146 | { |
---|
| 147 | cosTheta = 2. * G4UniformRand() - 1.; |
---|
| 148 | fCosTheta = (1 + 2.*n - cosTheta); |
---|
| 149 | fCosTheta = oneOverMax / (fCosTheta*fCosTheta); |
---|
| 150 | } |
---|
| 151 | while (fCosTheta < G4UniformRand()); |
---|
| 152 | |
---|
| 153 | return cosTheta; |
---|
| 154 | } |
---|
| 155 | |
---|
| 156 | G4double G4FinalStateElasticScreenedRutherford::ScreeningFactor(G4double k, G4int z) const |
---|
| 157 | { |
---|
| 158 | // |
---|
| 159 | // alpha_1 + beta_1 ln(K/eV) constK Z^(2/3) |
---|
| 160 | // n(T) = -------------------------- ----------------- |
---|
| 161 | // K/(m_e c^2) 2 + K/(m_e c^2) |
---|
| 162 | // |
---|
| 163 | // Where K is the electron non-relativistic kinetic energy |
---|
| 164 | // |
---|
| 165 | // n(T) > 0 for T < ~ 400 MeV |
---|
| 166 | // |
---|
| 167 | // Nucl. Instr. Meth. 155 (1978) 145-156 |
---|
| 168 | |
---|
| 169 | const G4double alpha_1 = 1.64; |
---|
| 170 | const G4double beta_1 = -0.0825; |
---|
| 171 | const G4double constK = 1.7E-5; |
---|
| 172 | |
---|
| 173 | G4double numerator = (alpha_1 + beta_1 * std::log(k/eV)) * constK * std::pow(static_cast<double>(z), 2./3.); |
---|
| 174 | |
---|
| 175 | k /= electron_mass_c2; |
---|
| 176 | |
---|
| 177 | G4double denominator; |
---|
| 178 | denominator = k * (2 + k); |
---|
| 179 | |
---|
| 180 | G4double result = 0.; |
---|
| 181 | if (denominator != 0.) |
---|
| 182 | { |
---|
| 183 | result = numerator / denominator; |
---|
| 184 | } |
---|
| 185 | else |
---|
| 186 | { |
---|
| 187 | // Throw an exception |
---|
| 188 | G4Exception("G4FinalStateElasticScreenedRutherford::ScreeningFactor - denominator = 0"); |
---|
| 189 | } |
---|
| 190 | return result; |
---|
| 191 | |
---|
| 192 | } |
---|