Changeset 961 for trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticScreenedRutherford.cc
- Timestamp:
- Apr 6, 2009, 12:21:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticScreenedRutherford.cc
r819 r961 24 24 // ******************************************************************** 25 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 26 // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1.4 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 51 28 52 29 #include "G4FinalStateElasticScreenedRutherford.hh" 53 #include "G4Track.hh"54 #include "G4Step.hh"55 #include "G4DynamicParticle.hh"56 #include "Randomize.hh"57 30 58 #include "G4ParticleTypes.hh" 59 #include "G4ParticleDefinition.hh" 60 #include "G4Electron.hh" 61 #include "G4SystemOfUnits.hh" 62 #include "G4ParticleMomentum.hh" 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 63 32 64 33 G4FinalStateElasticScreenedRutherford::G4FinalStateElasticScreenedRutherford() 65 34 { 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; 35 lowEnergyLimit = 200 * eV; 70 36 highEnergyLimit = 10 * MeV; 71 37 } 72 38 39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 73 40 74 41 G4FinalStateElasticScreenedRutherford::~G4FinalStateElasticScreenedRutherford() 75 { 76 // empty 77 // G4DynamicParticle objects produced are owned by client 78 } 42 {} 79 43 44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 80 45 81 const G4FinalStateProduct& G4FinalStateElasticScreenedRutherford::GenerateFinalState(const G4Track& track, const G4Step& step)46 const G4FinalStateProduct& G4FinalStateElasticScreenedRutherford::GenerateFinalState(const G4Track& track, const G4Step& ) 82 47 { 83 // Clear previous secondaries, energy deposit and particle kill status84 48 product.Clear(); 85 49 86 // Kinetic energy of primary particle87 50 G4double k = track.GetDynamicParticle()->GetKineticEnergy(); 88 51 89 // Assume material = water; H2O number of electrons90 // ---- MGP ---- To be generalized later91 52 const G4int z = 10; 92 53 … … 94 55 95 56 G4double phi = 2. * pi * G4UniformRand(); 96 97 // G4cout << "cosTheta in GenerateFinalState = " << cosTheta << ", phi = " << phi << G4endl;98 57 99 58 G4ThreeVector zVers = track.GetDynamicParticle()->GetMomentumDirection(); … … 106 65 yDir *= std::sin(phi); 107 66 108 // G4cout << "xDir, yDir = " << xDir <<", " << yDir << G4endl;109 110 // G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers).unit());111 67 G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers)); 112 68 113 // G4cout << "zPrimeVers = (" << zPrimeVers.x() << ", "<< zPrimeVers.y() << ", "<< zPrimeVers.z() << ") " << G4endl;114 115 // product.ModifyPrimaryParticle(zPrimeVers.x(),zPrimeVers.y(),zPrimeVers.z(),k);116 69 product.ModifyPrimaryParticle(zPrimeVers,k); 117 118 // this->aParticleChange.ProposeEnergy(k);119 // this->aParticleChange.ProposeMomentumDirection(zPrimeVers);120 // this->aParticleChange.SetNumberOfSecondaries(0);121 70 122 71 return product; 123 72 } 73 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 124 75 125 76 G4double G4FinalStateElasticScreenedRutherford::RandomizeCosTheta(G4double k, G4int z) const … … 144 95 145 96 do 146 147 148 149 150 97 { 98 cosTheta = 2. * G4UniformRand() - 1.; 99 fCosTheta = (1 + 2.*n - cosTheta); 100 fCosTheta = oneOverMax / (fCosTheta*fCosTheta); 101 } 151 102 while (fCosTheta < G4UniformRand()); 152 103 153 104 return cosTheta; 154 105 } 106 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 155 108 156 109 G4double G4FinalStateElasticScreenedRutherford::ScreeningFactor(G4double k, G4int z) const … … 180 133 G4double result = 0.; 181 134 if (denominator != 0.) 182 183 184 135 { 136 result = numerator / denominator; 137 } 185 138 else 186 { 187 // Throw an exception 188 G4Exception("G4FinalStateElasticScreenedRutherford::ScreeningFactor - denominator = 0"); 189 } 139 { 140 G4Exception("G4FinalStateElasticScreenedRutherford::ScreeningFactor - denominator = 0"); 141 } 190 142 return result; 191 192 143 }
Note: See TracChangeset
for help on using the changeset viewer.