35#define INCLXX_IN_GEANT4_MODE 1
54 const G4bool success = coulombDeviation(p, n);
69 const G4bool success = coulombDeviation(c, n);
80 Nucleus const *
const nucleus)
const {
82 for(
ParticleIter particle=pL.begin(); particle!=pL.end(); ++particle) {
84 const G4int Z = (*particle)->getZ();
98 if(cosTheta < 0.999999) {
99 const G4double sinTheta = std::sqrt(1.-cosTheta*cosTheta);
100 const G4double eta = et1 * Z / (*particle)->getKineticEnergy();
101 if(eta > transmissionRadius-0.0001) {
104 (*particle)->setMomentum(momentum);
106 const G4double b0 = 0.5 * (eta + std::sqrt(eta*eta +
107 4. * std::pow(transmissionRadius*sinTheta,2)
108 * (1.-eta/transmissionRadius)));
109 const G4double bInf = std::sqrt(b0*(b0-eta));
110 const G4double thr = std::atan(eta/(2.*bInf));
111 G4double uTemp = (1.-b0/transmissionRadius) * std::sin(thr) +
112 b0/transmissionRadius;
113 if(uTemp>tcos) uTemp=tcos;
116 const G4double c1 = std::sin(thd)*cosTheta/sinTheta + std::cos(thd);
117 const G4double c2 = -p*std::sin(thd)/(r*sinTheta);
119 (*particle)->setMomentum(newMomentum);
126 Nucleus const *
const n)
const {
127 G4double theMaxImpactParameter = maxImpactParameterParticle(p, kinE, n);
128 if(theMaxImpactParameter <= 0.)
132 return theMaxImpactParameter;
136 Nucleus const *
const n)
const {
137 const G4double theMinimumDistance = minimumDistance(p, kinE, n);
138 const G4double rMax = n->getCoulombRadius(p);
139 const G4double theMaxImpactParameterSquared = rMax*(rMax-theMinimumDistance);
140 if(theMaxImpactParameterSquared<=0.)
142 G4double theMaxImpactParameter = std::sqrt(theMaxImpactParameterSquared);
143 return theMaxImpactParameter;
146 G4bool CoulombNonRelativistic::coulombDeviation(Particle *
const p, Nucleus
const *
const n)
const {
148 ThreeVector positionTransverse = p->getTransversePosition();
149 const G4double impactParameter = positionTransverse.mag();
152 const G4double theMinimumDistance = minimumDistance(p, n);
154 const G4double deltaTheta2 = std::atan(2.*impactParameter/theMinimumDistance);
155 const G4double eccentricity = 1./std::cos(deltaTheta2);
159 ParticleSpecies aSpecies = p->getSpecies();
160 G4double kineticEnergy = p->getKineticEnergy();
164 if(impactParameter>maxImpactParameterParticle(aSpecies, kineticEnergy, n)) {
170 newImpactParameter = 0.5 * theMinimumDistance * (1.+eccentricity);
176 const G4double radius =
n->getCoulombRadius(p->getSpecies());
177 G4double argument = -(1. + 2.*impactParameter*impactParameter/(radius*theMinimumDistance))
182 alpha = std::atan((1+std::cos(thetaIn))
183 / (std::sqrt(eccentricity*eccentricity-1.) - std::sin(thetaIn)));
185 newImpactParameter = radius * std::sin(thetaIn - alpha);
189 positionTransverse *= newImpactParameter/positionTransverse.mag();
190 const ThreeVector theNewPosition = p->getLongitudinalPosition() + positionTransverse;
191 p->setPosition(theNewPosition);
194 const ThreeVector &momentum = p->getMomentum();
195 ThreeVector rotationAxis = momentum.vector(positionTransverse);
196 const G4double axisLength = rotationAxis.mag();
198 if(axisLength>1E-20) {
199 rotationAxis /= axisLength;
200 p->rotate(alpha, rotationAxis);
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 * getDensity() const
Getter for theDensity.
static G4double getNuclearRadius(const G4int A, const G4int Z)
G4int getZ() const
Returns the charge number.
const G4double eSquared
Coulomb conversion factor [MeV*fm].
std::list< IAvatar * > IAvatarList
std::list< G4INCL::Particle * > ParticleList
std::list< G4INCL::Particle * >::const_iterator ParticleIter