Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28 // Davide Mancusi, CEA
29 // Alain Boudard, CEA
30 // Sylvie Leray, CEA
31 // Joseph Cugnon, University of Liege
32 //
33 #define INCLXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
45 #include "G4INCLGlobals.hh"
46 
47 namespace G4INCL {
48 
50  // No distortion for neutral particles
51  if(p->getZ()!=0) {
52  const G4bool success = coulombDeviation(p, n);
53  if(!success) // transparent
54  return NULL;
55  }
56 
57  // Rely on the CoulombNone slave to compute the straight-line intersection
58  // and actually bring the particle to the surface of the nucleus
59  return theCoulombNoneSlave.bringToSurface(p,n);
60  }
61 
63  // Neutral clusters?!
64 // assert(c->getZ()>0);
65 
66  // Perform the actual Coulomb deviation
67  const G4bool success = coulombDeviation(c, n);
68  if(!success) {
69  return IAvatarList();
70  }
71 
72  // Rely on the CoulombNone slave to compute the straight-line intersection
73  // and actually bring the particle to the surface of the nucleus
74  return theCoulombNoneSlave.bringToSurface(c,n);
75  }
76 
78  Nucleus const * const nucleus) const {
79 
80  for(ParticleIter particle=pL.begin(); particle!=pL.end(); ++particle) {
81 
82  const G4int Z = (*particle)->getZ();
83  if(Z == 0) continue;
84 
85  const G4double tcos=1.-0.000001;
86 
87  const G4double et1 = PhysicalConstants::eSquared * nucleus->getZ();
88  const G4double transmissionRadius =
89  nucleus->getDensity()->getTransmissionRadius(*particle);
90 
91  const ThreeVector position = (*particle)->getPosition();
92  ThreeVector momentum = (*particle)->getMomentum();
93  const G4double r = position.mag();
94  const G4double p = momentum.mag();
95  const G4double cosTheta = position.dot(momentum)/(r*p);
96  if(cosTheta < 0.999999) {
97  const G4double sinTheta = std::sqrt(1.-cosTheta*cosTheta);
98  const G4double eta = et1 * Z / (*particle)->getKineticEnergy();
99  if(eta > transmissionRadius-0.0001) {
100  // If below the Coulomb barrier, radial emission:
101  momentum = position * (p/r);
102  (*particle)->setMomentum(momentum);
103  } else {
104  const G4double b0 = 0.5 * (eta + std::sqrt(eta*eta +
105  4. * std::pow(transmissionRadius*sinTheta,2)
106  * (1.-eta/transmissionRadius)));
107  const G4double bInf = std::sqrt(b0*(b0-eta));
108  const G4double thr = std::atan(eta/(2.*bInf));
109  G4double uTemp = (1.-b0/transmissionRadius) * std::sin(thr) +
110  b0/transmissionRadius;
111  if(uTemp>tcos) uTemp=tcos;
112  const G4double thd = std::acos(cosTheta)-Math::piOverTwo + thr +
113  std::acos(uTemp);
114  const G4double c1 = std::sin(thd)*cosTheta/sinTheta + std::cos(thd);
115  const G4double c2 = -p*std::sin(thd)/(r*sinTheta);
116  const ThreeVector newMomentum = momentum*c1 + position*c2;
117  (*particle)->setMomentum(newMomentum);
118  }
119  }
120  }
121  }
122 
124  Nucleus const * const n) const {
125  G4double theMaxImpactParameter = maxImpactParameterParticle(p, kinE, n);
126  if(theMaxImpactParameter <= 0.)
127  return 0.;
128  if(p.theType == Composite)
129  theMaxImpactParameter += 2.*ParticleTable::getNuclearRadius(p.theA, p.theZ);
130  return theMaxImpactParameter;
131  }
132 
133  G4double CoulombNonRelativistic::maxImpactParameterParticle(ParticleSpecies const &p, const G4double kinE,
134  Nucleus const * const n) const {
135  const G4double theMinimumDistance = minimumDistance(p, kinE, n);
136  const G4double rMax = n->getCoulombRadius(p);
137  const G4double theMaxImpactParameterSquared = rMax*(rMax-theMinimumDistance);
138  if(theMaxImpactParameterSquared<=0.)
139  return 0.;
140  G4double theMaxImpactParameter = std::sqrt(theMaxImpactParameterSquared);
141  return theMaxImpactParameter;
142  }
143 
144  G4bool CoulombNonRelativistic::coulombDeviation(Particle * const p, Nucleus const * const n) const {
145  // Determine the rotation angle and the new impact parameter
146  ThreeVector positionTransverse = p->getTransversePosition();
147  const G4double impactParameter = positionTransverse.mag();
148 
149  // Some useful variables
150  const G4double theMinimumDistance = minimumDistance(p, n);
151  // deltaTheta2 = (pi - Rutherford scattering angle)/2
152  const G4double deltaTheta2 = std::atan(2.*impactParameter/theMinimumDistance);
153  const G4double eccentricity = 1./std::cos(deltaTheta2);
154 
155  G4double newImpactParameter, alpha; // Parameters that must be determined by the deviation
156 
157  ParticleSpecies aSpecies = p->getSpecies();
158  G4double kineticEnergy = p->getKineticEnergy();
159  // Note that in the following call to maxImpactParameter we are not
160  // interested in the size of the cluster. This is why we call
161  // maxImpactParameterParticle.
162  if(impactParameter>maxImpactParameterParticle(aSpecies, kineticEnergy, n)) {
163  // This should happen only for composite particles, whose trajectory can
164  // geometrically miss the nucleus but still trigger a cascade because of
165  // the finite extension of the projectile.
166  // In this case, the sphere radius is the minimum distance of approach
167  // and the kinematics is very simple.
168  newImpactParameter = 0.5 * theMinimumDistance * (1.+eccentricity); // the minimum distance of approach
169  alpha = Math::piOverTwo - deltaTheta2; // half the Rutherford scattering angle
170  } else {
171  // The particle trajectory intersects the Coulomb sphere
172 
173  // Compute the entrance angle
174  const G4double radius = n->getCoulombRadius(p->getSpecies());
175  G4double argument = -(1. + 2.*impactParameter*impactParameter/(radius*theMinimumDistance))
176  / eccentricity;
177  const G4double thetaIn = Math::twoPi - std::acos(argument) - deltaTheta2;
178 
179  // Velocity angle at the entrance point
180  alpha = std::atan((1+std::cos(thetaIn))
181  / (std::sqrt(eccentricity*eccentricity-1.) - std::sin(thetaIn)));
182  // New impact parameter
183  newImpactParameter = radius * std::sin(thetaIn - alpha);
184  }
185 
186  // Modify the impact parameter of the particle
187  positionTransverse *= newImpactParameter/positionTransverse.mag();
188  const ThreeVector theNewPosition = p->getLongitudinalPosition() + positionTransverse;
189  p->setPosition(theNewPosition);
190 
191  // Determine the rotation axis for the incoming particle
192  const ThreeVector &momentum = p->getMomentum();
193  ThreeVector rotationAxis = momentum.vector(positionTransverse);
194  const G4double axisLength = rotationAxis.mag();
195  // Apply the rotation
196  if(axisLength>1E-20) {
197  rotationAxis /= axisLength;
198  p->rotate(alpha, rotationAxis);
199  }
200 
201  return true;
202  }
203 
204 }