34#define INCLXX_IN_GEANT4_MODE 1
53 const G4bool success = coulombDeviation(p, n);
68 const G4bool success = coulombDeviation(c, n);
79 Nucleus const *
const nucleus)
const {
81 for(
ParticleIter particle=pL.begin(), e=pL.end(); particle!=e; ++particle) {
83 const G4int Z = (*particle)->getZ();
97 if(cosTheta < 0.999999) {
98 const G4double sinTheta = std::sqrt(1.-cosTheta*cosTheta);
99 const G4double eta = et1 * Z / (*particle)->getKineticEnergy();
100 if(eta > transmissionRadius-0.0001) {
103 (*particle)->setMomentum(momentum);
105 const G4double b0 = 0.5 * (eta + std::sqrt(eta*eta +
106 4. * std::pow(transmissionRadius*sinTheta,2)
107 * (1.-eta/transmissionRadius)));
108 const G4double bInf = std::sqrt(b0*(b0-eta));
109 const G4double thr = std::atan(eta/(2.*bInf));
110 G4double uTemp = (1.-b0/transmissionRadius) * std::sin(thr) +
111 b0/transmissionRadius;
112 if(uTemp>tcos) uTemp=tcos;
115 const G4double c1 = std::sin(thd)*cosTheta/sinTheta + std::cos(thd);
116 const G4double c2 = -p*std::sin(thd)/(r*sinTheta);
118 (*particle)->setMomentum(newMomentum);
125 Nucleus const *
const n)
const {
126 const G4double theMinimumDistance = minimumDistance(p, kinE, n);
127 G4double rMax = n->getUniverseRadius();
130 const G4double theMaxImpactParameterSquared = rMax*(rMax-theMinimumDistance);
131 if(theMaxImpactParameterSquared<=0.)
133 const G4double theMaxImpactParameter = std::sqrt(theMaxImpactParameterSquared);
134 return theMaxImpactParameter;
140 const G4double impactParameterSquared = positionTransverse.
mag2();
141 const G4double impactParameter = std::sqrt(impactParameterSquared);
144 const G4double theMinimumDistance = minimumDistance(p, n);
146 G4double deltaTheta2 = std::atan(2.*impactParameter/theMinimumDistance);
149 const G4double eccentricity = 1./std::cos(deltaTheta2);
154 const G4double impactParameterTangentSquared = radius*(radius-theMinimumDistance);
155 if(impactParameterSquared >= impactParameterTangentSquared) {
160 newImpactParameter = 0.5 * theMinimumDistance * (1.+eccentricity);
166 const G4double argument = -(1. + 2.*impactParameter*impactParameter/(radius*theMinimumDistance))
171 alpha = std::atan((1+std::cos(thetaIn))
172 / (std::sqrt(eccentricity*eccentricity-1.) - std::sin(thetaIn)))
175 newImpactParameter = radius * std::sin(thetaIn - alpha);
179 positionTransverse *= newImpactParameter/positionTransverse.
mag();
185 ThreeVector rotationAxis = momentum.
vector(positionTransverse);
188 if(axisLength>1E-20) {
189 rotationAxis /= axisLength;
196 G4double CoulombNonRelativistic::getCoulombRadius(ParticleSpecies
const &p, Nucleus
const *
const n)
const {
198 const G4int Zp = p.theZ;
199 const G4int Ap = p.theA;
200 const G4int Zt =
n->getZ();
201 const G4int At =
n->getA();
206 }
else if(Zp==1 && Ap==3) {
216 const G4double rp = 1.12*Ap13 - 0.94/Ap13;
217 const G4double rt = 1.12*At13 - 0.94/At13;
218 const G4double someRadius = rp+rt+3.2;
224 INCL_ERROR(
"Negative Coulomb radius! Using the sum of nuclear radii = " << radius <<
'\n');
228 ", Z=" << Zt <<
": " << radius <<
'\n');
231 return n->getUniverseRadius();
Class for non-relativistic Coulomb distortion.
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.
ParticleEntryAvatar * bringToSurface(Particle *const p, Nucleus *const n) const
Position the particle on the surface of the nucleus.
G4double getTransmissionRadius(Particle const *const p) const
The radius used for calculating the transmission coefficient.
NuclearDensity const * getDensity() const
Getter for theDensity.
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)
ThreeVector vector(const ThreeVector &v) const
G4double pow13(G4double x)
G4double arcCos(const G4double x)
Calculates arccos with some tolerance on illegal arguments.
G4double pow23(G4double x)
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