67 G4bool onlyOnceInit =
true;
68 G4bool onlyOnceDestroy =
true;
81 mass2GeV2= massGeV*massGeV;
82 AtomicWeight =
G4lrint(AWeight);
84 DefineNucleusParameters(AWeight);
86 limitQ2 = 35./(R1*R1);
94 TableQ2[ii] = TableQ2[ii-1]+dQ2;
104 G4double plab2= eGeV[kk]*(eGeV[kk] + 2.0*massGeV);
105 G4double Q2m = 4.0*plab2*massA2/(mass2GeV2 + massA2 + 2.*massA2*elab);
110 TableCrossSec[ONQ2*kk] = 0.0;
120 void G4ElasticData::DefineNucleusParameters(
G4double A)
122 switch (AtomicWeight)
219 if(A < 100 && A > 3) Pnucl = 0.176 + 0.00275*
A;
225 if(A >= 100) Aeff = 0.7;
226 else if(A < 100 && A > 75) Aeff = 1.5 - 0.008*
A;
244 if ( onlyOnceInit ) {
245 for (
int i = 0 ; i<
NHADRONS ; ++i) {
246 for (
int j = 0 ; j<
ZMAX ; ++j ) {
247 SetOfElasticData[i][j]=0;
251 onlyOnceInit =
false;
256 dQ2 = hMass = hMass2 = hLabMomentum = hLabMomentum2 = MomentumCM = HadrEnergy
257 = R1 = R2 = Pnucl = Aeff = HadrTot = HadrSlope = HadrReIm = TotP = DDSect2
258 = DDSect3 = ConstU = FmaxT = Slope1 = Slope2 = Coeff1 = Coeff2 = MaxTR
259 = Slope0 = Coeff0 = aAIm = aDIm = Dtot11 = 0.0;
260 NumbN = iHadrCode = iHadron = 0;
263 plabLowLimit = 20.0*
MeV;
264 lowestEnergyLimit = 0.0;
272 protonM2 = protonM*protonM;
274 BoundaryP[0]=9.0;BoundaryTG[0]=5.0;BoundaryTL[0]=0.;
275 BoundaryP[1]=20.0;BoundaryTG[1]=1.5;BoundaryTL[1]=0.;
276 BoundaryP[2]=5.0; BoundaryTG[2]=1.0;BoundaryTL[2]=1.5;
277 BoundaryP[3]=8.0; BoundaryTG[3]=3.0;BoundaryTL[3]=0.;
278 BoundaryP[4]=7.0; BoundaryTG[4]=3.0;BoundaryTL[4]=0.;
279 BoundaryP[5]=5.0; BoundaryTG[5]=2.0;BoundaryTL[5]=0.;
280 BoundaryP[6]=5.0; BoundaryTG[6]=1.5;BoundaryTL[6]=3.0;
287 LowEdgeEnergy[0] = 0.0;
288 LowEdgeEnergy[1] = 0.5;
289 LowEdgeEnergy[2] = 0.7;
294 LowEdgeEnergy[i] = e/f;
300 G4int ic[
NHADRONS] = {211,-211,2112,2212,321,-321,130,310,311,-311,
301 3122,3222,3112,3212,3312,3322,3334,
302 -2212,-2112,-3122,-3222,-3112,-3212,-3312,-3322,-3334};
304 G4int id[
NHADRONS] = {2,3,6,0,4,5,4,4,4,5,
308 G4int id1[
NHADRONS] = {3,4,1,0,5,6,5,5,5,6,
314 HadronCode[j] = ic[j];
315 HadronType[j] =
id[j];
316 HadronType1[j] = id1[j];
318 for(
G4int k = 0; k <
ZMAX; k++) { SetOfElasticData[j][k] = 0; }
326 outFile <<
"G4ElasticHadrNucleusHE is a hadron-nucleus elastic scattering\n"
327 <<
"model developed by N. Starkov which uses a Glauber model\n"
328 <<
"parameterization to calculate the final state. It is valid\n"
329 <<
"for all hadrons with incident energies above 1 GeV.\n";
342 if ( onlyOnceDestroy ) {
347 if ( SetOfElasticData[j][k] ) {
348 delete SetOfElasticData[j][k];
349 SetOfElasticData[j][k]=0;
354 onlyOnceDestroy =
false;
378 G4cout<<
" G4ElasticHadrNucleusHE::SampleT: "
380 <<
" at Z= " << Z <<
" A= " << N
381 <<
" plab(GeV)= " << plab
386 for( idx = 0 ; idx <
NHADRONS; idx++)
388 if(iHadrCode == HadronCode[idx])
break;
393 if( idx >= NHADRONS )
return Q2;
395 iHadron = HadronType[idx];
396 iHadrCode = HadronCode[idx];
401 hMass2 = hMass*hMass;
403 G4double T = sqrt(plab*plab+hMass2)-hMass;
420 SetOfElasticData[idx][
Z] = ElD1;
424 G4cout<<
" G4ElasticHadrNucleusHE::SampleT: new record " << idx
435 (hMass2 + M2 + 2.*M*std::sqrt(plab2 + hMass2));
438 G4double T = sqrt(plab2+hMass2)-hMass;
443 G4cout<<
" SampleT: Q2(GeV^2)= "<<Q2<<
" t/tmax= " << Q2/Q2max <<
G4endl;
480 G4double ekin = std::sqrt(hMass2 + ptot2) - hMass;
483 G4cout<<
"Q2_2: ekin plab "<<ekin<<
" "<<plab<<
" tmax "<<tmax<<
G4endl;
487 for( NumbOnE = 0; NumbOnE <
NENERGY-1; NumbOnE++ )
489 if( ekin <= LowEdgeEnergy[NumbOnE+1] )
break;
493 if(NumbOnE >= NENERGY-1) { NumbOnE = NENERGY-2; }
498 hLabMomentum2 = T*(T + 2.*hMass);
509 hLabMomentum = std::sqrt(hLabMomentum2);
515 G4cout<<
"1 plab T "<<plab<<
" "<<T<<
" sigTot B ReIm "
516 <<HadrTot<<
" "<<HadrSlope<<
" "<<HadrReIm<<
G4endl;
517 G4cout<<
" R1 R2 Aeff p "<<R1<<
" "<<R2<<
" "<<Aeff<<
" "
524 G4cout<<
" HadrNucleusQ2_2: NumbOnE= " << NumbOnE
525 <<
" length= " << length
526 <<
" Q2max= " << Q2max
527 <<
" ekin= " << ekin <<
G4endl;
551 for( iNumbQ2 = 1; iNumbQ2<length; ++iNumbQ2)
553 if(Rand <= pElD->TableCrossSec[index+iNumbQ2])
break;
555 if(iNumbQ2 >= ONQ2) { iNumbQ2 = ONQ2 - 1; }
556 Q2 =
GetQ2_2(iNumbQ2, dNumbQ2, dNumbFQ2, Rand);
558 if(tmax < Q2max) Q2 *= tmax/Q2max;
561 G4cout<<
" HadrNucleusQ2_2(2): Q2= "<<Q2<<
" iNumbQ2= " << iNumbQ2
562 <<
" rand= " << Rand <<
G4endl;
584 G4cout <<
"GetQ2_2 kk= " << kk <<
" X2= " << X2 <<
" X3= " << X3
585 <<
" F2= " << F2 <<
" F3= " << F3 <<
" Rndm= " << ranUni <<
G4endl;
587 if(kk == 1 || kk == 0)
601 G4double D0 = F12*F2+F1*F32+F3*F22-F32*F2-F22*F1-F12*F3;
604 G4cout <<
" X1= " << X1 <<
" F1= " << F1 <<
" D0= "
607 if(std::abs(D0) < 0.00000001)
609 ranQ2 = X2 + (ranUni - F2)*(X3 - X2)/(F3 - F2);
613 G4double DA = X1*F2+X3*F1+X2*F3-X3*F2-X1*F3-X2*F1;
614 G4double DB = X2*F12+X1*F32+X3*F22-X2*F32-X3*F12-X1*
F22;
615 G4double DC = X3*F2*F12+X2*F1*F32+X1*F3*F22
616 -X1*F2*F32-X2*F3*F12-X3*F1*
F22;
617 ranQ2 = (DA*ranUni*ranUni + DB*ranUni + DC)/D0;
636 for(ii = 1; ii<
ONQ2; ii++)
641 for(jj = 0; jj<20; jj++)
646 curSum += curSec*aSimp;
648 if(aSimp > 3) aSimp = 2;
652 G4cout<<
" Q2 "<<curQ2<<
" AIm "<<aAIm<<
" DIm "<<aDIm
653 <<
" Diff "<<curSec<<
" totSum "<<totSum<<
G4endl;
663 G4cout<<
" GetHeavy: Q2 dQ2 totSum "<<Q2l<<
" "<<dQ2<<
" "<<totSum
665 <<curSec<<
" totSum "<< totSum<<
" DTot "
682 G4double valueConstU = 2.*(hMass2 + protonM2) - Q2;
684 G4double y = (1.-Coeff1-Coeff0)/HadrSlope*(1.-
G4Exp(-HadrSlope*Q2))
685 + Coeff0*(1.-
G4Exp(-Slope0*Q2))
686 + Coeff2/Slope2*
G4Exp(Slope2*valueConstU)*(
G4Exp(Slope2*Q2)-1.)
687 + 2.*Coeff1/Slope1*(1./Slope1-(1./Slope1+SqrQ2)*
G4Exp(-Slope1*SqrQ2));
702 G4cout<<
" Fq2 Before for i Tot B Im "<<HadrTot<<
" "<<HadrSlope<<
" "
706 G4cout <<
"GetFq2: Stot= " << Stot <<
" Bhad= " << Bhad
708 <<
" Asq= " << Asq <<
G4endl;
709 G4cout <<
"R1= " << R1 <<
" R2= " << R2 <<
" Pnucl= " << Pnucl <<
G4endl;
716 G4double Norm = (R12*R1-Pnucl*R22*R2);
723 G4double FiH = std::asin(HadrReIm/Rho2);
727 G4cout <<
"UnucRho2= " << UnucRho2 <<
" FiH= " << FiH <<
" NN2= " << NN2
728 <<
" Norm= " << Norm <<
G4endl;
740 G4int i1, i2, j1, j2;
742 for(i1 = 1; i1<= Nucleus; i1++)
744 N1 = -N1*Unucl*(Nucleus-i1+1)/i1*Rho2;
749 for(i2 = 1; i2<=Nucleus; i2++)
751 N2 = -N2*Unucl*(Nucleus-i2+1)/i2*Rho2;
754 for(j2=0; j2<= i2; j2++)
757 exp2 = 1/(j2/R22B+(i2-j2)/R12B);
760 for(j1=0; j1<=i1; j1++)
762 exp1 = 1/(j1/R22B+(i1-j1)/R12B);
765 Prod3 = Prod3+N4*exp1*exp2*
766 (1-
G4Exp(-Q2*dddd/4))/dddd*4*SetBinom[i1][j1];
768 Prod2 = Prod2 +Prod3*N5*SetBinom[i2][j2];
770 Prod1 = Prod1 + Prod2*N2*std::cos(FiH*(i1-i2));
772 if (std::fabs(Prod2*N2/Prod1)<prec)
break;
774 Prod0 = Prod0 + Prod1*N1;
775 if(std::fabs(N1*Prod1/Prod0) < prec)
break;
779 Prod0 *= 0.25*
pi/MbToGeV2;
782 G4cout <<
"GetLightFq2 Z= " << Z <<
" A= " << Nucleus
783 <<
" Q2= " << Q2 <<
" Res= " << Prod0 <<
G4endl;
801 G4double valueConstU = hMass2 + protonM2-2*protonM*HadrEnergy - aQ2;
803 G4double MaxT = 4*MomentumCM*MomentumCM;
805 BoundaryTL[0] = MaxT;
806 BoundaryTL[1] = MaxT;
807 BoundaryTL[3] = MaxT;
808 BoundaryTL[4] = MaxT;
809 BoundaryTL[5] = MaxT;
813 dSigPodT = HadrTot*HadrTot*(1+HadrReIm*HadrReIm)*
815 Coeff1*
G4Exp(-Slope1*SqrQ2)+
816 Coeff2*
G4Exp( Slope2*(valueConstU)+aQ2)+
817 (1-Coeff1-Coeff0)*
G4Exp(-HadrSlope*aQ2)+
818 +Coeff0*
G4Exp(-Slope0*aQ2)
838 G4double R23Ap = R22*R2/R22Ap*Pnuclp;
842 G4double R12ApdR22Ap = 0.5*(R12Apd+R22Apd);
844 G4double DDSec1p = (DDSect2+DDSect3*
G4Log(0.53*HadrEnergy/R1));
846 std::sqrt((R12+R22)/2)));
847 G4double DDSec3p = (DDSect2+DDSect3*
G4Log(0.53*HadrEnergy/R2));
849 G4double Norm = (R12*R1-Pnucl*R22*R2)*Aeff;
850 G4double Normp = (R12*R1-Pnuclp*R22*R2)*Aeff;
865 G4double Prod1, Tot1=0, medTot, DTot1, DmedTot;
868 for( i=1; i<=NWeight; i++)
870 N = -N*Unucl*(NWeight-i+1)/i*Rho2;
872 Prod1 =
G4Exp(-theQ2/i*R12B/4)/i*R12B;
875 for(
G4int l=1; l<=i; l++)
877 exp1 = l/R22B+(i-l)/R12B;
878 N4 = -N4*(i-l+1)/l*N2;
879 Prod1 = Prod1+N4/exp1*
G4Exp(-theQ2/(exp1*4));
880 medTot = medTot+N4/exp1;
883 ReElasticAmpl0 = ReElasticAmpl0+Prod1*N*std::sin(FiH*i);
884 ImElasticAmpl0 = ImElasticAmpl0+Prod1*N*std::cos(FiH*i);
885 Tot1 = Tot1+medTot*N*std::cos(FiH*i);
886 if(std::fabs(Prod1*N/ImElasticAmpl0) < 0.000001)
break;
889 ImElasticAmpl0 = ImElasticAmpl0*
pi/2.568;
890 ReElasticAmpl0 = ReElasticAmpl0*
pi/2.568;
891 Tot1 = Tot1*
twopi/2.568;
901 Din1 = 0.5*(C1*
G4Exp(-theQ2/8*R12Ap)/2*R12Ap-
902 C2/R12ApdR22Ap*
G4Exp(-theQ2/(4*R12ApdR22Ap))+
903 C3*R22Ap/2*
G4Exp(-theQ2/8*R22Ap));
905 DTot1 = 0.5*(C1/2*R12Ap-C2/R12ApdR22Ap+C3*R22Ap/2);
915 for( i = 1; i<= NWeight-2; i++)
917 N1p = -N1p*UnuclScr*(NWeight-i-1)/i*Rho2;
921 for(
G4int l = 0; l<=i; l++)
923 if(l == 0) BinCoeff = 1;
924 else if(l !=0 ) BinCoeff = BinCoeff*(i-l+1)/l;
926 exp1 = l/R22B+(i-l)/R12B;
928 exp2p = exp1+R12ApdR22Ap;
931 Din2 = Din2 + N2p*BinCoeff*
932 (C1/exp1p*
G4Exp(-theQ2/(4*exp1p))-
933 C2/exp2p*
G4Exp(-theQ2/(4*exp2p))+
934 C3/exp3p*
G4Exp(-theQ2/(4*exp3p)));
936 DmedTot = DmedTot + N2p*BinCoeff*
937 (C1/exp1p-C2/exp2p+C3/exp3p);
942 Din1 = Din1+Din2*N1p/((i+2)*(i+1))*std::cos(FiH*i);
943 DTot1 = DTot1+DmedTot*N1p/((i+2)*(i+1))*std::cos(FiH*i);
945 if(std::fabs(Din2*N1p/Din1) < 0.000001)
break;
948 Din1 = -Din1*NWeight*(NWeight-1)*4/(Normp*Normp);
950 DTot1 = DTot1*NWeight*(NWeight-1)*4/(Normp*Normp);
957 G4double DiffCrSec2 = (ReElasticAmpl0*ReElasticAmpl0+
958 (ImElasticAmpl0+Din1)*
959 (ImElasticAmpl0+Din1))/
twopi;
964 aAIm = ImElasticAmpl0;
977 HadrEnergy = std::sqrt(hMass2 + hLabMomentum2);
979 G4double sHadr = 2.*HadrEnergy*protonM+protonM2+hMass2;
981 G4double Ecm = 0.5*(sHadr-hMass2+protonM2)/sqrS;
982 MomentumCM = std::sqrt(Ecm*Ecm-protonM2);
985 G4cout <<
"GetHadrVall.: Z= " << Z <<
" iHadr= " << iHadron
986 <<
" E(GeV)= " << HadrEnergy <<
" sqrS= " << sqrS
987 <<
" plab= " << hLabMomentum
988 <<
" E - m "<<HadrEnergy - hMass<<
G4endl;
1000 if(hLabMomentum > 10)
1001 TotP = TotN = 7.5*logE - 40.12525 + 103*
G4Exp(-
G4Log(sHadr)*0.165);
1010 if( hLabMomentum > 1.4 )
1011 TotN = 33.3+15.2*(hLabMomentum2-1.35)/
1014 else if(hLabMomentum > 0.8)
1017 TotN = 33.0 + 25.5*A0*A0;
1022 TotN = 33.0 + 30.*A0*A0*A0*A0;
1027 if(hLabMomentum >= 1.05)
1029 TotP = 39.0+75.*(hLabMomentum-1.2)/
1030 (hLabMomentum2*hLabMomentum+0.15);
1033 else if(hLabMomentum >= 0.7)
1036 TotP = 23.0 + 40.*A0*A0;
1046 HadrTot = 0.5*(TotP+TotN);
1049 if(hLabMomentum >= 2.) HadrSlope = 5.44 + 0.88*logS;
1051 else if(hLabMomentum >= 0.5) HadrSlope = 3.73*hLabMomentum-0.37;
1053 else HadrSlope = 1.5;
1056 if(hLabMomentum >= 1.2)
1057 HadrReIm = 0.13*(logS - 5.8579332)*
G4Exp(-
G4Log(sHadr)*0.18);
1059 else if(hLabMomentum >= 0.6)
1060 HadrReIm = -75.5*(
G4Exp(
G4Log(hLabMomentum)*0.25)-0.95)/
1064 HadrReIm = 15.5*hLabMomentum/(27*hLabMomentum2*hLabMomentum+2);
1069 if( iHadrCode == 3122)
1075 else if( iHadrCode == 3222)
1081 else if(iHadrCode == 3112 || iHadrCode == 3212 )
1087 else if( iHadrCode == 3312 || iHadrCode == 3322 )
1093 else if( iHadrCode == 3334)
1104 HadrTot = 5.2+5.2*logE + 123.2/sqrS;
1105 HadrSlope = 8.32+0.57*logS;
1107 if( HadrEnergy < 1000 )
1108 HadrReIm = 0.06*(sqrS-2.236)*(sqrS-14.14)*
G4Exp(-
G4Log(sHadr)*0.8);
1110 HadrReIm = 0.6*(logS - 5.8579332)*
G4Exp(-
G4Log(sHadr)*0.25);
1115 if( iHadrCode == -3122)
1121 else if( iHadrCode == -3222)
1127 else if(iHadrCode == -3112 || iHadrCode == -3212 )
1133 else if( iHadrCode == -3312 || iHadrCode == -3322 )
1139 else if( iHadrCode == -3334)
1150 if(hLabMomentum >= 3.5)
1151 TotP = 10.6+2.*logE + 25.*
G4Exp(-
G4Log(HadrEnergy)*0.43);
1153 else if(hLabMomentum >= 1.15)
1155 G4double x = (hLabMomentum - 2.55)/0.55;
1156 G4double y = (hLabMomentum - 1.47)/0.225;
1157 TotP = 3.2*
G4Exp(-x*x) + 12.*
G4Exp(-y*y) + 27.5;
1160 else if(hLabMomentum >= 0.4)
1162 TotP = 88*(logE+0.2877)*(logE+0.2877)+14.0;
1167 G4double x = (hLabMomentum - 0.29)/0.085;
1168 TotP = 20. + 180.*
G4Exp(-x*x);
1172 if(hLabMomentum >= 3.0 )
1173 TotN = 10.6 + 2.*logE + 30.*
G4Exp(-
G4Log(HadrEnergy)*0.43);
1175 else if(hLabMomentum >= 1.3)
1177 G4double x = (hLabMomentum - 2.1)/0.4;
1178 G4double y = (hLabMomentum - 1.4)/0.12;
1179 TotN = 36.1+0.079 - 4.313*logE + 3.*
G4Exp(-x*x) +
1182 else if(hLabMomentum >= 0.65)
1184 G4double x = (hLabMomentum - 0.72)/0.06;
1185 G4double y = (hLabMomentum - 1.015)/0.075;
1186 TotN = 36.1 + 10.*
G4Exp(-x*x) + 24*
G4Exp(-y*y);
1188 else if(hLabMomentum >= 0.37)
1191 TotN = 26. + 110.*x*x;
1195 G4double x = (hLabMomentum - 0.29)/0.07;
1196 TotN = 28.0 + 40.*
G4Exp(-x*x);
1198 HadrTot = (TotP+TotN)/2;
1200 HadrSlope = 7.28+0.245*logS;
1201 HadrReIm = 0.2*(logS - 4.6051702)*
G4Exp(-
G4Log(sHadr)*0.15);
1210 HadrTot = 10.6+1.8*logE + 9.0*
G4Exp(-
G4Log(HadrEnergy)*0.55);
1211 if(HadrEnergy>100) HadrSlope = 15.0;
1212 else HadrSlope = 1.0+1.76*logS - 2.84/sqrS;
1214 HadrReIm = 0.4*(sHadr-20)*(sHadr-150)*
G4Exp(-
G4Log(sHadr+50)*2.1);
1221 HadrTot = 10+1.8*logE + 25./sqrS;
1222 HadrSlope = 6.98+0.127*logS;
1223 HadrReIm = 0.4*(sHadr-20)*(sHadr-20)*
G4Exp(-
G4Log(sHadr+50)*2.1);
1230 G4cout <<
"HadrTot= " << HadrTot <<
" HadrSlope= " << HadrSlope
1231 <<
" HadrReIm= " << HadrReIm <<
" DDSect2= " << DDSect2
1232 <<
" DDSect3= " << DDSect3 <<
G4endl;
1238 Coeff0 = Coeff1 = Coeff2 = 0.0;
1239 Slope0 = Slope1 = 1.0;
1243 static const G4double EnP0[6]={1.5,3.0,5.0,9.0,14.0,19.0};
1244 static const G4double C0P0[6]={0.15,0.02,0.06,0.08,0.0003,0.0002};
1245 static const G4double C1P0[6]={0.05,0.02,0.03,0.025,0.0,0.0};
1246 static const G4double B0P0[6]={1.5,2.5,3.0,4.5,1.4,1.25};
1247 static const G4double B1P0[6]={5.0,1.0,3.5,4.0,4.8,4.8};
1250 static const G4double EnN[5]={1.5,5.0,10.0,14.0,20.0};
1251 static const G4double C0N[5]={0.0,0.0,0.02,0.02,0.01};
1252 static const G4double C1N[5]={0.06,0.008,0.0015,0.001,0.0003};
1253 static const G4double B0N[5]={1.5,2.5,3.8,3.8,3.5};
1254 static const G4double B1N[5]={1.5,2.2,3.6,4.5,4.8};
1257 static const G4double EnP[2]={1.5,4.0};
1258 static const G4double C0P[2]={0.001,0.0005};
1259 static const G4double C1P[2]={0.003,0.001};
1260 static const G4double B0P[2]={2.5,4.5};
1261 static const G4double B1P[2]={1.0,4.0};
1264 static const G4double EnPP[4]={1.0,2.0,3.0,4.0};
1265 static const G4double C0PP[4]={0.0,0.0,0.0,0.0};
1266 static const G4double C1PP[4]={0.15,0.08,0.02,0.01};
1267 static const G4double B0PP[4]={1.5,2.8,3.8,3.8};
1268 static const G4double B1PP[4]={0.8,1.6,3.6,4.6};
1271 static const G4double EnPPN[4]={1.0,2.0,3.0,4.0};
1272 static const G4double C0PPN[4]={0.0,0.0,0.0,0.0};
1273 static const G4double C1PPN[4]={0.0,0.0,0.0,0.0};
1274 static const G4double B0PPN[4]={1.5,2.8,3.8,3.8};
1275 static const G4double B1PPN[4]={0.8,1.6,3.6,4.6};
1278 static const G4double EnK[4]={1.4,2.33,3.0,5.0};
1279 static const G4double C0K[4]={0.0,0.0,0.0,0.0};
1280 static const G4double C1K[4]={0.01,0.007,0.005,0.003};
1281 static const G4double B0K[4]={1.5,2.0,3.8,3.8};
1282 static const G4double B1K[4]={1.6,1.6,1.6,1.6};
1285 static const G4double EnKM[2]={1.4,4.0};
1286 static const G4double C0KM[2]={0.006,0.002};
1287 static const G4double C1KM[2]={0.00,0.00};
1288 static const G4double B0KM[2]={2.5,3.5};
1289 static const G4double B1KM[2]={1.6,1.6};
1295 if(hLabMomentum <BoundaryP[0])
1298 Coeff2 = 0.8/hLabMomentum/hLabMomentum;
1303 if(hLabMomentum < BoundaryP[1])
1306 Coeff2 = 0.8/hLabMomentum/hLabMomentum;
1311 if(hLabMomentum < BoundaryP[2])
1317 if(hLabMomentum < BoundaryP[3])
1320 Coeff2 = 0.02/hLabMomentum;
1325 if(hLabMomentum < BoundaryP[4])
1328 Coeff2 = 0.02/hLabMomentum;
1333 if(hLabMomentum < BoundaryP[5])
1336 if(hLabMomentum < 1) Coeff2 = 0.34;
1337 else Coeff2 = 0.34/hLabMomentum2/hLabMomentum;
1341 if(hLabMomentum < BoundaryP[6])
1344 if(hLabMomentum < 1) Coeff2 = 0.01;
1345 else Coeff2 = 0.01/hLabMomentum2/hLabMomentum;
1350 G4cout<<
" HadrVal : Plasb "<<hLabMomentum
1351 <<
" iHadron "<<iHadron<<
" HadrTot "<<HadrTot<<
G4endl;
1360 G4cout<<
"1 GetKin.: HadronName MomentumH "
1365 G4double Sh = 2.0*protonM*HadrEnergy+protonM2+hMass2;
1367 ConstU = 2*protonM2+2*hMass2-Sh;
1369 G4double MaxT = 4*MomentumCM*MomentumCM;
1371 BoundaryTL[0] = MaxT;
1372 BoundaryTL[1] = MaxT;
1373 BoundaryTL[3] = MaxT;
1374 BoundaryTL[4] = MaxT;
1375 BoundaryTL[5] = MaxT;
1379 while(iHadrCode!=HadronCode[NumberH]) NumberH++;
1381 NumberH = HadronType1[NumberH];
1383 if(MomentumH<BoundaryP[NumberH]) MaxTR = BoundaryTL[NumberH];
1384 else MaxTR = BoundaryTG[NumberH];
1387 G4cout<<
"3 GetKin. : NumberH "<<NumberH
1388 <<
" Bound.P[NumberH] "<<BoundaryP[NumberH]
1389 <<
" Bound.TL[NumberH] "<<BoundaryTL[NumberH]
1390 <<
" Bound.TG[NumberH] "<<BoundaryTG[NumberH]
1391 <<
" MaxT MaxTR "<<MaxT<<
" "<<MaxTR<<
G4endl;
1401 Fdistr = (1-Coeff1-Coeff0)
1402 /HadrSlope*(1-
G4Exp(-HadrSlope*Q2))
1403 + Coeff0*(1-
G4Exp(-Slope0*Q2))
1404 + Coeff2/Slope2*
G4Exp(Slope2*ConstU)*(
G4Exp(Slope2*Q2)-1)
1405 + 2*Coeff1/Slope1*(1/Slope1-(1/Slope1+SqrQ2)*
G4Exp(-Slope1*SqrQ2));
1408 G4cout<<
"Old: Coeff0 Coeff1 Coeff2 "<<Coeff0<<
" "
1409 <<Coeff1<<
" "<<Coeff2<<
" Slope Slope0 Slope1 Slope2 "
1410 <<HadrSlope<<
" "<<Slope0<<
" "<<Slope1<<
" "<<Slope2
1411 <<
" Fdistr "<<Fdistr<<
G4endl;
1417 G4double DDD0=MaxTR*0.5, DDD1=0.0, DDD2=MaxTR, delta;
1420 FmaxT =
GetFt(MaxTR);
1423 const G4int maxNumberOfLoops = 10000;
1424 G4int loopCounter = -1;
1425 while ( (std::fabs(delta) > 0.0001) &&
1426 ++loopCounter < maxNumberOfLoops )
1431 DDD0 = (DDD0+DDD1)*0.5;
1436 DDD0 = (DDD0+DDD2)*0.5;
1440 if ( loopCounter >= maxNumberOfLoops ) {
1455 hMass2 = hMass*hMass;
1456 hLabMomentum = inLabMom;
1457 hLabMomentum2 = hLabMomentum*hLabMomentum;
1458 HadrEnergy = sqrt(hLabMomentum2+hMass2);
1475 void G4ElasticHadrNucleusHE::Binom()
1480 for(N = 0; N < 240; N++)
1484 for( M = 0; M <=
N; M++ )
1488 if ( ( N > 0 ) && ( N > M ) && M > 0 )
1493 SetBinom[
N][M] = Fact1;
G4double SampleT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double GetQ2(G4double Ran)
static constexpr double proton_mass_c2
void DefineHadronValues(G4int Z)
G4double GetDistrFun(G4double Q2)
#define G4MUTEXINIT(mutex)
G4double HadronProtonQ2(const G4ParticleDefinition *aHadron, G4double inLabMom)
G4int GetPDGEncoding() const
static G4NistManager * Instance()
#define G4MUTEX_INITIALIZER
const G4String & GetParticleName() const
void GetKinematics(const G4ParticleDefinition *aHadron, G4double MomentumH)
static constexpr double twopi
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4ElasticHadrNucleusHE(const G4String &name="hElasticGlauber")
G4double TableCrossSec[NQTABLE]
G4double HadrNucDifferCrSec(G4int Z, G4int Nucleus, G4double Q2)
static G4Proton * Proton()
static constexpr double amu_c2
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static const G4int NENERGY
virtual ~G4ElasticHadrNucleusHE()
G4double GetPDGMass() const
G4ElasticData(const G4ParticleDefinition *h, G4int Z, G4double A, G4double *eGeV)
G4double GetLightFq2(G4int Z, G4int A, G4double Q)
virtual void ModelDescription(std::ostream &) const
G4double GetAtomicMassAmu(const G4String &symb) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double GeV
G4double GetHeavyFq2(G4int Z, G4int Nucleus, G4double *LineFq2)
static constexpr double MeV
G4double GetQ2_2(G4int N, G4double *Q, G4double *F, G4double R)
static constexpr double pi
G4double HadronNucleusQ2_2(G4ElasticData *pElD, G4int Z, G4double plabGeV, G4double tmax)
void InterpolateHN(G4int n, const G4double EnP[], const G4double C0P[], const G4double C1P[], const G4double B0P[], const G4double B1P[])
G4double GetFt(G4double Q2)
#define G4MUTEXDESTROY(mutex)
static const G4int NHADRONS
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)