source: trunk/source/processes/electromagnetic/standard/src/G4CoulombScatteringModel.cc@ 1305

Last change on this file since 1305 was 1228, checked in by garnier, 16 years ago

update geant4.9.3 tag

File size: 7.3 KB
RevLine 
[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//
[1228]26// $Id: G4CoulombScatteringModel.cc,v 1.44 2009/12/03 09:59:07 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-03 $
[819]28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class file
32//
33//
34// File name: G4CoulombScatteringModel
35//
36// Author: Vladimir Ivanchenko
37//
38// Creation date: 22.08.2005
39//
40// Modifications:
[1196]41//
[819]42// 01.08.06 V.Ivanchenko extend upper limit of table to TeV and review the
43// logic of building - only elements from G4ElementTable
44// 08.08.06 V.Ivanchenko build internal table in ekin scale, introduce faclim
45// 19.10.06 V.Ivanchenko use inheritance from G4eCoulombScatteringModel
46// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
[961]47// 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class
[1196]48// 16.06.09 Consolandi rows 109, 111-112, 183, 185-186
[819]49//
[1196]50//
[819]51// Class Description:
52//
53// -------------------------------------------------------------------
54//
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57
58#include "G4CoulombScatteringModel.hh"
59#include "Randomize.hh"
60#include "G4ParticleChangeForGamma.hh"
61#include "G4ParticleTable.hh"
62#include "G4IonTable.hh"
63#include "G4Proton.hh"
64
65//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
66
67using namespace std;
68
[961]69G4CoulombScatteringModel::G4CoulombScatteringModel(const G4String& nam)
70 : G4eCoulombScatteringModel(nam)
71{}
[819]72
73//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
74
75G4CoulombScatteringModel::~G4CoulombScatteringModel()
76{}
77
78//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
79
80G4double G4CoulombScatteringModel::ComputeCrossSectionPerAtom(
81 const G4ParticleDefinition* p,
82 G4double kinEnergy,
83 G4double Z,
[961]84 G4double,
[819]85 G4double cutEnergy,
86 G4double)
87{
[961]88 SetupParticle(p);
[1196]89 if(kinEnergy < lowEnergyLimit) return 0.0;
90 SetupKinematic(kinEnergy, cutEnergy);
[819]91
[961]92 // save lab system kinematics
93 G4double xtkin = tkin;
94 G4double xmom2 = mom2;
95 G4double xinvb = invbeta2;
[819]96
97 // CM system
[1055]98 iz = G4int(Z);
[961]99 G4double m2 = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
[819]100 G4double etot = tkin + mass;
101 G4double ptot = sqrt(mom2);
102
[961]103 G4double m12 = mass*mass;
104 G4double momCM= ptot*m2/sqrt(m12 + m2*m2 + 2.0*etot*m2);
[819]105
[961]106 mom2 = momCM*momCM;
107 tkin = sqrt(mom2 + m12) - mass;
[819]108
[1196]109 //invbeta2 = 1.0 + m12/mom2;
[1228]110 // G4double fm = m2/(mass + m2);
[1196]111
[1228]112 // 03.09.2009 C.Consaldi
113 G4double Ecm=sqrt(m12 + m2*m2 + 2.0*etot*m2);
114 G4double mu_rel=mass*m2/Ecm;
115
116 invbeta2 = 1.0 + mu_rel*mu_rel/mom2;
117 //
118
[961]119 SetupTarget(Z, tkin);
[819]120
[961]121 G4double xsec = CrossSectionPerAtom();
[819]122
[961]123 // restore Lab system kinematics
124 tkin = xtkin;
125 mom2 = xmom2;
126 invbeta2 = xinvb;
127
128 return xsec;
[819]129}
130
131//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
132
133void G4CoulombScatteringModel::SampleSecondaries(
134 std::vector<G4DynamicParticle*>* fvect,
135 const G4MaterialCutsCouple* couple,
136 const G4DynamicParticle* dp,
137 G4double cutEnergy,
[961]138 G4double)
[819]139{
140 G4double kinEnergy = dp->GetKineticEnergy();
[1196]141 if(kinEnergy < lowEnergyLimit) return;
[961]142 DefineMaterial(couple);
143 SetupParticle(dp->GetDefinition());
[1196]144 SetupKinematic(kinEnergy, cutEnergy);
[819]145
[961]146 // Choose nucleus
[1196]147 currentElement = SelectRandomAtom(couple,particle,
148 kinEnergy,ecut,kinEnergy);
[961]149
150 G4double Z = currentElement->GetZ();
[1055]151 iz = G4int(Z);
[961]152 G4int ia = SelectIsotopeNumber(currentElement);
153 G4double m2 = theParticleTable->GetIonTable()->GetNucleusMass(iz, ia);
[819]154
[961]155 // CM system
156 G4double etot = tkin + mass;
157 G4double ptot = sqrt(mom2);
[819]158
[961]159 G4double momCM= ptot*m2/sqrt(mass*mass + m2*m2 + 2.0*etot*m2);
160 mom2 = momCM*momCM;
161 G4double m12 = mass*mass;
162 G4double eCM = sqrt(mom2 + m12);
[819]163
[961]164 // a correction for heavy projectile
[1228]165 // G4double fm = m2/(mass + m2);
166 // invbeta2 = 1.0 + m12*fm*fm/mom2;
[819]167
[1228]168 // 03.09.2009 C.Consaldi
169 G4double Ecm=sqrt(m12 + m2*m2 + 2.0*etot*m2);
170 G4double mu_rel=mass*m2/Ecm;
171
172 invbeta2 = 1.0 + mu_rel*mu_rel/mom2;
173 //
174
[961]175 // sample scattering angle in CM system
176 SetupTarget(Z, eCM - mass);
[819]177
[961]178 G4double cost = SampleCosineTheta();
179 G4double z1 = 1.0 - cost;
180 if(z1 < 0.0) return;
181 G4double sint = sqrt(z1*(1.0 + cost));
182 G4double phi = twopi * G4UniformRand();
[819]183
[961]184 // kinematics in the Lab system
185 G4double bet = ptot/(etot + m2);
186 G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
187 G4double pzCM = momCM*cost;
[819]188
[961]189 G4ThreeVector v1(momCM*cos(phi)*sint,momCM*sin(phi)*sint,gam*(pzCM + bet*eCM));
[819]190 G4ThreeVector dir = dp->GetMomentumDirection();
191 G4ThreeVector newDirection = v1.unit();
192 newDirection.rotateUz(dir);
193 fParticleChange->ProposeMomentumDirection(newDirection);
[961]194
[1228]195 // G4double elab = gam*(eCM + bet*pzCM);
[819]196
[1228]197 // G4double Ecm = sqrt(mass*mass + m2*m2 + 2.0*etot*m2);
[1196]198 G4double elab = etot - m2*(ptot/Ecm)*(ptot/Ecm)*(1.-cost) ;
199
200
201 G4double finalT = elab - mass;
202 if(finalT < 0.0) finalT = 0.0;
203 fParticleChange->SetProposedKineticEnergy(finalT);
204
[819]205 // recoil
[1196]206 G4double erec = kinEnergy - finalT;
[961]207
[1196]208 G4double tcut = recoilThreshold;
209 if(pCuts) { tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]); }
210
211 if(erec > tcut) {
[819]212 G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz);
[1196]213 G4double plab = sqrt(finalT*(finalT + 2.0*mass));
[819]214 G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit();
215 G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, erec);
216 fvect->push_back(newdp);
217 } else if(erec > 0.0) {
218 fParticleChange->ProposeLocalEnergyDeposit(erec);
219 fParticleChange->ProposeNonIonizingEnergyDeposit(erec);
220 }
221}
222
223//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224
Note: See TracBrowser for help on using the repository browser.