87 if(ProjectilePDGcode > 0)
118 Psum=Pprojectile+Ptarget;
136 toCms.
rotateY(-1*Ptmp.theta());
146 G4double X_a(0.), X_b(0.), X_c(0.), X_d(0.);
151 G4double Prel2= S*S + M0projectile2*M0projectile2 + M0target2*M0target2 -
152 2.*S*M0projectile2 - 2.*S*M0target2 - 2.*M0projectile2*M0target2;
172 if(SqrtS < MesonProdThreshold)
174 X_b=3.13+140.*std::pow((MesonProdThreshold - SqrtS)/
GeV,2.5);
194 if((ProjectilePDGcode == -2212)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
195 {X_b*=5.; X_c*=5.; X_d*=6.;}
196 else if((ProjectilePDGcode == -2212)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
197 {X_b*=4.; X_c*=4.; X_d*=4.;}
198 else if((ProjectilePDGcode == -2112)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
199 {X_b*=4.; X_c*=4.; X_d*=4.;}
200 else if((ProjectilePDGcode == -2112)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
201 {X_b*=5.; X_c*=5.; X_d*=6.;}
202 else if((ProjectilePDGcode == -3122)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
203 {X_b*=3.; X_c*=3.; X_d*=2.;}
204 else if((ProjectilePDGcode == -3122)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
205 {X_b*=3.; X_c*=3.; X_d*=2.;}
206 else if((ProjectilePDGcode == -3112)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
207 {X_b*=2.; X_c*=2.; X_d*=0.;}
208 else if((ProjectilePDGcode == -3112)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
209 {X_b*=4.; X_c*=4.; X_d*=2.;}
210 else if((ProjectilePDGcode == -3212)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
211 {X_b*=3.; X_c*=3.; X_d*=2.;}
212 else if((ProjectilePDGcode == -3212)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
213 {X_b*=3.; X_c*=3.; X_d*=2.;}
214 else if((ProjectilePDGcode == -3222)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
215 {X_b*=4.; X_c*=4.; X_d*=2.;}
216 else if((ProjectilePDGcode == -3222)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
217 {X_b*=2.; X_c*=2.; X_d*=0.;}
218 else if((ProjectilePDGcode == -3312)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
219 {X_b*=1.; X_c*=1.; X_d*=0.;}
220 else if((ProjectilePDGcode == -3312)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
221 {X_b*=2.; X_c*=2.; X_d*=0.;}
222 else if((ProjectilePDGcode == -3322)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
223 {X_b*=2.; X_c*=2.; X_d*=0.;}
224 else if((ProjectilePDGcode == -3322)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
225 {X_b*=1.; X_c*=1.; X_d*=0.;}
226 else if((ProjectilePDGcode == -3334)&&((TargetPDGcode == 2212)||(TargetPDGcode == 2214)))
227 {X_b*=0.; X_c*=0.; X_d*=0.;}
228 else if((ProjectilePDGcode == -3334)&&((TargetPDGcode == 2112)||(TargetPDGcode == 2114)))
229 {X_b*=0.; X_c*=0.; X_d*=0.;}
230 else {
G4cout<<
"Unknown anti-baryon for FTF annihilation: PDGcodes - "<<ProjectilePDGcode<<
" "<<TargetPDGcode<<
G4endl;}
240 G4double Xannihilation=X_a+X_b+X_c+X_d;
244 UnpackBaryon(ProjectilePDGcode, AQ[0], AQ[1], AQ[2]);
248 UnpackBaryon(TargetPDGcode, Q[0], Q[1], Q[2]);
253 if(Ksi < X_a/Xannihilation)
261 G4int Tmp1(0), Tmp2(0);
262 if(SampledCase == 0) { }
263 if(SampledCase == 1) {Tmp1=AQ[1]; AQ[1]=AQ[2]; AQ[2]=Tmp1;}
264 if(SampledCase == 2) {Tmp1=AQ[0]; AQ[0]=AQ[1]; AQ[1]=Tmp1;}
265 if(SampledCase == 3) {Tmp1=AQ[0]; Tmp2=AQ[1]; AQ[0]=AQ[2]; AQ[1]=Tmp1; AQ[2]=Tmp2;}
266 if(SampledCase == 4) {Tmp1=AQ[0]; Tmp2=AQ[1]; AQ[0]=Tmp2; AQ[1]=AQ[2]; AQ[2]=Tmp1;}
267 if(SampledCase == 5) {Tmp1=AQ[0]; Tmp2=AQ[1]; AQ[0]=AQ[2]; AQ[1]=Tmp2; AQ[2]=Tmp1;}
299 AveragePt2=200.*200.; maxPtSquare=S;
306 G4int NumberOfTries(0);
312 if(NumberOfTries == 100*(NumberOfTries/100))
315 AveragePt2 *=ScaleFactor;
319 for(
G4int i=0; i<6; i++)
321 Quark_Mom[i]=GaussianPt(AveragePt2, maxPtSquare);
328 for(
G4int i=0; i<6; i++)
332 ModMom2[i]=Quark_Mom[i].
mag2();
333 SumMt+=std::sqrt(ModMom2[i]+MassQ2);
335 }
while(SumMt > SqrtS);
337 G4double WminusTarget(0.), WplusProjectile(0.);
372 if(NumberOfTries == 100*(NumberOfTries/100))
383 Quark_Mom[0].
setZ(Xaq1); Quark_Mom[1].
setZ(Xaq2); Quark_Mom[2].
setZ(Xaq3);
391 Quark_Mom[0].
setZ(Xaq1); Quark_Mom[1].
setZ(Xaq2); Quark_Mom[2].
setZ(Xaq3);
401 Quark_Mom[3].
setZ(Xq1); Quark_Mom[4].
setZ(Xq2); Quark_Mom[5].
setZ(Xq3);
409 Quark_Mom[3].
setZ(Xq1); Quark_Mom[4].
setZ(Xq2); Quark_Mom[5].
setZ(Xq3);
414 for(
G4int i=0; i<3; i++)
416 if(Quark_Mom[i].getZ() != 0.)
417 {Alfa+=(ScaleFactor*ModMom2[i]+MassQ2)/Quark_Mom[i].getZ();}
421 for(
G4int i=3; i<6; i++)
423 if(Quark_Mom[i].getZ() != 0.)
424 {Beta+=(ScaleFactor*ModMom2[i]+MassQ2)/Quark_Mom[i].getZ();}
428 if(!Succes)
continue;
430 if(std::sqrt(Alfa)+std::sqrt(Beta) > SqrtS) {Succes=
false;
continue;}
432 G4double DecayMomentum2=S*S + Alfa*Alfa + Beta*Beta
433 - 2.*S*Alfa - 2.*S*Beta - 2.*Alfa*Beta;
435 WminusTarget=(S-Alfa+Beta+std::sqrt(DecayMomentum2))/2./SqrtS;
436 WplusProjectile=SqrtS-Beta/WminusTarget;
441 G4double SqrtScaleF=std::sqrt(ScaleFactor);
443 for(
G4int i=0; i<3; i++)
446 (ScaleFactor*ModMom2[i]+MassQ2)/(2.*WplusProjectile*Quark_Mom[i].getZ());
447 Quark_Mom[i].
setZ(Pz);
449 if(ScaleFactor != 1.)
451 Quark_Mom[i].
setX(SqrtScaleF*Quark_Mom[i].getX());
452 Quark_Mom[i].
setY(SqrtScaleF*Quark_Mom[i].getY());
456 for(
G4int i=3; i<6; i++)
459 (ScaleFactor*ModMom2[i]+MassQ2)/(2.*WminusTarget*Quark_Mom[i].getZ());
460 Quark_Mom[i].
setZ(Pz);
462 if(ScaleFactor != 1.)
464 Quark_Mom[i].
setX(SqrtScaleF*Quark_Mom[i].getX());
465 Quark_Mom[i].
setY(SqrtScaleF*Quark_Mom[i].getY());
474 std::sqrt(Quark_Mom[3].mag2()+MassQ2));
484 tmp=Quark_Mom[1]+Quark_Mom[4];
486 std::sqrt(Quark_Mom[4].mag2()+MassQ2));
496 tmp=Quark_Mom[2]+Quark_Mom[5];
498 std::sqrt(Quark_Mom[5].mag2()+MassQ2));
513 if((Ystring1 > Ystring2)&&(Ystring2 > Ystring3))
515 Pprojectile=Pstring1;
516 LeftString =Pstring2;
520 if((Ystring1 > Ystring3)&&(Ystring3 > Ystring2))
522 Pprojectile=Pstring1;
523 LeftString =Pstring3;
527 if((Ystring2 > Ystring1)&&(Ystring1 > Ystring3))
529 Pprojectile=Pstring2;
530 LeftString =Pstring1;
534 if((Ystring2 > Ystring3)&&(Ystring3 > Ystring1))
536 Pprojectile=Pstring2;
537 LeftString =Pstring3;
541 if((Ystring3 > Ystring1)&&(Ystring1 > Ystring2))
543 Pprojectile=Pstring3;
544 LeftString =Pstring1;
548 if((Ystring3 > Ystring2)&&(Ystring2 > Ystring1))
550 Pprojectile=Pstring3;
551 LeftString =Pstring2;
589 if(Ksi < (X_a+X_b)/Xannihilation)
592 G4int CandidatsN(0), CandAQ[9][2], CandQ[9][2];
593 G4int LeftAQ1(0), LeftAQ2(0), LeftQ1(0), LeftQ2(0);
595 for(
G4int iAQ=0; iAQ<3; iAQ++)
597 for(
G4int iQ=0; iQ<3; iQ++)
599 if(-AQ[iAQ] == Q[iQ])
601 if(iAQ == 0) {CandAQ[CandidatsN][0]=1; CandAQ[CandidatsN][1]=2;}
602 if(iAQ == 1) {CandAQ[CandidatsN][0]=0; CandAQ[CandidatsN][1]=2;}
603 if(iAQ == 2) {CandAQ[CandidatsN][0]=0; CandAQ[CandidatsN][1]=1;}
604 if(iQ == 0) {CandQ[CandidatsN][0] =1; CandQ[CandidatsN][1]=2;}
605 if(iQ == 1) {CandQ[CandidatsN][0] =0; CandQ[CandidatsN][1]=2;}
606 if(iQ == 2) {CandQ[CandidatsN][0] =0; CandQ[CandidatsN][1]=1;}
618 LeftAQ1=AQ[CandAQ[SampledCase][0]];
619 LeftAQ2=AQ[CandAQ[SampledCase][1]];
621 LeftQ1=Q[CandQ[SampledCase][0]];
622 LeftQ2=Q[CandQ[SampledCase][1]];
625 G4int Anti_DQ(0), DQ(0);
627 if(std::abs(LeftAQ1) > std::abs(LeftAQ2))
629 Anti_DQ=1000*LeftAQ1+100*LeftAQ2-3;
632 Anti_DQ=1000*LeftAQ2+100*LeftAQ1-3;
636 if(std::abs(LeftQ1) > std::abs(LeftQ2))
638 DQ=1000*LeftQ1+100*LeftQ2+3;
641 DQ=1000*LeftQ2+100*LeftQ1+3;
658 Pprojectile.setPx(0.);
659 Pprojectile.setPy(0.);
660 Pprojectile.setPz(0.);
661 Pprojectile.setE(SqrtS);
662 Pprojectile.transform(toLab);
683 if(Ksi < (X_a+X_b+X_c)/Xannihilation)
688 G4int CandidatsN(0), CandAQ[9][2], CandQ[9][2];
689 G4int LeftAQ1(0), LeftAQ2(0), LeftQ1(0), LeftQ2(0);
691 for(
G4int iAQ=0; iAQ<3; iAQ++)
693 for(
G4int iQ=0; iQ<3; iQ++)
695 if(-AQ[iAQ] == Q[iQ])
697 if(iAQ == 0) {CandAQ[CandidatsN][0]=1; CandAQ[CandidatsN][1]=2;}
698 if(iAQ == 1) {CandAQ[CandidatsN][0]=0; CandAQ[CandidatsN][1]=2;}
699 if(iAQ == 2) {CandAQ[CandidatsN][0]=0; CandAQ[CandidatsN][1]=1;}
700 if(iQ == 0) {CandQ[CandidatsN][0] =1; CandQ[CandidatsN][1]=2;}
701 if(iQ == 1) {CandQ[CandidatsN][0] =0; CandQ[CandidatsN][1]=2;}
702 if(iQ == 2) {CandQ[CandidatsN][0] =0; CandQ[CandidatsN][1]=1;}
714 LeftAQ1=AQ[CandAQ[SampledCase][0]];
715 LeftAQ2=AQ[CandAQ[SampledCase][1]];
719 LeftQ1=Q[CandQ[SampledCase][0]];
720 LeftQ2=Q[CandQ[SampledCase][1]];
723 LeftQ2=Q[CandQ[SampledCase][0]];
724 LeftQ1=Q[CandQ[SampledCase][1]];
749 AveragePt2=200.*200.; maxPtSquare=S;
756 G4int NumberOfTries(0);
762 if(NumberOfTries == 100*(NumberOfTries/100))
765 AveragePt2 *=ScaleFactor;
769 for(
G4int i=0; i<4; i++)
771 Quark_Mom[i]=GaussianPt(AveragePt2, maxPtSquare);
778 for(
G4int i=0; i<4; i++)
782 ModMom2[i]=Quark_Mom[i].
mag2();
783 SumMt+=std::sqrt(ModMom2[i]+MassQ2);
785 }
while(SumMt > SqrtS);
787 G4double WminusTarget(0.), WplusProjectile(0.);
801 if(NumberOfTries == 100*(NumberOfTries/100))
811 Quark_Mom[0].
setZ(Xaq1); Quark_Mom[1].
setZ(Xaq2);
818 Quark_Mom[0].
setZ(Xaq1); Quark_Mom[1].
setZ(Xaq2);
827 Quark_Mom[2].
setZ(Xq1); Quark_Mom[3].
setZ(Xq2);
834 Quark_Mom[2].
setZ(Xq1); Quark_Mom[3].
setZ(Xq2);
839 for(
G4int i=0; i<2; i++)
841 if(Quark_Mom[i].getZ() != 0.)
842 {Alfa+=(ScaleFactor*ModMom2[i]+MassQ2)/Quark_Mom[i].getZ();}
846 for(
G4int i=2; i<4; i++)
848 if(Quark_Mom[i].getZ() != 0.)
849 {Beta+=(ScaleFactor*ModMom2[i]+MassQ2)/Quark_Mom[i].getZ();}
853 if(!Succes)
continue;
855 if(std::sqrt(Alfa)+std::sqrt(Beta) > SqrtS) {Succes=
false;
continue;}
857 G4double DecayMomentum2=S*S + Alfa*Alfa + Beta*Beta
858 - 2.*S*Alfa - 2.*S*Beta - 2.*Alfa*Beta;
860 WminusTarget=(S-Alfa+Beta+std::sqrt(DecayMomentum2))/2./SqrtS;
861 WplusProjectile=SqrtS-Beta/WminusTarget;
866 G4double SqrtScaleF=std::sqrt(ScaleFactor);
868 for(
G4int i=0; i<2; i++)
871 (ScaleFactor*ModMom2[i]+MassQ2)/(2.*WplusProjectile*Quark_Mom[i].getZ());
872 Quark_Mom[i].
setZ(Pz);
874 if(ScaleFactor != 1.)
876 Quark_Mom[i].
setX(SqrtScaleF*Quark_Mom[i].getX());
877 Quark_Mom[i].
setY(SqrtScaleF*Quark_Mom[i].getY());
882 for(
G4int i=2; i<4; i++)
885 (ScaleFactor*ModMom2[i]+MassQ2)/(2.*WminusTarget*Quark_Mom[i].getZ());
886 Quark_Mom[i].
setZ(Pz);
888 if(ScaleFactor != 1.)
890 Quark_Mom[i].
setX(SqrtScaleF*Quark_Mom[i].getX());
891 Quark_Mom[i].
setY(SqrtScaleF*Quark_Mom[i].getY());
901 std::sqrt(Quark_Mom[2].mag2()+MassQ2));
911 tmp=Quark_Mom[1]+Quark_Mom[3];
913 std::sqrt(Quark_Mom[3].mag2()+MassQ2));
923 if(Ystring1 > Ystring2)
925 Pprojectile=Pstring1;
929 Pprojectile=Pstring2;
964 if(Ksi < (X_a+X_b+X_c+X_d)/Xannihilation)
967 G4int CandidatsN(0), CandAQ[9], CandQ[9];
968 G4int LeftAQ(0), LeftQ(0);
970 for(
G4int iAQ1=0; iAQ1<3; iAQ1++)
972 for(
G4int iAQ2=0; iAQ2<3; iAQ2++)
976 for(
G4int iQ1=0; iQ1<3; iQ1++)
978 for(
G4int iQ2=0; iQ2<3; iQ2++)
982 if((-AQ[iAQ1] == Q[iQ1]) && (-AQ[iAQ2] == Q[iQ2]))
984 if((iAQ1 == 0) && (iAQ2 == 1)){CandAQ[CandidatsN]=2;}
985 if((iAQ1 == 1) && (iAQ2 == 0)){CandAQ[CandidatsN]=2;}
987 if((iAQ1 == 0) && (iAQ2 == 2)){CandAQ[CandidatsN]=1;}
988 if((iAQ1 == 2) && (iAQ2 == 0)){CandAQ[CandidatsN]=1;}
990 if((iAQ1 == 1) && (iAQ2 == 2)){CandAQ[CandidatsN]=0;}
991 if((iAQ1 == 2) && (iAQ2 == 1)){CandAQ[CandidatsN]=0;}
993 if((iQ1 == 0) && (iQ2 == 1)){CandQ[CandidatsN]=2;}
994 if((iQ1 == 1) && (iQ2 == 0)){CandQ[CandidatsN]=2;}
996 if((iQ1 == 0) && (iQ2 == 2)){CandQ[CandidatsN]=1;}
997 if((iQ1 == 2) && (iQ2 == 0)){CandQ[CandidatsN]=1;}
999 if((iQ1 == 1) && (iQ2 == 2)){CandQ[CandidatsN]=0;}
1000 if((iQ1 == 2) && (iQ2 == 1)){CandQ[CandidatsN]=0;}
1015 LeftAQ=AQ[CandAQ[SampledCase]];
1017 LeftQ =Q[CandQ[SampledCase]];
1032 Pprojectile.setPx(0.);
1033 Pprojectile.setPy(0.);
1034 Pprojectile.setPz(0.);
1035 Pprojectile.setE(SqrtS);
1036 Pprojectile.transform(toLab);
1075 if(AveragePt2 <= 0.) {Pt2=0.;}
1079 (std::exp(-maxPtSquare/AveragePt2)-1.));
1083 return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
1088 void G4FTFAnnihilation::UnpackBaryon(
G4int IdPDG,
1091 G4int AbsId=std::abs(IdPDG);
1094 Q2 = (AbsId % 1000) / 100;
1095 Q3 = (AbsId % 100) / 10;
1097 if(IdPDG < 0 ) {Q1=-Q1; Q2=-Q2; Q3=-Q3;}
1105 throw G4HadronicException(__FILE__, __LINE__,
"G4FTFAnnihilation copy contructor not meant to be called");
1116 throw G4HadronicException(__FILE__, __LINE__,
"G4FTFAnnihilation = operator not meant to be called");
1123 throw G4HadronicException(__FILE__, __LINE__,
"G4FTFAnnihilation == operator not meant to be called");
1129 throw G4HadronicException(__FILE__, __LINE__,
"G4DiffractiveExcitation != operator not meant to be called");