42#define G4hhElastic_h 1
113 std::vector<G4PhysicsTable*> fBankT;
245 static const G4double theNuclNuclData[19][6];
246 static const G4double thePiKaNuclData[8][6];
275 fMq = 0.36*CLHEP::GeV;
276 fMQ = 0.441*CLHEP::GeV;
277 fMff2 = 0.26*CLHEP::GeV*CLHEP::GeV;
283 fDelta = 1. - fGamma;
287 fRA = 6.5/CLHEP::GeV;
290 fRB = 6.5/CLHEP::GeV;
294 fAlphaP = 0.15/CLHEP::GeV/CLHEP::GeV;
295 fLambda = 0.25*fRA*fRA;
302 fBQ = 1. + fBq - 2*std::sqrt(fBq);
303 fBqQ = std::sqrt(fBq*fBQ);
305 fLambdaFF = 1.5/CLHEP::GeV/CLHEP::GeV;
306 fSo = 1.*CLHEP::GeV*CLHEP::GeV;
307 fQcof = 0.009*CLHEP::GeV;
308 fExpSlope = 19.9/CLHEP::GeV/CLHEP::GeV;
319 G4double trMass = 900.*CLHEP::MeV, Tkin;
320 G4double sl, sh, ds, rAl, rAh, drA, rBl, rBh, drB, bql, bqh, dbq, bQl, bQh, dbQ, cIl, cIh, dcI;
322 Tkin = std::sqrt(fMassProj*fMassProj + plab*plab) - fMassProj;
329 delete theDynamicParticle;
331 fSpp = fMassProj*fMassProj + fMassTarg*fMassTarg + 2.*fMassTarg*std::sqrt(plab*plab + fMassProj*fMassProj);
332 fPcms = std::sqrt( (fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
336 if( fMassProj > trMass )
341 fDelta = 1. - fGamma;
343 if( sCMS <= theNuclNuclData[0][0]*CLHEP::GeV )
345 this->
SetRA(theNuclNuclData[0][1]/CLHEP::GeV,0.173,0.316);
346 this->
SetRB(theNuclNuclData[0][2]/CLHEP::GeV,0.173,0.316);
348 this->
SetBq(theNuclNuclData[0][3]);
349 this->
SetBQ(theNuclNuclData[0][4]);
350 this->
SetImCof(theNuclNuclData[0][5]);
355 else if( sCMS >= theNuclNuclData[17][0]*CLHEP::GeV )
357 this->
SetRA(theNuclNuclData[17][1]/CLHEP::GeV,0.173,0.316);
358 this->
SetRB(theNuclNuclData[17][2]/CLHEP::GeV,0.173,0.316);
360 this->
SetBq(theNuclNuclData[17][3]);
361 this->
SetBQ(theNuclNuclData[17][4]);
362 this->
SetImCof(theNuclNuclData[17][5]);
369 for( i = 0; i < 19; i++ )
if( sCMS <= theNuclNuclData[i][0]*CLHEP::GeV )
break;
373 sl = theNuclNuclData[i-1][0]*CLHEP::GeV;
374 sh = theNuclNuclData[i][0]*CLHEP::GeV;
375 ds = (sCMS - sl)/(sh - sl);
377 rAl = theNuclNuclData[i-1][1]/CLHEP::GeV;
378 rAh = theNuclNuclData[i][1]/CLHEP::GeV;
381 rBl = theNuclNuclData[i-1][2]/CLHEP::GeV;
382 rBh = theNuclNuclData[i][2]/CLHEP::GeV;
385 bql = theNuclNuclData[i-1][3];
386 bqh = theNuclNuclData[i][3];
389 bQl = theNuclNuclData[i-1][4];
390 bQh = theNuclNuclData[i][4];
393 cIl = theNuclNuclData[i-1][5];
394 cIh = theNuclNuclData[i][5];
397 this->
SetRA(rAl+drA*ds,0.173,0.316);
398 this->
SetRB(rBl+drB*ds,0.173,0.316);
400 this->
SetBq(bql+dbq*ds);
401 this->
SetBQ(bQl+dbQ*ds);
413 fDelta = 1. - fGamma;
415 if( sCMS <= thePiKaNuclData[0][0]*CLHEP::GeV )
417 this->
SetRA(thePiKaNuclData[0][1]/CLHEP::GeV,0.173,0.316);
418 this->
SetRB(thePiKaNuclData[0][2]/CLHEP::GeV,0.173,0.173);
420 this->
SetBq(thePiKaNuclData[0][3]);
421 this->
SetBQ(thePiKaNuclData[0][4]);
422 this->
SetImCof(thePiKaNuclData[0][5]);
427 else if( sCMS >= thePiKaNuclData[7][0]*CLHEP::GeV )
429 this->
SetRA(thePiKaNuclData[7][1]/CLHEP::GeV,0.173,0.316);
430 this->
SetRB(thePiKaNuclData[7][2]/CLHEP::GeV,0.173,0.173);
432 this->
SetBq(thePiKaNuclData[7][3]);
433 this->
SetBQ(thePiKaNuclData[7][4]);
434 this->
SetImCof(thePiKaNuclData[7][5]);
441 for( i = 0; i < 8; i++ )
if( sCMS <= thePiKaNuclData[i][0]*CLHEP::GeV )
break;
445 sl = thePiKaNuclData[i-1][0]*CLHEP::GeV;
446 sh = thePiKaNuclData[i][0]*CLHEP::GeV;
447 ds = (sCMS - sl)/(sh - sl);
449 rAl = thePiKaNuclData[i-1][1]/CLHEP::GeV;
450 rAh = thePiKaNuclData[i][1]/CLHEP::GeV;
453 rBl = thePiKaNuclData[i-1][2]/CLHEP::GeV;
454 rBh = thePiKaNuclData[i][2]/CLHEP::GeV;
457 bql = thePiKaNuclData[i-1][3];
458 bqh = thePiKaNuclData[i][3];
461 bQl = thePiKaNuclData[i-1][4];
462 bQh = thePiKaNuclData[i][4];
465 cIl = thePiKaNuclData[i-1][5];
466 cIh = thePiKaNuclData[i][5];
469 this->
SetRA(rAl+drA*ds,0.173,0.316);
470 this->
SetRB(rBl+drB*ds,0.173,0.173);
472 this->
SetBq(bql+dbq*ds);
473 this->
SetBQ(bQl+dbQ*ds);
513 re = fAlphaP*
G4Log(fSpp/fSo);
514 im = -0.5*fAlphaP*fImCof*CLHEP::pi;
522 G4double re = (fRq*fRq + fRg*fRg)/16.;
532 G4double re = (fRq*fRq + fRG*fRG)/16.;
542 G4double re = (fRQ*fRQ + fRg*fRg)/16.;
552 G4double re = (fRQ*fRQ + fRG*fRG)/16.;
564 G4double p = std::sqrt((fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
567 G4complex exp13 = fBq*std::exp(-(
Phi13() + fBeta*fBeta*fLambda + fDelta*fDelta*fEta)*t);
568 G4complex exp14 = fBq*std::exp(-(
Phi14() + fBeta*fBeta*fLambda + fGamma*fGamma*fEta)*t);
569 G4complex exp23 = fBQ*std::exp(-(
Phi23() + fAlpha*fAlpha*fLambda + fDelta*fDelta*fEta)*t);
570 G4complex exp24 = fBQ*std::exp(-(
Phi24() + fAlpha*fAlpha*fLambda + fGamma*fGamma*fEta)*t);
572 G4complex res = exp13 + exp14 + exp23 + exp24;
574 res *= 0.25*k*fSigmaTot/CLHEP::pi;
587 G4double p = std::sqrt((fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
590 G4complex exp14 = fBqQ*std::exp(-(
Phi14() + fBeta*fBeta*fLambda + fGamma*fGamma*fEta)*t);
591 G4complex exp24 = fBQ*std::exp(-(
Phi24() + fAlpha*fAlpha*fLambda + fGamma*fGamma*fEta)*t);
595 F1 *= 0.25*k*fSigmaTot/CLHEP::pi;
602 z1424 +=
Phi24() + fAlpha*fAlpha*fLambda + fGamma*fGamma*fEta;
611 F3 *= 0.25*k/CLHEP::pi;
613 F3 *= fSigmaTot*fSigmaTot/(8.*CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc);
630 G4double p = std::sqrt((fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
635 dsdt *= real(F1)*real(F1) + imag(F1)*imag(F1);
645 G4double p = std::sqrt((fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
648 G4complex z1324 = -(
Phi24() + fAlpha*fLambda + fGamma*fEta)*(
Phi24() + fAlpha*fLambda + fGamma*fEta);
650 z1324 +=
Phi24() + fAlpha*fAlpha*fLambda + fGamma*fGamma*fEta;
653 exp1324 /=
Phi13() +
Phi24() + fLambda + fEta;
655 G4complex z1423 = -(
Phi23() + fAlpha*fLambda + fDelta*fEta)*(
Phi24() + fAlpha*fLambda + fDelta*fEta);;
657 z1423 +=
Phi23() + fAlpha*fAlpha*fLambda + fDelta*fDelta*fEta;
660 exp1423 /=
Phi14() +
Phi23() + fLambda + fEta;
665 res *= 0.25*k/CLHEP::pi;
667 res *= fBq*fBQ*fSigmaTot*fSigmaTot/(8.*CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc);
679 G4double p = std::sqrt((fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
694 G4double p = std::sqrt( (fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
701 z1314 +=
Phi14() + fBeta*fBeta*fLambda + fGamma*fGamma*fEta;
710 z2324 +=
Phi24() + fAlpha*fAlpha*fLambda + fGamma*fGamma*fEta;
719 z1323 +=
Phi23() + fAlpha*fAlpha*fLambda + fDelta*fDelta*fEta;
728 z1424 +=
Phi24() + fAlpha*fAlpha*fLambda + fGamma*fGamma*fEta;
733 G4complex res = fBq*fBq*exp1314 + fBQ*fBQ*exp2324 + fBq*fBQ*exp1323 + fBq*fBQ*exp1424;
735 res *= 0.25*k/CLHEP::pi;
737 res *= fSigmaTot*fSigmaTot/(8.*CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc);
748 G4double p = std::sqrt( (fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp );
755 dsdt *= real(F123)*real(F123) + imag(F123)*imag(F123);
769 G4double c1424 = real(z1424)/(CLHEP::hbarc*CLHEP::hbarc);
772 fBQ /= 1. - fSigmaTot*fBQ*c1424;
774 G4cout<<
"fSigmaTot*fBQ*c1424 = "<<fSigmaTot*fBQ*c1424<<
G4endl;
776 G4double ratio = fBqQ + fBQ - fSigmaTot*fBqQ*fBQ*c1424;
792 G4double c1324 = real(z1324)/(CLHEP::hbarc*CLHEP::hbarc);
796 G4double c1423 = real(z1423)/(CLHEP::hbarc*CLHEP::hbarc);
799 fBQ /= 2. - fSigmaTot*fBq*(c1324+1423);
801 G4double ratio = 2.*(fBq + fBQ) - fSigmaTot*fBq*fBQ*(c1324 + c1423);
818 G4double c1324 = real(z1324)/(CLHEP::hbarc*CLHEP::hbarc);
822 G4double c1423 = real(z1423)/(CLHEP::hbarc*CLHEP::hbarc);
826 G4double c1314 = real(z1314)/(CLHEP::hbarc*CLHEP::hbarc);
830 G4double c2324 = real(z2324)/(CLHEP::hbarc*CLHEP::hbarc);
834 G4double c1323 = real(z1323)/(CLHEP::hbarc*CLHEP::hbarc);
838 G4double c1424 = real(z1424)/(CLHEP::hbarc*CLHEP::hbarc);
841 G4double B = fSigmaTot*fBq*(c1324 + c1423 + c1323 + c1424) - 2.;
842 G4double C = 1. + fSigmaTot*fBq*fBq*c1314 - 2*fBq;
850 if(
B*
B-4.*
A*C < 1.e-6 ) fBQ = std::abs(-
B/2./
A);
851 else if (
B < 0.) fBQ = std::abs( ( -
B - std::sqrt(
B*
B-4.*
A*C) )/2./
A);
852 else fBQ = std::abs( ( -
B + std::sqrt(
B*
B-4.*
A*C) )/2./
A);
854 fOptRatio = 2*(fBq+fBQ) - fSigmaTot*fBq*fBQ*(c1324 + c1423 + c1323 + c1424);
855 fOptRatio -= fSigmaTot*fBq*fBq*c1314 + fSigmaTot*c2324*fBQ*fBQ;
871 re = fRq*fRq/8. + fAlphaP*
G4Log(fSpp/fSo) + 8.*fLambda/9.;
872 im = -0.5*fAlphaP*fImCof*CLHEP::pi;
884 re = fRQ*fRQ/8. + fAlphaP*
G4Log(fSpp/fSo) + 2.*fLambda/9.;
885 im = -0.5*fAlphaP*fImCof*CLHEP::pi;
907 result /= 4.*CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc;
908 result *= fSigmaTot*fCofF2;
920 result /= 4.*CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc;
921 result *= fSigmaTot*fCofF3;
933 result /= 4.*CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc;
934 result *= fSigmaTot*fCofF3;
978 q += 2*b*b*b/a/a/a/27.;
1000 G4cout<<
"re_x1 = "<<real(x1)<<
"; re_x2 = "<<real(x2)<<
"; re_x3 = "<<real(x3)<<
G4endl;
1001 G4cout<<
"im_x1 = "<<imag(x1)<<
"; im_x2 = "<<imag(x2)<<
"; im_x3 = "<<imag(x3)<<
G4endl;
1007 if( r1 <= 1. && r1 >= 0. ) fBQ = r1;
1008 else if( r2 <= 1. && r2 >= 0. ) fBQ = r2;
1009 else if( r3 <= 1. && r3 >= 0. ) fBQ = r3;
1012 G4double sqrtBqBQ = std::sqrt(fBq*fBQ);
1013 fOptRatio = fBq + fBQ + 2.*sqrtBqBQ - 1.;
1026 G4double p = std::sqrt(0.25*fSpp - CLHEP::proton_mass_c2*CLHEP::proton_mass_c2);
1033 res *= 0.25*k*fSigmaTot/CLHEP::pi;
1045 G4double p = std::sqrt(0.25*spp - CLHEP::proton_mass_c2*CLHEP::proton_mass_c2);
1049 dsdt *= real(F1)*real(F1) + imag(F1)*imag(F1);
1059 G4double p = std::sqrt(0.25*fSpp - CLHEP::proton_mass_c2*CLHEP::proton_mass_c2);
1062 z1 /= 2.*(
GetAqQ() + 4.*fLambda/9.);
1073 res *= 0.25*k/CLHEP::pi;
1076 res *= fBq*fBQ*fSigmaTot*fSigmaTot/(8.*CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc);
1088 G4double p = std::sqrt(0.25*spp - CLHEP::proton_mass_c2*CLHEP::proton_mass_c2);
1092 dsdt *= real(F1)*real(F1) + imag(F1)*imag(F1);
1102 G4double p = std::sqrt(0.25*fSpp - CLHEP::proton_mass_c2*CLHEP::proton_mass_c2);
1117 res *= 0.25*k/CLHEP::pi;
1119 res *= std::sqrt(fBq*fBQ)*fSigmaTot*fSigmaTot/(4.*CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc);
1130 G4double p = std::sqrt(0.25*fSpp - CLHEP::proton_mass_c2*CLHEP::proton_mass_c2);
1132 F1 -= fCofF2*
GetF2(t);
1133 F1 -= fCofF3*
GetF3(t);
1135 dsdt *= real(F1)*real(F1) + imag(F1)*imag(F1);
1146 G4double p = std::sqrt(0.25*spp - CLHEP::proton_mass_c2*CLHEP::proton_mass_c2);
1153 dsdt *= real(F1)*real(F1) + imag(F1)*imag(F1);
1159 fRhoReIm = real(
F10)/imag(
F10);
1164 dsdt0 *=
G4Exp(-fExpSlope*t);
G4double B(G4double temperature)
G4double D(G4double temp)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4ThreeVector G4ParticleMomentum
std::complex< G4double > G4complex
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * GetDefinition() const
G4double GetHadronNucleonXscNS(const G4DynamicParticle *dp, const G4ParticleDefinition *p)
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4Neutron * Neutron()
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4Proton * Proton()
void SetImCof(G4double a)
void SetRA(G4double rn, G4double pq, G4double pQ)
G4double GetdsdtF1qQgG(G4double s, G4double q)
G4complex GetF2(G4double qp)
G4complex GetF3(G4double qp)
virtual G4bool IsApplicable(const G4HadProjectile &, G4Nucleus &)
G4double GetdsdtF123(G4double q)
G4complex GetF1(G4double qp)
void SetCofF2(G4double f)
void CalculateBqQ13(G4double b)
G4double SampleBisectionalT(const G4ParticleDefinition *p, G4double plab)
void SetSpp(G4double spp)
void CalculateBqQ12(G4double b)
G4complex GetF2qQgG(G4double qp)
void BuildTableTest(G4ParticleDefinition *target, G4ParticleDefinition *projectile, G4double plab)
G4double GetdsdtF12(G4double s, G4double q)
void SetLambda(G4double L)
G4complex GetF1qQgG(G4double qp)
G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int, G4int)
G4double GetdsdtF12qQgG(G4double s, G4double q)
G4complex GetF3qQgG(G4double qp)
void CalculateBqQ123(G4double b)
G4double GetdsdtF1(G4double s, G4double q)
void SetAlphaP(G4double a)
void SetParametersCMS(G4double plab)
void SetRB(G4double rn, G4double pq, G4double pQ)
G4double GetdsdtF123qQgG(G4double q)
void CalculateBQ(G4double b)
G4double SampleTest(G4double tMin)
G4double GetdsdtF13qQG(G4double s, G4double q)
void BuildTableT(G4ParticleDefinition *target, G4ParticleDefinition *projectile)
void SetCofF3(G4double f)
void SetSigmaTot(G4double stot)
G4double GetTransfer(G4int iMomentum, G4int iTransfer, G4double position)
G4double GetOpticalRatio()
G4double GetExpRatioF123(G4double s, G4double q)