Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLCoulombNonRelativistic.cc
Go to the documentation of this file.
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// INCL++ intra-nuclear cascade model
27// Alain Boudard, CEA-Saclay, France
28// Joseph Cugnon, University of Liege, Belgium
29// Jean-Christophe David, CEA-Saclay, France
30// Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31// Sylvie Leray, CEA-Saclay, France
32// Davide Mancusi, CEA-Saclay, France
33//
34#define INCLXX_IN_GEANT4_MODE 1
35
36#include "globals.hh"
37
38/** \file G4INCLCoulombNonRelativistic.cc
39 * \brief Class for non-relativistic Coulomb distortion.
40 *
41 * \date 14 February 2011
42 * \author Davide Mancusi
43 */
44
46#include "G4INCLGlobals.hh"
47
48namespace G4INCL {
49
51 // No distortion for neutral particles
52 if(p->getZ()!=0) {
53 const G4bool success = coulombDeviation(p, n);
54 if(!success) // transparent
55 return NULL;
56 }
57
58 // Rely on the CoulombNone slave to compute the straight-line intersection
59 // and actually bring the particle to the surface of the nucleus
60 return theCoulombNoneSlave.bringToSurface(p,n);
61 }
62
64 // No distortion for neutral particles
65 if(p->getZ()!=0) {
66 const G4bool success = coulombDeviation(p, n);
67 if(!success) // transparent
68 return NULL;
69 }
70
71 // Rely on the CoulombNone slave to compute the straight-line intersection
72 // and actually bring the particle to the surface of the nucleus
73 return theCoulombNoneSlave.bringToSurfaceAbar(p,n);
74 }
75
77 // Neutral clusters?!
78// assert(c->getZ()>0);
79
80 // Perform the actual Coulomb deviation
81 const G4bool success = coulombDeviation(c, n);
82 if(!success) {
83 return IAvatarList();
84 }
85
86 // Rely on the CoulombNone slave to compute the straight-line intersection
87 // and actually bring the particle to the surface of the nucleus
88 return theCoulombNoneSlave.bringToSurface(c,n);
89 }
90
92 Nucleus const * const nucleus) const {
93
94 for(ParticleIter particle=pL.begin(), e=pL.end(); particle!=e; ++particle) {
95
96 const G4int Z = (*particle)->getZ();
97 if(Z == 0) continue;
98
99 const G4double tcos=1.-0.000001;
100
101 const G4double et1 = PhysicalConstants::eSquared * nucleus->getZ();
102 const G4double transmissionRadius =
103 nucleus->getDensity()->getTransmissionRadius(*particle);
104
105 const ThreeVector position = (*particle)->getPosition();
106 ThreeVector momentum = (*particle)->getMomentum();
107 const G4double r = position.mag();
108 const G4double p = momentum.mag();
109 const G4double cosTheta = position.dot(momentum)/(r*p);
110 if(cosTheta < 0.999999) {
111 const G4double sinTheta = std::sqrt(1.-cosTheta*cosTheta);
112 const G4double eta = et1 * Z / (*particle)->getKineticEnergy();
113 if(eta > transmissionRadius-0.0001) {
114 // If below the Coulomb barrier, radial emission:
115 momentum = position * (p/r);
116 (*particle)->setMomentum(momentum);
117 } else {
118 const G4double b0 = 0.5 * (eta + std::sqrt(eta*eta +
119 4. * std::pow(transmissionRadius*sinTheta,2)
120 * (1.-eta/transmissionRadius)));
121 const G4double bInf = std::sqrt(b0*(b0-eta));
122 const G4double thr = std::atan(eta/(2.*bInf));
123 G4double uTemp = (1.-b0/transmissionRadius) * std::sin(thr) +
124 b0/transmissionRadius;
125 if(uTemp>tcos) uTemp=tcos;
126 const G4double thd = Math::arcCos(cosTheta)-Math::piOverTwo + thr +
127 Math::arcCos(uTemp);
128 const G4double c1 = std::sin(thd)*cosTheta/sinTheta + std::cos(thd);
129 const G4double c2 = -p*std::sin(thd)/(r*sinTheta);
130 const ThreeVector newMomentum = momentum*c1 + position*c2;
131 (*particle)->setMomentum(newMomentum);
132 }
133 }
134 }
135 }
136
138 Nucleus const * const n) const {
139 const G4double theMinimumDistance = minimumDistance(p, kinE, n);
140 G4double rMax = n->getUniverseRadius();
141 if(p.theType == Composite){
143 }
144 if (p.theType == antiComposite){
145 rMax += 2.*ParticleTable::getLargestNuclearRadius(-(p.theA), -(p.theZ));
146 }
147 const G4double theMaxImpactParameterSquared = rMax*(rMax-theMinimumDistance);
148 if(theMaxImpactParameterSquared<=0.)
149 return 0.;
150 const G4double theMaxImpactParameter = std::sqrt(theMaxImpactParameterSquared);
151 return theMaxImpactParameter;
152 }
153
154 G4bool CoulombNonRelativistic::coulombDeviation(Particle * const p, Nucleus const * const n) const {
155 // Determine the rotation angle and the new impact parameter
156 ThreeVector positionTransverse = p->getTransversePosition();
157 const G4double impactParameterSquared = positionTransverse.mag2();
158 const G4double impactParameter = std::sqrt(impactParameterSquared);
159
160 // Some useful variables
161 const G4double theMinimumDistance = minimumDistance(p, n);
162 // deltaTheta2 = (pi - Rutherford scattering angle)/2
163 G4double deltaTheta2 = std::atan(2.*impactParameter/theMinimumDistance);
164 if(deltaTheta2<0.)
165 deltaTheta2 += Math::pi;
166 const G4double eccentricity = 1./std::cos(deltaTheta2);
167
168 G4double newImpactParameter, alpha; // Parameters that must be determined by the deviation
169
170 const G4double radius = getCoulombRadius(p->getSpecies(), n);
171 const G4double impactParameterTangentSquared = radius*(radius-theMinimumDistance);
172 if(impactParameterSquared >= impactParameterTangentSquared) {
173 // The particle trajectory misses the Coulomb sphere
174 // In this case the new impact parameter is the minimum distance of
175 // approach of the hyperbola
176// assert(std::abs(1. + 2.*impactParameter*impactParameter/(radius*theMinimumDistance))>=eccentricity);
177 newImpactParameter = 0.5 * theMinimumDistance * (1.+eccentricity); // the minimum distance of approach
178 alpha = Math::piOverTwo - deltaTheta2; // half the Rutherford scattering angle
179 } else {
180 // The particle trajectory intersects the Coulomb sphere
181
182 // Compute the entrance angle
183 const G4double argument = -(1. + 2.*impactParameter*impactParameter/(radius*theMinimumDistance))
184 / eccentricity;
185 const G4double thetaIn = Math::twoPi - Math::arcCos(argument) - deltaTheta2;
186
187 // Velocity angle at the entrance point
188 alpha = std::atan((1+std::cos(thetaIn))
189 / (std::sqrt(eccentricity*eccentricity-1.) - std::sin(thetaIn)))
190 * Math::sign(theMinimumDistance);
191 // New impact parameter
192 newImpactParameter = radius * std::sin(thetaIn - alpha);
193 }
194
195 // Modify the impact parameter of the particle
196 positionTransverse *= newImpactParameter/positionTransverse.mag();
197 const ThreeVector theNewPosition = p->getLongitudinalPosition() + positionTransverse;
198 p->setPosition(theNewPosition);
199
200 // Determine the rotation axis for the incoming particle
201 const ThreeVector &momentum = p->getMomentum();
202 ThreeVector rotationAxis = momentum.vector(positionTransverse);
203 const G4double axisLength = rotationAxis.mag();
204 // Apply the rotation
205 if(axisLength>1E-20) {
206 rotationAxis /= axisLength;
207 p->rotatePositionAndMomentum(alpha, rotationAxis);
208 }
209
210 return true;
211 }
212
213 G4double CoulombNonRelativistic::getCoulombRadius(ParticleSpecies const &p, Nucleus const * const n) const {
214 if(p.theType == Composite || p.theType == antiComposite) {
215 G4int Zp = p.theZ;
216 G4int Ap = p.theA;
217 const G4int Zt = n->getZ();
218 const G4int At = n->getA();
219 G4double barr, radius = 0.;
220 if(p.theType == antiComposite){
221 Zp = -Zp;
222 Ap = -Ap;
223 }
224 if(Zp==1 && Ap==2) { // d
225 barr = 0.2565*Math::pow23((G4double)At)-0.78;
226 radius = PhysicalConstants::eSquared*Zp*Zt/barr - 2.5;
227 } else if(Zp==1 && Ap==3) { // t
228 barr = 0.5*(0.5009*Math::pow23((G4double)At)-1.16);
229 radius = PhysicalConstants::eSquared*Zt/barr - 0.5;
230 } else if(Zp==2) { // alpha, He3
231 barr = 0.5939*Math::pow23((G4double)At)-1.64;
232 radius = PhysicalConstants::eSquared*Zp*Zt/barr - 0.5;
233 } else if(Zp>2) {
234 // Coulomb radius from the Shen model
235 const G4double Ap13 = Math::pow13((G4double)Ap);
236 const G4double At13 = Math::pow13((G4double)At);
237 const G4double rp = 1.12*Ap13 - 0.94/Ap13;
238 const G4double rt = 1.12*At13 - 0.94/At13;
239 const G4double someRadius = rp+rt+3.2;
240 const G4double theShenBarrier = PhysicalConstants::eSquared*Zp*Zt/someRadius - rt*rp/(rt+rp);
241 radius = PhysicalConstants::eSquared*Zp*Zt/theShenBarrier;
242 }
243 if(radius<=0.) {
245 INCL_ERROR("Negative Coulomb radius! Using the sum of nuclear radii = " << radius << '\n');
246 }
247 INCL_DEBUG("Coulomb radius for particle "
248 << ParticleTable::getShortName(p) << " in nucleus A=" << At <<
249 ", Z=" << Zt << ": " << radius << '\n');
250 return radius;
251 } else
252 return n->getUniverseRadius();
253 }
254
255}
Class for non-relativistic Coulomb distortion.
#define INCL_ERROR(x)
#define INCL_DEBUG(x)
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
ParticleEntryAvatar * bringToSurfaceAbar(Particle *const p, Nucleus *const n) const
void distortOut(ParticleList const &pL, Nucleus const *const n) const
Modify the momenta of the outgoing particles.
G4double maxImpactParameter(ParticleSpecies const &p, const G4double kinE, Nucleus const *const n) const
Return the maximum impact parameter for Coulomb-distorted trajectories.
ParticleEntryAvatar * bringToSurface(Particle *const p, Nucleus *const n) const
Modify the momentum of the particle and position it on the surface of the nucleus.
virtual G4INCL::ParticleSpecies getSpecies() const
Get the particle species.
virtual void rotatePositionAndMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle position and momentum.
G4int getZ() const
Returns the charge number.
ThreeVector getLongitudinalPosition() const
Longitudinal component of the position w.r.t. the momentum.
const G4INCL::ThreeVector & getMomentum() const
ThreeVector getTransversePosition() const
Transverse component of the position w.r.t. the momentum.
virtual void setPosition(const G4INCL::ThreeVector &position)
G4double mag2() const
ThreeVector vector(const ThreeVector &v) const
const G4double pi
const G4double twoPi
G4double pow13(G4double x)
G4double arcCos(const G4double x)
Calculates arccos with some tolerance on illegal arguments.
const G4double piOverTwo
G4double pow23(G4double x)
G4int sign(const T t)
G4double getLargestNuclearRadius(const G4int A, const G4int Z)
std::string getShortName(const ParticleType t)
Get the short INCL name of the particle.
const G4double eSquared
Coulomb conversion factor [MeV*fm].
ParticleList::const_iterator ParticleIter
UnorderedVector< IAvatar * > IAvatarList