62 G4double G4WentzelVIRelXSection::ScreenRSquare[] = {0.0};
63 G4double G4WentzelVIRelXSection::FormFactor[] = {0.0};
80 lowEnergyLimit = 1.0*
eV;
88 if(0.0 == ScreenRSquare[0]) {
92 ScreenRSquare[0] = alpha2*a0*
a0;
93 for(
G4int j=1; j<100; ++j) {
96 ScreenRSquare[j] = 0.5*alpha2*x*
x;
97 x = fNistManager->
GetA27(j);
98 FormFactor[j] = constn*x*
x;
102 factB = factD = formfactA = screenZ = 0.0;
103 cosTetMaxElec = cosTetMaxNuc = invbeta2 = kinFactor = gam0pcmp = pcmp2 = 1.0;
108 tkin = mom2 = momCM2 = factorA2 = mass = spin = chargeSquare = charge3 = 0.0;
125 tkin = mom2 = momCM2 = 0.0;
130 if(isCombined) { cosThetaMax = cosThetaLim; }
135 currentMaterial =
nullptr;
145 if(0.0 != spin) { spin = 0.5; }
148 charge3 = chargeSquare*q;
150 currentMaterial =
nullptr;
159 G4double cosTetMaxNuc2 = cosTetMaxNuc;
160 if(Z != targetZ || tkin != etag) {
164 kinFactor = coeff*targetZ*chargeSquare*invbeta2/mom2;
166 screenZ = ScreenRSquare[targetZ]/mom2;
168 screenZ *=
std::min(Z*1.13,1.13 +3.76*Z*Z*invbeta2*alpha2*chargeSquare);
170 if(targetZ == 1 && cosTetMaxNuc2 < 0.0 && particle == theProton) {
173 formfactA = FormFactor[targetZ]*mom2;
176 ComputeMaxElectronScattering(cut);
178 return cosTetMaxNuc2;
187 if(cosTMax >= 1.0) {
return xsec; }
201 x = (1.0 - costm)/screenZ;
204 y = x2*(1.0 - 1.3333333*x + 3*x2);
205 if(0.0 < factB) { y -= fb*x2*x*(0.6666667 -
x); }
208 xlog =
G4Log(1.0 + x);
210 if(0.0 < factB) { y -= fb*(x + x1 - 2*xlog); }
215 if(nwarnings < nwarnlimit) {
216 G4cout <<
"G4WentzelVIRelXSection::ComputeTransportCrossSectionPerAtom scattering on e- <0"
219 <<
" e(MeV)= " << tkin <<
" p(MeV/c)= " << sqrt(mom2)
220 <<
" Z= " << targetZ <<
" "
222 G4cout <<
" 1-costm= " << 1.0-costm <<
" screenZ= " << screenZ
239 x = (1.0 - cosTMax)/screenZ;
242 y = x2*(1.0 - 1.3333333*x + 3*x2);
243 if(0.0 < factB) { y -= fb*x2*x*(0.6666667 -
x); }
246 xlog =
G4Log(1.0 + x);
248 if(0.0 < factB) { y -= fb*(x + x1 - 2*xlog); }
253 if(nwarnings < nwarnlimit) {
254 G4cout <<
"G4WentzelVIRelXSection::ComputeTransportCrossSectionPerAtom scattering on e- <0"
257 <<
" e(MeV)= " << tkin <<
" Z= " << targetZ <<
" "
259 G4cout <<
" formfactA= " << formfactA <<
" screenZ= " << screenZ
260 <<
" x= " <<
" x1= " << x1 <<
G4endl;
264 xSection += y*targetZ;
266 xSection *= kinFactor;
285 temp.
set(0.0,0.0,1.0);
292 if(elecRatio > 0.0) {
293 if(rndmEngine->
flat() <= elecRatio) {
295 cost1 =
std::max(cost1,cosTetMaxElec);
296 cost2 =
std::max(cost2,cosTetMaxElec);
299 if(cost1 < cost2) {
return temp; }
303 G4double z1 = w1*w2/(w1 + rndmEngine->
flat()*(w2 - w1)) - screenZ;
306 G4double grej = (1. - z1*factB + factB1*targetZ*sqrt(z1*factB)*(2 - z1))
307 /( (1.0 + z1*factD)*fm*fm );
309 if(rndmEngine->
flat() > grej ) {
return temp; }
313 if(cost > 1.0) { cost = 1.0; }
314 else if(cost < -1.0) { cost =-1.0; }
315 G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
322 temp.
set(vx1,vy1,cost);
329 G4WentzelVIRelXSection::ComputeMaxElectronScattering(
G4double cutEnergy)
335 (1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);
341 if(particle == theElectron) { tmax *= 0.5; }
349 G4double mom22 = t1*(t1 + 2.0*mass);
350 G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);
351 if(ctm < 1.0) { cosTetMaxElec = ctm; }
352 if(particle == theElectron && cosTetMaxElec < 0.0) {
void set(double x, double y, double z)
static G4Pow * GetInstance()
G4WentzelVIRelXSection(G4bool combined=true)
std::vector< ExP01TrackerHit * > a
static constexpr double hbarc
G4double GetA27(G4int Z) const
G4double ComputeTransportCrossSectionPerAtom(G4double CosThetaMax)
static G4NistManager * Instance()
const G4String & GetParticleName() const
static constexpr double twopi
void SetupParticle(const G4ParticleDefinition *)
G4GLOB_DLL std::ostream G4cout
G4double Z13(G4int Z) const
G4double SetupTarget(G4int Z, G4double cut)
static constexpr double eplus
static G4Proton * Proton()
static constexpr double eV
G4double G4Log(G4double x)
static G4Positron * Positron()
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4EmParameters * Instance()
static constexpr double fermi
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double GetPDGSpin() const
static G4Electron * Electron()
static constexpr double MeV
void Initialise(const G4ParticleDefinition *, G4double CosThetaLim)
G4ThreeVector & SampleSingleScattering(G4double CosThetaMin, G4double CosThetaMax, G4double elecRatio)
G4double GetPDGCharge() const
static constexpr double pi
G4double FactorForAngleLimit() const
virtual ~G4WentzelVIRelXSection()