58const G4double G4InitXscPAI::fDelta = 0.005 ;
59const G4int G4InitXscPAI::fPAIbin = 100 ;
60const G4double G4InitXscPAI::fSolidDensity = 0.05*g/cm3 ;
70 : fPAIxscVector(nullptr),
71 fPAIdEdxVector(nullptr),
72 fPAIphotonVector(nullptr),
73 fPAIelectronVector(nullptr),
74 fChCosSqVector(nullptr),
75 fChWidthVector(nullptr)
88 for (i = 0; i < fIntervalNumber; ++i)
92 for (i = 0; i < fIntervalNumber; ++i)
96 for(j = 1; j < 5 ; ++j)
103 fBetaGammaSq = fTmax = 0.0;
104 fIntervalTmax = fCurrentInterval = 0;
116 delete fPAIxscVector;
117 delete fPAIdEdxVector;
118 delete fPAIphotonVector;
119 delete fPAIelectronVector;
120 delete fChCosSqVector;
121 delete fChWidthVector;
123 delete fMatSandiaMatrix;
135 for( i = 0 ; i < fIntervalNumber - 1 ; i++ )
137 energy1 = (*(*fMatSandiaMatrix)[i])[0];
138 energy2 = (*(*fMatSandiaMatrix)[i+1])[0];
140 if( energy2 - energy1 > 1.5*fDelta*(energy1 + energy2) )
continue ;
143 for(j = i; j < fIntervalNumber-1; j++)
145 for( k = 0; k < 5; k++ )
147 (*(*fMatSandiaMatrix)[j])[k] = (*(*fMatSandiaMatrix)[j+1])[k];
166 energy1 = (*(*fMatSandiaMatrix)[fIntervalNumber-1])[0];
167 energy2 = 2.*(*(*fMatSandiaMatrix)[fIntervalNumber-1])[0];
172 for( i = fIntervalNumber-2; i >= 0; i-- )
174 energy1 = (*(*fMatSandiaMatrix)[i])[0];
175 energy2 = (*(*fMatSandiaMatrix)[i+1])[0];
180 fNormalizationCof = 2*pi*pi*hbarc*hbarc*fine_structure_const/electron_mass_c2 ;
181 fNormalizationCof *= fElectronDensity;
183 fNormalizationCof /= cof;
187 for (i = 0; i < fIntervalNumber; i++)
189 for(j = 1; j < 5 ; j++)
191 (*(*fMatSandiaMatrix)[i])[j] *= fNormalizationCof;
235 G4double c1, c2, c3, a1, a2, a3, a4 ;
237 a1 = (*(*fMatSandiaMatrix)[k])[1];
238 a2 = (*(*fMatSandiaMatrix)[k])[2];
239 a3 = (*(*fMatSandiaMatrix)[k])[3];
240 a4 = (*(*fMatSandiaMatrix)[k])[4];
242 c1 = (x2 - x1)/x1/x2 ;
243 c2 = (x2 - x1)*(x2 + x1)/x1/x1/x2/x2 ;
244 c3 = (x2 - x1)*(x1*x1 + x1*x2 + x2*x2)/x1/x1/x1/x2/x2/x2 ;
247 return a1*log(x2/x1) + a2*c1 + a3*c2/2 + a4*c3/3 ;
258 G4double energy1, energy2, result = 0.;
260 for( i = 0; i <= fIntervalTmax; i++ )
262 if(i == fIntervalTmax)
264 energy1 = (*(*fMatSandiaMatrix)[i])[0];
269 if( omega <= (*(*fMatSandiaMatrix)[i+1])[0])
271 energy1 = (*(*fMatSandiaMatrix)[i])[0];
277 energy1 = (*(*fMatSandiaMatrix)[i])[0];
278 energy2 = (*(*fMatSandiaMatrix)[i+1])[0];
296 G4double energy2,energy3,energy4,a1,a2,a3,a4,result;
298 a1 = (*(*fMatSandiaMatrix)[k])[1];
299 a2 = (*(*fMatSandiaMatrix)[k])[2];
300 a3 = (*(*fMatSandiaMatrix)[k])[3];
301 a4 = (*(*fMatSandiaMatrix)[k])[4];
303 energy2 = energy1*energy1;
304 energy3 = energy2*energy1;
305 energy4 = energy3*energy1;
307 result = a1/energy1+a2/energy2+a3/energy3+a4/energy4 ;
308 result *= hbarc/energy1 ;
325 eIm2 = result*result;
328 eRe2 = result*result;
330 result = eIm2 + eRe2;
345 G4double x0, x02, x03, x04, x05, x1, x2, a1,a2,a3,a4,xx1 ,xx2 , xx12,
346 c1, c2, c3, cof1, cof2, xln1, xln2, xln3, result ;
351 for( i = 0; i < fIntervalNumber-1; i++)
353 x1 = (*(*fMatSandiaMatrix)[i])[0];
354 x2 = (*(*fMatSandiaMatrix)[i+1])[0] ;
356 a1 = (*(*fMatSandiaMatrix)[i])[1];
357 a2 = (*(*fMatSandiaMatrix)[i])[2];
358 a3 = (*(*fMatSandiaMatrix)[i])[3];
359 a4 = (*(*fMatSandiaMatrix)[i])[4];
361 if( std::abs(x0-x1) < 0.5*(x0+x1)*fDelta )
363 if(x0 >= x1) x0 = x1*(1+fDelta);
364 else x0 = x1*(1-fDelta);
366 if( std::abs(x0-x2) < 0.5*(x0+x2)*fDelta )
368 if(x0 >= x2) x0 = x2*(1+fDelta);
369 else x0 = x2*(1-fDelta);
375 if( xx12 < 0 ) xx12 = -xx12;
379 xln3 = log((x2 + x0)/(x1 + x0)) ;
386 c1 = (x2 - x1)/x1/x2 ;
387 c2 = (x2 - x1)*(x2 +x1)/x1/x1/x2/x2 ;
388 c3 = (x2 -x1)*(x1*x1 + x1*x2 + x2*x2)/x1/x1/x1/x2/x2/x2 ;
390 result -= (a1/x02 + a3/x04)*xln1 ;
391 result -= (a2/x02 + a4/x04)*c1 ;
392 result -= a3*c2/2/x02 ;
393 result -= a4*c3/3/x02 ;
395 cof1 = a1/x02 + a3/x04 ;
396 cof2 = a2/x03 + a4/x05 ;
398 result += 0.5*(cof1 +cof2)*xln2 ;
399 result += 0.5*(cof1 - cof2)*xln3 ;
401 result *= 2*hbarc/pi ;
415 G4int i = fCurrentInterval;
416 G4double betaGammaSq = fBetaGammaSq;
418 G4double be2,cof,x1,x2,x3,x4,x5,x6,x7,x8,result ;
422 static const G4double betaBohr2 = fine_structure_const*fine_structure_const ;
423 static const G4double betaBohr4 = betaBohr2*betaBohr2*4.0 ;
424 be2 = betaGammaSq/(1 + betaGammaSq) ;
428 x1 = log(2*electron_mass_c2/omega) ;
430 if( betaGammaSq < 0.01 ) x2 = log(be2) ;
433 x2 = -log( (1/betaGammaSq - epsilonRe)*
434 (1/betaGammaSq - epsilonRe) +
435 epsilonIm*epsilonIm )/2 ;
437 if( epsilonIm == 0.0 || betaGammaSq < 0.01 )
443 x3 = -epsilonRe + 1/betaGammaSq ;
444 x5 = -1 - epsilonRe + be2*((1 +epsilonRe)*(1 + epsilonRe) +
445 epsilonIm*epsilonIm) ;
447 x7 = atan2(epsilonIm,x3) ;
452 x4 = ((x1 + x2)*epsilonIm + x6)/hbarc ;
454 x8 = (1 + epsilonRe)*(1 + epsilonRe) +
457 result = (x4 + cof*integralTerm/omega/omega) ;
458 if(result < 1.0e-8) result = 1.0e-8 ;
459 result *= fine_structure_const/be2/pi ;
462 result *= (1-exp(-be4/betaBohr4)) ;
463 if(fDensity >= fSolidDensity)
488 G4int i = fCurrentInterval;
489 G4double betaGammaSq = fBetaGammaSq;
493 G4double logarithm, x3, x5, argument, modul2, dNdxC ;
497 static const G4double cofBetaBohr = 4.0 ;
498 static const G4double betaBohr2 = fine_structure_const*fine_structure_const ;
499 static const G4double betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr ;
501 be2 = betaGammaSq/(1 + betaGammaSq) ;
504 if( betaGammaSq < 0.01 ) logarithm = log(1.0+betaGammaSq) ;
507 logarithm = -log( (1/betaGammaSq - epsilonRe)*
508 (1/betaGammaSq - epsilonRe) +
509 epsilonIm*epsilonIm )*0.5 ;
510 logarithm += log(1+1.0/betaGammaSq) ;
513 if( epsilonIm == 0.0 || betaGammaSq < 0.01 )
519 x3 = -epsilonRe + 1.0/betaGammaSq ;
520 x5 = -1.0 - epsilonRe +
521 be2*((1.0 +epsilonRe)*(1.0 + epsilonRe) +
522 epsilonIm*epsilonIm) ;
523 if( x3 == 0.0 ) argument = 0.5*pi;
524 else argument = atan2(epsilonIm,x3) ;
527 dNdxC = ( logarithm*epsilonIm + argument )/hbarc ;
529 if(dNdxC < 1.0e-8) dNdxC = 1.0e-8 ;
531 dNdxC *= fine_structure_const/be2/pi ;
533 dNdxC *= (1-exp(-be4/betaBohr4)) ;
535 if(fDensity >= fSolidDensity)
537 modul2 = (1.0 + epsilonRe)*(1.0 + epsilonRe) +
552 G4int i = fCurrentInterval;
553 G4double betaGammaSq = fBetaGammaSq;
558 G4double cof, resonance, modul2, dNdxP ;
562 static const G4double cofBetaBohr = 4.0 ;
563 static const G4double betaBohr2 = fine_structure_const*fine_structure_const ;
564 static const G4double betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr ;
566 be2 = betaGammaSq/(1 + betaGammaSq) ;
569 resonance = log(2*electron_mass_c2*be2/omega) ;
570 resonance *= epsilonIm/hbarc ;
573 dNdxP = ( resonance + cof*integralTerm/omega/omega ) ;
575 if( dNdxP < 1.0e-8 ) dNdxP = 1.0e-8 ;
577 dNdxP *= fine_structure_const/be2/pi ;
578 dNdxP *= (1-exp(-be4/betaBohr4)) ;
580 if( fDensity >= fSolidDensity )
582 modul2 = (1 + epsilonRe)*(1 + epsilonRe) +
599 G4double energy1, energy2, result = 0.;
604 delete fPAIxscVector;
606 fPAIxscVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
607 fPAIxscVector->
PutValue(fPAIbin-1,result);
609 for( i = fIntervalNumber - 1; i >= 0; i-- )
611 if( Tmax >= (*(*fMatSandiaMatrix)[i])[0] )
break;
619 for( k = fPAIbin - 2; k >= 0; k-- )
624 for( i = fIntervalTmax; i >= 0; i-- )
626 if( energy2 > (*(*fMatSandiaMatrix)[i])[0] )
break;
631 for( i = fIntervalTmax; i >= 0; i-- )
633 if( energy1 > (*(*fMatSandiaMatrix)[i])[0] )
break;
640 fCurrentInterval = i1;
647 for( i = i2; i >= i1; i-- )
649 fCurrentInterval = i;
651 if( i==i2 ) result += integral.Legendre10(
this,
653 (*(*fMatSandiaMatrix)[i])[0] ,energy2);
655 else if( i == i1 ) result += integral.Legendre10(
this,
657 (*(*fMatSandiaMatrix)[i+1])[0]);
659 else result += integral.Legendre10(
this,
661 (*(*fMatSandiaMatrix)[i])[0] ,(*(*fMatSandiaMatrix)[i+1])[0]);
680 G4double energy1, energy2, result = 0.;
685 delete fPAIdEdxVector;
687 fPAIdEdxVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
688 fPAIdEdxVector->
PutValue(fPAIbin-1,result);
690 for( i = fIntervalNumber - 1; i >= 0; i-- )
692 if( Tmax >= (*(*fMatSandiaMatrix)[i])[0] )
break;
700 for( k = fPAIbin - 2; k >= 0; k-- )
705 for( i = fIntervalTmax; i >= 0; i-- )
707 if( energy2 > (*(*fMatSandiaMatrix)[i])[0] )
break;
712 for( i = fIntervalTmax; i >= 0; i-- )
714 if( energy1 > (*(*fMatSandiaMatrix)[i])[0] )
break;
721 fCurrentInterval = i1;
728 for( i = i2; i >= i1; i-- )
730 fCurrentInterval = i;
732 if( i==i2 ) result += integral.Legendre10(
this,
734 (*(*fMatSandiaMatrix)[i])[0] ,energy2);
736 else if( i == i1 ) result += integral.Legendre10(
this,
738 (*(*fMatSandiaMatrix)[i+1])[0]);
740 else result += integral.Legendre10(
this,
742 (*(*fMatSandiaMatrix)[i])[0] ,(*(*fMatSandiaMatrix)[i+1])[0]);
760 G4double energy1, energy2, beta2, module2, cos2, width, result = 0.;
766 delete fPAIphotonVector;
767 delete fChCosSqVector;
768 delete fChWidthVector;
770 fPAIphotonVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
771 fChCosSqVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
772 fChWidthVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
774 fPAIphotonVector->
PutValue(fPAIbin-1,result);
775 fChCosSqVector->
PutValue(fPAIbin-1,1.);
776 fChWidthVector->
PutValue(fPAIbin-1,1e-7);
778 for( i = fIntervalNumber - 1; i >= 0; i-- )
780 if( Tmax >= (*(*fMatSandiaMatrix)[i])[0] )
break;
788 for( k = fPAIbin - 2; k >= 0; k-- )
793 for( i = fIntervalTmax; i >= 0; i-- )
795 if( energy2 > (*(*fMatSandiaMatrix)[i])[0] )
break;
800 for( i = fIntervalTmax; i >= 0; i-- )
802 if( energy1 > (*(*fMatSandiaMatrix)[i])[0] )
break;
816 fCurrentInterval = i1;
819 fPAIphotonVector->
PutValue(k,result);
824 for( i = i2; i >= i1; i-- )
826 fCurrentInterval = i;
828 if( i==i2 ) result += integral.Legendre10(
this,
830 (*(*fMatSandiaMatrix)[i])[0] ,energy2);
832 else if( i == i1 ) result += integral.Legendre10(
this,
834 (*(*fMatSandiaMatrix)[i+1])[0]);
836 else result += integral.Legendre10(
this,
838 (*(*fMatSandiaMatrix)[i])[0] ,(*(*fMatSandiaMatrix)[i+1])[0]);
840 fPAIphotonVector->
PutValue(k,result);
856 G4double energy1, energy2, result = 0.;
861 delete fPAIelectronVector;
863 fPAIelectronVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
864 fPAIelectronVector->
PutValue(fPAIbin-1,result);
866 for( i = fIntervalNumber - 1; i >= 0; i-- )
868 if( Tmax >= (*(*fMatSandiaMatrix)[i])[0] )
break;
876 for( k = fPAIbin - 2; k >= 0; k-- )
881 for( i = fIntervalTmax; i >= 0; i-- )
883 if( energy2 > (*(*fMatSandiaMatrix)[i])[0] )
break;
888 for( i = fIntervalTmax; i >= 0; i-- )
890 if( energy1 > (*(*fMatSandiaMatrix)[i])[0] )
break;
897 fCurrentInterval = i1;
900 fPAIelectronVector->
PutValue(k,result);
904 for( i = i2; i >= i1; i-- )
906 fCurrentInterval = i;
908 if( i==i2 ) result += integral.Legendre10(
this,
910 (*(*fMatSandiaMatrix)[i])[0] ,energy2);
912 else if( i == i1 ) result += integral.Legendre10(
this,
914 (*(*fMatSandiaMatrix)[i+1])[0]);
916 else result += integral.Legendre10(
this,
918 (*(*fMatSandiaMatrix)[i])[0] ,(*(*fMatSandiaMatrix)[i+1])[0]);
920 fPAIelectronVector->
PutValue(k,result);
935 G4double omega2, omega3, omega4, a1, a2, a3, a4, lambda ;
937 omega2 = omega*omega ;
938 omega3 = omega2*omega ;
939 omega4 = omega2*omega2 ;
941 for(i = 0; i < fIntervalNumber;i++)
943 if( omega < (*(*fMatSandiaMatrix)[i])[0] ) break ;
947 G4cout<<
"Warning: energy in G4InitXscPAI::GetPhotonLambda < I1"<<
G4endl;
951 a1 = (*(*fMatSandiaMatrix)[i])[1];
952 a2 = (*(*fMatSandiaMatrix)[i])[2];
953 a3 = (*(*fMatSandiaMatrix)[i])[3];
954 a4 = (*(*fMatSandiaMatrix)[i])[4];
956 lambda = 1./(a1/omega + a2/omega2 + a3/omega3 + a4/omega4);
G4GLOB_DLL std::ostream G4cout
G4double RutherfordIntegral(G4int intervalNumber, G4double limitLow, G4double limitHigh)
G4double GetPhotonLambda(G4double omega)
void IntegralCherenkov(G4double bg2, G4double Tmax)
void IntegralPAIxSection(G4double bg2, G4double Tmax)
G4double GetStepCerenkovLoss(G4double step)
G4double ModuleSqDielectricConst(G4int intervalNumber, G4double energy)
G4double DifPAIdEdx(G4double omega)
G4double PAIdNdxCherenkov(G4double omega)
G4double GetStepEnergyLoss(G4double step)
void IntegralPlasmon(G4double bg2, G4double Tmax)
G4double IntegralTerm(G4double omega)
G4double GetStepPlasmonLoss(G4double step)
G4double ImPartDielectricConst(G4int intervalNumber, G4double energy)
G4InitXscPAI(const G4MaterialCutsCouple *matCC)
G4double DifPAIxSection(G4double omega)
G4double RePartDielectricConst(G4double energy)
void IntegralPAIdEdx(G4double bg2, G4double Tmax)
void KillCloseIntervals()
G4double PAIdNdxPlasmon(G4double omega)
const G4Material * GetMaterial() const
G4double GetDensity() const
G4double GetElectronDensity() const
G4double GetLowEdgeEnergy(const std::size_t index) const
void PutValue(const std::size_t index, const G4double value)
G4int GetMaxInterval() const
G4double GetSandiaMatTable(G4int, G4int) const