59const G4double G4InitXscPAI::fDelta = 0.005 ;
60const G4int G4InitXscPAI::fPAIbin = 100 ;
61const G4double G4InitXscPAI::fSolidDensity = 0.05*g/cm3 ;
71 : fPAIxscVector(NULL),
73 fPAIphotonVector(NULL),
74 fPAIelectronVector(NULL),
89 for (i = 0; i < fIntervalNumber; i++)
93 for (i = 0; i < fIntervalNumber; i++)
97 for(j = 1; j < 5 ; j++)
104 fBetaGammaSq = fTmax = 0.0;
105 fIntervalTmax = fCurrentInterval = 0;
117 if(fPAIxscVector)
delete fPAIxscVector;
118 if(fPAIdEdxVector)
delete fPAIdEdxVector;
119 if(fPAIphotonVector)
delete fPAIphotonVector;
120 if(fPAIelectronVector)
delete fPAIelectronVector;
121 if(fChCosSqVector)
delete fChCosSqVector;
122 if(fChWidthVector)
delete fChWidthVector;
124 delete fMatSandiaMatrix;
136 for( i = 0 ; i < fIntervalNumber - 1 ; i++ )
138 energy1 = (*(*fMatSandiaMatrix)[i])[0];
139 energy2 = (*(*fMatSandiaMatrix)[i+1])[0];
141 if( energy2 - energy1 > 1.5*fDelta*(energy1 + energy2) )
continue ;
144 for(j = i; j < fIntervalNumber-1; j++)
146 for( k = 0; k < 5; k++ )
148 (*(*fMatSandiaMatrix)[j])[k] = (*(*fMatSandiaMatrix)[j+1])[k];
167 energy1 = (*(*fMatSandiaMatrix)[fIntervalNumber-1])[0];
168 energy2 = 2.*(*(*fMatSandiaMatrix)[fIntervalNumber-1])[0];
173 for( i = fIntervalNumber-2; i >= 0; i-- )
175 energy1 = (*(*fMatSandiaMatrix)[i])[0];
176 energy2 = (*(*fMatSandiaMatrix)[i+1])[0];
181 fNormalizationCof = 2*pi*pi*hbarc*hbarc*fine_structure_const/electron_mass_c2 ;
182 fNormalizationCof *= fElectronDensity;
184 fNormalizationCof /= cof;
188 for (i = 0; i < fIntervalNumber; i++)
190 for(j = 1; j < 5 ; j++)
192 (*(*fMatSandiaMatrix)[i])[j] *= fNormalizationCof;
236 G4double c1, c2, c3, a1, a2, a3, a4 ;
238 a1 = (*(*fMatSandiaMatrix)[k])[1];
239 a2 = (*(*fMatSandiaMatrix)[k])[2];
240 a3 = (*(*fMatSandiaMatrix)[k])[3];
241 a4 = (*(*fMatSandiaMatrix)[k])[4];
243 c1 = (x2 - x1)/x1/x2 ;
244 c2 = (x2 - x1)*(x2 + x1)/x1/x1/x2/x2 ;
245 c3 = (x2 - x1)*(x1*x1 + x1*x2 + x2*x2)/x1/x1/x1/x2/x2/x2 ;
248 return a1*log(x2/x1) + a2*c1 + a3*c2/2 + a4*c3/3 ;
259 G4double energy1, energy2, result = 0.;
261 for( i = 0; i <= fIntervalTmax; i++ )
263 if(i == fIntervalTmax)
265 energy1 = (*(*fMatSandiaMatrix)[i])[0];
270 if( omega <= (*(*fMatSandiaMatrix)[i+1])[0])
272 energy1 = (*(*fMatSandiaMatrix)[i])[0];
278 energy1 = (*(*fMatSandiaMatrix)[i])[0];
279 energy2 = (*(*fMatSandiaMatrix)[i+1])[0];
297 G4double energy2,energy3,energy4,a1,a2,a3,a4,result;
299 a1 = (*(*fMatSandiaMatrix)[k])[1];
300 a2 = (*(*fMatSandiaMatrix)[k])[2];
301 a3 = (*(*fMatSandiaMatrix)[k])[3];
302 a4 = (*(*fMatSandiaMatrix)[k])[4];
304 energy2 = energy1*energy1;
305 energy3 = energy2*energy1;
306 energy4 = energy3*energy1;
308 result = a1/energy1+a2/energy2+a3/energy3+a4/energy4 ;
309 result *= hbarc/energy1 ;
326 eIm2 = result*result;
329 eRe2 = result*result;
331 result = eIm2 + eRe2;
346 G4double x0, x02, x03, x04, x05, x1, x2, a1,a2,a3,a4,xx1 ,xx2 , xx12,
347 c1, c2, c3, cof1, cof2, xln1, xln2, xln3, result ;
352 for( i = 0; i < fIntervalNumber-1; i++)
354 x1 = (*(*fMatSandiaMatrix)[i])[0];
355 x2 = (*(*fMatSandiaMatrix)[i+1])[0] ;
357 a1 = (*(*fMatSandiaMatrix)[i])[1];
358 a2 = (*(*fMatSandiaMatrix)[i])[2];
359 a3 = (*(*fMatSandiaMatrix)[i])[3];
360 a4 = (*(*fMatSandiaMatrix)[i])[4];
362 if( std::abs(x0-x1) < 0.5*(x0+x1)*fDelta )
364 if(x0 >= x1) x0 = x1*(1+fDelta);
365 else x0 = x1*(1-fDelta);
367 if( std::abs(x0-x2) < 0.5*(x0+x2)*fDelta )
369 if(x0 >= x2) x0 = x2*(1+fDelta);
370 else x0 = x2*(1-fDelta);
376 if( xx12 < 0 ) xx12 = -xx12;
380 xln3 = log((x2 + x0)/(x1 + x0)) ;
387 c1 = (x2 - x1)/x1/x2 ;
388 c2 = (x2 - x1)*(x2 +x1)/x1/x1/x2/x2 ;
389 c3 = (x2 -x1)*(x1*x1 + x1*x2 + x2*x2)/x1/x1/x1/x2/x2/x2 ;
391 result -= (a1/x02 + a3/x04)*xln1 ;
392 result -= (a2/x02 + a4/x04)*c1 ;
393 result -= a3*c2/2/x02 ;
394 result -= a4*c3/3/x02 ;
396 cof1 = a1/x02 + a3/x04 ;
397 cof2 = a2/x03 + a4/x05 ;
399 result += 0.5*(cof1 +cof2)*xln2 ;
400 result += 0.5*(cof1 - cof2)*xln3 ;
402 result *= 2*hbarc/pi ;
416 G4int i = fCurrentInterval;
417 G4double betaGammaSq = fBetaGammaSq;
419 G4double be2,cof,x1,x2,x3,x4,x5,x6,x7,x8,result ;
423 G4double betaBohr2 = fine_structure_const*fine_structure_const ;
424 G4double betaBohr4 = betaBohr2*betaBohr2*4.0 ;
425 be2 = betaGammaSq/(1 + betaGammaSq) ;
429 x1 = log(2*electron_mass_c2/omega) ;
431 if( betaGammaSq < 0.01 ) x2 = log(be2) ;
434 x2 = -log( (1/betaGammaSq - epsilonRe)*
435 (1/betaGammaSq - epsilonRe) +
436 epsilonIm*epsilonIm )/2 ;
438 if( epsilonIm == 0.0 || betaGammaSq < 0.01 )
444 x3 = -epsilonRe + 1/betaGammaSq ;
445 x5 = -1 - epsilonRe + be2*((1 +epsilonRe)*(1 + epsilonRe) +
446 epsilonIm*epsilonIm) ;
448 x7 = atan2(epsilonIm,x3) ;
453 x4 = ((x1 + x2)*epsilonIm + x6)/hbarc ;
455 x8 = (1 + epsilonRe)*(1 + epsilonRe) +
458 result = (x4 + cof*integralTerm/omega/omega) ;
459 if(result < 1.0e-8) result = 1.0e-8 ;
460 result *= fine_structure_const/be2/pi ;
463 result *= (1-exp(-be4/betaBohr4)) ;
464 if(fDensity >= fSolidDensity)
489 G4int i = fCurrentInterval;
490 G4double betaGammaSq = fBetaGammaSq;
494 G4double logarithm, x3, x5, argument, modul2, dNdxC ;
495 G4double be2, be4, betaBohr2,betaBohr4,cofBetaBohr ;
499 betaBohr2 = fine_structure_const*fine_structure_const ;
500 betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr ;
502 be2 = betaGammaSq/(1 + betaGammaSq) ;
505 if( betaGammaSq < 0.01 ) logarithm = log(1.0+betaGammaSq) ;
508 logarithm = -log( (1/betaGammaSq - epsilonRe)*
509 (1/betaGammaSq - epsilonRe) +
510 epsilonIm*epsilonIm )*0.5 ;
511 logarithm += log(1+1.0/betaGammaSq) ;
514 if( epsilonIm == 0.0 || betaGammaSq < 0.01 )
520 x3 = -epsilonRe + 1.0/betaGammaSq ;
521 x5 = -1.0 - epsilonRe +
522 be2*((1.0 +epsilonRe)*(1.0 + epsilonRe) +
523 epsilonIm*epsilonIm) ;
524 if( x3 == 0.0 ) argument = 0.5*pi;
525 else argument = atan2(epsilonIm,x3) ;
528 dNdxC = ( logarithm*epsilonIm + argument )/hbarc ;
530 if(dNdxC < 1.0e-8) dNdxC = 1.0e-8 ;
532 dNdxC *= fine_structure_const/be2/pi ;
534 dNdxC *= (1-exp(-be4/betaBohr4)) ;
536 if(fDensity >= fSolidDensity)
538 modul2 = (1.0 + epsilonRe)*(1.0 + epsilonRe) +
553 G4int i = fCurrentInterval;
554 G4double betaGammaSq = fBetaGammaSq;
559 G4double cof, resonance, modul2, dNdxP ;
560 G4double be2, be4, betaBohr2, betaBohr4, cofBetaBohr ;
564 betaBohr2 = fine_structure_const*fine_structure_const ;
565 betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr ;
567 be2 = betaGammaSq/(1 + betaGammaSq) ;
570 resonance = log(2*electron_mass_c2*be2/omega) ;
571 resonance *= epsilonIm/hbarc ;
574 dNdxP = ( resonance + cof*integralTerm/omega/omega ) ;
576 if( dNdxP < 1.0e-8 ) dNdxP = 1.0e-8 ;
578 dNdxP *= fine_structure_const/be2/pi ;
579 dNdxP *= (1-exp(-be4/betaBohr4)) ;
581 if( fDensity >= fSolidDensity )
583 modul2 = (1 + epsilonRe)*(1 + epsilonRe) +
600 G4double energy1, energy2, result = 0.;
605 if(fPAIxscVector)
delete fPAIxscVector;
607 fPAIxscVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
608 fPAIxscVector->
PutValue(fPAIbin-1,result);
610 for( i = fIntervalNumber - 1; i >= 0; i-- )
612 if( Tmax >= (*(*fMatSandiaMatrix)[i])[0] )
break;
620 for( k = fPAIbin - 2; k >= 0; k-- )
625 for( i = fIntervalTmax; i >= 0; i-- )
627 if( energy2 > (*(*fMatSandiaMatrix)[i])[0] )
break;
632 for( i = fIntervalTmax; i >= 0; i-- )
634 if( energy1 > (*(*fMatSandiaMatrix)[i])[0] )
break;
641 fCurrentInterval = i1;
648 for( i = i2; i >= i1; i-- )
650 fCurrentInterval = i;
652 if( i==i2 ) result += integral.Legendre10(
this,
654 (*(*fMatSandiaMatrix)[i])[0] ,energy2);
656 else if( i == i1 ) result += integral.Legendre10(
this,
658 (*(*fMatSandiaMatrix)[i+1])[0]);
660 else result += integral.Legendre10(
this,
662 (*(*fMatSandiaMatrix)[i])[0] ,(*(*fMatSandiaMatrix)[i+1])[0]);
681 G4double energy1, energy2, result = 0.;
686 if(fPAIdEdxVector)
delete fPAIdEdxVector;
688 fPAIdEdxVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
689 fPAIdEdxVector->
PutValue(fPAIbin-1,result);
691 for( i = fIntervalNumber - 1; i >= 0; i-- )
693 if( Tmax >= (*(*fMatSandiaMatrix)[i])[0] )
break;
701 for( k = fPAIbin - 2; k >= 0; k-- )
706 for( i = fIntervalTmax; i >= 0; i-- )
708 if( energy2 > (*(*fMatSandiaMatrix)[i])[0] )
break;
713 for( i = fIntervalTmax; i >= 0; i-- )
715 if( energy1 > (*(*fMatSandiaMatrix)[i])[0] )
break;
722 fCurrentInterval = i1;
729 for( i = i2; i >= i1; i-- )
731 fCurrentInterval = i;
733 if( i==i2 ) result += integral.Legendre10(
this,
735 (*(*fMatSandiaMatrix)[i])[0] ,energy2);
737 else if( i == i1 ) result += integral.Legendre10(
this,
739 (*(*fMatSandiaMatrix)[i+1])[0]);
741 else result += integral.Legendre10(
this,
743 (*(*fMatSandiaMatrix)[i])[0] ,(*(*fMatSandiaMatrix)[i+1])[0]);
761 G4double energy1, energy2, beta2, module2, cos2, width, result = 0.;
767 if(fPAIphotonVector)
delete fPAIphotonVector;
768 if(fChCosSqVector)
delete fChCosSqVector;
769 if(fChWidthVector)
delete fChWidthVector;
771 fPAIphotonVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
772 fChCosSqVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
773 fChWidthVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
775 fPAIphotonVector->
PutValue(fPAIbin-1,result);
776 fChCosSqVector->
PutValue(fPAIbin-1,1.);
777 fChWidthVector->
PutValue(fPAIbin-1,1e-7);
779 for( i = fIntervalNumber - 1; i >= 0; i-- )
781 if( Tmax >= (*(*fMatSandiaMatrix)[i])[0] )
break;
789 for( k = fPAIbin - 2; k >= 0; k-- )
794 for( i = fIntervalTmax; i >= 0; i-- )
796 if( energy2 > (*(*fMatSandiaMatrix)[i])[0] )
break;
801 for( i = fIntervalTmax; i >= 0; i-- )
803 if( energy1 > (*(*fMatSandiaMatrix)[i])[0] )
break;
817 fCurrentInterval = i1;
820 fPAIphotonVector->
PutValue(k,result);
825 for( i = i2; i >= i1; i-- )
827 fCurrentInterval = i;
829 if( i==i2 ) result += integral.Legendre10(
this,
831 (*(*fMatSandiaMatrix)[i])[0] ,energy2);
833 else if( i == i1 ) result += integral.Legendre10(
this,
835 (*(*fMatSandiaMatrix)[i+1])[0]);
837 else result += integral.Legendre10(
this,
839 (*(*fMatSandiaMatrix)[i])[0] ,(*(*fMatSandiaMatrix)[i+1])[0]);
841 fPAIphotonVector->
PutValue(k,result);
857 G4double energy1, energy2, result = 0.;
862 if(fPAIelectronVector)
delete fPAIelectronVector;
864 fPAIelectronVector =
new G4PhysicsLogVector( (*(*fMatSandiaMatrix)[0])[0], fTmax, fPAIbin);
865 fPAIelectronVector->
PutValue(fPAIbin-1,result);
867 for( i = fIntervalNumber - 1; i >= 0; i-- )
869 if( Tmax >= (*(*fMatSandiaMatrix)[i])[0] )
break;
877 for( k = fPAIbin - 2; k >= 0; k-- )
882 for( i = fIntervalTmax; i >= 0; i-- )
884 if( energy2 > (*(*fMatSandiaMatrix)[i])[0] )
break;
889 for( i = fIntervalTmax; i >= 0; i-- )
891 if( energy1 > (*(*fMatSandiaMatrix)[i])[0] )
break;
898 fCurrentInterval = i1;
901 fPAIelectronVector->
PutValue(k,result);
905 for( i = i2; i >= i1; i-- )
907 fCurrentInterval = i;
909 if( i==i2 ) result += integral.Legendre10(
this,
911 (*(*fMatSandiaMatrix)[i])[0] ,energy2);
913 else if( i == i1 ) result += integral.Legendre10(
this,
915 (*(*fMatSandiaMatrix)[i+1])[0]);
917 else result += integral.Legendre10(
this,
919 (*(*fMatSandiaMatrix)[i])[0] ,(*(*fMatSandiaMatrix)[i+1])[0]);
921 fPAIelectronVector->
PutValue(k,result);
936 G4double omega2, omega3, omega4, a1, a2, a3, a4, lambda ;
938 omega2 = omega*omega ;
939 omega3 = omega2*omega ;
940 omega4 = omega2*omega2 ;
942 for(i = 0; i < fIntervalNumber;i++)
944 if( omega < (*(*fMatSandiaMatrix)[i])[0] ) break ;
948 G4cout<<
"Warning: energy in G4InitXscPAI::GetPhotonLambda < I1"<<
G4endl;
952 a1 = (*(*fMatSandiaMatrix)[i])[1];
953 a2 = (*(*fMatSandiaMatrix)[i])[2];
954 a3 = (*(*fMatSandiaMatrix)[i])[3];
955 a4 = (*(*fMatSandiaMatrix)[i])[4];
957 lambda = 1./(a1/omega + a2/omega2 + a3/omega3 + a4/omega4);
G4DLLIMPORT 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
virtual G4double GetLowEdgeEnergy(size_t binNumber) const
void PutValue(size_t index, G4double theValue)
G4int GetMaxInterval() const
G4double GetSandiaMatTable(G4int, G4int)