60 G4double G4WentzelOKandVIxSection::ScreenRSquareElec[] = {0.0};
61 G4double G4WentzelOKandVIxSection::ScreenRSquare[] = {0.0};
62 G4double G4WentzelOKandVIxSection::FormFactor[] = {0.0};
80 lowEnergyLimit = 1.0*
eV;
90 if(0.0 == ScreenRSquare[0]) {
94 ScreenRSquare[0] = alpha2*a0*
a0;
95 ScreenRSquareElec[0] = ScreenRSquare[0];
96 for(
G4int j=1; j<100; ++j) {
98 if(1 == j) { ScreenRSquare[j] = 0.5*alpha2*a0*
a0; }
100 ScreenRSquare[j] = 0.5*(1 +
G4Exp(-j*j*0.001))*alpha2*x*x;
101 ScreenRSquareElec[j] = 0.5*alpha2*x*x;
103 x = fNistManager->
GetA27(j);
104 FormFactor[j] = constn*x*x;
108 factB = factD = formfactA = screenZ = 0.0;
109 cosTetMaxElec = cosTetMaxNuc = invbeta2 = kinFactor = gam0pcmp = pcmp2 = 1.0;
113 tkin = mom2 = momCM2 = factorA2 = mass = spin = chargeSquare = charge3 = 0.0;
131 tkin = mom2 = momCM2 = 0.0;
136 if(isCombined) { cosThetaMax = cosThetaLim; }
141 currentMaterial =
nullptr;
158 if(0.0 != spin) { spin = 0.5; }
161 charge3 = chargeSquare*q;
172 G4double cosTetMaxNuc2 = cosTetMaxNuc;
173 if(Z != targetZ || tkin != etag) {
176 if(targetZ > 99) { targetZ = 99; }
183 kinFactor = coeff*Z*chargeSquare*invbeta2/mom2;
186 screenZ = ScreenRSquare[targetZ]/mom2;
187 }
else if(mass >
MeV) {
188 screenZ =
std::min(Z*1.13,1.13 +3.76*Z*Z*invbeta2*alpha2*chargeSquare)*
189 ScreenRSquare[targetZ]/mom2;
192 screenZ =
std::min(Z*1.13,(1.13 +3.76*Z*Z
193 *invbeta2*alpha2*std::sqrt(tau/(tau + fG4pow->
Z23(targetZ)))))*
194 ScreenRSquareElec[targetZ]/mom2;
196 if(targetZ == 1 && cosTetMaxNuc2 < 0.0 && particle == theProton) {
199 formfactA = FormFactor[targetZ]*mom2;
202 ComputeMaxElectronScattering(cut);
204 return cosTetMaxNuc2;
213 if(cosTMax >= 1.0) {
return xSection; }
226 x = (1.0 - costm)/screenZ;
229 y = x2*(1.0 - 1.3333333*x + 3*x2);
230 if(0.0 < factB) { y -= fb*x2*x*(0.6666667 - x); }
233 xlog =
G4Log(1.0 + x);
235 if(0.0 < factB) { y -= fb*(x + x1 - 2*xlog); }
240 if(nwarnings < nwarnlimit) {
241 G4cout <<
"G4WentzelOKandVIxSection::ComputeTransportCrossSectionPerAtom"
242 <<
" scattering on e- <0"
245 <<
" e(MeV)= " << tkin <<
" p(MeV/c)= " << sqrt(mom2)
246 <<
" Z= " << targetZ <<
" "
248 G4cout <<
" 1-costm= " << 1.0-costm <<
" screenZ= " << screenZ
265 x = (1.0 - cosTMax)/screenZ;
268 y = x2*(1.0 - 1.3333333*x + 3*x2);
269 if(0.0 < factB) { y -= fb*x2*x*(0.6666667 - x); }
272 xlog =
G4Log(1.0 + x);
274 if(0.0 < factB) { y -= fb*(x + x1 - 2*xlog); }
279 if(nwarnings < nwarnlimit) {
280 G4cout <<
"G4WentzelOKandVIxSection::ComputeTransportCrossSectionPerAtom"
281 <<
" scattering on nucleus <0"
284 <<
" e(MeV)= " << tkin <<
" Z= " << targetZ <<
" "
286 G4cout <<
" formfactA= " << formfactA <<
" screenZ= " << screenZ
287 <<
" x= " <<
" x1= " << x1 <<
G4endl;
291 xSection += y*targetZ;
293 xSection *= kinFactor;
313 temp.
set(0.0,0.0,1.0);
319 if(elecRatio > 0.0) {
320 if(rndmEngineMod->
flat() <= elecRatio) {
322 cost1 =
std::max(cost1,cosTetMaxElec);
323 cost2 =
std::max(cost2,cosTetMaxElec);
329 G4double z1 = w1*w2/(w1 + rndmEngineMod->
flat()*(w2 - w1)) - screenZ;
336 fm =
G4Exp(-2*formf*z1);
337 }
else if(fNucFormfactor ==
fFlatNF) {
339 G4double x = std::sqrt(2.*mom2*z1)*ccoef*2.;
340 fm = FlatFormfactor(x);
341 fm *= FlatFormfactor(x*0.6
345 G4double grej = (1. - z1*factB + factB1*targetZ*sqrt(z1*factB)*(2. - z1))
346 *fm*fm/(1.0 + z1*factD);
348 if(rndmEngineMod->
flat() <= grej) {
351 if(cost > 1.0) { cost = 1.0; }
352 else if(cost < -1.0) { cost =-1.0; }
353 G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
356 temp.
set(sint*cos(phi),sint*sin(phi),cost);
365 G4WentzelOKandVIxSection::ComputeMaxElectronScattering(
G4double cutEnergy)
371 (1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);
377 if(particle == theElectron) { tmax *= 0.5; }
385 G4double mom22 = t1*(t1 + 2.0*mass);
386 G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);
387 if(ctm < 1.0) { cosTetMaxElec = ctm; }
388 if(particle == theElectron && cosTetMaxElec < 0.0) {
void set(double x, double y, double z)
static G4Pow * GetInstance()
void SetupParticle(const G4ParticleDefinition *)
void SetTargetMass(G4double value)
G4WentzelOKandVIxSection(G4bool combined=true)
static constexpr double proton_mass_c2
static constexpr double hbarc
G4double ComputeSecondTransportMoment(G4double CosThetaMax)
G4double GetA27(G4int Z) const
static G4NistManager * Instance()
G4double SetupTarget(G4int Z, G4double cut=DBL_MAX)
const G4String & GetParticleName() const
static constexpr double twopi
static constexpr double electron_mass_c2
virtual ~G4WentzelOKandVIxSection()
G4double ComputeTransportCrossSectionPerAtom(G4double CosThetaMax)
G4GLOB_DLL std::ostream G4cout
G4double Z13(G4int Z) const
static constexpr double classic_electr_radius
static constexpr double eplus
static G4Proton * Proton()
static constexpr double eV
static constexpr double amu_c2
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4NuclearFormfactorType NuclearFormfactorType() const
static G4Positron * Positron()
G4double GetPDGMass() const
G4double A13(G4double A) const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4EmParameters * Instance()
static constexpr double fermi
G4double GetAtomicMassAmu(const G4String &symb) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double Z23(G4int Z) const
G4double GetPDGSpin() const
static G4Electron * Electron()
static constexpr double MeV
static constexpr double fine_structure_const
G4double GetPDGCharge() const
static constexpr double pi
void Initialise(const G4ParticleDefinition *, G4double CosThetaLim)
G4double FactorForAngleLimit() const
G4ThreeVector & SampleSingleScattering(G4double CosThetaMin, G4double CosThetaMax, G4double elecRatio=0.0)