64 "C" ,
"N" ,
"O" ,
"F" ,
"Ne",
"Na",
"Mg",
"Al",
"Si",
"P" ,
"S",
"Cl",
"Ar",
"K" ,
"Ca",
"Sc",
65 "Ti",
"V" ,
"Cr",
"Mn",
"Fe",
"Co",
"Ni",
"Cu",
"Zn",
"Ga",
"Ge",
"As",
"Se",
"Br",
"Kr",
"Rb",
66 "Sr",
"Y" ,
"Zr",
"Nb",
"Mo",
"Tc",
"Ru",
"Rh",
"Pd",
"Ag",
"Cd",
"In",
"Sn",
"Sb",
"Te",
"I" ,
67 "Xe",
"Cs",
"Ba",
"La",
"Ce",
"Pr",
"Nd",
"Pm",
"Sm",
"Eu",
"Gd",
"Tb",
"Dy",
"Ho",
"Er",
"Tm",
68 "Yb",
"Lu",
"Hf",
"Ta",
"W" ,
"Re",
"Os",
"Ir",
"Pt",
"Au",
"Hg",
"Tl",
"Pb",
"Bi",
"Po",
"At",
69 "Rn",
"Fr",
"Ra",
"Ac",
"Th",
"Pa",
"U" ,
"Np",
"Pu",
"Am",
"Cm",
"Bk",
"Cf"};
92 G4int ekinIndxLow = 0;
99 ekinIndxLow = (
G4int)remRfaction;
100 remRfaction -= ekinIndxLow;
104 ekinIndxLow = (
G4int)remRfaction;
105 remRfaction -= ekinIndxLow;
112 if (remRfaction>0.) {
133 G4int ekinIndxLow = 0;
140 ekinIndxLow = (
G4int)probIndxHigh;
141 probIndxHigh -= ekinIndxLow;
145 ekinIndxLow = (
G4int)probIndxHigh;
146 probIndxHigh -= ekinIndxLow;
154 ekindx = ekinIndxLow;
162 probIndxHigh -= deltIndxLow;
168 deltindx = deltIndxLow;
175 G4double ang = std::sqrt(0.5*(1.-cost));
178 remRfaction -= angIndx;
183 val = perDelta->
fSA + dum*(perDelta->
fSB + dum*(perDelta->
fSC + dum*perDelta->
fSD));
208 for (
size_t imc=0; imc<numMatCuts; ++imc) {
216 size_t numElems = elemVect->size();
217 for (
size_t ielem=0; ielem<numElems; ++ielem) {
218 const G4Element *elem = (*elemVect)[ielem];
240 for (
size_t imc=0; imc<numMatCuts; ++imc) {
265 char* tmppath = std::getenv(
"G4LEDATA");
267 G4Exception(
"G4GSMottCorrection::LoadMCDataElement()",
"em0006",
269 "Environment variable G4LEDATA not defined");
272 std::string path(tmppath);
274 path +=
"/msc_GS/MottCor/el/";
276 path +=
"/msc_GS/MottCor/pos/";
296 infile >> perDelta->
fSA;
297 infile >> perDelta->
fSB;
298 infile >> perDelta->
fSC;
299 infile >> perDelta->
fSD;
306 std::string *dataString =
nullptr;
307 std::string compfilename(fname+
".z");
309 std::ifstream
in(compfilename, std::ios::binary | std::ios::ate);
312 int fileSize = in.tellg();
314 in.seekg(0,std::ios::beg);
316 Bytef *compdata =
new Bytef[fileSize];
318 in.read((
char*)compdata, fileSize);
321 uLongf complen = (uLongf)(fileSize*4);
322 Bytef *uncompdata =
new Bytef[complen];
323 while (
Z_OK!=
uncompress(uncompdata, &complen, compdata, fileSize)) {
327 uncompdata =
new Bytef[complen];
332 dataString =
new std::string((
char*)uncompdata, (
long)complen);
334 delete [] uncompdata;
336 std::string msg =
" Problem while trying to read " + compfilename +
" data file.\n";
342 iss.str(*dataString);
352 constexpr
G4double finstrc2 = 5.325135453E-5;
355 constFactor *= constFactor;
375 for (
G4int ielem=0; ielem<numElems; ++ielem) {
376 G4double zet = (*elemVect)[ielem]->GetZ();
380 G4double iwa = (*elemVect)[ielem]->GetN();
381 G4double ipz = nbAtomsPerVolVect[ielem]/totNbAtomsPerVol;
384 ze += dum*(-2.0/3.0)*
G4Log(zet);
385 zx += dum*
G4Log(1.0+3.34*finstrc2*zet*zet);
390 moliereBc = const1*density*zs/sa*
G4Exp(ze/zs)/
G4Exp(zx/zs);
391 moliereXc2 = const2*density*zs/sa;
407 for (
G4int ielem=0; ielem<numElems; ++ielem) {
408 const G4Element *elem = (*elemVect)[ielem];
415 G4double nZZPlus1 = nbAtomsPerVolVect[ielem]*zet*(zet+1.0)/totNbAtomsPerVol;
430 mcScrCF *= constFactor*Z23/(4.*
pt2);
457 perMatPerDelta->
fSA += nZZPlus1*perElemPerDelta->
fSA;
458 perMatPerDelta->
fSB += nZZPlus1*perElemPerDelta->
fSB;
459 perMatPerDelta->
fSC += nZZPlus1*perElemPerDelta->
fSC;
460 perMatPerDelta->
fSD += nZZPlus1*perElemPerDelta->
fSD;
464 if (ielem==numElems-1) {
469 perMatPerEkin->
fMCScreening = constFactor*dumScr*moliereBc/moliereXc2;
479 G4double G2PerG1 = 3.*(1.+scrCorTed)*((1.+2.*scrCorTed)*dum0-2.)/((1.+scrCorTed)*dum0-1.);
495 perMatPerDelta->
fSA /= maxVal;
496 perMatPerDelta->
fSB /= maxVal;
497 perMatPerDelta->
fSC /= maxVal;
498 perMatPerDelta->
fSD /= maxVal;