56G4int G4QIonIonCollision::nCutMax=7;
57G4double G4QIonIonCollision::stringTension=1.*GeV/fermi;
58G4double G4QIonIonCollision::tubeDensity =1./fermi;
60G4double G4QIonIonCollision::widthOfPtSquare=-0.75*GeV*GeV;
68 G4bool stringsInitted=
false;
74 G4cout<<
"G4QIn::Constr:*Called*,pA="<<pNucleus<<proj4M<<
",tA="<<tNucleus<<targM<<
G4endl;
79 G4int pPDG=90000000+pZ*1000+pN;
83 G4int tPDG=90000000+tZ*1000+tN;
94 G4cout<<
"-EMC-G4QIonIonCollision::Constr: tLS4M="<<totLS4M<<
",tZLS4M="<<totZLS4M<<
G4endl;
100 G4int ModelMode=SOFT;
116 G4cout<<
"-EMC-G4QIonIonCollision::Construct: pNuc4M="<<sumP1<<
", tNuc4M="<<sumT1<<
G4endl;
123 G4double e_per_projectile = proj4M.
e()/pA+targM/tA;
124 G4double vz = pz_per_projectile/e_per_projectile;
126 G4cout<<
"G4QIonIonCollision::Construct: (КщеЯ)Projectile4M="<<proj4M<<
", Vz="<<vz
127 <<
", pA="<<pA<<
", pE="<<e_per_projectile<<
G4endl;
129 theCMVelocity.
setZ(vz);
134 theALVelocity.
setZ(avz);
138 G4cout<<
"-EMC-G4QIonIonCollision::Construct: Boosted, vCM="<<vz<<
", vAL="<<avz<<
", tN4M="
139 <<sumT2<<
", pN4M="<<sumP2<<
G4endl;
149 G4cout<<
"G4QIonIonCollision::Construct: theIntSize="<<theInteractions.size()<<
G4endl;
159 while(!theInteractions.size() && ++attCnt < maxAtt)
163 G4int nint=theInteractions.size();
164 for(
G4int ni=0; ni < nint; ++ni)
171 theInteractions.clear();
178 curProjNucleus = theProjNucleus;
179 curTargNucleus = theTargNucleus;
181 std::pair<G4double, G4double> theImpactParameter;
183 G4double impactX = theImpactParameter.first;
184 G4double impactY = theImpactParameter.second;
186 G4cout<<
"G4QIonIonCollision::Con:At#="<<attCnt<<
",X="<<impactX<<
",Y="<<impactY<<
G4endl;
192 G4cout<<
"G4QIonIonCollision::Constr: Before the WHILE over pNucleons,pA="<<pnA<<
G4endl;
204 if (proB>0) prEn-=pNucleus.
GetMass();
205 else if(proB<0) prEn+=mProt;
208 G4cout<<
"G4QIonIonCollision::Construct: estimated energy, prEn="<<prEn<<
G4endl;
213 G4double pImp=std::sqrt(pImpX*pImpX+pImpY*pImpY);
215 maxEn=eflen*stringTension;
216 maxNuc=
static_cast<int>(eflen*tubeDensity+0.5);
218 G4cout<<
"G4QIonIonCollision::Con:pE="<<prEn<<
" < mE="<<maxEn<<
",mN="<<maxNuc<<
G4endl;
229 curInteractions.push_back(anInteraction);
237 G4cout<<
"G4QIonIonCollision::Construct: DINR interaction is created"<<
G4endl;
245 G4cout<<
"G4QIonIonCollision::Constr: Before WHILE over tNucleons, tA="<<tnA<<
G4endl;
247 while((tNucleon=curTargNucleus.
GetNextNucleon()) && tnCnt<tnA && totalCuts<maxCuts)
252 G4cout<<
"G4QIonIonCollision::Constr: OuterR="<<outerRadius<<
", mC="<<maxCuts
253 <<
", pA="<<curProjNucleus<<
", tA="<<curTargNucleus<<
G4endl;
256 G4double s_value = (tNuc4M + pNuc4M).mag2();
259 G4cout<<
"G4QInel::Constr: s="<<s_value<<
", ThreshM="<<
sqr(ThresholdMass)<<
G4endl;
264 G4cerr<<
"*G4QInelast::Constr:s="<<s_value<<
",pN4M="<<pNuc4M<<
",tN4M="<<tNuc4M<<
G4endl;
267 if (s_value <
sqr(ThresholdMass))
270 G4cout<<
"G4QIonIonCollision::Constr: ***OnlyDiffraction***, ThM="<<ThresholdMass
271 <<
">sqrt(s)="<<std::sqrt(s_value)<<
" -> only Diffraction is possible"<<
G4endl;
273 ModelMode = DIFFRACTIVE;
278 G4double Distance2=dImpX*dImpX+dImpY*dImpY;
280 G4cout<<
"G4QIonIonCollision::Construct: s="<<s_value<<
", D2="<<Distance2<<
G4endl;
285 G4cout<<
"-Warning-G4QIonIonCollision::Construct: s < .01 GeV^2, p4M="
292 G4cout<<
"G4QIonIonCollision::Construct: Probubility="<<Probability<<
G4endl;
297 G4cout<<
"G4QIonIonCollision::Construct: NLOOP prob="<<Probability<<
", rndm="
298 <<rndNumber<<
", d="<<std::sqrt(Distance2)<<
G4endl;
300 if (Probability > rndNumber)
305 G4cout<<
"--->EMC-->G4QIonIonCollision::Construct: TargNucleon is filled, 4M/PDG="
316 G4UniformRand() && ModelMode==SOFT ) || ModelMode==DIFFRACTIVE)
324 curInteractions.push_back(anInteraction);
328 G4cout<<
"G4QIonIonCollision::Constr:NLOOP DiffInteract,tC="<<totalCuts<<
G4endl;
337 for(nCut = 0; nCut < nCutMax; nCut++)
340 if(nCut) running[nCut] += running[nCut-1];
343 for(nCut = 0; nCut < nCutMax; nCut++)
if(running[nCut] > random)
break;
346 G4cout<<
"G4QIonIonCollision::Construct: NLOOP-Soft Chosen nCut="<<nCut<<
G4endl;
356 curInteractions.push_back(anInteraction);
359 G4cout<<
"G4QIonIonCollision::Constr:NLOOP SoftInteract,tC="<<totalCuts<<
G4endl;
360 impactUsed=Distance2;
365 G4int nCurInt=curInteractions.size();
366 for(
G4int ni=0; ni < nCurInt; ++ni) theInteractions.push_back(curInteractions[ni]);
367 curInteractions.clear();
372 theProjNucleus = curProjNucleus;
373 theTargNucleus = curTargNucleus;
376 G4int nInt=theInteractions.size();
378 G4cout<<
"G4QIonIonCollision::Constr: #ofInteractions = "<<nInt<<
", #OfDINR = "
379 <<theInteractions[0]->GetNumberOfDINRCollisions()<<
G4endl;
381 if(!nInt || (nInt==1 && theInteractions[0]->GetNumberOfDINRCollisions()==1))
387 aTarget=theInteractions[0]->GetTarget();
388 aProjectile=theInteractions[0]->GetProjectile();
389 delete theInteractions[0];
390 theInteractions.clear();
412 Q4M.
boost(theCMVelocity);
415 theQuasmons.push_back(stringQuasmon);
423 for(
G4int i=0; i<nInt; i++)
425 theInteractions[i]->SplitHadrons();
427 G4QHadron* projH=theInteractions[i]->GetProjectile();
428 G4QHadron* targH=theInteractions[i]->GetTarget();
431 std::list<G4QParton*> projCP=projH->
GetColor();
433 std::list<G4QParton*> targCP=targH->
GetColor();
435 std::list<G4QParton*>::iterator picp = projCP.begin();
436 std::list<G4QParton*>::iterator pecp = projCP.end();
437 std::list<G4QParton*>::iterator piac = projAC.begin();
438 std::list<G4QParton*>::iterator peac = projAC.end();
439 std::list<G4QParton*>::iterator ticp = targCP.begin();
440 std::list<G4QParton*>::iterator tecp = targCP.end();
441 std::list<G4QParton*>::iterator tiac = targAC.begin();
442 std::list<G4QParton*>::iterator teac = targAC.end();
443 for(; picp!=pecp&& piac!=peac&& ticp!=tecp&& tiac!=teac; ++picp,++piac,++ticp,++tiac)
445 pSP+=(*picp)->Get4Momentum();
446 pSP+=(*piac)->Get4Momentum();
447 tSP+=(*ticp)->Get4Momentum();
448 tSP+=(*tiac)->Get4Momentum();
450 G4cout<<
"-EMC-G4QIonIonCollision::Construct: Interaction#"<<i<<
",dP4M="
457 G4QInteractionVector::iterator it;
459 G4cout<<
"G4QIonIonCollision::Constr: Creation ofSoftCollisionPartonPair STARTS"<<
G4endl;
462 while(rep && theInteractions.size())
464 for(it = theInteractions.begin(); it != theInteractions.end(); ++it)
470 G4cout<<
"G4QIonIonCollision::Construct: #0f SoftCollisions ="<<nSoftCollisions<<
G4endl;
476 for (
G4int j = 0; j < nSoftCollisions; j++)
481 thePartonPairs.push_back(aPair);
485 thePartonPairs.push_back(aPair);
487 G4cout<<
"--->G4QIonIonCollision::Constr: SOFT, 2 parton pairs are filled"<<
G4endl;
491 it=theInteractions.erase(it);
492 if( it != theInteractions.begin() )
507 G4cout<<
"G4QIonIonCollision::Constr: -> Parton pairs for SOFT strings are made"<<
G4endl;
512 for(
unsigned i = 0; i < theInteractions.size(); i++)
518 G4cout<<
"G4QIonIonCollision::Constr: CreationOfDiffractivePartonPairs, i="<<i<<
G4endl;
528 thePartonPairs.push_back(aPartonPair);
530 G4cout<<
"G4QIonIonCollision::Constr: proj Diffractive PartonPair is filled"<<
G4endl;
540 thePartonPairs.push_back(aPartonPair);
542 G4cout<<
"G4QIonIonCollision::Constr: target Diffractive PartonPair's filled"<<
G4endl;
547 G4cout<<
"G4QIonIonCollision::Construct: DiffractivePartonPairs are created"<<
G4endl;
553 theInteractions.clear();
555 G4cout<<
"G4QIonIonCollision::Construct: Temporary objects are cleaned up"<<
G4endl;
562 G4cout<<
">>........>>G4QIonIonCollision::Construct: >>..>> Strings are created "<<
G4endl;
566 while(thePartonPairs.size())
568 aPair = thePartonPairs.back();
569 thePartonPairs.pop_back();
577 aString->
Boost(theCMVelocity);
578 strings.push_back(aString);
584 G4int rChg=totChg-theProjNucleus.
GetZ()-theTargNucleus.
GetZ();
585 G4int rBaN=totBaN-theProjNucleus.
GetA()-theTargNucleus.
GetA();
586 G4int nStrings=strings.size();
587 G4cout<<
"-EMC-G4QIonIonCollision::Constr:#ofString="<<nStrings<<
",tNuc4M="<<sum<<
G4endl;
588 for(
G4int i=0; i<nStrings; i++)
601 G4cout<<
"-EMC-G4QIonIonCollision::Construct: String#"<<i<<
", 4M="<<strI4M<<
", LPDG="
602 <<LPDG<<LQC<<
",RPDG="<<RPDG<<RQC<<
", Ch="<<sChg<<
", BN="<<sBaN<<
G4endl;
604 G4cout<<
"-EMC-G4QInel::Constr: r4M="<<sum-totZLS4M<<
", rC="<<rChg<<
", rB="<<rBaN<<
G4endl;
608 G4cerr<<
"*****G4QIonIonCollision::Construct:**** No strings are created *****"<<
G4endl;
612 G4cout<<
"G4QIonIonCollision::Constr:BeforeRotation, #0fStrings="<<strings.size()<<
G4endl;
617 for(
unsigned astring=0; astring < strings.size(); astring++)
618 strings[astring]->LorentzRotate(toLab);
624 G4int rCg=totChg-theProjNucleus.
GetZ()-theTargNucleus.
GetZ();
625 G4int rBC=totBaN-theProjNucleus.
GetA()-theTargNucleus.
GetA();
626 G4int nStrs=strings.size();
627 G4cout<<
"-EMCLS-G4QIonIonCollision::Constr:#ofS="<<nStrings<<
",Nuc4M(E=M)="<<sum<<
G4endl;
628 for(
G4int i=0; i<nStrs; i++)
632 G4int sChg=strings[i]->GetCharge();
634 G4int sBaN=strings[i]->GetBaryonNumber();
636 G4cout<<
"-EMCLS-G4QInel::Construct:String#"<<i<<
",4M="<<strI4M<<strI4M.
m()<<
",Charge="
637 <<sChg<<
",BaryN="<<sBaN<<
G4endl;
639 G4cout<<
"-EMCLS-...G4QInel::Constr: r4M="<<sm-totLS4M<<
", rC="<<rCg<<
",rB="<<rBC<<
G4endl;
649 G4QStringVector::iterator ist;
651 while(con && strings.size())
653 for(ist = strings.begin(); ist < strings.end(); ++ist)
658 G4QParton* cLeft=(*ist)->GetLeftParton();
659 G4QParton* cRight=(*ist)->GetRightParton();
666 if (cLPDG > 7) aLPDG= cLPDG/100;
667 else if(cLPDG <-7) aLPDG=(-cLPDG)/100;
668 if (cRPDG > 7) aRPDG= cRPDG/100;
669 else if(cRPDG <-7) aRPDG=(-cRPDG)/100;
685 if(cSM2>0.) cSM=std::sqrt(cSM2);
687 G4cout<<
"G4QIonIonCollision::Construct: Needs Fusion? cLPDG="<<cLPDG<<
",cRPDG="<<cRPDG
688 <<
",cM(cM2 if neg)="<<cSM<<
G4endl;
696 if(L1!=R1 && L1!=R2 && L2!=R1 && L2!=R2)
707 G4cout<<
"G4QInel::Const:*IsItGood? realM="<<std::sqrt(cSM2)<<
" > GSM="<<miM<<
G4endl;
709 if(std::sqrt(cSM2) > miM) bad=
false;
714 G4cout<<
"G4QInel::Const:TryFuse,L1="<<L1<<
",L2="<<L2<<
",R1="<<R1<<
",R2="<<R2<<
G4endl;
719 G4QStringVector::iterator sst;
720 G4QStringVector::iterator pst;
725 if(cSM2>0.) minC=
false;
726 for(pst = strings.begin(); pst < strings.end(); pst++)
if(pst != ist)
734 G4cout<<
"->G4QIonIonCollision::Construct: sum4M="<<pS4M<<
", M2="<<pSM2<<
G4endl;
738 G4QParton* pLeft=(*pst)->GetLeftParton();
739 G4QParton* pRight=(*pst)->GetRightParton();
746 if (pLPDG > 7) LPDG= pLPDG/100;
747 else if(pLPDG <-7) LPDG=(-pLPDG)/100;
748 if (pRPDG > 7) RPDG= pRPDG/100;
749 else if(pRPDG <-7) RPDG=(-pRPDG)/100;
766 G4cout<<
"G4QInel::Construct: Partner/w pLPDG="<<pLPDG<<
", pRPDG="<<pRPDG<<
", pM2="
772 if (cST==2 && pST==2)
777 else if(cST==2 && pST==3)
781 ( (cLPDG<0 && (-cLPDG==pL1 || -cLPDG==pL2 || -cLPDG==pRPDG) ) ||
782 (cRPDG<0 && (-cRPDG==pL1 || -cRPDG==pL2 || -cRPDG==pRPDG) )
786 ( (cLPDG<0 && (-cLPDG==pR1 || -cLPDG==pR2 || -cLPDG==pLPDG) ) ||
787 (cRPDG<0 && (-cRPDG==pR1 || -cRPDG==pR2 || -cRPDG==pLPDG) )
791 ( (cLPDG>0 && ( cLPDG==pL1 || cLPDG==pL2 || cLPDG==-pRPDG) ) ||
792 (cRPDG>0 && ( cRPDG==pL1 || cRPDG==pL2 || cRPDG==-pRPDG) )
796 ( (cLPDG>0 && ( cLPDG==pR1 || cLPDG==pR2 || cLPDG==-pLPDG) ) ||
797 (cRPDG>0 && ( cRPDG==pR1 || cRPDG==pR2 || cRPDG==-pLPDG) )
801 else G4cout<<
"G4QIonIonCollision::Constr:2(QaQ+QDiQ/aQaDiQ) Can't fuse"<<
G4endl;
804 else if(cST==3 && pST==2)
808 ( (pLPDG<0 && (-pLPDG==L1 || -pLPDG==L2) ) ||
809 (pRPDG<0 && (-pRPDG==L1 || -pRPDG==L2) )
813 ( (pLPDG<0 && (-pLPDG==R1 || -pLPDG==R2) ) ||
814 (pRPDG<0 && (-pRPDG==R1 || -pRPDG==R2) )
818 ( (pLPDG>0 && ( pLPDG==L1 || pLPDG==L2) ) ||
819 (pRPDG>0 && ( pRPDG==L1 || pRPDG==L2) )
823 ( (pLPDG>0 && ( pLPDG==R1 || pLPDG==R2) ) ||
824 (pRPDG>0 && ( pRPDG==R1 || pRPDG==R2) )
828 else G4cout<<
"G4QIonIonCollision::Constr:3(QDiQ/aQaDiQ+QaQ) Can't fuse"<<
G4endl;
831 else if(cST==2 && pST==4)
836 if ( (-cLPDG==pL1 || -cLPDG==pL2) && (cRPDG==pR1 || cRPDG==pR2) ) af=1;
837 else if( (-cRPDG==pL1 || -cRPDG==pL2) && (cLPDG==pR1 || cLPDG==pR2) ) af=2;
841 if ( (-cRPDG==pR1 || -cRPDG==pR2) && (cLPDG==pL1 || cLPDG==pL2) ) af=3;
842 else if( (-cLPDG==pR1 || -cLPDG==pR2) && (cRPDG==pL1 || cRPDG==pL2) ) af=4;
845 else G4cout<<
"-G4QIonIonCollision::Constr: 4 (QaQ+aQDiQDiQ) Can't fuse"<<
G4endl;
848 else if(cST==4 && pST==2)
853 if ( (-pLPDG==L1 || -pLPDG==L2) && (pRPDG==R1 || pRPDG==R2) ) af=1;
854 else if( (-pRPDG==L1 || -pRPDG==L2) && (pLPDG==R1 || pLPDG==R2) ) af=2;
858 if ( (-pRPDG==R1 || -pRPDG==R2) && (pLPDG==L1 || pLPDG==L2) ) af=3;
859 else if( (-pLPDG==R1 || -pLPDG==R2) && (pRPDG==L1 || pRPDG==L2) ) af=4;
862 else G4cout<<
"-G4QIonIonCollision::Constr: 5 (aQDiQDiQ+QaQ) Can't fuse"<<
G4endl;
865 else if(cST==3 && pST==3)
870 if (cLPDG<-7 && (-cRPDG==pL1 || -cRPDG==pL2) && (pRPDG==L1 || pRPDG==L2))
872 else if(cRPDG<-7 && (-cLPDG==pL1 || -cLPDG==pL2) && (pRPDG==R1 || pRPDG==R2))
877 if (cLPDG<-7 && (-cRPDG==pR1 || -cRPDG==pR2) && (pLPDG==L1 || pLPDG==L2))
879 else if(cRPDG<-7 && (-cLPDG==pR1 || -cLPDG==pR2) && (pLPDG==R1 || pLPDG==R2))
884 if (pLPDG<-7 && (-pRPDG==L1 || -pRPDG==L2) && (cRPDG==pL1 || cRPDG==pL2))
886 else if(pRPDG<-7 && (-pLPDG==L1 || -pLPDG==L2) && (cRPDG==pR1 || cRPDG==pR2))
891 if (pLPDG<-7 && (-pRPDG==R1 || -pRPDG==R2) && (cLPDG==pL1 || cLPDG==pL2))
893 else if(pRPDG<-7 && (-pLPDG==R1 || -pLPDG==R2) && (cLPDG==pR1 || cLPDG==pR2))
897 else G4cout<<
"-G4QIonIonCollision::Constr: 6 (QDiQ+aQaDiQ) Can't fuse"<<
G4endl;
901 G4cout<<
"G4QIonIonCollision::Constr: **Possibility**, tf="<<tf<<
",af="<<af<<
G4endl;
910 if (cLPDG > 0 && pLPDG > 0)
913 if (cLPDG > pLPDG) nLPDG=cLPDG*1000+pLPDG*100+1;
914 else if(cLPDG < pLPDG) nLPDG=pLPDG*1000+cLPDG*100+1;
915 else nLPDG=pLPDG*1000+cLPDG*100+3;
916 if (cRPDG < pRPDG) nRPDG=cRPDG*1000+pRPDG*100-1;
917 else if(cRPDG > pRPDG) nRPDG=pRPDG*1000+cRPDG*100-1;
918 else nRPDG=pRPDG*1000+cRPDG*100-3;
920 else if(cLPDG < 0 && pLPDG < 0)
923 if (cRPDG > pRPDG) nRPDG=cRPDG*1000+pRPDG*100+1;
924 else if(cRPDG < pRPDG) nRPDG=pRPDG*1000+cRPDG*100+1;
925 else nRPDG=pRPDG*1000+cRPDG*100+3;
926 if (cLPDG < pLPDG) nLPDG=cLPDG*1000+pLPDG*100-1;
927 else if(cLPDG > pLPDG) nLPDG=pLPDG*1000+cLPDG*100-1;
928 else nLPDG=pLPDG*1000+cLPDG*100-3;
930 else if(cRPDG > 0 && pLPDG > 0)
933 if (cRPDG > pLPDG) nLPDG=cRPDG*1000+pLPDG*100+1;
934 else if(cRPDG < pLPDG) nLPDG=pLPDG*1000+cRPDG*100+1;
935 else nLPDG=pLPDG*1000+cRPDG*100+3;
936 if (cLPDG < pRPDG) nRPDG=cLPDG*1000+pRPDG*100-1;
937 else if(cLPDG > pRPDG) nRPDG=pRPDG*1000+cLPDG*100-1;
938 else nRPDG=pRPDG*1000+cLPDG*100-3;
940 else if(cRPDG < 0 && pLPDG < 0)
943 if (cLPDG > pRPDG) nRPDG=cLPDG*1000+pRPDG*100+1;
944 else if(cLPDG < pRPDG) nRPDG=pRPDG*1000+cLPDG*100+1;
945 else nRPDG=pRPDG*1000+cLPDG*100+3;
946 if (cRPDG < pLPDG) nLPDG=cRPDG*1000+pLPDG*100-1;
947 else if(cRPDG > pLPDG) nLPDG=pLPDG*1000+cRPDG*100-1;
948 else nLPDG=pLPDG*1000+cRPDG*100-3;
965 if (cRPDG > pRPDG) nRPDG=cRPDG*1000+pRPDG*100+1;
966 else if(cRPDG < pRPDG) nRPDG=pRPDG*1000+cRPDG*100+1;
967 else nRPDG=pRPDG*1000+cRPDG*100+3;
968 if (-cLPDG == pL1) nLPDG=pL2;
982 if (cLPDG > pRPDG) nRPDG=cLPDG*1000+pRPDG*100+1;
983 else if(cLPDG < pRPDG) nRPDG=pRPDG*1000+cLPDG*100+1;
984 else nRPDG=pRPDG*1000+cLPDG*100+3;
985 if (-cRPDG == pL1) nLPDG=pL2;
1001 if (cRPDG > pLPDG) nLPDG=cRPDG*1000+pLPDG*100+1;
1002 else if(cRPDG < pLPDG) nLPDG=pLPDG*1000+cRPDG*100+1;
1003 else nLPDG=pLPDG*1000+cRPDG*100+3;
1004 if (-cLPDG == pR1) nRPDG=pR2;
1018 if (cLPDG > pLPDG) nLPDG=cLPDG*1000+pLPDG*100+1;
1019 else if(cLPDG < pLPDG) nLPDG=pLPDG*1000+cLPDG*100+1;
1020 else nLPDG=pLPDG*1000+cLPDG*100+3;
1021 if (-cRPDG == pR1) nRPDG=pR2;
1037 if (cRPDG < pRPDG) nRPDG=cRPDG*1000+pRPDG*100-1;
1038 else if(cRPDG > pRPDG) nRPDG=pRPDG*1000+cRPDG*100-1;
1039 else nRPDG=pRPDG*1000+cRPDG*100-3;
1040 if ( cLPDG == pL1) nLPDG=-pL2;
1054 if (cLPDG < pRPDG) nRPDG=cLPDG*1000+pRPDG*100-1;
1055 else if(cLPDG > pRPDG) nRPDG=pRPDG*1000+cLPDG*100-1;
1056 else nRPDG=pRPDG*1000+cLPDG*100-3;
1057 if ( cRPDG == pL1) nLPDG=-pL2;
1073 if (cRPDG < pLPDG) nLPDG=cRPDG*1000+pLPDG*100-1;
1074 else if(cRPDG > pLPDG) nLPDG=pLPDG*1000+cRPDG*100-1;
1075 else nLPDG=pLPDG*1000+cRPDG*100-3;
1076 if ( cLPDG == pR1) nRPDG=-pR2;
1090 if (cLPDG < pLPDG) nLPDG=cLPDG*1000+pLPDG*100-1;
1091 else if(cLPDG > pLPDG) nLPDG=pLPDG*1000+cLPDG*100-1;
1092 else nLPDG=pLPDG*1000+cLPDG*100-3;
1093 if ( cRPDG == pR1) nRPDG=-pR2;
1107 if (pRPDG > cRPDG) nRPDG=pRPDG*1000+cRPDG*100+1;
1108 else if(pRPDG < cRPDG) nRPDG=cRPDG*1000+pRPDG*100+1;
1109 else nRPDG=cRPDG*1000+pRPDG*100+3;
1110 if (-pLPDG == L1) nLPDG=L2;
1116 if (pLPDG > cRPDG) nLPDG=pLPDG*1000+cRPDG*100+1;
1117 else if(pLPDG < cRPDG) nLPDG=cRPDG*1000+pLPDG*100+1;
1118 else nLPDG=cRPDG*1000+pLPDG*100+3;
1119 if (-pRPDG == L1) nRPDG=L2;
1127 if (pRPDG > cLPDG) nRPDG=pRPDG*1000+cLPDG*100+1;
1128 else if(pRPDG < cLPDG) nRPDG=cLPDG*1000+pRPDG*100+1;
1129 else nRPDG=cLPDG*1000+pRPDG*100+3;
1130 if (-pLPDG == R1) nLPDG=R2;
1136 if (pLPDG > cLPDG) nLPDG=pLPDG*1000+cLPDG*100+1;
1137 else if(pLPDG < cLPDG) nLPDG=cLPDG*1000+pLPDG*100+1;
1138 else nLPDG=cLPDG*1000+pLPDG*100+3;
1139 if (-pRPDG == R1) nRPDG=R2;
1147 if (pRPDG < cRPDG) nRPDG=pRPDG*1000+cRPDG*100-1;
1148 else if(pRPDG > cRPDG) nRPDG=cRPDG*1000+pRPDG*100-1;
1149 else nRPDG=cRPDG*1000+pRPDG*100-3;
1150 if ( pLPDG == L1) nLPDG=-L2;
1156 if (pLPDG < cRPDG) nLPDG=pLPDG*1000+cRPDG*100-1;
1157 else if(pLPDG > cRPDG) nLPDG=cRPDG*1000+pLPDG*100-1;
1158 else nLPDG=cRPDG*1000+pLPDG*100-3;
1159 if ( pRPDG == L1) nRPDG=-L2;
1167 if (pRPDG < cLPDG) nRPDG=pRPDG*1000+cLPDG*100-1;
1168 else if(pRPDG > cLPDG) nRPDG=cLPDG*1000+pRPDG*100-1;
1169 else nRPDG=cLPDG*1000+pRPDG*100-3;
1170 if ( pLPDG == R1) nLPDG=-R2;
1176 if (pLPDG < cLPDG) nLPDG=pLPDG*1000+cLPDG*100-1;
1177 else if(pLPDG > cLPDG) nLPDG=cLPDG*1000+pLPDG*100-1;
1178 else nLPDG=cLPDG*1000+pLPDG*100-3;
1179 if ( pRPDG == R1) nRPDG=-R2;
1190 if(-cLPDG == pL1) nLPDG= pL2;
1192 if( cRPDG == pR1) nRPDG=-pR2;
1197 if(-cRPDG == pL1) nLPDG= pL2;
1199 if( cLPDG == pR1) nRPDG=-pR2;
1204 if( cLPDG == pL1) nLPDG=-pL2;
1206 if(-cRPDG == pR1) nRPDG= pR2;
1211 if( cRPDG == pL1) nLPDG=-pL2;
1213 if(-cLPDG == pR1) nRPDG= pR2;
1223 if(-pLPDG == L1) nLPDG= L2;
1225 if( pRPDG == R1) nRPDG=-R2;
1230 if(-pRPDG == L1) nRPDG= L2;
1232 if( pLPDG == R1) nLPDG=-R2;
1237 if( pLPDG == L1) nLPDG=-L2;
1239 if(-pRPDG == R1) nRPDG= R2;
1244 if( pRPDG == L1) nRPDG=-L2;
1246 if(-pLPDG == R1) nLPDG= R2;
1256 if(-cRPDG == pL1) nLPDG= pL2;
1258 if( pRPDG == L1) nRPDG= -L2;
1263 if(-cLPDG == pL1) nLPDG= pL2;
1265 if( pRPDG == R1) nRPDG= -R2;
1270 if(-cRPDG == pR1) nRPDG= pR2;
1272 if( pLPDG == L1) nLPDG= -L2;
1277 if(-cLPDG == pR1) nRPDG= pR2;
1279 if( pLPDG == R1) nLPDG= -R2;
1284 if(-pRPDG == L1) nRPDG= L2;
1286 if( cRPDG == pL1) nLPDG=-pL2;
1291 if(-pLPDG == L1) nLPDG= L2;
1293 if( cRPDG == pR1) nRPDG=-pR2;
1298 if(-pRPDG == R1) nRPDG= R2;
1300 if( cLPDG == pL1) nLPDG=-pL2;
1305 if(-pLPDG == R1) nLPDG= R2;
1307 if( cLPDG == pR1) nRPDG=-pR2;
1313 if(!order)
G4cerr<<
"-Warning-G4QInel::Constr: t="<<tf<<
", a="<<af<<
", cL="<<cLPDG
1314 <<
", cR="<<cRPDG<<
", pL="<<pLPDG<<
", pR="<<pRPDG<<
G4endl;
1319 if(std::abs(nLPDG) > 7) ++
LT;
1321 if(std::abs(nRPDG) > 7) ++RT;
1324 if(cLT==2 && cRT==2)
1342 if(nL1!=nR1 && nL1!=nR2 && nL2!=nR1 && nL2!=nR2)
1345 G4cout<<
"G4QIonIonCollis::Constr:aLPDG="<<aLPDG<<
", aRPDG="<<aRPDG<<
G4endl;
1349 std::pair<G4int,G4int> pB=tmp.
MakeTwoBaryons(nL1, nL2, nR1, nR2);
1355 std::pair<G4int,G4int> newPair = std::make_pair(nLPDG,nRPDG);
1358 G4cout<<
"G4QIn::Con: LPDG="<<nLPDG<<
",RPDG="<<nRPDG<<
",QC="<<newStQC<<
G4endl;
1366 if(pSM2>0.) pSM=std::sqrt(pSM2);
1367 if(minC && pSM2 > maxiM2)
1372 else if(!minC || pSM > minM)
1375 if(minC || pExcess > excess)
1397 G4QParton* pLeft=(*sst)->GetLeftParton();
1398 G4QParton* pRight=(*sst)->GetRightParton();
1402 G4cout<<
"G4QIonIonCollis::Constr:cS4M="<<cS4M<<
" fused/w pS4M="<<pL4M+pR4M<<
G4endl;
1422 G4cout<<
"G4QIonIonCollision::Constr:Created,4M="<<ss4M<<
",m2="<<ss4M.
m2()<<
G4endl;
1424 if( ist != strings.begin() )
1429 G4cout<<
"G4QIonIonCollision::Construct: *** IST Decremented ***"<<
G4endl;
1436 G4cout<<
"G4QIonIonCollision::Construct: *** IST Begin ***"<<
G4endl;
1444 G4cout<<
"-Warning-G4QInel::Const: S4M="<<cS4M<<
",M2="<<cSM2<<
" Leave ASIS"<<
G4endl;
1453 G4cout<<
"G4QIonIonCollision::Construct: *** IST While *** , con="<<con<<
G4endl;
1459 G4int rC=totChg-theProjNucleus.
GetZ()-theTargNucleus.
GetZ();
1460 G4int rB=totBaN-theProjNucleus.
GetA()-theTargNucleus.
GetA();
1461 G4int nStr=strings.size();
1462 G4cout<<
"-EMCLS-G4QIn::Const: AfterSUPPRESION #ofS="<<nStr<<
",tNuc4M(E=M)="<<sum<<
G4endl;
1463 for(
G4int i=0; i<nStr; i++)
1467 G4int sChg=strings[i]->GetCharge();
1469 G4int sBaN=strings[i]->GetBaryonNumber();
1471 G4cout<<
"-EMCLS-G4QIonIonCollision::Construct: St#"<<i<<
", 4M="<<strI4M<<
", M="
1472 <<strI4M.
m()<<
", C="<<sChg<<
", B="<<sBaN<<
G4endl;
1474 G4cout<<
"-EMCLS-G4QInel::Construct: r4M="<<t4M-totLS4M<<
", rC="<<rC<<
", rB="<<rB<<
G4endl;
1480 G4cout<<
"G4QIonIonCollision::Construct: problem="<<problem<<
G4endl;
1484 G4int nOfStr=strings.size();
1486 G4cout<<
"G4QIonIonCollision::Constr:SecurityDiQaDiQReduction, #OfStr="<<nOfStr<<
G4endl;
1488 for (
G4int astring=0; astring < nOfStr; astring++)
1500 G4cout<<
"G4QIonIonCollis::Constr:TrySelfReduString,L="<<sPDG<<
",R="<<nPDG<<
G4endl;
1507 G4cout<<
"+G4QInel::Const:#"<<astring<<
" Reduced, L="<<sPDG<<
", R="<<nPDG<<
G4endl;
1511 else G4cout<<
"--*--G4QInel::Const: #"<<astring<<
" DQ-aDQ reduction Failed"<<
G4endl;
1514 else if(sPDG==3 && nPDG==-3)
1521 else if(sPDG==-3 && nPDG==3)
1533 G4int rCh=totChg-theProjNucleus.
GetZ()-theTargNucleus.
GetZ();
1534 G4int rBa=totBaN-theProjNucleus.
GetA()-theTargNucleus.
GetA();
1535 G4int nStri=strings.size();
1536 G4cout<<
"-EMCLS-G4QIn::Const: FinalConstruct, #ofSt="<<nStri<<
",tN4M(E=M)="<<t4M<<
G4endl;
1537 for(
G4int i=0; i<nStri; i++)
1541 G4int sChg=strings[i]->GetCharge();
1543 G4int sBaN=strings[i]->GetBaryonNumber();
1545 G4cout<<
"-EMCLS-G4QIonIonCollision::Construct: St#"<<i<<
", 4M="<<strI4M<<
", M="
1546 <<strI4M.
m()<<
", C="<<sChg<<
", B="<<sBaN<<
G4endl;
1548 G4cout<<
"-EMCLS-G4QInel::Construct: r4M="<<u4M-totLS4M<<
",rC="<<rCh<<
",rB="<<rBa<<
G4endl;
1554 std::for_each(strings.begin(), strings.end(),
DeleteQString() );
1560 G4cout<<
"*******>G4QIonIonCollision::Fragment: ***Called***, Res="<<theResult<<
G4endl;
1562 G4int striNum=strings.size();
1563 G4int hadrNum=theResult->size();
1565 G4int nQm=theQuasmons.size();
1569 G4cout<<
"-EMCLS-G4QIn::Fragment: CHECKRecovery, #ofS="<<striNum<<
", Nuc4M(E=M)="<<totLS4M
1570 <<
",#Q="<<nQm<<
",#H="<<hadrNum<<
G4endl;
1571 for(
G4int i=0; i < striNum; i++)
1575 G4int sChg=strings[i]->GetCharge();
1577 G4int sBaN=strings[i]->GetBaryonNumber();
1579 G4cout<<
"-EMCLS-G4QIonIonCollision::Fragment:String#"<<i<<
", 4M="<<strI4M<<
", M="
1580 <<strI4M.
m()<<
", C="<<sChg<<
", B="<<sBaN<<
G4endl;
1582 for(
G4int i=0; i < nQm; i++)
1586 G4int hChg=theQuasmons[i]->GetCharge();
1588 G4int hBaN=theQuasmons[i]->GetBaryonNumber();
1590 G4cout<<
"-EMCLS-G4QIonIonCollision::Fragment: Quasmon#"<<i<<
", 4M="<<hI4M<<
", C="<<hChg
1593 for(
G4int i=0; i < hadrNum; i++)
1597 G4int hChg=(*theResult)[i]->GetCharge();
1599 G4int hBaN=(*theResult)[i]->GetBaryonNumber();
1601 G4cout<<
"-EMCLS-G4QIn::Fragment:H#"<<i<<
",4M="<<hI4M<<
",C="<<hChg<<
",B="<<hBaN<<
G4endl;
1605 G4cout<<
"***>G4QIonIonCollision::Fragm: #OfStr="<<striNum<<
", #OfRes="<<hadrNum<<
G4endl;
1607 if(!striNum && hadrNum)
1610 G4cout<<
"***>G4QIonIonCollision::Fragm:**Quasi-Elastic**, #OfResult="<<hadrNum<<
G4endl;
1619 for(
G4int ih=0; ih<hadrNum; ih++)
delete (*theResult)[ih];
1625 theResult->push_back(resPNuc);
1629 theResult->push_back(resTNuc);
1631 G4int nQuas=theQuasmons.size();
1632 G4int theRS=theResult->size();
1634 G4cout<<
"***>G4QIonIonCollision::Fragm:beforeEnv, #OfQ="<<nQuas<<
",#OfR="<<theRS<<
G4endl;
1639 G4QHadron* resNuc = (*theResult)[theRS-1];
1644 theResult->pop_back();
1647 G4cout<<
"G4QIonIonCollision::Fragm:#OfRemainingHadron="<<theRS<<
", A="<<theEnv<<
G4endl;
1650 for(
G4int j=theRS-1; j>-2; --j)
1655 G4cout<<
"G4QIonIonCollis::Fragm: rN4M"<<qsum4M<<qsum4M.
m()<<
",rNQC="<<qsumQC<<
G4endl;
1660 for(
G4int i=0; i<nQuas; ++i)
1668 G4cout<<
"G4QIonIonCollis::Fragm: Q#"<<i<<
", QQC="<<curQC<<
", sQC="<<qsumQC<<
G4endl;
1692 else if(miPDG < 80000000 && std::abs(miPDG)%10 > 2)
1697 G4cout<<
"G4QIonIonCollision::Fragm: PDG="<<miPDG<<
", rM="<<reM<<
",GSM="<<gsM<<
G4endl;
1699 if(reM > gsM)
break;
1706 firstQ->
SetQC(firstQC+hQC);
1708 theResult->pop_back();
1715 G4cerr<<
"***G4QIonIonCollision::Fra:PDG="<<miPDG<<
",M="<<reM<<
",GSM="<<gsM<<
G4endl;
1720 if(nucE<1.E-12) nucE=0.;
1725 G4cout<<
"G4QIonIonCollision::Fragm: nucE="<<nucE<<
", nQ="<<nQuas<<
G4endl;
1727 if(nucE) nucVel=resNuc4M.
vect()/nucE;
1728 for(
G4int i=0; i<nQuas; ++i)
1731 if(nucE) curQuasm->
Boost(-nucVel);
1735 G4cout<<
"G4QIonIonCollision::Fragment: Quasmon# "<<i<<
" added, 4M="<<cQ4M<<
G4endl;
1745 G4cerr<<
"***G4QIonIonCollision::Fragment: G4QE Exception is catched"<<
G4endl;
1747 G4Exception(
"G4QIonIonCollision::Fragment()",
"HAD_CHPS_0027",
1753 G4int nOut=output->size();
1754 for(
G4int j=0; j<nOut; j++)
1757 if(nucE) curHadron->
Boost(nucVel);
1758 theResult->push_back(curHadron);
1763 else if(!striNum)
G4cout<<
"-Warning-G4QIonIonCollision::Fragment:NothingWasDone"<<
G4endl;
1765 G4cout<<
"=--=>G4QIonIonCollision::Fragment: Final #OfResult="<<theResult->size()<<
G4endl;
1767 G4int nQ =theQuasmons.size();
1768 if(nQ) theQuasmons.clear();
1773 G4int nHd=theResult->size();
1774 G4cout<<
"-EMCLS-G4QIonIonCollision::Fragment: #ofHadr="<<nHd<<
",#OfQuasm="<<nQ<<
G4endl;
1775 for(
G4int i=0; i<nHd; i++)
1779 G4int hChg=(*theResult)[i]->GetCharge();
1781 G4int hBaN=(*theResult)[i]->GetBaryonNumber();
1783 G4cout<<
"-EMCLS-G4QIonIonCollision::Fragment: Hadron#"<<i<<
", 4M="<<hI4M<<
", PDG="
1784 <<(*theResult)[i]->GetPDGCode()<<
", C="<<hChg<<
", B="<<hBaN<<
G4endl;
1786 G4cout<<
"-EMCLS-G4QInel::Fragm:, r4M="<<f4M-totLS4M<<
", rC="<<fCh<<
",rB="<<fBN<<
G4endl;
1801 G4int nStri=strings.size();
1802 G4cout<<
"-EMCLS-G4QIn::Breed: CHECKRecovery #ofS="<<nStri<<
",N4M(E=M)="<<totLS4M<<
G4endl;
1803 for(
G4int i=0; i<nStri; i++)
1807 G4int sChg=strings[i]->GetCharge();
1809 G4int sBaN=strings[i]->GetBaryonNumber();
1811 G4cout<<
"-EMCLS-G4QIonIonCollision::Breeder: St#"<<i<<
", 4M="<<strI4M<<
", M="
1812 <<strI4M.
m()<<
", C="<<sChg<<
", B="<<sBaN<<
G4endl;
1815 G4int nOfStr=strings.size();
1817 G4cout<<
"G4QIonIonCollision::Breeder: BeforeFragmentation, #OfStr="<<nOfStr<<
G4endl;
1822 for(
G4int i=0; i < nOfStr; ++i)
1828 if(pS4M.
m2() < 0.) ftBad=
true;
1830 G4cout<<
">G4QIonIonCollision::Breed:1stTest,S#"<<i<<
",4M="<<pS4M<<
",QC="<<pSQC<<
G4endl;
1837 G4cout<<
"->G4QIonIonCollision::Breed:*TotQ*,QC="<<ftQC<<
",4M="<<ft4M<<ft4M.
m()<<
G4endl;
1839 theQuasmons.push_back(stringQuasmon);
1843 theResult->push_back(resPNuc);
1847 theResult->push_back(resTNuc);
1850 for (
G4int astring=0; astring < nOfStr; astring++)
1854 G4int rChg=totChg-theProjNucleus.
GetZ()-theTargNucleus.
GetZ();
1855 G4int rBaN=totBaN-theProjNucleus.
GetA()-theTargNucleus.
GetA();
1856 G4int nOfHadr=theResult->size();
1857 G4cout<<
"-EMCLS-G4QIonIonCollision::Breed:#ofSt="<<nOfStr<<
",#ofHad="<<nOfHadr<<
G4endl;
1858 for(
G4int i=astring; i<nOfStr; i++)
1862 G4int sChg=strings[i]->GetCharge();
1864 G4int sBaN=strings[i]->GetBaryonNumber();
1866 G4cout<<
"-EMCLS-G4QI::Breed:S#"<<i<<
",4M="<<strI4M<<
",C="<<sChg<<
",B="<<sBaN<<
G4endl;
1868 for(
G4int i=0; i<nOfHadr; i++)
1872 G4int hChg=(*theResult)[i]->GetCharge();
1874 G4int hBaN=(*theResult)[i]->GetBaryonNumber();
1876 G4cout<<
"-EMCLS-G4QIn::Breed: H#"<<i<<
",4M="<<hI4M<<
",C="<<hChg<<
",B="<<hBaN<<
G4endl;
1878 G4cout<<
"....-EMCLS-G4QInel::Br:r4M="<<sum-totLS4M<<
",rC="<<rChg<<
",rB="<<rBaN<<
G4endl;
1888 G4cout<<
"=--=>G4QIonIonCollision::Breeder: String#"<<astring<<
",s4M/m="<<curString4M
1907 G4cout<<
"G4QIonIonCollision::Breed:TryReduceString, L="<<sPDG<<
",R="<<nPDG<<
G4endl;
1917 G4cout<<
"G4QIonIonCollision::Breed:AfterReduction,L="<<sPDG<<
",R="<<nPDG<<
G4endl;
1928 else G4cout<<
"^G4QIonIonCollision::Breed: DQ-aDQ reduction to Q-aQ Failed"<<
G4endl;
1932 G4cout<<
"G4QIonIonCollision::Breed:AfterRedAttempt, theH="<<theHadrons<<
", L4M="
1935 unsigned next=astring+1;
1939 if(next < strings.size())
1946 if(dPDG<-99 || (dPDG>0&&dPDG<7) || qPDG>99 || (qPDG<0 && qPDG>-7))
1952 if(dPDG>99) dPDG/=100;
1953 if(qPDG<-99) qPDG=-(-qPDG)/100;
1955 G4cout<<
"G4QIonIonCollision::Breed:TryFuseStringS, q="<<qPDG<<
", a="<<dPDG
1962 for (restr=next; restr < nOfStr; restr++)
1974 if(aPDG<-99 || (aPDG>0 && aPDG<7) || rPDG>99 || (rPDG<0 && rPDG>-7))
1980 if(aPDG > 99) aPDG/=100;
1981 if(rPDG <-99) rPDG=-(-rPDG)/100;
1984 G4cout<<
"G4Qnel::Breed: TryReduce #"<<restr<<
", q="<<rPDG<<
",a="<<aPDG<<
G4endl;
1986 if(
LT==2 && RT==2 && PLT==2 && PRT==2)
1988 G4int cQ1=(-qPDG)/10;
1989 G4int cQ2=(-qPDG)%10;
1992 G4int pQ1=(-rPDG)/10;
1993 G4int pQ2=(-rPDG)%10;
1997 G4cout<<
"G4QIonIonCollision::Breeder: cQ="<<cQ1<<
","<<cQ2<<
", cA="<<cA1<<
","
1998 <<cA2<<
", pQ="<<pQ1<<
","<<pQ2<<
", pA="<<pA1<<
","<<pA2<<
G4endl;
2000 G4bool iQA = (cA1==pQ1 || cA1==pQ2 || cA2==pQ1 || cA2==pQ2);
2001 G4bool iAQ = (cQ1==pA1 || cQ1==pA2 || cQ2==pA1 || cQ2==pA2);
2006 if(sPDG>0 && uPDG<0)
2008 std::pair<G4int,G4int> resLL=
ReducePair(sPDG/100, (-uPDG)/100);
2009 G4int newCL=resLL.first;
2010 G4int newPL=resLL.second;
2011 if(!newCL || !newPL)
2013 G4cerr<<
"*G4QIonIonCollision::Breed:CL="<<newCL<<
",PL="<<newPL<<
G4endl;
2016 std::pair<G4int,G4int> resRR=
ReducePair((-nPDG)/100, mPDG/100);
2017 G4int newCR=resRR.first;
2018 G4int newPR=resRR.second;
2019 if(!newCR || !newPR)
2021 G4cerr<<
"*G4QIonIonCollision::Breed:CR="<<newCR<<
",PR="<<newPR<<
G4endl;
2030 else if(sPDG<0 && uPDG>0)
2032 std::pair<G4int,G4int> resLL=
ReducePair((-sPDG)/100, uPDG/100);
2033 G4int newCL=resLL.first;
2034 G4int newPL=resLL.second;
2035 if(!newCL || !newPL)
2037 G4cerr<<
"*G4QIonIonCollision::Breed:CL="<<newCL<<
",PL="<<newPL<<
G4endl;
2040 std::pair<G4int,G4int> resRR=
ReducePair(nPDG/100, (-mPDG)/100);
2041 G4int newCR=resRR.first;
2042 G4int newPR=resRR.second;
2043 if(!newCR || !newPR)
2045 G4cerr<<
"*G4QIonIonCollision::Breed:CR="<<newCR<<
",PR="<<newPR<<
G4endl;
2054 else if(sPDG>0 && mPDG<0)
2056 std::pair<G4int,G4int> resLL=
ReducePair(sPDG/100, (-mPDG)/100);
2057 G4int newCL=resLL.first;
2058 G4int newPR=resLL.second;
2059 if(!newCL || !newPR)
2061 G4cerr<<
"*G4QIonIonCollision::Breed:CL="<<newCL<<
",PR="<<newPR<<
G4endl;
2064 std::pair<G4int,G4int> resRR=
ReducePair((-nPDG)/100, uPDG/100);
2065 G4int newCR=resRR.first;
2066 G4int newPL=resRR.second;
2067 if(!newCR || !newPR)
2069 G4cerr<<
"*G4QIonIonCollision::Breed:CR="<<newCR<<
",PL="<<newPL<<
G4endl;
2080 std::pair<G4int,G4int> resLL=
ReducePair((-sPDG)/100, mPDG/100);
2081 G4int newCL=resLL.first;
2082 G4int newPR=resLL.second;
2083 if(!newCL || !newPR)
2085 G4cerr<<
"*G4QIonIonCollision::Breed:CL="<<newCL<<
",PR="<<newPR<<
G4endl;
2088 std::pair<G4int,G4int> resRR=
ReducePair(nPDG/100, (-uPDG)/100);
2089 G4int newCR=resRR.first;
2090 G4int newPL=resRR.second;
2091 if(!newCR || !newPR)
2093 G4cerr<<
"*G4QIonIonCollision::Breed:CR="<<newCR<<
",PL="<<newPL<<
G4endl;
2107 G4cout<<
"G4QInel::Breed: TryFuse/w #"<<restr<<
",q="<<rPDG<<
",a="<<aPDG<<
G4endl;
2110 if( (LS==2 && PLS==2) ||
2111 ( ( (LS==2 && PLS==3) || (LS==3 && PLS==2) ) &&
2112 ( (aPDG> 7 && (-dPDG==aPDG/10 || -dPDG==aPDG%10) ) ||
2113 (dPDG> 7 && (-aPDG==dPDG/10 || -aPDG==dPDG%10) ) ||
2114 (rPDG<-7 && (qPDG==(-rPDG)/10 || qPDG==(-rPDG)%10) ) ||
2115 (qPDG<-7 && (rPDG==(-qPDG)/10 || rPDG==(-qPDG)%10) )
2119 ( ( LS==2 && PLS==4 &&
2120 (aPDG> 7 && (-dPDG == aPDG/10 || -dPDG == aPDG%10) ) &&
2121 (rPDG<-7 && (qPDG==(-rPDG)/10 || qPDG==(-rPDG)%10) )
2123 ( LS==4 && PLS==2 &&
2124 (dPDG> 7 && (-aPDG == dPDG/10 || -aPDG == dPDG%10) ) &&
2125 (qPDG<-7 && (rPDG==(-qPDG)/10 || rPDG==(-qPDG)%10) )
2128 ( LS==3 && PLS==3 &&
2129 ( (aPDG> 7 && (-dPDG == aPDG/10 || -dPDG == aPDG%10) &&
2130 qPDG<-7 && (rPDG==(-qPDG)/10 || rPDG==(-qPDG)%10)
2132 (dPDG> 7 && (-aPDG == dPDG/10 || -aPDG == dPDG%10) &&
2133 rPDG<-7 && (dPDG==(-rPDG)/10 || dPDG==(-rPDG)%10)
2143 G4cout<<
"G4QIonIonCollision::Breeder: StringCand#"<<restr<<
", q="<<rPDG
2144 <<
", a="<<aPDG<<
", L="<<uPDG<<
", R="<<mPDG<<
",dV="<<dV<<
G4endl;
2157 G4cout<<
"-G4QIonIonCollision::Breed:Reduced #"<<astring<<
" & #"<<restr<<
G4endl;
2165 G4cout<<
"G4QInel::Breeder: StPartner#"<<fustr<<
", LT="<<
LT<<
",RT="<<RT<<
G4endl;
2174 if(aPDG<-99 || (aPDG>0 && aPDG<7) || rPDG>99 || (rPDG<0 && rPDG>-7))
2180 if(aPDG > 99) aPDG/=100;
2181 if(rPDG <-99) rPDG=-(-rPDG)/100;
2188 G4cout<<
"G4QIonIonCollision::Breeder:BeforeFuDir,sL="<<sPDG<<
",nR="<<nPDG
2189 <<
",uL="<<uPDG<<
",mR="<<mPDG<<
",L4M="<<L4M<<
",R4M="<<R4M<<
G4endl;
2198 if ( (uPDG<0 || nPDG<0) && -uPDG==nPDG ) Left->
SetPDGCode(sPDG);
2199 else if( (mPDG<0 || sPDG<0) && -mPDG==sPDG ) Right->
SetPDGCode(nPDG);
2200 else if( (uPDG<0 || sPDG<0) && -uPDG==sPDG ) Left->
SetPDGCode(nPDG);
2201 else if( (mPDG<0 || nPDG<0) && -mPDG==nPDG ) Right->
SetPDGCode(sPDG);
2211 <<
",S="<<L4M+PL4M+R4M+PR4M<<
", L="<<Left->
Get4Momentum()<<
", R="
2215 else if(fusionDONE<0)
2223 <<
",S="<<L4M+PL4M+R4M+PR4M<<
", L="<<Left->
Get4Momentum()<<
", R="
2228 else G4cout<<
"-Warning-G4QIonIonCollision::Breeder: WrongStringFusion"<<
G4endl;
2231 G4cout<<
"#EMC#G4QIonIonCollision::Breed:StringFused,F="<<fusionDONE<<
",L="<<L4M
2232 <<
",R="<<R4M<<
",pL="<<PL4M<<
",pR="<<PR4M<<
",nL="<<Left->
Get4Momentum()
2238 G4cout<<
"###G4QIonIonCollision::Breed: Str#"<<astring<<
" fused/w Str#"<<fustr
2256 G4int nHadr=theResult->size();
2263 while( (nHadr=theResult->size()) && !theHadrons)
2266 for(
G4int i=0; i<nHadr; i++)
2269 G4int hPDG=(*theResult)[i]->GetPDGCode();
2271 G4cout<<
"-EMC-G4QInel::Breed:H#"<<i<<
",4M="<<h4M<<hQC<<
",PDG="<<hPDG<<
G4endl;
2289 for (
G4int reh=0; reh < nHadr; reh++)
2296 G4cout<<
"G4QIonIonCollision::Breeder: Hadron # "<<reh<<
", QC="<<curQC
2297 <<
", P1="<<partPDG1<<
", P2="<<partPDG2<<
G4endl;
2299 if(partPDG1 || partPDG2)
2302 if(sumT>3 && partPDG1 && partPDG2) cCur=2;
2304 G4double M2=(cString4M+curHadr4M).m2();
2306 G4cout<<
"G4QIonIonCollision::Breeder:*IN*Hadron#"<<reh<<
",M2="<<M2<<
G4endl;
2308 if( (sumT<4 || cCur>=cMax) && M2 > maM2)
2328 G4cout<<
"G4QInel::Br:*Selected*,P1="<<partPDG1<<
",P2="<<partPDG2<<
G4endl;
2336 G4cout<<
"G4QIonIonCollision::Breeder: fuh="<<fuhad<<
",fus="<<fusDONE<<
G4endl;
2345 if(secPDG && cMax>1)
2348 G4cout<<
"G4QInel::Br:TryReduce, nPDG="<<newPDG<<
",sPDG="<<secPDG<<
G4endl;
2354 <<
", L4M="<<newLeft<<
", R4M="<<cRight->
Get4Momentum()<<
", h4M="
2365 <<
", L4M="<<cLeft->
Get4Momentum()<<
", R4M="<<newRight<<
", h4M="
2370 else G4cout<<
"-G4QIonIonCollision::Breed: Wrong String+HadronFusion"<<
G4endl;
2373 if(fusDONE)
G4cout<<
"####G4QIonIonCollision::Breeder: String #"<<astring
2374 <<
" is fused with Hadron #"<<fuhad
2393 G4cout<<
"G4QIonIonCollision::Breed: before HR, nH="<<theResult->size()<<
G4endl;
2396 G4QHadronVector::iterator ih;
2400 for(ih = theResult->begin(); ih != theResult->end(); ih++)
2403 G4cout<<
"G4QInelast::Breeder:#"<<icon<<
", i="<<(*ih)<<
", sH="<<selHP<<
G4endl;
2418 G4cout<<
"-EMC->>>G4QIonIonCollision::Breed: S+=H, 4M="<<curString4M<<
", M="
2419 <<curString4M.
m()<<
", Charge="<<curStrChg<<
", B="<<curStrBaN<<
G4endl;
2422 theResult->erase(ih);
2430 if(!found)
G4cout<<
"*G4QIonIonCollision::Breed:nH="<<theResult->size()<<
G4endl;
2435 G4cout<<
"G4QInel::Breeder: tH="<<theHadrons<<
",nH="<<theResult->size()<<
G4endl;
2439 G4cout<<
"*G4QIonIonCollision::Breed: *CanTryToDecay?* nH="<<theHadrons<<
", next="
2440 <<next<<
" =? nS="<<strings.size()<<
", nR="<<theResult->size()<<
G4endl;
2442 if(!theHadrons && next == strings.size() && !(theResult->size()))
2458 if(std::fabs(ttM-h1M-h2M)<=eps)
2461 h14M=part1*curString4M;
2462 h24M=curString4M-h14M;
2468 G4cerr<<
"***G4QIonIonCollision::Breeder: tM="<<ttM<<
"->h1="<<h1QPDG
2469 <<
"("<<h1M<<
")+h2="<<h1QPDG<<
"("<<h2M<<
")="<<h1M+h2M<<
G4endl;
2474 theResult->push_back(h1H);
2480 G4cout<<
"-EMC->>G4QIonIonCollision::Breed:String=HadrChiPro1's filled,f4M="
2481 <<f4M<<
", fPDG="<<fPD<<
", fCg="<<fCg<<
", fBN="<<fBN<<
G4endl;
2484 theResult->push_back(h2H);
2490 G4cout<<
"-EMC->>G4QIonIonCollision::Breed:String=HadrChiPro2's filled,s4M="
2491 <<s4M<<
", sPDG="<<sPD<<
", sCg="<<sCg<<
", sBN="<<sBN<<
G4endl;
2494 G4cout<<
"-EMC-..Chi..G4QIonIonCollision::Breeder: DecayCHECK, Ch4M="
2495 <<curString4M<<
", d4M="<<curString4M-h14M-h24M<<
G4endl;
2502 theQuasmons.push_back(stringQuasmon);
2508 if (miPDG>0 && miPDG%10 < 3) miPDG+=2;
2509 else if(miPDG<0 && (-miPDG)%10< 3) miPDG-=2;
2513 G4int tmpN=tmpQHadVec->size();
2515 G4cout<<
"G4QIonIonCollision::Breeder: Decay the Last, Res#H="<<tmpN<<
G4endl;
2519 for(
G4int aH=0; aH < tmpN; aH++)
2521 theResult->push_back((*tmpQHadVec)[aH]);
2528 G4cout<<
"-EMC->>G4QIonIonCollis::Breed:String=Hadr,H#"<<aH<<
" filled,4M="
2529 <<p4M<<
", PDG="<<PDG<<
", Chg="<<Chg<<
", BaN="<<BaN<<
G4endl;
2537 G4cout<<
"G4QIonIonCollision::Breeder:==> to Quasm="<<miQC<<curString4M
2538 <<
", pNuc="<<theProjNucleus<<theProjNucleus.
Get4Momentum()<<
", tNuc="
2539 <<theTargNucleus<<theTargNucleus.
Get4Momentum()<<
", NString="
2540 <<strings.size()<<
", nR="<<theResult->size()<<
", nQ="
2541 <<theQuasmons.size()<<
G4endl;
2543 theQuasmons.push_back(stringQuasmon);
2545 tmpQHadVec->clear();
2549 tmpQHadVec->clear();
2558 G4cout<<
"G4QIonIonCollision::Breeder: theH="<<theHadrons<<
"?=0, next="<<next<<
G4endl;
2560 if(!theHadrons && next < strings.size())
2566 G4cout<<
">>>G4QIonIonCollision::Breeder: SQC="<<miQC<<
", miSPDG="<<miPDG<<
G4endl;
2577 G4cout<<
">>>G4QIonIonCollision::Breeder: minMass="<<miM<<
", realM2="<<cM2<<
G4endl;
2583 if(std::fabs(cM-miM) < eps)
2588 theResult->push_back(sHad);
2590 G4cout<<
">>>G4QIonIonCollision::Breeder:S->H="<<miPDG<<curString4M<<
G4endl;
2604 theResult->push_back(h1H);
2610 G4cout<<
"-EMC->>G4QIonIonCollision::Breed:Str=2HadrAR Prod-F is filled, f4M="
2611 <<f4M<<
", fPDG="<<fPD<<
", fCg="<<fCg<<
", fBN="<<fBN<<
G4endl;
2614 theResult->push_back(h2H);
2620 G4cout<<
"-EMC->>G4QIonIonCollision::Breed:Str=2HadrAR Prod-S is filled, s4M="
2621 <<s4M<<
", sPDG="<<sPD<<
", sCg="<<sCg<<
", sBN="<<sBN<<
G4endl;
2639 G4cout<<
"G4QIonIonCollision::Breeder: TryRecover, cV="<<curV<<
G4endl;
2641 nOfStr=strings.size();
2642 for(restr=next; restr < nOfStr; ++restr)
if(restr != astring)
2653 if(D >= 0. && pM2>.01) x=(std::sqrt(D)-D2)/pM2;
2655 else G4cout<<
"G4QIonIonCollis::Breed:D="<<D<<
",D2="<<D2<<
",dM="<<dM4<<
G4endl;
2656 G4cout<<
"G4QIonIonCollision::Breed: pM2="<<pM2<<
",D2="<<D2<<
",x="<<x<<
G4endl;
2658 if(x > 0. && x < 1.)
2671 if(delta > 0. && delta > maD)
2675 G4cout<<
"G4QIonIonCollision::Breed: Subtr,S#"<<restr<<
",d="<<maD<<
G4endl;
2689 G4cout<<
"G4QIonIonCollision::Breed: FreeAdd,S#"<<restr<<
",x="<<x<<
G4endl;
2698 G4cout<<
"G4QIonIonCollision::Breed:EndOfLOOP r="<<restr<<
"<"<<nOfStr<<
G4endl;
2702 G4cout<<
"G4QIonIonCollision::Breeder: AfterLOOP fustr="<<fustr<<
G4endl;
2708 G4cout<<
"G4QIonIonCollision::Breeder: Found Sum4M="<<sum4M<<
G4endl;
2711 curString4M+=selX*s4M;
2712 if(std::abs(miPDG)%10 > 2)
2718 G4cout<<
"G4QIonIonCollision::Breed:DecStH,nH="<<tmpQHadVec->size()<<
G4endl;
2720 for(
unsigned aH=0; aH < tmpQHadVec->size(); aH++)
2722 theResult->push_back((*tmpQHadVec)[aH]);
2729 G4cout<<
"-EMC->>G4QIonIonCollision::Breed:St=Had,pH#"<<aH<<
" filled, 4M="
2730 <<p4M<<
", PDG="<<PDG<<
", Chg="<<Chg<<
", BaN="<<BaN<<
G4endl;
2733 tmpQHadVec->clear();
2736 else if(miPDG == 10)
2748 if(std::fabs(ttM-h1M-h2M)<=eps)
2751 h14M=part1*curString4M;
2752 h24M=curString4M-h14M;
2758 G4cerr<<
"***G4QIonIonCollision::Breeder: tM="<<ttM<<
"->h1="<<h1QPDG
2759 <<
"("<<h1M<<
")+h2="<<h1QPDG<<
"("<<h2M<<
")="<<h1M+h2M<<
G4endl;
2764 theResult->push_back(h1H);
2770 G4cout<<
"-EMC->>>G4QIonIonCollision::Breed:Str=Hadr Prod-F's filled,f4M="
2771 <<f4M<<
", fPDG="<<fPD<<
", fCg="<<fCg<<
", fBN="<<fBN<<
G4endl;
2774 theResult->push_back(h2H);
2780 G4cout<<
"-EMC->>>G4QIonIonCollision::Breed:Str=Hadr Prod-S's filled,s4M="
2781 <<s4M<<
", sPDG="<<sPD<<
", sCg="<<sCg<<
", sBN="<<sBN<<
G4endl;
2784 G4cout<<
"-EMC-Chipo.G4QIonIonCollision::Breed:DecCHECK,c4M="<<curString4M
2785 <<
", ChQC="<<miQC<<
", d4M="<<curString4M-h14M-h24M<<
G4endl;
2790 G4cerr<<
"***G4QInel::Breeder: tM="<<ttM<<miQC<<
"->h1="<<h1QPDG<<
"(" <<h1M
2791 <<
")+h2="<<h1QPDG<<
"("<<h2M<<
") = "<<h1M+h2M<<
G4endl;
2798 theResult->push_back(sHad);
2800 G4cout<<
"-EMC->>>G4QIonIonCollision::Breeder:Str=Hadr Filled, 4M="
2801 <<curString4M<<
", PDG="<<miPDG<<
G4endl;
2810 G4cout<<
"-EMC-...Cor...G4QIonIonCollision::Breeder:CorCHECK Sum="<<sum4M
2811 <<
" =? "<<curString4M+pString->
Get4Momentum()<<
", M="<<miM<<
" ?= "
2815 G4cout<<
">>>G4QIonIonCollision::Breeder:*Corrected* String->Hadr="<<miPDG
2816 <<curString4M<<
" by String #"<<fustr<<
G4endl;
2824 else G4cerr<<
"***G4QIonIonCollision::Breed:**No SSCorrection**, next="<<next<<
G4endl;
2831 if (lPDGcS==3 && rPDGcS==-3)
2836 else if(lPDGcS==-3 && rPDGcS==3)
2842 G4int nofRH=theResult->size();
2844 G4cout<<
"G4QIonIonCollision::Breeder: theH="<<theHadrons<<
", #OfH="<<nofRH<<
G4endl;
2846 if(!theHadrons && nofRH)
2849 G4cerr<<
"!G4QIonIonCollision::Breeder:CanTrySHCor, nH="<<theResult->size()<<
G4endl;
2870 for (reha=next; reha < nofRH; reha++)
2877 if(tM2 >=
sqr(pM+miM+eps))
2898 if(std::fabs(sM-miM-spM)<=eps)
2908 G4cerr<<
"***G4QIonIonCollision::Breeder: *SH*, tM="<<sM<<
"->h1=("<<miPDG
2909 <<
")"<<miM<<
" + h2="<<spM<<
" = "<<miM+spM<<
G4endl;
2915 G4cout<<
"-EMC->...>G4QIonIonCollision::Breed: H# "<<fuha<<
" is updated, new4M="
2921 G4cerr<<
"***G4QInel::Breeder: HS Failed, tM="<<sM<<
"->h1M=("<<miPDG<<
")"<<miM
2922 <<
"+h2M="<<spM<<
" = "<<miM+spM<<
G4endl;
2925 if(std::abs(miPDG)%10 > 2)
2931 G4cout<<
"G4QInelast::Breeder: *HS* DecStrHad, nH="<<tmpQHadVec->size()<<
G4endl;
2933 for(
unsigned aH=0; aH < tmpQHadVec->size(); aH++)
2935 theResult->push_back((*tmpQHadVec)[aH]);
2942 G4cout<<
"-EMC->>>G4QIonIonCollision::Breed:Str+Hadr PrH#"<<aH<<
" filled, 4M="
2943 <<p4M<<
", PDG="<<PDG<<
", Chg="<<Chg<<
", BaN="<<BaN<<
G4endl;
2946 tmpQHadVec->clear();
2949 else if(miPDG == 10)
2961 if(std::fabs(ttM-h1M-h2M)<=eps)
2971 G4cerr<<
"***G4QIonIonCollision::Breeder: HS tM="<<ttM<<
"->h1="<<h1QPDG
2972 <<
"("<<h1M<<
")+h2="<<h1QPDG<<
"("<<h2M<<
")="<<h1M+h2M<<
G4endl;
2977 theResult->push_back(h1H);
2983 G4cout<<
"-EMC->>G4QIonIonCollision::Breed: CorStrHadr Prod-1 is filled, f4M="
2984 <<f4M<<
", fPDG="<<fPD<<
", fCg="<<fCg<<
", fBN="<<fBN<<
G4endl;
2987 theResult->push_back(h2H);
2993 G4cout<<
"-EMC->>>G4QIonIonCollision::Breed:CorStrHadr Prod-2 is filled, n4M="
2994 <<n4M<<
", nPDG="<<nPD<<
", nCg="<<nCg<<
", nBN="<<nBN<<
G4endl;
2997 G4cout<<
"-EMC-...HS-Chipo...G4QIonIonCollision::Breeder:DecCHECK, Ch4M="
2998 <<mi4M<<
", ChQC="<<miQC<<
", d4M="<<mi4M-h14M-h24M<<
G4endl;
3005 theResult->push_back(sHad);
3007 G4cout<<
">>..>>G4QIonIonCollision::Breeder: CorStr=Hadr is Filled, 4M="
3008 <<curString4M<<
", StPDG="<<miPDG<<
G4endl;
3012 G4cout<<
"-EMC-...Cor...G4QIonIonCollision::Breeder:StHadCor CHECK Sum="<<s4M
3016 G4cout<<
">>>G4QIonIonCollision::Breeder:*Corrected* String+Hadr="<<miPDG
3017 <<mi4M<<
" by Hadron #"<<reha<<
G4endl;
3024 G4cout<<
"-EMC->>>G4QIonIonCollision::Breeder: Str+Hadr Failed, 4M="<<curString4M
3025 <<
", PDG="<<miPDG<<
G4endl;
3031 theQuasmons.push_back(stringQuasmon);
3037 if(theHadrons) nHfin=theHadrons->size();
3042 G4int tnSt=strings.size();
3043 for(
G4int i=astring; i < tnSt; ++i)
3050 G4cout<<
"=--=>G4QIonIonCollision::Breed:S#"<<i<<
",4M="<<pS4M<<
",QC="<<pSQC<<
G4endl;
3054 G4cout<<
"==>G4QIonIonCollision::Breed:AllStrings are summed up in a Quasmon"<<
G4endl;
3057 theQuasmons.push_back(stringQuasmon);
3061 G4cout<<
"G4QIonIonCollision::Breeder: Trying to decay hadrons #ofHRes="<<nHfin<<
G4endl;
3063 for(
G4int aTrack=0; aTrack<nHfin; aTrack++)
3065 G4QHadron* curHadron=(*theHadrons)[aTrack];
3073 G4cout<<
">>...>>G4QIonIonCollision::Breeder:S#"<<astring<<
",H#"<<aTrack<<
",PDG="
3076 if(std::abs(hPDG)%10 > 2)
3080 G4cout<<
"G4QIonIonCollision::Breed:-DECAY'S DONE-,nH="<<tmpQHadVec->size()<<
G4endl;
3085 for(
unsigned aH=0; aH < tmpQHadVec->size(); aH++)
3087 theResult->push_back((*tmpQHadVec)[aH]);
3100 G4cout<<
"-EMC->.>>G4QIonIonCollision::Breed:Str*Filled, 4M="<<p4M<<
", PDG="<<PDG
3101 <<
", Chg="<<Chg<<
", BaN="<<BaN<<
G4endl;
3105 G4cout<<
"-EMC-.G4QIn::Br:Dec,r4M="<<curH4M<<
",rC="<<curHCh<<
",rB="<<curHBN<<
G4endl;
3107 tmpQHadVec->clear();
3112 theResult->push_back(curHadron);
3114 curString4M-=curH4M;
3119 G4cout<<
"-EMC->>..>>G4QIonIonCollision::Breeder: curH filled 4M="<<curH4M<<
",PDG="
3125 if(theHadrons)
delete theHadrons;
3127 G4cout<<
"-EMC-.......G4QIonIonCollision::Breeder: StringDecay CHECK, r4M="<<curString4M
3128 <<
", rChg="<<curStrChg<<
", rBaN="<<curStrBaN<<
G4endl;
3134 theResult->push_back(resPNuc);
3138 theResult->push_back(resTNuc);
3143 G4int nHadr=theResult->size();
3144 G4int nQuasm=theQuasmons.size();
3145 G4cout<<
"-EMCLS-G4QInel::Breeder: #ofHadr="<<nHadr<<
", #OfQ="<<nQuasm<<
", rPA="<<rp4M.
m()
3148 for(
G4int i=0; i<nHadr; i++)
3152 G4int hChg=(*theResult)[i]->GetCharge();
3154 G4int hBaN=(*theResult)[i]->GetBaryonNumber();
3156 G4cout<<
"-EMCLS-G4QIonIonCollision::Breeder: Hadron#"<<i<<
", 4M="<<hI4M<<
", PDG="
3157 <<(*theResult)[i]->GetPDGCode()<<
", C="<<hChg<<
", B="<<hBaN<<
G4endl;
3159 for(
G4int i=0; i<nQuasm; i++)
3163 G4int hChg=theQuasmons[i]->GetCharge();
3165 G4int hBaN=theQuasmons[i]->GetBaryonNumber();
3167 G4cout<<
"-EMCLS-G4QIonIonCollision::Breeder: Quasmon#"<<i<<
", 4M="<<hI4M<<
", C="<<hChg
3170 G4cout<<
"-EMCLS-G4QInel::Breed: LS r4M="<<s4M-totLS4M<<
",rC="<<rCh<<
",rB="<<rBN<<
G4endl;
3173 G4int nRes=theResult->size();
3176 G4QHadronVector::iterator ih;
3177 G4QHadronVector::iterator nih;
3178 G4QHadronVector::iterator mih;
3179 G4QHadronVector::iterator lst=theResult->end();
3185 for(ih = theResult->begin(); ih < theResult->end(); ++ih)
if(ih != lst)
3188 G4int hPDG=(*ih)->GetPDGCode();
3190 G4cout<<
"%->G4QIonIonCollision::Breeder: TRY hPDG="<<hPDG<<
", h4M="<<h4M<<
G4endl;
3192 if(hPDG>1111 && hPDG<3333)
3213 if(nfound && mfound && minMesEn+minBarEn < maxEn)
3215 G4QHadron* resNuc = (*theResult)[nRes-1];
3216 theResult->pop_back();
3218 G4QContent qQC=(*nih)->GetQC()+(*mih)->GetQC();
3219 maxEn -= minBarEn+minMesEn;
3221 G4cout<<
"%->G4QIonIonCollision::Breeder:Exclude,4M="<<(*nih)->Get4Momentum()
3222 <<
", & 4m="<<(*mih)->Get4Momentum()<<
G4endl;
3228 theResult->erase(nih);
3229 theResult->erase(mih);
3233 theResult->erase(mih);
3234 theResult->erase(nih);
3237 G4cout<<
"%->G4QI::Breed: BeforeLOOP, dE="<<maxEn<<
", nR="<<theResult->size()<<
G4endl;
3241 for(ih = theResult->begin(); ih < theResult->end(); ih++)
3244 G4int hPDG=(*ih)->GetPDGCode();
3246 if (hPDG> 1111 && hPDG<3333) dE=h4M.
e()-(*ih)->GetMass();
3247 else if(hPDG>-1111) dE=h4M.
e();
3253 qQC+=(*ih)->GetQC();
3255 G4cout<<
"%->G4QIonIonCollision::Breed:Exclude,4M="<<h4M<<
",dE="<<maxEn<<
G4endl;
3258 theResult->erase(ih);
3265 G4cout<<
"%->G4QIonIonCollision::Breed:QuasmonIsFilled,4M="<<q4M<<
",QC="<<qQC<<
G4endl;
3267 theQuasmons.push_back(softQuasmon);
3268 theResult->push_back(resNuc);
3274 G4int nHd=theResult->size();
3275 G4int nQm=theQuasmons.size();
3276 G4cout<<
"-EMCLS-G4QIonIonCollision::Breeder:#ofHadr="<<nHd<<
", #OfQ="<<nQm
3279 for(
G4int i=0; i<nHd; i++)
3283 G4int hChg=(*theResult)[i]->GetCharge();
3285 G4int hBaN=(*theResult)[i]->GetBaryonNumber();
3287 G4cout<<
"-EMCLS-G4QIonIonCollision::Breeder: Hadron#"<<i<<
", 4M="<<hI4M<<
", PDG="
3288 <<(*theResult)[i]->GetPDGCode()<<
", C="<<hChg<<
", B="<<hBaN<<
G4endl;
3290 for(
G4int i=0; i<nQm; i++)
3294 G4int hChg=theQuasmons[i]->GetCharge();
3296 G4int hBaN=theQuasmons[i]->GetBaryonNumber();
3298 G4cout<<
"-EMCLS-G4QIonIonCollision::Breeder: Quasmon#"<<i<<
", 4M="<<hI4M<<
", C="
3299 <<hChg<<
", B="<<hBaN<<
G4endl;
3301 G4cout<<
"-EMCLS-G4QInel::Breed:, r4M="<<f4M-totLS4M<<
", rC="<<fCh<<
",rB="<<fBN<<
G4endl;
3313 G4double Mprojectile2=Mprojectile*Mprojectile;
3318 G4cout<<
"G4QInel::ExciteDiffPartici: Ep="<<Pprojectile.
e()<<
", Et="<<Ptarget.
e()<<
G4endl;
3327 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipants:*1* abort Collision!! *1*"<<
G4endl;
3334 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipantts:BeforBoost Pproj="<<Pprojectile
3335 <<
",Ptarg="<<Ptarget<<
G4endl;
3341 G4cout<<
"G4QInelast::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<
",Ptarg="
3342 <<Ptarget<<
", cms4M="<<Pprojectile+Ptarget<<
G4endl;
3343 G4cout<<
"G4QIonIonCollis::ExciteDiffParticipants:ProjX+="<<Pprojectile.
plus()<<
",ProjX-="
3349 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipants: Before DO"<<
G4endl;
3356 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipants: maxPtSq="<<maxPtSquare<<
G4endl;
3357 if(whilecount++>=500 && whilecount%100==0)
3358 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipantts: can loop, loopCount="<<whilecount
3359 <<
", maxPtSquare="<<maxPtSquare<<
G4endl;
3364 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipants: *2* abort Loop!! *2*"<<
G4endl;
3370 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipants: generated Pt="<<Qmomentum
3371 <<
", ProjPt="<<Pprojectile+Qmomentum<<
", TargPt="<<Ptarget-Qmomentum<<
G4endl;
3379 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipant:X+="<<Xplus<<
",X-="<<Xminus<<
G4endl;
3384 Qmomentum.
setPz((Qplus-Qminus)/2);
3385 Qmomentum.
setE( (Qplus+Qminus)/2);
3387 G4cout<<
"G4QInelast::ExciteDiffParticip: Qplus="<<Qplus<<
", Qminus="<<Qminus<<
", pt2="
3388 <<pt2<<
", Qmomentum="<<Qmomentum<<
", ProjM="<<(Pprojectile+Qmomentum).mag()
3389 <<
", TargM="<<(Ptarget-Qmomentum).mag()<<
G4endl;
3391 }
while((Pprojectile+Qmomentum).mag2()<=Mprojectile2 ||
3392 (Ptarget-Qmomentum).mag2()<=Mtarget2);
3393 Pprojectile += Qmomentum;
3394 Ptarget -= Qmomentum;
3396 G4cout<<
"G4QInelast::ExciteDiffParticipan: Proj(Q)="<<Pprojectile<<
", Targ(Q)="<<Ptarget
3397 <<
", Proj(back)="<<toLab*Pprojectile<<
", Targ(bac)="<< toLab*Ptarget <<
G4endl;
3403 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipants:TargetMass="<<Ptarget.
mag()<<
G4endl;
3407 G4cout<<
"G4QIonIonCollision::ExciteDiffParticipant:ProjMass="<<Pprojectile.
mag()<<
G4endl;
3420 G4double Mprojectile2=Mprojectile*Mprojectile;
3425 G4cout<<
"G4QInel::ExSingDiffPartici: Ep="<<Pprojectile.
e()<<
", Et="<<Ptarget.
e()<<
G4endl;
3432 G4cout<<
"-1/2-G4QIonIonCollision::ExSingDiffParticipants: Projectile is fixed"<<
G4endl;
3434 Mprojectile2 = projectile->
GetMass2()*(1.-perCent);
3439 G4cout<<
"---1/2---G4QIonIonCollision::ExSingDiffParticipants: Target is fixed"<<
G4endl;
3441 Mtarget2 = target->
GetMass2()*(1.-perCent);
3451 G4cout<<
"G4QIonIonCollision::ExciteSingDiffParticipants: *1*abortCollision*1*"<<
G4endl;
3458 G4cout<<
"G4QInel::ExciteSingDiffParticipantts: Be4Boost Pproj="<<Pprojectile<<
", Ptarg="
3465 G4cout<<
"G4QInelast::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<
"Ptarg="
3466 <<Ptarget<<
", cms4M="<<Pprojectile+Ptarget<<
G4endl;
3468 G4cout<<
"G4QInelast::ExciteDiffParticipantts: ProjX+="<<Pprojectile.
plus()<<
", ProjX-="
3469 <<Pprojectile.
minus()<<
", TargX+="<< Ptarget.
plus()<<
", TargX-="<<Ptarget.
minus()
3478 if(whilecount++>=500 && whilecount%100==0)
3480 G4cout<<
"G4QIonIonCollision::ExciteSingDiffParticipantts: can loop, loopCount="
3481 <<whilecount<<
", maxPtSquare="<<maxPtSquare<<
G4endl;
3486 G4cout<<
"G4QIonIonCollision::ExciteSingDiffParticipants:*2* abortLoop!! *2*"<<
G4endl;
3492 G4cout<<
"G4QInelast::ExciteSingDiffParticipants: generated Pt="<<Qmomentum
3493 <<
", ProjPt="<<Pprojectile+Qmomentum<<
", TargPt="<<Ptarget-Qmomentum<<
G4endl;
3501 G4cout<<
"G4QInel::ExciteSingDiffPartici: X-plus="<<Xplus<<
", X-minus="<<Xminus<<
G4endl;
3507 Qminus=(projectile->
GetMass2()+pt2)/(Pprojectile.
plus()+Qplus) - Pprojectile.
minus();
3509 Qmomentum.
setPz((Qplus-Qminus)/2);
3510 Qmomentum.
setE( (Qplus+Qminus)/2);
3512 G4cout<<
"G4QInel::ExciteDiffParticip: Qplus="<<Qplus<<
", Qminus="<<Qminus<<
", pt2="
3513 <<pt2<<
", Qmomentum="<<Qmomentum<<
", ProjM="<<(Pprojectile+Qmomentum).mag()
3514 <<
", TargM="<<(Ptarget-Qmomentum).mag()<<
G4endl;
3519 }
while((Ptarget-Qmomentum).mag2()<=Mtarget2 ||
3520 (Pprojectile+Qmomentum).mag2()<=Mprojectile2 ||
3521 (Ptarget-Qmomentum).e() < 0. || (Pprojectile+Qmomentum).e() < 0.);
3522 Pprojectile += Qmomentum;
3523 Ptarget -= Qmomentum;
3525 G4cout<<
"G4QIonIonCollision::ExciteSingDiffParticipan: Proj(Q)="<<Pprojectile<<
"(E="
3526 <<Pprojectile.
e()<<
"), Targ(Q)="<<Ptarget<<
"(E="<<Ptarget.
e()
3527 <<
"), Proj(back)="<<toLab*Pprojectile<<
", Targ(bac)="<< toLab*Ptarget <<
G4endl;
3533 G4cout<<
"G4QIonIonCollision::ExciteSingleDiffParticipants: TgM="<<Ptarget.
mag()<<
G4endl;
3537 G4cout<<
"G4QIonIonCollision::ExciteSingleParticipants:ProjM="<<Pprojectile.
mag()<<
G4endl;
3546 stringTension = stT;
3548 widthOfPtSquare = -2*SigPt*SigPt;
3555 if(Xmax == Xmin)
return Xmin;
3556 if( Xmin < 0. || Xmax < Xmin)
3558 G4cerr<<
"***G4QIonIonCollision::ChooseX: Xmin="<<Xmin<<
", Xmax="<<Xmax<<
G4endl;
3566 G4cout<<
"G4QIonIonCollision::ChooseX: DiffractiveX="<<x<<
G4endl;
3575 G4cout<<
"G4QIonIonCollision::GaussianPt: w^2="<<widthSq<<
",maxPt2="<<maxPtSquare<<
G4endl;
3579 if(rm>-.01) pt2=widthSq*(std::sqrt(1.-
G4UniformRand()*(1.-
sqr(1.+rm)))-1.);
3580 else pt2=widthSq*std::log(1.-
G4UniformRand()*(1.-std::exp(rm)));
3583 return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.);
3588 if (PDG1 < 7 && PDG1 > 0 && PDG2 < 7 && PDG2 > 0)
3590 if(PDG1 > PDG2)
return PDG1*1000+PDG2*100+1;
3591 else return PDG2*1000+PDG1*100+1;
3593 else if (PDG1 >-7 && PDG1 < 0 && PDG2 >-7 && PDG2 < 0)
3595 if(-PDG1 > -PDG2)
return PDG1*1000+PDG2*100-1;
3596 else return PDG2*1000+PDG1*100-1;
3598 else if (PDG1 <-99 && PDG2 < 7 && PDG2 > 0)
3600 G4int PDG=-PDG1/100;
3601 if(PDG2==PDG/10)
return -PDG%10;
3602 if(PDG2==PDG%10)
return -PDG/10;
3605 G4cerr<<
"***4QFragmentation::SumPartonPDG: PDG1="<<PDG1<<
", PDG2="<<PDG2<<
G4endl;
3609 else if (PDG2 <-99 && PDG1 < 7 && PDG1 > 0)
3611 G4int PDG=-PDG2/100;
3612 if(PDG1==PDG/10)
return -PDG%10;
3613 if(PDG1==PDG%10)
return -PDG/10;
3616 G4cerr<<
"***4QFragmentation::SumPartonPDG: PDG1="<<PDG1<<
", PDG2="<<PDG2<<
G4endl;
3620 else if (PDG1 > 99 && PDG2 >-7 && PDG2 < 0)
3623 if(PDG2==-PDG/10)
return PDG%10;
3624 if(PDG2==-PDG%10)
return PDG/10;
3627 G4cerr<<
"***4QFragmentation::SumPartonPDG: PDG1="<<PDG1<<
", PDG2="<<PDG2<<
G4endl;
3631 else if (PDG2 > 99 && PDG1 >-7 && PDG1 < 0)
3634 if(PDG1==-PDG/10)
return PDG%10;
3635 if(PDG1==-PDG%10)
return PDG/10;
3638 G4cerr<<
"***G4QIonIonCollision::SumPartonPDG: PDG1="<<PDG1<<
", PDG2="<<PDG2<<
G4endl;
3644 G4cerr<<
"***G4QIonIonCollision::SumPartonPDG: PDG1="<<PDG1<<
", PDG2="<<PDG2<<
G4endl;
3654 G4cout<<
"G4QIonIonCollision::ReducePair: **Called** P1="<<P1<<
", P2="<<P2<<
G4endl;
3660 if (P11==P21)
return std::make_pair(P12,P22);
3661 else if(P11==P22)
return std::make_pair(P12,P21);
3662 else if(P12==P21)
return std::make_pair(P11,P22);
3663 else if(P12==P22)
return std::make_pair(P11,P21);
3665 G4cout<<
"-Warning-G4QIonIonCollision::ReducePair:**Failed**,P1="<<P1<<
",P2="<<P2<<
G4endl;
3667 return std::make_pair(0,0);
3676 if (LS==2 && MPS==2 )
3679 G4cout<<
"G4QIonIonCollision::AnnihilationOrder:QaQ/QaQ->DiQ-aDiQ, uPDG="<<uPDG<<
G4endl;
3681 if ( (uPDG>0 && sPDG>0 && mPDG<0 && nPDG<0) ||
3682 (uPDG<0 && sPDG<0 && mPDG>0 && nPDG>0) ) Ord= 1;
3683 else if( (uPDG>0 && nPDG>0 && mPDG<0 && sPDG<0) ||
3684 (uPDG<0 && nPDG<0 && mPDG>0 && sPDG>0) ) Ord=-1;
3685 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong 22 fusion, L="
3686 <<uPDG<<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3688 else if ( LS==2 && MPS==3 )
3693 G4cout<<
"G4QIonIonCollision::AnnihOrder:pLDiQ, sPDG="<<sPDG<<
", nPDG="<<nPDG<<
G4endl;
3695 if ( sPDG<0 && (-sPDG==uPDG/1000 || -sPDG==(uPDG/100)%10) ) Ord= 1;
3696 else if( nPDG<0 && (-nPDG==uPDG/1000 || -nPDG==(uPDG/100)%10) ) Ord=-1;
3697 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong pLDiQ, L="<<uPDG
3698 <<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3703 G4cout<<
"G4QIonIonCollision::AnnihOrder:pRDiQ, sPDG="<<sPDG<<
", nPDG="<<nPDG<<
G4endl;
3705 if ( sPDG<0 && (-sPDG==mPDG/1000 || -sPDG==(mPDG/100)%10) ) Ord=-1;
3706 else if( nPDG<0 && (-nPDG==mPDG/1000 || -nPDG==(mPDG/100)%10) ) Ord= 1;
3707 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong pRDiQ, L="<<uPDG
3708 <<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3713 G4cout<<
"G4QIonIonCollision::AnnihOrder:pLaDiQ, sPDG="<<sPDG<<
",nPDG="<<nPDG<<
G4endl;
3715 if ( sPDG>0 && (sPDG==(-uPDG)/1000 || sPDG==((-uPDG)/100)%10) ) Ord= 1;
3716 else if( nPDG>0 && (nPDG==(-uPDG)/1000 || nPDG==((-uPDG)/100)%10) ) Ord=-1;
3717 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong pLaDiQ, L="<<uPDG
3718 <<
", R="<<mPDG<<
", cL="<<sPDG<<
", cR="<<nPDG<<
G4endl;
3723 G4cout<<
"G4QIonIonCollision::AnnihOrder:pRaDiQ, sPDG="<<sPDG<<
",nPDG="<<nPDG<<
G4endl;
3725 if ( sPDG>0 && (sPDG==(-mPDG)/1000 || sPDG==((-mPDG)/100)%10) ) Ord=-1;
3726 else if( nPDG>0 && (nPDG==(-mPDG)/1000 || nPDG==((-mPDG)/100)%10) ) Ord= 1;
3727 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong pRaDiQ, L="<<uPDG
3728 <<
", R="<<mPDG<<
", cL="<<sPDG<<
", cR="<<nPDG<<
G4endl;
3730 else if( (sPDG<0 && (-sPDG==mPDG || -sPDG==uPDG) ) ||
3731 (nPDG<0 && (-nPDG==mPDG || -nPDG==uPDG) ) ) Ord= 2;
3733 else G4cout<<
"-Warning-G4QIonIonCollision::AnnihilatOrder:Wrong23StringFusion"<<
G4endl;
3734 G4cout<<
"G4QIonIonCollision::AnnihilationOrder: Ord="<<Ord<<
",sPDG="<<sPDG<<
",nPDG="
3735 <<nPDG<<
", uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3738 else if ( LS==3 && MPS==2 )
3743 G4cout<<
"G4QIonIonCollision::AnnihOrder:cLDiQ, uPDG="<<uPDG<<
", mPDG="<<mPDG<<
G4endl;
3745 if ( uPDG<0 && (-uPDG==sPDG/1000 || -uPDG==(sPDG/100)%10) ) Ord= 1;
3746 else if( mPDG<0 && (-mPDG==sPDG/1000 || -mPDG==(sPDG/100)%10) ) Ord=-1;
3747 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong cLDiQ, L="<<uPDG
3748 <<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3753 G4cout<<
"G4QIonIonCollision::AnnihOrder:cRDiQ, uPDG="<<uPDG<<
", mPDG="<<mPDG<<
G4endl;
3755 if ( uPDG<0 && (-uPDG==nPDG/1000 || -uPDG==(nPDG/100)%10) ) Ord=-1;
3756 else if( mPDG<0 && (-mPDG==nPDG/1000 || -mPDG==(nPDG/100)%10) ) Ord= 1;
3757 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong cRDiQ, L="<<uPDG
3758 <<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3763 G4cout<<
"G4QIonIonCollision::AnnihOrder:cLaDiQ, uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3765 if ( uPDG>0 && (uPDG==(-sPDG)/1000 || uPDG==((-sPDG)/100)%10) ) Ord= 1;
3766 else if( mPDG>0 && (mPDG==(-sPDG)/1000 || mPDG==((-sPDG)/100)%10) ) Ord=-1;
3767 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong cLaDiQ, L="<<uPDG
3768 <<
", R="<<mPDG<<
", cL="<<sPDG<<
", cR="<<nPDG<<
G4endl;
3773 G4cout<<
"G4QIonIonCollision::AnnihOrder:cRaDiQ, uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3775 if ( uPDG>0 && (uPDG==(-nPDG)/1000 || uPDG==((-nPDG)/100)%10) ) Ord=-1;
3776 else if( mPDG>0 && (mPDG==(-nPDG)/1000 || mPDG==((-nPDG)/100)%10) ) Ord= 1;
3777 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong cRaDiQ, L="<<uPDG
3778 <<
", R="<<mPDG<<
", cL="<<sPDG<<
", cR="<<nPDG<<
G4endl;
3780 else if( (uPDG<0 && (-uPDG==sPDG || -uPDG==nPDG) ) ||
3781 (mPDG<0 && (-mPDG==sPDG || -mPDG==nPDG) ) ) Ord=2;
3783 else G4cout<<
"-Warning-G4QIonIonCollision::AnnihilatOrder:Wrong32StringFusion"<<
G4endl;
3784 G4cout<<
"G4QIonIonCollision::AnnihilationOrder: Ord="<<Ord<<
",sPDG="<<sPDG<<
",nPDG="
3785 <<nPDG<<
", uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3788 else if ( (LS==2 && MPS==4) || (LS==4 && MPS==2) )
3793 G4cout<<
"G4QIonIonCollision::AnnihilOrder:pLDiQ,sPDG="<<sPDG<<
",nPDG="<<nPDG<<
G4endl;
3795 if ( sPDG<0 && (-sPDG==uPDG/1000 || -sPDG==(uPDG/100)%10) &&
3796 (nPDG==(-mPDG)/1000 || nPDG==((-mPDG)/100)%10) ) Ord= 1;
3797 else if( nPDG<0 && (-nPDG==uPDG/1000 || -nPDG==(uPDG/100)%10) &&
3798 (sPDG==(-mPDG)/1000 || sPDG==((-mPDG)/100)%10) ) Ord=-1;
3799 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong 24 pLDiQ, L="
3800 <<uPDG<<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3805 G4cout<<
"G4QIonIonCollision::AnnihilOrder:PRDiQ,sPDG="<<sPDG<<
",nPDG="<<nPDG<<
G4endl;
3807 if ( sPDG<0 && (-sPDG==mPDG/1000 || -sPDG==(mPDG/100)%10) &&
3808 (nPDG==(-uPDG)/1000 || nPDG==((-uPDG)/100)%10) ) Ord=-1;
3809 else if( nPDG<0 && (-nPDG==mPDG/1000 || -nPDG==(mPDG/100)%10) &&
3810 (sPDG==(-uPDG)/1000 || sPDG==((-uPDG)/100)%10) ) Ord= 1;
3811 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong 24 pLDiQ, L="
3812 <<uPDG<<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3817 G4cout<<
"G4QIonIonCollision::AnnihilOrder:cLDiQ,uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3819 if ( uPDG<0 && (-uPDG==sPDG/1000 || -uPDG==(sPDG/100)%10) &&
3820 (mPDG==(-nPDG)/1000 || mPDG==((-nPDG)/100)%10) ) Ord= 1;
3821 else if( mPDG<0 && (-mPDG==sPDG/1000 || -mPDG==(sPDG/100)%10) &&
3822 (uPDG==(-nPDG)/1000 || uPDG==((-nPDG)/100)%10) ) Ord=-1;
3823 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong 24 cLDiQ, L="
3824 <<uPDG<<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3829 G4cout<<
"G4QIonIonCollision::AnnihilOrder:cRDiQ,uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3831 if ( uPDG<0 && (-uPDG==nPDG/1000 || -uPDG==(nPDG/100)%10) &&
3832 (mPDG==(-sPDG)/1000 || mPDG==((-sPDG)/100)%10) ) Ord=-1;
3833 else if( mPDG<0 && (-mPDG==nPDG/1000 || -mPDG==(nPDG/100)%10) &&
3834 (uPDG==(-sPDG)/1000 || uPDG==((-sPDG)/100)%10) ) Ord= 1;
3835 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong 24 cRDiQ, L="
3836 <<uPDG<<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3839 else G4cout<<
"-Warning-G4QIonIonCollision::AnnihilOrder: Wrong 24StringFusion"<<
G4endl;
3840 G4cout<<
"G4QIonIonCollision::AnnihilationOrder: Ord="<<Ord<<
",sPDG="<<sPDG<<
",nPDG="
3841 <<nPDG<<
", uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3844 else if ( LS==3 && MPS==3 )
3849 G4cout<<
"G4QIonIonCollision::AnnihilOrder:pLDiQ,sPDG="<<sPDG<<
",nPDG="<<nPDG<<
G4endl;
3851 if ( sPDG<-7 && (-nPDG==uPDG/1000 || -nPDG==(uPDG/100)%10) &&
3852 (mPDG==(-sPDG)/1000 || mPDG==((-sPDG)/100)%10) ) Ord=-1;
3853 else if( nPDG<-7 && (-sPDG==uPDG/1000 || -sPDG==(uPDG/100)%10) &&
3854 (mPDG==(-nPDG)/1000 || mPDG==((-nPDG)/100)%10) ) Ord= 1;
3855 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong 33 pLDiQ, L="
3856 <<uPDG<<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3861 G4cout<<
"G4QIonIonCollision::AnnihilOrder:pRDiQ,sPDG="<<sPDG<<
",nPDG="<<nPDG<<
G4endl;
3863 if ( sPDG<-7 && (-nPDG==mPDG/1000 || -nPDG==(mPDG/100)%10) &&
3864 (uPDG==(-sPDG)/1000 || uPDG==((-sPDG)/100)%10) ) Ord= 1;
3865 else if( nPDG<-7 && (-sPDG==mPDG/1000 || -sPDG==(mPDG/100)%10) &&
3866 (uPDG==(-nPDG)/1000 || uPDG==((-nPDG)/100)%10) ) Ord=-1;
3867 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong33pRDiQ, L="<<uPDG
3868 <<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3873 G4cout<<
"G4QIonIonCollision::AnnihilOrder:cLDiQ,uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3875 if ( uPDG<-7 && (-mPDG==sPDG/1000 || -mPDG==(sPDG/100)%10) &&
3876 (nPDG==(-uPDG)/1000 || nPDG==((-uPDG)/100)%10) ) Ord=-1;
3877 else if( mPDG<-7 && (-uPDG==sPDG/1000 || -uPDG==(sPDG/100)%10) &&
3878 (nPDG==(-mPDG)/1000 || nPDG==((-mPDG)/100)%10) ) Ord= 1;
3879 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong 33 cLDiQ, L="
3880 <<uPDG<<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3885 G4cout<<
"G4QIonIonCollision::AnnihilOrder:cRDiQ,uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3887 if ( uPDG<-7 && (-mPDG==nPDG/1000 || -mPDG==(nPDG/100)%10) &&
3888 (nPDG==(-uPDG)/1000 || nPDG==((-uPDG)/100)%10) ) Ord= 1;
3889 else if( mPDG<-7 && (-uPDG==nPDG/1000 || -sPDG==(nPDG/100)%10) &&
3890 (sPDG==(-mPDG)/1000 || sPDG==((-mPDG)/100)%10) ) Ord=-1;
3891 else G4cerr<<
"-Warning-G4QIonIonCollision::AnnihilationOrder: Wrong 33 cRDiQ, L="
3892 <<uPDG<<
",R="<<mPDG<<
",cL="<<sPDG<<
",cR="<<nPDG<<
G4endl;
3895 else G4cout<<
"-Warning-G4QIonIonCollision::AnnihilOrder: Wrong 33StringFusion"<<
G4endl;
3896 G4cout<<
"G4QIonIonCollision::AnnihilationOrder: Ord="<<Ord<<
",sPDG="<<sPDG<<
",nPDG="
3897 <<nPDG<<
", uPDG="<<uPDG<<
",mPDG="<<mPDG<<
G4endl;
3906 G4QStringVector::iterator ist;
3907 for(ist = strings.begin(); ist < strings.end(); ist++)
3913 G4QParton* cLeft=(*ist)->GetLeftParton();
3914 G4QParton* cRight=(*ist)->GetRightParton();
3921 G4QStringVector::iterator sst;
3922 G4QStringVector::iterator pst;
3925 for(pst = strings.begin(); pst < strings.end(); pst++)
if(pst != ist)
3927 G4QParton* pLeft=(*pst)->GetLeftParton();
3928 G4QParton* pRight=(*pst)->GetRightParton();
3937 if(((cLPDG<-7 || (cLPDG>0 && cLPDG< 7) ) && (pLPDG<-7 || (pLPDG>0 && pLPDG< 7) ))||
3938 ((cLPDG> 7 || (cLPDG<0 && cLPDG>-7) ) && (pLPDG> 7 || (pLPDG<0 && cLPDG>-7) )))
3942 if(pLM2>0. && cLM2>0.)
3945 if(cLT+pRT==3) pLM-=baryM;
3947 if(cRT+pLT==3) cLM-=baryM;
3948 LM=std::min(pLM2,cLM2);
3951 if(((cRPDG<-7 || (cRPDG>0 && cRPDG< 7) ) && (pRPDG<-7 || (pRPDG>0 && pRPDG< 7) ))||
3952 ((cRPDG> 7 || (cRPDG<0 && cRPDG>-7) ) && (pRPDG> 7 || (pRPDG<0 && cRPDG>-7) )) )
3956 if(pRM2>0. && cRM2>0.)
3959 if(cRT+pLT==3) pRM-=baryM;
3961 if(cLT+pRT==3) cRM-=baryM;
3962 RM=std::min(pRM,cRM);
3986 G4QParton* pLeft=(*sst)->GetLeftParton();
3987 G4QParton* pRight=(*sst)->GetRightParton();
3991 (*sst)->SetLeftParton(cLeft);
3992 (*ist)->SetLeftParton(swap);
3997 (*sst)->SetRightParton(cRight);
3998 (*ist)->SetRightParton(swap);
4002 else G4cout<<
"***G4QIonIonCollision::SwapPartons:**Failed**,cLPDG="<<cLPDG<<
",cRPDG="
4003 <<cRPDG<<
",-->cM2="<<cSM2<<
G4endl;
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4QHadron * > G4QHadronVector
std::vector< G4QInteraction * > G4QInteractionVector
std::vector< G4QPartonPair * > G4QPartonPairVector
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
double dot(const Hep3Vector &) const
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
HepLorentzVector & transform(const HepRotation &)
G4QParticle * GetQParticle(G4int PDG) const
static G4QCHIPSWorld * Get()
G4int GetSPDGCode() const
G4int AddParton(G4int pPDG) const
void AddQuasmon(G4Quasmon *Q)
G4QHadronVector * Fragment()
G4LorentzVector Get4Momentum() const
G4int GetBaryonNumber() const
void IncrementCollisionCount(G4int aCount)
G4QParton * GetNextParton()
G4bool DecayIn2(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom)
void Boost(const G4LorentzVector &theBoost)
const G4ThreeVector & GetPosition() const
std::list< G4QParton * > GetColor()
std::list< G4QParton * > GetAntiColor()
G4QParton * GetNextAntiParton()
G4double GetMass2() const
void Set4Momentum(const G4LorentzVector &aMom)
G4int GetNumberOfSoftCollisions()
void SetNumberOfSoftCollisions(G4int nofSoft)
G4QHadron * GetProjectile() const
G4QHadron * GetTarget() const
void SetTarget(G4QHadron *aTarget)
void SetNumberOfDINRCollisions(G4int nofDINR)
void SetNumberOfDiffractiveCollisions(G4int nofDiff)
G4QIonIonCollision(G4QNucleus &pNucleus, const G4QNucleus &tNucleus)
G4int AnnihilationOrder(G4int LS, G4int MS, G4int uP, G4int mP, G4int sP, G4int nP)
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const
G4bool ExciteSingDiffParticipants(G4QHadron *aPartner, G4QHadron *bPartner) const
G4bool IsSingleDiffractive()
std::pair< G4int, G4int > ReducePair(G4int P1, G4int P2) const
G4QHadronVector * Fragment()
static void SetParameters(G4int nC, G4double strTens, G4double tubeDens, G4double SigPt)
G4int SumPartonPDG(G4int PDG1, G4int PFG2) const
G4double ChooseX(G4double Xmin, G4double Xmax) const
G4bool ExciteDiffParticipants(G4QHadron *aPartner, G4QHadron *bPartner) const
void InitByPDG(G4int newPDG)
std::pair< G4double, G4double > ChooseImpactXandY(G4double maxImpact)
G4double GetOuterRadius()
void SubtractNucleon(G4QHadron *pNucleon)
void DoLorentzBoost(const G4LorentzVector &theBoost)
void DoLorentzRotation(const G4LorentzRotation &theLoRot)
G4QContent GetQCZNS() const
G4double GetThickness(G4double b)
G4LorentzVector GetNucleons4Momentum()
G4QHadron * GetNextNucleon()
G4double GetGSMass() const
std::pair< G4int, G4int > MakeTwoBaryons(G4int L1, G4int L2, G4int R1, G4int R2)
G4double MinMassOfFragm()
void SetPDGCode(G4int aPDG)
const G4int & GetType() const
const G4LorentzVector & Get4Momentum() const
void Set4Momentum(const G4LorentzVector &aMomentum)
G4bool ReduceDiQADiQ(G4QParton *d1, G4QParton *d2)
G4double GetPomDiffProbability(const G4double s_value, const G4double imp2)
G4double GetCutPomProbability(const G4double s, const G4double ip2, const G4int nPom)
G4double GetPomInelProbability(const G4double s_value, const G4double imp2)
G4QHadronVector * FragmentString(G4bool QL)
G4QParton * GetLeftParton() const
G4int GetDirection() const
G4LorentzVector Get4Momentum() const
G4int GetBaryonNumber() const
G4QParton * GetRightParton() const
void Boost(G4ThreeVector &Velocity)
void Set4Momentum(G4LorentzVector Q4M)
G4QHadronVector * DecayQHadron(G4QHadron *hadron)
void Boost(const G4LorentzVector &theBoost)
G4LorentzVector Get4Momentum() const
void SetQC(G4QContent QQC)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)