95 G4cout <<
"---------------------------- Annihilation----------------" <<
G4endl;
101 if ( ProjectilePDGcode > 0 ) {
108 G4double M0projectile2 = Pprojectile.mag2();
116 G4double M0target2 = Ptarget.mag2();
119 G4cout <<
"PDG codes " << ProjectilePDGcode <<
" " << TargetPDGcode << G4endl
120 <<
"Pprojec " << Pprojectile <<
" " << Pprojectile.mag() << G4endl
121 <<
"Ptarget " << Ptarget <<
" " << Ptarget.mag() << G4endl
122 <<
"M0 proj target " << std::sqrt( M0projectile2 )
123 <<
" " << std::sqrt( M0target2 ) <<
G4endl;
130 Psum = Pprojectile + Ptarget;
134 G4cout <<
"Psum SqrtS S " << Psum <<
" " << std::sqrt( S ) <<
" " << S <<
G4endl;
140 toCms.rotateZ( -1*Ptmp.phi() );
141 toCms.rotateY( -1*Ptmp.theta() );
146 G4double X_a( 0.0 ), X_b( 0.0 ), X_c( 0.0 ), X_d( 0.0 );
150 ( 2.0*140.0 + 16.0 )*
MeV;
151 G4double Prel2 = S*S + M0projectile2*M0projectile2 + M0target2*M0target2 -
152 2.0*S*M0projectile2 - 2.0*S*M0target2 - 2.0*M0projectile2*M0target2;
155 if ( Prel2 <= 0.0 ) {
163 G4cout <<
"Annih at Rest X a b c d " << X_a <<
" " << X_b <<
" " << X_c <<
" " << X_d
172 if ( SqrtS < MesonProdThreshold ) {
175 X_b = 6.8*
GeV / SqrtS;
188 G4cout <<
"Annih in Flight X a b c d " << X_a <<
" " << X_b <<
" " << X_c <<
" " << X_d
189 << G4endl <<
"SqrtS MesonProdThreshold " << SqrtS <<
" " << MesonProdThreshold
195 if ((ProjectilePDGcode == -2212 || ProjectilePDGcode == -2214)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
196 X_b *= 5.0; X_c *= 5.0; X_d *= 6.0;
197 }
else if ((ProjectilePDGcode == -2212 || ProjectilePDGcode == -2214)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
198 X_b *= 4.0; X_c *= 4.0; X_d *= 4.0;
199 }
else if ((ProjectilePDGcode == -2112 || ProjectilePDGcode == -2114)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
200 X_b *= 4.0; X_c *= 4.0; X_d *= 4.0;
201 }
else if ((ProjectilePDGcode == -2112 || ProjectilePDGcode == -2114)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
202 X_b *= 5.0; X_c *= 5.0; X_d *= 6.0;
203 }
else if ((ProjectilePDGcode == -3122 || ProjectilePDGcode == -3124)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
204 X_b *= 3.0; X_c *= 3.0; X_d *= 2.0;
205 }
else if ((ProjectilePDGcode == -3122 || ProjectilePDGcode == -3124)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
206 X_b *= 3.0; X_c *= 3.0; X_d *= 2.0;
207 }
else if ((ProjectilePDGcode == -3112 || ProjectilePDGcode == -3114)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
208 X_b *= 2.0; X_c *= 2.0; X_d *= 0.0;
209 }
else if ((ProjectilePDGcode == -3112 || ProjectilePDGcode == -3114)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
210 X_b *= 4.0; X_c *= 4.0; X_d *= 2.0;
211 }
else if ((ProjectilePDGcode == -3212 || ProjectilePDGcode == -3214)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
212 X_b *= 3.0; X_c *= 3.0; X_d *= 2.0;
213 }
else if ((ProjectilePDGcode == -3212 || ProjectilePDGcode == -3214)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
214 X_b *= 3.0; X_c *= 3.0; X_d *= 2.0;
215 }
else if ((ProjectilePDGcode == -3222 || ProjectilePDGcode == -3224)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
216 X_b *= 4.0; X_c *= 4.0; X_d *= 2.0;
217 }
else if ((ProjectilePDGcode == -3222 || ProjectilePDGcode == -3224)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
218 X_b *= 2.0; X_c *= 2.0; X_d *= 0.0;
219 }
else if ((ProjectilePDGcode == -3312 || ProjectilePDGcode == -3314)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
220 X_b *= 1.0; X_c *= 1.0; X_d *= 0.0;
221 }
else if ((ProjectilePDGcode == -3312 || ProjectilePDGcode == -3314)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
222 X_b *= 2.0; X_c *= 2.0; X_d *= 0.0;
223 }
else if ((ProjectilePDGcode == -3322 || ProjectilePDGcode == -3324)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
224 X_b *= 2.0; X_c *= 2.0; X_d *= 0.0;
225 }
else if ((ProjectilePDGcode == -3322 || ProjectilePDGcode == -3324)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
226 X_b *= 1.0; X_c *= 1.0; X_d *= 0.0;
227 }
else if ( ProjectilePDGcode == -3334 && ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
228 X_b *= 0.0; X_c *= 0.0; X_d *= 0.0;
229 }
else if ( ProjectilePDGcode == -3334 && ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
230 X_b *= 0.0; X_c *= 0.0; X_d *= 0.0;
232 G4cout <<
"Unknown anti-baryon for FTF annihilation: PDGcodes - "
233 << ProjectilePDGcode <<
" " << TargetPDGcode <<
G4endl;
237 G4cout <<
"Annih Actual X a b c d " << X_a <<
" " << X_b <<
" " << X_c <<
" " << X_d <<
G4endl;
240 G4double Xannihilation = X_a + X_b + X_c + X_d;
257 if ( Ksi < X_a / Xannihilation ) {
266 G4int SampledCase = G4RandFlat::shootInt(
G4long( 6 ) );
268 G4int Tmp1( 0 ), Tmp2( 0 );
269 if ( SampledCase == 0 ) {
270 }
else if ( SampledCase == 1 ) {
271 Tmp1 = AQ[1]; AQ[1] = AQ[2]; AQ[2] = Tmp1;
272 }
else if ( SampledCase == 2 ) {
273 Tmp1 = AQ[0]; AQ[0] = AQ[1]; AQ[1] = Tmp1;
274 }
else if ( SampledCase == 3 ) {
275 Tmp1 = AQ[0]; Tmp2 = AQ[1]; AQ[0] = AQ[2]; AQ[1] = Tmp1; AQ[2] = Tmp2;
276 }
else if ( SampledCase == 4 ) {
277 Tmp1 = AQ[0]; Tmp2 = AQ[1]; AQ[0] = Tmp2; AQ[1] = AQ[2]; AQ[2] = Tmp1;
278 }
else if ( SampledCase == 5 ) {
279 Tmp1 = AQ[0]; Tmp2 = AQ[1]; AQ[0] = AQ[2]; AQ[1] = Tmp2; AQ[2] = Tmp1;
292 aAQ=std::abs( AQ[0] ); aQ=std::abs( Q[0] );
304 if ( aKsi < 0.25 ) {NewCode = 331;}
309 if( aKsi < 0.5 ) {NewCode = 331;}
313 if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[0]; }
314 else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[0]; }
318 if(!TestParticle)
return false;
332 aAQ=std::abs( AQ[1] ); aQ=std::abs( Q[1] ); aKsi =
G4UniformRand();
341 if ( aKsi < 0.25 ) {NewCode = 331;}
346 if( aKsi < 0.5 ) {NewCode = 331;}
350 if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[1]; }
351 else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[1]; }
354 if(!TestParticle)
return false;
366 aAQ=std::abs( AQ[2] ); aQ=std::abs( Q[2] ); aKsi =
G4UniformRand();
376 if ( aKsi < 0.25 ) {NewCode = 331;}
381 if( aKsi < 0.5 ) {NewCode = 331;}
385 if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[2]; }
386 else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[2]; }
390 if(!TestParticle)
return false;
406 AveragePt2 = 200.0*200.0; maxPtSquare =
S;
410 G4int NumberOfTries( 0 );
413 const G4int maxNumberOfLoops = 1000;
414 G4int loopCounter = 0;
417 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
420 AveragePt2 *= ScaleFactor;
423 for (
G4int i = 0; i < 6; i++ ) {
424 Quark_Mom [i] =
GaussianPt( AveragePt2, maxPtSquare );
425 PtSum += Quark_Mom[i];
429 for(
G4int i = 0; i < 6; i++ ) {
430 Quark_Mom[i] -= PtSum;
432 ModMom2[i] = Quark_Mom[i].mag2();
433 SumMt += std::sqrt( ModMom2[i] + MassQ2 );
435 }
while ( ( SumMt > SqrtS ) &&
436 ++loopCounter < maxNumberOfLoops );
437 if ( loopCounter >= maxNumberOfLoops ) {
441 G4double WminusTarget( 0.0 ), WplusProjectile( 0.0 );
471 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
476 if ( Alfa_R == 1.0 ) {
480 Quark_Mom[0].setZ( Xaq1 ); Quark_Mom[1].setZ( Xaq2 ); Quark_Mom[2].setZ( Xaq3 );
485 Quark_Mom[0].setZ( Xaq1 ); Quark_Mom[1].setZ( Xaq2 ); Quark_Mom[2].setZ( Xaq3 );
489 if ( Alfa_R == 1.0 ) {
493 Quark_Mom[3].setZ( Xq1 ); Quark_Mom[4].setZ( Xq2 ); Quark_Mom[5].setZ( Xq3 );
498 Quark_Mom[3].setZ( Xq1 ); Quark_Mom[4].setZ( Xq2 ); Quark_Mom[5].setZ( Xq3 );
502 for (
G4int i = 0; i < 3; i++ ) {
503 if ( Quark_Mom[i].getZ() != 0.0 ) {
504 Alfa += ( ScaleFactor * ModMom2[i] + MassQ2 ) / Quark_Mom[i].getZ();
509 for (
G4int i = 3; i < 6; i++ ) {
510 if ( Quark_Mom[i].getZ() != 0.0 ) {
511 Beta += ( ScaleFactor * ModMom2[i] + MassQ2 ) / Quark_Mom[i].getZ();
517 if ( ! Succes )
continue;
519 if ( std::sqrt( Alfa ) + std::sqrt( Beta ) > SqrtS ) {
524 G4double DecayMomentum2 = S*S + Alfa*Alfa + Beta*Beta
525 - 2.0*S*Alfa - 2.0*S*Beta - 2.0*Alfa*Beta;
527 WminusTarget = ( S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / SqrtS;
528 WplusProjectile = SqrtS - Beta/WminusTarget;
530 }
while ( ( ! Succes ) &&
531 ++loopCounter < maxNumberOfLoops );
532 if ( loopCounter >= maxNumberOfLoops ) {
536 G4double SqrtScaleF = std::sqrt( ScaleFactor );
537 for (
G4int i = 0; i < 3; i++ ) {
538 G4double Pz = WplusProjectile * Quark_Mom[i].getZ() / 2.0 -
539 ( ScaleFactor * ModMom2[i] + MassQ2 ) /
540 ( 2.0 * WplusProjectile * Quark_Mom[i].getZ() );
541 Quark_Mom[i].setZ( Pz );
542 if ( ScaleFactor != 1.0 ) {
543 Quark_Mom[i].setX( SqrtScaleF * Quark_Mom[i].getX() );
544 Quark_Mom[i].setY( SqrtScaleF * Quark_Mom[i].getY() );
547 for (
G4int i = 3; i < 6; i++ ) {
548 G4double Pz = -WminusTarget * Quark_Mom[i].getZ() / 2.0 +
549 ( ScaleFactor * ModMom2[i] + MassQ2 ) /
550 ( 2.0 * WminusTarget * Quark_Mom[i].getZ() );
551 Quark_Mom[i].setZ( Pz );
552 if ( ScaleFactor != 1.0 ) {
553 Quark_Mom[i].setX( SqrtScaleF * Quark_Mom[i].getX() );
554 Quark_Mom[i].setY( SqrtScaleF * Quark_Mom[i].getY() );
561 G4LorentzVector Pstring1( tmp, std::sqrt( Quark_Mom[0].mag2() + MassQ2 ) +
562 std::sqrt( Quark_Mom[3].mag2() + MassQ2 ) );
563 G4double Ystring1 = Pstring1.rapidity();
569 tmp = Quark_Mom[1] + Quark_Mom[4];
570 G4LorentzVector Pstring2( tmp, std::sqrt( Quark_Mom[1].mag2() + MassQ2 ) +
571 std::sqrt( Quark_Mom[4].mag2() + MassQ2 ) );
572 G4double Ystring2 = Pstring2.rapidity();
578 tmp = Quark_Mom[2] + Quark_Mom[5];
579 G4LorentzVector Pstring3( tmp, std::sqrt( Quark_Mom[2].mag2() + MassQ2 ) +
580 std::sqrt( Quark_Mom[5].mag2() + MassQ2 ) );
581 G4double Ystring3 = Pstring3.rapidity();
591 if ( Ystring1 > Ystring2 && Ystring2 > Ystring3 ) {
592 Pprojectile = Pstring1;
593 LeftString = Pstring2;
596 if ( Ystring1 > Ystring3 && Ystring3 > Ystring2 ) {
597 Pprojectile = Pstring1;
598 LeftString = Pstring3;
602 if ( Ystring2 > Ystring1 && Ystring1 > Ystring3 ) {
603 Pprojectile = Pstring2;
604 LeftString = Pstring1;
607 if ( Ystring2 > Ystring3 && Ystring3 > Ystring1 ) {
608 Pprojectile = Pstring2;
609 LeftString = Pstring3;
613 if ( Ystring3 > Ystring1 && Ystring1 > Ystring2 ) {
614 Pprojectile = Pstring3;
615 LeftString = Pstring1;
618 if ( Ystring3 > Ystring2 && Ystring2 > Ystring1 ) {
619 Pprojectile = Pstring3;
620 LeftString = Pstring2;
625 Pprojectile.transform( toLab );
626 LeftString.transform( toLab );
627 Ptarget.transform( toLab );
654 if ( Ksi < (X_a + X_b) / Xannihilation ) {
657 G4cout <<
"Process b, quark - anti-quark annihilation, di-q - anti-di-q string" <<
G4endl;
660 G4int CandidatsN( 0 ), CandAQ[9][2], CandQ[9][2];
661 G4int LeftAQ1( 0 ), LeftAQ2( 0 ), LeftQ1( 0 ), LeftQ2( 0 );
663 for (
G4int iAQ = 0; iAQ < 3; iAQ++ ) {
664 for (
G4int iQ = 0; iQ < 3; iQ++ ) {
665 if ( -AQ[iAQ] == Q[iQ] ) {
666 if ( iAQ == 0 ) { CandAQ[CandidatsN][0] = 1; CandAQ[CandidatsN][1] = 2; }
667 if ( iAQ == 1 ) { CandAQ[CandidatsN][0] = 0; CandAQ[CandidatsN][1] = 2; }
668 if ( iAQ == 2 ) { CandAQ[CandidatsN][0] = 0; CandAQ[CandidatsN][1] = 1; }
669 if ( iQ == 0 ) { CandQ[CandidatsN][0] = 1; CandQ[CandidatsN][1] = 2; }
670 if ( iQ == 1 ) { CandQ[CandidatsN][0] = 0; CandQ[CandidatsN][1] = 2; }
671 if ( iQ == 2 ) { CandQ[CandidatsN][0] = 0; CandQ[CandidatsN][1] = 1; }
678 if ( CandidatsN != 0 ) {
679 G4int SampledCase = G4RandFlat::shootInt(
G4long( CandidatsN ) );
680 LeftAQ1 = AQ[ CandAQ[SampledCase][0] ];
681 LeftAQ2 = AQ[ CandAQ[SampledCase][1] ];
682 LeftQ1 = Q[ CandQ[SampledCase][0] ];
683 LeftQ2 = Q[ CandQ[SampledCase][1] ];
686 G4int Anti_DQ( 0 ), DQ( 0 );
687 if ( std::abs( LeftAQ1 ) > std::abs( LeftAQ2 ) ) {
688 Anti_DQ = 1000*LeftAQ1 + 100*LeftAQ2 - 3;
690 Anti_DQ = 1000*LeftAQ2 + 100*LeftAQ1 - 3;
693 if ( std::abs( LeftQ1 ) > std::abs( LeftQ2 ) ) {
694 DQ = 1000*LeftQ1 + 100*LeftQ2 + 3;
696 DQ = 1000*LeftQ2 + 100*LeftQ1 + 3;
709 Pprojectile.setPx( 0.0 );
710 Pprojectile.setPy( 0.0 );
711 Pprojectile.setPz( 0.0 );
712 Pprojectile.setE( SqrtS );
713 Pprojectile.transform( toLab );
737 if ( Ksi < ( X_a + X_b + X_c ) / Xannihilation ) {
742 G4cout <<
"Process c, quark - anti-quark and string junctions annihilation, 2 strings left."
746 G4int CandidatsN( 0 ), CandAQ[9][2], CandQ[9][2];
747 G4int LeftAQ1( 0 ), LeftAQ2( 0 ), LeftQ1( 0 ), LeftQ2( 0 );
749 for (
G4int iAQ = 0; iAQ < 3; iAQ++ ) {
750 for (
G4int iQ = 0; iQ < 3; iQ++ ) {
751 if ( -AQ[iAQ] == Q[iQ] ) {
752 if ( iAQ == 0 ) { CandAQ[CandidatsN][0] = 1; CandAQ[CandidatsN][1] = 2; }
753 if ( iAQ == 1 ) { CandAQ[CandidatsN][0] = 0; CandAQ[CandidatsN][1] = 2; }
754 if ( iAQ == 2 ) { CandAQ[CandidatsN][0] = 0; CandAQ[CandidatsN][1] = 1; }
755 if ( iQ == 0 ) { CandQ[CandidatsN][0] = 1; CandQ[CandidatsN][1] = 2; }
756 if ( iQ == 1 ) { CandQ[CandidatsN][0] = 0; CandQ[CandidatsN][1] = 2; }
757 if ( iQ == 2 ) { CandQ[CandidatsN][0] = 0; CandQ[CandidatsN][1] = 1; }
764 if ( CandidatsN != 0 ) {
765 G4int SampledCase = G4RandFlat::shootInt(
G4long( CandidatsN ) );
766 LeftAQ1 = AQ[ CandAQ[SampledCase][0] ];
767 LeftAQ2 = AQ[ CandAQ[SampledCase][1] ];
769 LeftQ1 = Q[ CandQ[SampledCase][0] ];
770 LeftQ2 = Q[ CandQ[SampledCase][1] ];
772 LeftQ2 = Q[ CandQ[SampledCase][0] ];
773 LeftQ1 = Q[ CandQ[SampledCase][1] ];
785 aAQ=std::abs( LeftAQ1 ); aQ=std::abs( LeftQ1 );
798 if ( aKsi < 0.25 ) {NewCode = 331;}
803 if( aKsi < 0.5 ) {NewCode = 331;}
807 if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ1; }
808 else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ1; }
812 if(!TestParticle)
return false;
825 aAQ=std::abs( LeftAQ2 ); aQ=std::abs( LeftQ2 ); aKsi =
G4UniformRand();
835 if ( aKsi < 0.25 ) {NewCode = 331;}
840 if( aKsi < 0.5 ) {NewCode = 331;}
844 if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ2; }
845 else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ2; }
849 if(!TestParticle)
return false;
860 AveragePt2 = 200.0*200.0; maxPtSquare =
S;
864 G4int NumberOfTries( 0 );
867 const G4int maxNumberOfLoops = 1000;
868 G4int loopCounter = 0;
871 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
874 AveragePt2 *= ScaleFactor;
877 for(
G4int i = 0; i < 4; i++ ) {
878 Quark_Mom[i] =
GaussianPt( AveragePt2, maxPtSquare );
879 PtSum += Quark_Mom[i];
883 for (
G4int i = 0; i < 4; i++ ) {
884 Quark_Mom[i] -= PtSum;
886 ModMom2[i] = Quark_Mom[i].mag2();
887 SumMt += std::sqrt( ModMom2[i] + MassQ2 );
889 }
while ( ( SumMt > SqrtS ) &&
890 ++loopCounter < maxNumberOfLoops );
891 if ( loopCounter >= maxNumberOfLoops ) {
895 G4double WminusTarget( 0.0 ), WplusProjectile( 0.0 );
908 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
913 if ( Alfa_R == 1.0 ) {
916 Quark_Mom[0].setZ( Xaq1 ); Quark_Mom[1].setZ( Xaq2 );
920 Quark_Mom[0].setZ( Xaq1 ); Quark_Mom[1].setZ( Xaq2 );
924 if ( Alfa_R == 1.0 ) {
927 Quark_Mom[2].setZ( Xq1 ); Quark_Mom[3].setZ( Xq2 );
931 Quark_Mom[2].setZ( Xq1 ); Quark_Mom[3].setZ( Xq2 );
935 for (
G4int i = 0; i < 2; i++ ) {
936 if ( Quark_Mom[i].getZ() != 0.0 ) {
937 Alfa += ( ScaleFactor * ModMom2[i] + MassQ2 ) / Quark_Mom[i].getZ();
942 for (
G4int i = 2; i < 4; i++ ) {
943 if ( Quark_Mom[i].getZ() != 0.0 ) {
944 Beta += ( ScaleFactor * ModMom2[i] + MassQ2 ) / Quark_Mom[i].getZ();
950 if ( ! Succes )
continue;
952 if ( std::sqrt( Alfa ) + std::sqrt( Beta ) > SqrtS ) {
957 G4double DecayMomentum2 = S*S + Alfa*Alfa + Beta*Beta
958 - 2.0*S*Alfa - 2.0*S*Beta - 2.0*Alfa*Beta;
959 WminusTarget = ( S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / SqrtS;
960 WplusProjectile = SqrtS - Beta/WminusTarget;
962 }
while ( ( ! Succes ) &&
963 ++loopCounter < maxNumberOfLoops );
964 if ( loopCounter >= maxNumberOfLoops ) {
968 G4double SqrtScaleF = std::sqrt( ScaleFactor );
970 for (
G4int i = 0; i < 2; i++ ) {
971 G4double Pz = WplusProjectile * Quark_Mom[i].getZ() / 2.0 -
972 ( ScaleFactor * ModMom2[i] + MassQ2 ) /
973 ( 2.0 * WplusProjectile * Quark_Mom[i].getZ() );
974 Quark_Mom[i].setZ( Pz );
975 if ( ScaleFactor != 1.0 ) {
976 Quark_Mom[i].setX( SqrtScaleF * Quark_Mom[i].getX() );
977 Quark_Mom[i].setY( SqrtScaleF * Quark_Mom[i].getY() );
981 for (
G4int i = 2; i < 4; i++ ) {
982 G4double Pz = -WminusTarget * Quark_Mom[i].getZ() / 2.0 +
983 ( ScaleFactor * ModMom2[i] + MassQ2 ) /
984 ( 2.0 * WminusTarget * Quark_Mom[i].getZ() );
985 Quark_Mom[i].setZ( Pz );
986 if ( ScaleFactor != 1.0 ) {
987 Quark_Mom[i].setX( SqrtScaleF * Quark_Mom[i].getX() );
988 Quark_Mom[i].setY( SqrtScaleF * Quark_Mom[i].getY() );
996 G4LorentzVector Pstring1( tmp, std::sqrt( Quark_Mom[0].mag2() + MassQ2 ) +
997 std::sqrt( Quark_Mom[2].mag2() + MassQ2 ) );
998 G4double Ystring1 = Pstring1.rapidity();
1004 tmp = Quark_Mom[1] + Quark_Mom[3];
1005 G4LorentzVector Pstring2( tmp, std::sqrt( Quark_Mom[1].mag2() + MassQ2 ) +
1006 std::sqrt( Quark_Mom[3].mag2() + MassQ2 ) );
1007 G4double Ystring2 = Pstring2.rapidity();
1013 if ( Ystring1 > Ystring2 ) {
1014 Pprojectile = Pstring1;
1017 Pprojectile = Pstring2;
1022 Pprojectile.transform( toLab );
1023 Ptarget.transform( toLab );
1047 if ( Ksi < ( X_a + X_b + X_c + X_d ) / Xannihilation ) {
1049 #ifdef debugFTFannih
1050 G4cout <<
"Process d, only 1 quark - anti-quark string" <<
G4endl;
1053 G4int CandidatsN( 0 ), CandAQ[36], CandQ[36];
1054 G4int LeftAQ( 0 ), LeftQ( 0 );
1056 for (
G4int iAQ1 = 0; iAQ1 < 3; iAQ1++ ) {
1057 for (
G4int iAQ2 = 0; iAQ2 < 3; iAQ2++ ) {
1058 if ( iAQ1 != iAQ2 ) {
1059 for (
G4int iQ1 = 0; iQ1 < 3; iQ1++ ) {
1060 for (
G4int iQ2 = 0; iQ2 < 3; iQ2++ ) {
1062 if ( -AQ[iAQ1] == Q[iQ1] && -AQ[iAQ2] == Q[iQ2] ) {
1063 if ( iAQ1 == 0 && iAQ2 == 1 ) { CandAQ[CandidatsN] = 2; }
1064 if ( iAQ1 == 1 && iAQ2 == 0 ) { CandAQ[CandidatsN] = 2; }
1066 if ( iAQ1 == 0 && iAQ2 == 2 ) { CandAQ[CandidatsN] = 1; }
1067 if ( iAQ1 == 2 && iAQ2 == 0 ) { CandAQ[CandidatsN] = 1; }
1069 if ( iAQ1 == 1 && iAQ2 == 2 ) { CandAQ[CandidatsN] = 0; }
1070 if ( iAQ1 == 2 && iAQ2 == 1 ) { CandAQ[CandidatsN] = 0; }
1072 if ( iQ1 == 0 && iQ2 == 1 ) { CandQ[CandidatsN] = 2; }
1073 if ( iQ1 == 1 && iQ2 == 0 ) { CandQ[CandidatsN] = 2; }
1075 if ( iQ1 == 0 && iQ2 == 2 ) { CandQ[CandidatsN] = 1; }
1076 if ( iQ1 == 2 && iQ2 == 0 ) { CandQ[CandidatsN] = 1; }
1078 if ( iQ1 == 1 && iQ2 == 2 ) { CandQ[CandidatsN] = 0; }
1079 if ( iQ1 == 2 && iQ2 == 1 ) { CandQ[CandidatsN] = 0; }
1089 if ( CandidatsN != 0 ) {
1090 G4int SampledCase = G4RandFlat::shootInt(
G4long( CandidatsN ) );
1091 LeftAQ = AQ[ CandAQ[SampledCase] ];
1092 LeftQ = Q[ CandQ[SampledCase] ];
1105 aAQ=std::abs( LeftAQ ); aQ=std::abs( LeftQ );
1118 if ( aKsi < 0.25 ) {NewCode = 331;}
1123 if( aKsi < 0.5 ) {NewCode = 331;}
1127 if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ; }
1128 else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ; }
1132 if(!TestParticle)
return false;
1139 Pprojectile.setPx( 0.0 );
1140 Pprojectile.setPy( 0.0 );
1141 Pprojectile.setPz( 0.0 );
1142 Pprojectile.setE( SqrtS );
1143 Pprojectile.transform( toLab );
1186 if ( AveragePt2 <= 0.0 ) {
1190 (
G4Exp( -maxPtSquare/AveragePt2 ) -1.0 ) );
1194 return G4ThreeVector ( Pt*std::cos( phi ), Pt*std::sin( phi ), 0.0 );
1201 G4int AbsId = std::abs( IdPDG );
1203 Q2 = ( AbsId % 1000 ) / 100;
1204 Q3 = ( AbsId % 100 ) / 10;
1205 if ( IdPDG < 0 ) { Q1 = -Q1; Q2 = -Q2; Q3 = -Q3; }
1214 "G4FTFAnnihilation copy contructor not meant to be called" );
1222 "G4FTFAnnihilation = operator not meant to be called" );
1230 "G4FTFAnnihilation == operator not meant to be called" );
1238 "G4DiffractiveExcitation != operator not meant to be called" );
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
int operator!=(const G4FTFAnnihilation &right) const
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepLorentzRotation G4LorentzRotation
virtual void SetSecondParton(G4int PDGcode)=0
int operator==(const G4FTFAnnihilation &right) const
void SetTimeOfCreation(G4double aTime)
G4int GetPDGEncoding() const
void UnpackBaryon(G4int IdPDG, G4int &Q1, G4int &Q2, G4int &Q3) const
void SetTarMinNonDiffMass(const G4double aValue)
void SetDefinition(const G4ParticleDefinition *aDefinition)
void SetStatus(const G4int aStatus)
const G4ParticleDefinition * GetDefinition() const
G4GLOB_DLL std::ostream G4cout
virtual void SetFirstParton(G4int PDGcode)=0
static const double twopi
G4double GetTimeOfCreation()
void SetProjMinNonDiffMass(const G4double aValue)
void IncrementCollisionCount(G4int aCount)
virtual ~G4FTFAnnihilation()
const G4LorentzVector & Get4Momentum() const
void SetProjMinDiffMass(const G4double aValue)
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
G4double ChooseX(G4double Alpha, G4double Beta) const
void SetPosition(const G4ThreeVector &aPosition)
const G4ThreeVector & GetPosition() const
virtual G4bool Annihilate(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4VSplitableHadron *&AdditionalString, G4FTFParameters *theParameters) const
void Set4Momentum(const G4LorentzVector &a4Momentum)
void SetProbabilityOfAnnihilation(const G4double aValue)
const G4FTFAnnihilation & operator=(const G4FTFAnnihilation &right)
void SetTarMinDiffMass(const G4double aValue)
CLHEP::HepLorentzVector G4LorentzVector