96 G4cout <<
"---------------------------- Annihilation----------------" <<
G4endl;
101 G4int ProjectilePDGcode = projectile->GetDefinition()->GetPDGEncoding();
102 if ( ProjectilePDGcode > 0 ) {
112 G4int TargetPDGcode =
target->GetDefinition()->GetPDGEncoding();
120 G4cout <<
"PDG codes " << ProjectilePDGcode <<
" " << TargetPDGcode << G4endl
121 <<
"Pprojec " << Pprojectile <<
" " << Pprojectile.
mag() << G4endl
122 <<
"Ptarget " << Ptarget <<
" " << Ptarget.
mag() << G4endl
123 <<
"M0 proj target " << std::sqrt( M0projectile2 )
124 <<
" " << std::sqrt( M0target2 ) <<
G4endl;
131 Psum = Pprojectile + Ptarget;
135 G4cout <<
"Psum SqrtS S " << Psum <<
" " << std::sqrt( S ) <<
" " << S <<
G4endl;
141 toCms.
rotateZ( -1*Ptmp.phi() );
142 toCms.
rotateY( -1*Ptmp.theta() );
147 G4double X_a( 0.0 ), X_b( 0.0 ), X_c( 0.0 ), X_d( 0.0 );
149 G4double MesonProdThreshold = projectile->GetDefinition()->GetPDGMass() +
150 target->GetDefinition()->GetPDGMass() +
151 ( 2.0*140.0 + 16.0 )*
MeV;
152 G4double Prel2 = S*S + M0projectile2*M0projectile2 + M0target2*M0target2 -
153 2.0*S*M0projectile2 - 2.0*S*M0target2 - 2.0*M0projectile2*M0target2;
156 if ( Prel2 <= 0.0 ) {
164 G4cout <<
"Annih at Rest X a b c d " << X_a <<
" " << X_b <<
" " << X_c <<
" " << X_d
173 if ( SqrtS < MesonProdThreshold ) {
176 X_b = 6.8*
GeV / SqrtS;
178 if ( projectile->GetDefinition()->GetPDGMass() +
target->GetDefinition()->GetPDGMass()
183 X_c = 2.0 * FlowF *
sqr( projectile->GetDefinition()->GetPDGMass() +
184 target->GetDefinition()->GetPDGMass() ) / S;
189 G4cout <<
"Annih in Flight X a b c d " << X_a <<
" " << X_b <<
" " << X_c <<
" " << X_d
190 << G4endl <<
"SqrtS MesonProdThreshold " << SqrtS <<
" " << MesonProdThreshold
196 if ((ProjectilePDGcode == -2212 || ProjectilePDGcode == -2214)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
197 X_b *= 5.0; X_c *= 5.0; X_d *= 6.0;
198 }
else if ((ProjectilePDGcode == -2212 || ProjectilePDGcode == -2214)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
199 X_b *= 4.0; X_c *= 4.0; X_d *= 4.0;
200 }
else if ((ProjectilePDGcode == -2112 || ProjectilePDGcode == -2114)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
201 X_b *= 4.0; X_c *= 4.0; X_d *= 4.0;
202 }
else if ((ProjectilePDGcode == -2112 || ProjectilePDGcode == -2114)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
203 X_b *= 5.0; X_c *= 5.0; X_d *= 6.0;
204 }
else if ((ProjectilePDGcode == -3122 || ProjectilePDGcode == -3124)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
205 X_b *= 3.0; X_c *= 3.0; X_d *= 2.0;
206 }
else if ((ProjectilePDGcode == -3122 || ProjectilePDGcode == -3124)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
207 X_b *= 3.0; X_c *= 3.0; X_d *= 2.0;
208 }
else if ((ProjectilePDGcode == -3112 || ProjectilePDGcode == -3114)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
209 X_b *= 2.0; X_c *= 2.0; X_d *= 0.0;
210 }
else if ((ProjectilePDGcode == -3112 || ProjectilePDGcode == -3114)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
211 X_b *= 4.0; X_c *= 4.0; X_d *= 2.0;
212 }
else if ((ProjectilePDGcode == -3212 || ProjectilePDGcode == -3214)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
213 X_b *= 3.0; X_c *= 3.0; X_d *= 2.0;
214 }
else if ((ProjectilePDGcode == -3212 || ProjectilePDGcode == -3214)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
215 X_b *= 3.0; X_c *= 3.0; X_d *= 2.0;
216 }
else if ((ProjectilePDGcode == -3222 || ProjectilePDGcode == -3224)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
217 X_b *= 4.0; X_c *= 4.0; X_d *= 2.0;
218 }
else if ((ProjectilePDGcode == -3222 || ProjectilePDGcode == -3224)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
219 X_b *= 2.0; X_c *= 2.0; X_d *= 0.0;
220 }
else if ((ProjectilePDGcode == -3312 || ProjectilePDGcode == -3314)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
221 X_b *= 1.0; X_c *= 1.0; X_d *= 0.0;
222 }
else if ((ProjectilePDGcode == -3312 || ProjectilePDGcode == -3314)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
223 X_b *= 2.0; X_c *= 2.0; X_d *= 0.0;
224 }
else if ((ProjectilePDGcode == -3322 || ProjectilePDGcode == -3324)&& ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
225 X_b *= 2.0; X_c *= 2.0; X_d *= 0.0;
226 }
else if ((ProjectilePDGcode == -3322 || ProjectilePDGcode == -3324)&& ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
227 X_b *= 1.0; X_c *= 1.0; X_d *= 0.0;
228 }
else if ( ProjectilePDGcode == -3334 && ( TargetPDGcode == 2212 || TargetPDGcode == 2214 ) ) {
229 X_b *= 0.0; X_c *= 0.0; X_d *= 0.0;
230 }
else if ( ProjectilePDGcode == -3334 && ( TargetPDGcode == 2112 || TargetPDGcode == 2114 ) ) {
231 X_b *= 0.0; X_c *= 0.0; X_d *= 0.0;
233 G4cout <<
"Unknown anti-baryon for FTF annihilation: PDGcodes - "
234 << ProjectilePDGcode <<
" " << TargetPDGcode <<
G4endl;
238 G4cout <<
"Annih Actual X a b c d " << X_a <<
" " << X_b <<
" " << X_c <<
" " << X_d <<
G4endl;
241 G4double Xannihilation = X_a + X_b + X_c + X_d;
251 UnpackBaryon( ProjectilePDGcode, AQ[0], AQ[1], AQ[2] );
255 UnpackBaryon( TargetPDGcode, Q[0], Q[1], Q[2] );
259 if ( Ksi < X_a / Xannihilation ) {
268 G4int SampledCase = G4RandFlat::shootInt(
G4long( 6 ) );
270 G4int Tmp1( 0 ), Tmp2( 0 );
271 if ( SampledCase == 0 ) {
272 }
else if ( SampledCase == 1 ) {
273 Tmp1 = AQ[1]; AQ[1] = AQ[2]; AQ[2] = Tmp1;
274 }
else if ( SampledCase == 2 ) {
275 Tmp1 = AQ[0]; AQ[0] = AQ[1]; AQ[1] = Tmp1;
276 }
else if ( SampledCase == 3 ) {
277 Tmp1 = AQ[0]; Tmp2 = AQ[1]; AQ[0] = AQ[2]; AQ[1] = Tmp1; AQ[2] = Tmp2;
278 }
else if ( SampledCase == 4 ) {
279 Tmp1 = AQ[0]; Tmp2 = AQ[1]; AQ[0] = Tmp2; AQ[1] = AQ[2]; AQ[2] = Tmp1;
280 }
else if ( SampledCase == 5 ) {
281 Tmp1 = AQ[0]; Tmp2 = AQ[1]; AQ[0] = AQ[2]; AQ[1] = Tmp2; AQ[2] = Tmp1;
287 projectile->SplitUp();
288 projectile->SetFirstParton( AQ[0] );
289 projectile->SetSecondParton( Q[0] );
290 projectile->SetStatus( 0 );
293 aAQ = std::abs( AQ[0] ); aQ = std::abs( Q[0] );
314 NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[0];
316 NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[0];
321 if ( ! TestParticle )
return false;
322 projectile->SetDefinition( TestParticle );
329 target->SetFirstParton( Q[1] );
330 target->SetSecondParton( AQ[1] );
333 aAQ = std::abs( AQ[1] ); aQ = std::abs( Q[1] ); aKsi =
G4UniformRand();
351 NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[1];
353 NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[1];
358 if ( ! TestParticle )
return false;
359 target->SetDefinition( TestParticle );
367 aAQ = std::abs( AQ[2] ); aQ = std::abs( Q[2] ); aKsi =
G4UniformRand();
386 NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[2];
388 NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[2];
393 if ( ! TestParticle )
return false;
408 AveragePt2 = 200.0*200.0; maxPtSquare =
S;
412 G4int NumberOfTries( 0 );
415 const G4int maxNumberOfLoops = 1000;
416 G4int loopCounter = 0;
419 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
422 AveragePt2 *= ScaleFactor;
425 for (
G4int i = 0; i < 6; i++ ) {
426 Quark_Mom [i] = GaussianPt( AveragePt2, maxPtSquare );
427 PtSum += Quark_Mom[i];
431 for(
G4int i = 0; i < 6; i++ ) {
432 Quark_Mom[i] -= PtSum;
434 ModMom2[i] = Quark_Mom[i].
mag2();
435 SumMt += std::sqrt( ModMom2[i] + MassQ2 );
437 }
while ( ( SumMt > SqrtS ) &&
438 ++loopCounter < maxNumberOfLoops );
439 if ( loopCounter >= maxNumberOfLoops ) {
443 G4double WminusTarget( 0.0 ), WplusProjectile( 0.0 );
473 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
478 if ( Alfa_R == 1.0 ) {
482 Quark_Mom[0].
setZ( Xaq1 ); Quark_Mom[1].
setZ( Xaq2 ); Quark_Mom[2].
setZ( Xaq3 );
487 Quark_Mom[0].
setZ( Xaq1 ); Quark_Mom[1].
setZ( Xaq2 ); Quark_Mom[2].
setZ( Xaq3 );
491 if ( Alfa_R == 1.0 ) {
495 Quark_Mom[3].
setZ( Xq1 ); Quark_Mom[4].
setZ( Xq2 ); Quark_Mom[5].
setZ( Xq3 );
500 Quark_Mom[3].
setZ( Xq1 ); Quark_Mom[4].
setZ( Xq2 ); Quark_Mom[5].
setZ( Xq3 );
504 for (
G4int i = 0; i < 3; i++ ) {
505 if ( Quark_Mom[i].getZ() != 0.0 ) {
506 Alfa += ( ScaleFactor * ModMom2[i] + MassQ2 ) / Quark_Mom[i].getZ();
511 for (
G4int i = 3; i < 6; i++ ) {
512 if ( Quark_Mom[i].getZ() != 0.0 ) {
513 Beta += ( ScaleFactor * ModMom2[i] + MassQ2 ) / Quark_Mom[i].getZ();
519 if ( ! Succes )
continue;
521 if ( std::sqrt( Alfa ) + std::sqrt( Beta ) > SqrtS ) {
526 G4double DecayMomentum2 = S*S + Alfa*Alfa + Beta*Beta
527 - 2.0*S*Alfa - 2.0*S*Beta - 2.0*Alfa*Beta;
529 WminusTarget = ( S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / SqrtS;
530 WplusProjectile = SqrtS - Beta/WminusTarget;
532 }
while ( ( ! Succes ) &&
533 ++loopCounter < maxNumberOfLoops );
534 if ( loopCounter >= maxNumberOfLoops ) {
538 G4double SqrtScaleF = std::sqrt( ScaleFactor );
539 for (
G4int i = 0; i < 3; i++ ) {
540 G4double Pz = WplusProjectile * Quark_Mom[i].
getZ() / 2.0 -
541 ( ScaleFactor * ModMom2[i] + MassQ2 ) /
542 ( 2.0 * WplusProjectile * Quark_Mom[i].getZ() );
543 Quark_Mom[i].
setZ( Pz );
544 if ( ScaleFactor != 1.0 ) {
545 Quark_Mom[i].
setX( SqrtScaleF * Quark_Mom[i].getX() );
546 Quark_Mom[i].
setY( SqrtScaleF * Quark_Mom[i].getY() );
549 for (
G4int i = 3; i < 6; i++ ) {
550 G4double Pz = -WminusTarget * Quark_Mom[i].
getZ() / 2.0 +
551 ( ScaleFactor * ModMom2[i] + MassQ2 ) /
552 ( 2.0 * WminusTarget * Quark_Mom[i].getZ() );
553 Quark_Mom[i].
setZ( Pz );
554 if ( ScaleFactor != 1.0 ) {
555 Quark_Mom[i].
setX( SqrtScaleF * Quark_Mom[i].getX() );
556 Quark_Mom[i].
setY( SqrtScaleF * Quark_Mom[i].getY() );
563 G4LorentzVector Pstring1( tmp, std::sqrt( Quark_Mom[0].mag2() + MassQ2 ) +
564 std::sqrt( Quark_Mom[3].mag2() + MassQ2 ) );
565 G4double Ystring1 = Pstring1.rapidity();
571 tmp = Quark_Mom[1] + Quark_Mom[4];
572 G4LorentzVector Pstring2( tmp, std::sqrt( Quark_Mom[1].mag2() + MassQ2 ) +
573 std::sqrt( Quark_Mom[4].mag2() + MassQ2 ) );
574 G4double Ystring2 = Pstring2.rapidity();
580 tmp = Quark_Mom[2] + Quark_Mom[5];
581 G4LorentzVector Pstring3( tmp, std::sqrt( Quark_Mom[2].mag2() + MassQ2 ) +
582 std::sqrt( Quark_Mom[5].mag2() + MassQ2 ) );
583 G4double Ystring3 = Pstring3.rapidity();
593 if ( Ystring1 > Ystring2 && Ystring2 > Ystring3 ) {
594 Pprojectile = Pstring1;
595 LeftString = Pstring2;
598 if ( Ystring1 > Ystring3 && Ystring3 > Ystring2 ) {
599 Pprojectile = Pstring1;
600 LeftString = Pstring3;
604 if ( Ystring2 > Ystring1 && Ystring1 > Ystring3 ) {
605 Pprojectile = Pstring2;
606 LeftString = Pstring1;
609 if ( Ystring2 > Ystring3 && Ystring3 > Ystring1 ) {
610 Pprojectile = Pstring2;
611 LeftString = Pstring3;
615 if ( Ystring3 > Ystring1 && Ystring1 > Ystring2 ) {
616 Pprojectile = Pstring3;
617 LeftString = Pstring1;
620 if ( Ystring3 > Ystring2 && Ystring2 > Ystring1 ) {
621 Pprojectile = Pstring3;
622 LeftString = Pstring2;
627 Pprojectile.transform( toLab );
628 LeftString.transform( toLab );
629 Ptarget.transform( toLab );
633 projectile->SetTimeOfCreation(
target->GetTimeOfCreation() );
634 projectile->SetPosition(
target->GetPosition() );
641 projectile->Set4Momentum( Pprojectile );
643 target->Set4Momentum( Ptarget );
644 projectile->IncrementCollisionCount( 1 );
646 target->IncrementCollisionCount( 1 );
656 if ( Ksi < (X_a + X_b) / Xannihilation ) {
659 G4cout <<
"Process b, quark - anti-quark annihilation, di-q - anti-di-q string" <<
G4endl;
662 G4int CandidatsN( 0 ), CandAQ[9][2], CandQ[9][2];
663 G4int LeftAQ1( 0 ), LeftAQ2( 0 ), LeftQ1( 0 ), LeftQ2( 0 );
665 for (
G4int iAQ = 0; iAQ < 3; iAQ++ ) {
666 for (
G4int iQ = 0; iQ < 3; iQ++ ) {
667 if ( -AQ[iAQ] == Q[iQ] ) {
668 if ( iAQ == 0 ) { CandAQ[CandidatsN][0] = 1; CandAQ[CandidatsN][1] = 2; }
669 if ( iAQ == 1 ) { CandAQ[CandidatsN][0] = 0; CandAQ[CandidatsN][1] = 2; }
670 if ( iAQ == 2 ) { CandAQ[CandidatsN][0] = 0; CandAQ[CandidatsN][1] = 1; }
671 if ( iQ == 0 ) { CandQ[CandidatsN][0] = 1; CandQ[CandidatsN][1] = 2; }
672 if ( iQ == 1 ) { CandQ[CandidatsN][0] = 0; CandQ[CandidatsN][1] = 2; }
673 if ( iQ == 2 ) { CandQ[CandidatsN][0] = 0; CandQ[CandidatsN][1] = 1; }
680 if ( CandidatsN != 0 ) {
681 G4int SampledCase = G4RandFlat::shootInt(
G4long( CandidatsN ) );
682 LeftAQ1 = AQ[ CandAQ[SampledCase][0] ];
683 LeftAQ2 = AQ[ CandAQ[SampledCase][1] ];
684 LeftQ1 = Q[ CandQ[SampledCase][0] ];
685 LeftQ2 = Q[ CandQ[SampledCase][1] ];
688 G4int Anti_DQ( 0 ), DQ( 0 );
689 if ( std::abs( LeftAQ1 ) > std::abs( LeftAQ2 ) ) {
690 Anti_DQ = 1000*LeftAQ1 + 100*LeftAQ2 - 3;
692 Anti_DQ = 1000*LeftAQ2 + 100*LeftAQ1 - 3;
695 if ( std::abs( LeftQ1 ) > std::abs( LeftQ2 ) ) {
696 DQ = 1000*LeftQ1 + 100*LeftQ2 + 3;
698 DQ = 1000*LeftQ2 + 100*LeftQ1 + 3;
704 projectile->SplitUp();
707 projectile->SetFirstParton( DQ );
708 projectile->SetSecondParton( Anti_DQ );
709 projectile->SetStatus( 0 );
711 Pprojectile.setPx( 0.0 );
712 Pprojectile.setPy( 0.0 );
713 Pprojectile.setPz( 0.0 );
714 Pprojectile.setE( SqrtS );
715 Pprojectile.transform( toLab );
719 projectile->SetTimeOfCreation(
target->GetTimeOfCreation() );
720 projectile->SetPosition(
target->GetPosition() );
726 projectile->Set4Momentum( Pprojectile );
728 projectile->IncrementCollisionCount( 1 );
729 target->IncrementCollisionCount( 1 );
739 if ( Ksi < ( X_a + X_b + X_c ) / Xannihilation ) {
744 G4cout <<
"Process c, quark - anti-quark and string junctions annihilation, 2 strings left."
748 G4int CandidatsN( 0 ), CandAQ[9][2], CandQ[9][2];
749 G4int LeftAQ1( 0 ), LeftAQ2( 0 ), LeftQ1( 0 ), LeftQ2( 0 );
751 for (
G4int iAQ = 0; iAQ < 3; iAQ++ ) {
752 for (
G4int iQ = 0; iQ < 3; iQ++ ) {
753 if ( -AQ[iAQ] == Q[iQ] ) {
754 if ( iAQ == 0 ) { CandAQ[CandidatsN][0] = 1; CandAQ[CandidatsN][1] = 2; }
755 if ( iAQ == 1 ) { CandAQ[CandidatsN][0] = 0; CandAQ[CandidatsN][1] = 2; }
756 if ( iAQ == 2 ) { CandAQ[CandidatsN][0] = 0; CandAQ[CandidatsN][1] = 1; }
757 if ( iQ == 0 ) { CandQ[CandidatsN][0] = 1; CandQ[CandidatsN][1] = 2; }
758 if ( iQ == 1 ) { CandQ[CandidatsN][0] = 0; CandQ[CandidatsN][1] = 2; }
759 if ( iQ == 2 ) { CandQ[CandidatsN][0] = 0; CandQ[CandidatsN][1] = 1; }
766 if ( CandidatsN != 0 ) {
767 G4int SampledCase = G4RandFlat::shootInt(
G4long( CandidatsN ) );
768 LeftAQ1 = AQ[ CandAQ[SampledCase][0] ];
769 LeftAQ2 = AQ[ CandAQ[SampledCase][1] ];
771 LeftQ1 = Q[ CandQ[SampledCase][0] ];
772 LeftQ2 = Q[ CandQ[SampledCase][1] ];
774 LeftQ2 = Q[ CandQ[SampledCase][0] ];
775 LeftQ1 = Q[ CandQ[SampledCase][1] ];
780 projectile->SplitUp();
781 projectile->SetFirstParton( LeftAQ1 );
782 projectile->SetSecondParton( LeftQ1 );
783 projectile->SetStatus( 0 );
786 aAQ = std::abs( LeftAQ1 ); aQ = std::abs( LeftQ1 );
808 NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ1;
810 NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ1;
815 if ( ! TestParticle )
return false;
816 projectile->SetDefinition( TestParticle );
822 target->SetFirstParton( LeftQ2 );
823 target->SetSecondParton( LeftAQ2 );
826 aAQ = std::abs( LeftAQ2 ); aQ = std::abs( LeftQ2 ); aKsi =
G4UniformRand();
845 NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ2;
847 NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ2;
852 if ( ! TestParticle )
return false;
853 target->SetDefinition( TestParticle );
862 AveragePt2 = 200.0*200.0; maxPtSquare =
S;
866 G4int NumberOfTries( 0 );
869 const G4int maxNumberOfLoops = 1000;
870 G4int loopCounter = 0;
873 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
876 AveragePt2 *= ScaleFactor;
879 for(
G4int i = 0; i < 4; i++ ) {
880 Quark_Mom[i] = GaussianPt( AveragePt2, maxPtSquare );
881 PtSum += Quark_Mom[i];
885 for (
G4int i = 0; i < 4; i++ ) {
886 Quark_Mom[i] -= PtSum;
888 ModMom2[i] = Quark_Mom[i].
mag2();
889 SumMt += std::sqrt( ModMom2[i] + MassQ2 );
891 }
while ( ( SumMt > SqrtS ) &&
892 ++loopCounter < maxNumberOfLoops );
893 if ( loopCounter >= maxNumberOfLoops ) {
897 G4double WminusTarget( 0.0 ), WplusProjectile( 0.0 );
910 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
915 if ( Alfa_R == 1.0 ) {
918 Quark_Mom[0].
setZ( Xaq1 ); Quark_Mom[1].
setZ( Xaq2 );
922 Quark_Mom[0].
setZ( Xaq1 ); Quark_Mom[1].
setZ( Xaq2 );
926 if ( Alfa_R == 1.0 ) {
929 Quark_Mom[2].
setZ( Xq1 ); Quark_Mom[3].
setZ( Xq2 );
933 Quark_Mom[2].
setZ( Xq1 ); Quark_Mom[3].
setZ( Xq2 );
937 for (
G4int i = 0; i < 2; i++ ) {
938 if ( Quark_Mom[i].getZ() != 0.0 ) {
939 Alfa += ( ScaleFactor * ModMom2[i] + MassQ2 ) / Quark_Mom[i].getZ();
944 for (
G4int i = 2; i < 4; i++ ) {
945 if ( Quark_Mom[i].getZ() != 0.0 ) {
946 Beta += ( ScaleFactor * ModMom2[i] + MassQ2 ) / Quark_Mom[i].getZ();
952 if ( ! Succes )
continue;
954 if ( std::sqrt( Alfa ) + std::sqrt( Beta ) > SqrtS ) {
959 G4double DecayMomentum2 = S*S + Alfa*Alfa + Beta*Beta
960 - 2.0*S*Alfa - 2.0*S*Beta - 2.0*Alfa*Beta;
961 WminusTarget = ( S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / SqrtS;
962 WplusProjectile = SqrtS - Beta/WminusTarget;
964 }
while ( ( ! Succes ) &&
965 ++loopCounter < maxNumberOfLoops );
966 if ( loopCounter >= maxNumberOfLoops ) {
970 G4double SqrtScaleF = std::sqrt( ScaleFactor );
972 for (
G4int i = 0; i < 2; i++ ) {
973 G4double Pz = WplusProjectile * Quark_Mom[i].
getZ() / 2.0 -
974 ( ScaleFactor * ModMom2[i] + MassQ2 ) /
975 ( 2.0 * WplusProjectile * Quark_Mom[i].getZ() );
976 Quark_Mom[i].
setZ( Pz );
977 if ( ScaleFactor != 1.0 ) {
978 Quark_Mom[i].
setX( SqrtScaleF * Quark_Mom[i].getX() );
979 Quark_Mom[i].
setY( SqrtScaleF * Quark_Mom[i].getY() );
983 for (
G4int i = 2; i < 4; i++ ) {
984 G4double Pz = -WminusTarget * Quark_Mom[i].
getZ() / 2.0 +
985 ( ScaleFactor * ModMom2[i] + MassQ2 ) /
986 ( 2.0 * WminusTarget * Quark_Mom[i].getZ() );
987 Quark_Mom[i].
setZ( Pz );
988 if ( ScaleFactor != 1.0 ) {
989 Quark_Mom[i].
setX( SqrtScaleF * Quark_Mom[i].getX() );
990 Quark_Mom[i].
setY( SqrtScaleF * Quark_Mom[i].getY() );
998 G4LorentzVector Pstring1( tmp, std::sqrt( Quark_Mom[0].mag2() + MassQ2 ) +
999 std::sqrt( Quark_Mom[2].mag2() + MassQ2 ) );
1000 G4double Ystring1 = Pstring1.rapidity();
1006 tmp = Quark_Mom[1] + Quark_Mom[3];
1007 G4LorentzVector Pstring2( tmp, std::sqrt( Quark_Mom[1].mag2() + MassQ2 ) +
1008 std::sqrt( Quark_Mom[3].mag2() + MassQ2 ) );
1009 G4double Ystring2 = Pstring2.rapidity();
1015 if ( Ystring1 > Ystring2 ) {
1016 Pprojectile = Pstring1;
1019 Pprojectile = Pstring2;
1024 Pprojectile.transform( toLab );
1025 Ptarget.transform( toLab );
1029 projectile->SetTimeOfCreation(
target->GetTimeOfCreation() );
1030 projectile->SetPosition(
target->GetPosition() );
1034 projectile->Set4Momentum( Pprojectile );
1035 target->Set4Momentum( Ptarget );
1036 projectile->IncrementCollisionCount( 1 );
1037 target->IncrementCollisionCount( 1 );
1049 if ( Ksi < ( X_a + X_b + X_c + X_d ) / Xannihilation ) {
1051 #ifdef debugFTFannih
1052 G4cout <<
"Process d, only 1 quark - anti-quark string" <<
G4endl;
1055 G4int CandidatsN( 0 ), CandAQ[36], CandQ[36];
1056 G4int LeftAQ( 0 ), LeftQ( 0 );
1058 for (
G4int iAQ1 = 0; iAQ1 < 3; iAQ1++ ) {
1059 for (
G4int iAQ2 = 0; iAQ2 < 3; iAQ2++ ) {
1060 if ( iAQ1 != iAQ2 ) {
1061 for (
G4int iQ1 = 0; iQ1 < 3; iQ1++ ) {
1062 for (
G4int iQ2 = 0; iQ2 < 3; iQ2++ ) {
1064 if ( -AQ[iAQ1] == Q[iQ1] && -AQ[iAQ2] == Q[iQ2] ) {
1065 if ( iAQ1 == 0 && iAQ2 == 1 ) { CandAQ[CandidatsN] = 2; }
1066 if ( iAQ1 == 1 && iAQ2 == 0 ) { CandAQ[CandidatsN] = 2; }
1068 if ( iAQ1 == 0 && iAQ2 == 2 ) { CandAQ[CandidatsN] = 1; }
1069 if ( iAQ1 == 2 && iAQ2 == 0 ) { CandAQ[CandidatsN] = 1; }
1071 if ( iAQ1 == 1 && iAQ2 == 2 ) { CandAQ[CandidatsN] = 0; }
1072 if ( iAQ1 == 2 && iAQ2 == 1 ) { CandAQ[CandidatsN] = 0; }
1074 if ( iQ1 == 0 && iQ2 == 1 ) { CandQ[CandidatsN] = 2; }
1075 if ( iQ1 == 1 && iQ2 == 0 ) { CandQ[CandidatsN] = 2; }
1077 if ( iQ1 == 0 && iQ2 == 2 ) { CandQ[CandidatsN] = 1; }
1078 if ( iQ1 == 2 && iQ2 == 0 ) { CandQ[CandidatsN] = 1; }
1080 if ( iQ1 == 1 && iQ2 == 2 ) { CandQ[CandidatsN] = 0; }
1081 if ( iQ1 == 2 && iQ2 == 1 ) { CandQ[CandidatsN] = 0; }
1091 if ( CandidatsN != 0 ) {
1092 G4int SampledCase = G4RandFlat::shootInt(
G4long( CandidatsN ) );
1093 LeftAQ = AQ[ CandAQ[SampledCase] ];
1094 LeftQ = Q[ CandQ[SampledCase] ];
1098 projectile->SplitUp();
1101 projectile->SetFirstParton( LeftQ );
1102 projectile->SetSecondParton( LeftAQ );
1103 projectile->SetStatus( 0 );
1106 aAQ = std::abs( LeftAQ ); aQ = std::abs( LeftQ );
1116 if ( aKsi < 0.25 ) {
1128 NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ;
1130 NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ;
1135 if ( ! TestParticle )
return false;
1136 projectile->SetDefinition( TestParticle );
1141 Pprojectile.setPx( 0.0 );
1142 Pprojectile.setPy( 0.0 );
1143 Pprojectile.setPz( 0.0 );
1144 Pprojectile.setE( SqrtS );
1145 Pprojectile.transform( toLab );
1148 projectile->SetTimeOfCreation(
target->GetTimeOfCreation() );
1149 projectile->SetPosition(
target->GetPosition() );
1154 projectile->Set4Momentum( Pprojectile );
1156 projectile->IncrementCollisionCount( 1 );
1157 target->IncrementCollisionCount( 1 );
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
Hep3Vector boostVector() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
virtual void SetSecondParton(G4int PDGcode)=0
void SetTimeOfCreation(G4double aTime)
void SetTarMinNonDiffMass(const G4double aValue)
void SetDefinition(const G4ParticleDefinition *aDefinition)
HepLorentzVector & rotateZ(double)
void SetStatus(const G4int aStatus)
G4GLOB_DLL std::ostream G4cout
virtual void SetFirstParton(G4int PDGcode)=0
void SetProjMinNonDiffMass(const G4double aValue)
void IncrementCollisionCount(G4int aCount)
void SetProjMinDiffMass(const G4double aValue)
static G4ParticleTable * GetParticleTable()
void SetPosition(const G4ThreeVector &aPosition)
HepLorentzVector & rotateY(double)
static constexpr double GeV
static constexpr double MeV
static constexpr double pi
void Set4Momentum(const G4LorentzVector &a4Momentum)
void SetProbabilityOfAnnihilation(const G4double aValue)
void SetTarMinDiffMass(const G4double aValue)