53G4double G4QHadron::StrangeSuppress = 0.48;
54G4double G4QHadron::sigmaPt = 1.7*GeV;
55G4double G4QHadron::widthOfPtSquare = 0.01*GeV*GeV;
57G4QHadron::G4QHadron(): theMomentum(0.,0.,0.,0.), theQPDG(0), valQ(0,0,0,0,0,0), nFragm(0),
58 thePosition(0.,0.,0.), theCollisionCount(0), isSplit(false), Direction(true),
59 Color(), AntiColor(), bindE(0.), formTime(0.) {}
62 nFragm(0), thePosition(0.,0.,0.), theCollisionCount(0), isSplit(false), Direction(true),
63 Color(), AntiColor(), bindE(0.), formTime(0.) {}
67 nFragm(0),thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true),
68 Color(), AntiColor(), bindE(0.), formTime(0.)
71 G4cout<<
"G4QHadron must be created with PDG="<<PDGCode<<
", 4M="<<p<<
G4endl;
78 else if(PDGCode>80000000) DefineQC(PDGCode);
79 else G4cerr<<
"***G4QHadron:(P) PDG="<<PDGCode<<
", use other constructor"<<
G4endl;
87 nFragm(0), thePosition(0.,0.,0.), theCollisionCount(0), isSplit(false), Direction(true),
88 Color(), AntiColor(), bindE(0.), formTime(0.)
98 if(cPDG>80000000) DefineQC(cPDG);
99 else G4cerr<<
"***G4QHadr:(QP) PDG="<<cPDG<<
" use other constructor"<<
G4endl;
105 nFragm(0), thePosition(0.,0.,0.), theCollisionCount(0), isSplit(false), Direction(true),
106 Color(), AntiColor(), bindE(0.), formTime(0.)
110 if(curPDG&&curPDG!=10) theQPDG.
SetPDGCode(curPDG);
115 theMomentum(0.,0.,0.,aMass), theQPDG(PDGCode), valQ(QC), nFragm(0),thePosition(0.,0.,0.),
116 theCollisionCount(0), isSplit(false), Direction(true), Color(), AntiColor(), bindE(0.),
121 theMomentum(0.,0.,0.,aMass), theQPDG(QPDG), valQ(QC), nFragm(0), thePosition(0.,0.,0.),
122 theCollisionCount(0), isSplit(false), Direction(true), Color(), AntiColor(), bindE(0.),
127 theQPDG(PDGCode), valQ(QC), nFragm(0), thePosition(0.,0.,0.), theCollisionCount(0),
128 isSplit(false), Direction(true), Color(), AntiColor(), bindE(0.), formTime(0.)
132 theQPDG(QPDG), valQ(QC), nFragm(0), thePosition(0.,0.,0.), theCollisionCount(0),
133 isSplit(false), Direction(true), Color(), AntiColor(), bindE(0.), formTime(0.)
137 theQPDG(pPart->GetQPDG()), nFragm(0), thePosition(0.,0.,0.), theCollisionCount(0),
138 isSplit(false), Direction(true), Color(), AntiColor(), bindE(0.), formTime(0.)
141 G4cout<<
"G4QHadron is created & randomized with maxM="<<maxM<<
G4endl;
144 if(PDGCode<2)
G4cerr<<
"***G4QHadron:(M) PDGC="<<PDGCode<<
" use other constructor"<<
G4endl;
152 theQPDG = right.theQPDG;
154 nFragm = right.nFragm;
155 thePosition = right.thePosition;
156 theCollisionCount = 0;
158 Direction = right.Direction;
160 formTime = right.formTime;
166 theQPDG = right->theQPDG;
168 nFragm = right->nFragm;
169 thePosition = right->thePosition;
170 theCollisionCount = 0;
172 Direction = right->Direction;
173 bindE = right->bindE;
174 formTime = right->formTime;
180 theQPDG = right->theQPDG;
182 nFragm = right->nFragm;
184 theCollisionCount = C;
186 Direction = right->Direction;
187 bindE = right->bindE;
188 formTime = right->formTime;
196 theQPDG = right.theQPDG;
198 nFragm = right.nFragm;
199 thePosition = right.thePosition;
200 theCollisionCount = 0;
202 Direction = right.Direction;
210 std::list<G4QParton*>::iterator ipos = Color.begin();
211 std::list<G4QParton*>::iterator epos = Color.end();
212 for( ; ipos != epos; ipos++) {
delete [] *ipos;}
215 ipos = AntiColor.begin();
216 epos = AntiColor.end();
217 for( ; ipos != epos; ipos++) {
delete [] *ipos;}
222void G4QHadron::DefineQC(
G4int PDGCode)
225 G4int szn=PDGCode-90000000;
231 G4int ns_value=(-szn)/1000000+1;
232 szn+=ns_value*1000000;
237 G4int nz=(-szn)/1000+1;
260 G4int Sq =sz/1000-ds;
264 if (Dq<0&&Uq<0&&Sq<0)valQ=
G4QContent(0 ,0 ,0 ,-Dq,-Uq,-Sq);
265 else if (Uq<0&&Sq<0) valQ=
G4QContent(Dq,0 ,0 ,0 ,-Uq,-Sq);
266 else if (Dq<0&&Sq<0) valQ=
G4QContent(0 ,Uq,0 ,-Dq,0 ,-Sq);
267 else if (Dq<0&&Uq<0) valQ=
G4QContent(0 ,0 ,Sq,-Dq,-Uq,0 );
268 else if (Uq<0) valQ=
G4QContent(Dq,0 ,Sq,0 ,-Uq,0 );
269 else if (Sq<0) valQ=
G4QContent(Dq,Uq,0 ,0 ,0 ,-Sq);
270 else if (Dq<0) valQ=
G4QContent(0 ,Uq,Sq,-Dq,0 ,0 );
281 G4cout<<
"G4QHadron::SetQPDG is called with PDGCode="<<PDG<<
", QCode="<<Q<<
G4endl;
284 else if(PDG>80000000) DefineQC(PDG);
290 ed <<
"Impossible QPDG Probably a Chipolino: QPDG=" << newQPDG <<
G4endl;
314 G4cerr<<
"G4QHadron::RelDecIn2: *Boost* E-p shift is corrected to "<<emodif<<
G4endl;
322 if(cdir.
e()+.001<cdir.
rho())
G4cerr<<
"*G4QH::RDIn2:*Boost* cd4M="<<cdir<<
",e-p="
328 G4cout<<
"G4QHad::RelDI2:dir="<<dir<<
",ltf="<<ltf<<
",cdir="<<cdir<<
",vdir="<<vdir<<
G4endl;
344 G4cout<<
"G4QHad::RelDecIn2:iM="<<iM<<
"=>fM="<<fM<<
"+sM="<<sM<<
",ob="<<vx<<vy<<vz<<
G4endl;
346 if(maxCost> 1.) maxCost= 1.;
347 if(minCost<-1.) minCost=-1.;
348 if(maxCost<-1.) maxCost=-1.;
349 if(minCost> 1.) minCost= 1.;
350 if(minCost> maxCost) minCost=maxCost;
351 if(fabs(iM-fM-sM)<.00000001)
359 else if (iM+.001<fM+sM || iM==0.)
361 G4cerr<<
"***G4QH::RelDecIn2: fM="<<fM<<
"+sM="<<sM<<
">iM="<<iM<<
",d="<<iM-fM-sM<<
G4endl;
365 G4double p2 = (d2*d2/4.-fM2*sM2)/iM2;
369 G4cout<<
"**G4QH:RDIn2:p2="<<p2<<
"<0,d2^2="<<d2*d2/4.<<
"<4*fM2*sM2="<<4*fM2*sM2<<
G4endl;
382 if(fabs(ct)<1.) ps = p * sqrt(1.-ct*ct);
386 G4cout<<
"**G4QH::RDIn2:ct="<<ct<<
",mac="<<maxCost<<
",mic="<<minCost<<
G4endl;
392 G4ThreeVector pVect=(ps*sin(phi))*vz+(ps*cos(phi))*vy+p*ct*vx;
394 G4cout<<
"G4QH::RelDIn2:ct="<<ct<<
",p="<<p<<
",ps="<<ps<<
",ph="<<phi<<
",v="<<pVect<<
G4endl;
398 f4Mom.
setE(sqrt(fM2+p2));
400 s4Mom.
setE(sqrt(sM2+p2));
403 G4cout<<
"G4QHadr::RelDecIn2:p2="<<p2<<
",v="<<ltb<<
",f4M="<<f4Mom<<
" + s4M="<<s4Mom<<
" = "
404 <<f4Mom+s4Mom<<
", M="<<iM<<
G4endl;
406 if(f4Mom.
e()+.001<f4Mom.
rho())
G4cerr<<
"*G4QH::RDIn2:*Boost* f4M="<<f4Mom<<
",e-p="
409 if(s4Mom.
e()+.001<s4Mom.
rho())
G4cerr<<
"*G4QH::RDIn2:*Boost* s4M="<<s4Mom<<
",e-p="
413 G4cout<<
"G4QHadron::RelDecayIn2:Output, f4Mom="<<f4Mom<<
" + s4Mom="<<s4Mom<<
" = "
444 G4cerr<<
"G4QHadron::CopDecIn2: *Boost* E-p shift is corrected to "<<emodif<<
G4endl;
452 if(cdir.
e()+.001<cdir.
rho())
G4cerr<<
"*G4QH::RDIn2:*Boost* cd4M="<<cdir<<
",e-p="
458 G4cout<<
"G4QHad::CopDI2:dir="<<dir<<
",ltf="<<ltf<<
",cdir="<<cdir<<
",vdir="<<vdir<<
G4endl;
474 G4cout<<
"G4QHad::CopDecIn2:iM="<<iM<<
"=>fM="<<fM<<
"+sM="<<sM<<
",ob="<<vx<<vy<<vz<<
G4endl;
476 if(fabs(iM-fM-sM)<.00000001)
484 else if (iM+.001<fM+sM || iM==0.)
486 G4cerr<<
"***G4QH::CopDecIn2: fM="<<fM<<
"+sM="<<sM<<
">iM="<<iM<<
",d="<<iM-fM-sM<<
G4endl;
490 G4double p2 = (d2*d2/4.-fM2*sM2)/iM2;
494 G4cout<<
"*G4QH:CopDI2:p2="<<p2<<
"<0,d4/4="<<d2*d2/4.<<
"<4*fM2*sM2="<<4*fM2*sM2<<
G4endl;
501 if(neg) ct = rn+rn-1.;
506 if(fabs(ct)<1.) ps = p * sqrt(1.-ct*ct);
510 G4cout<<
"**G4QH::CopDecayIn2:ct="<<ct<<
",mac="<<maxCost<<
",mic="<<minCost<<
G4endl;
516 G4ThreeVector pVect=(ps*sin(phi))*vz+(ps*cos(phi))*vy+p*ct*vx;
518 G4cout<<
"G4QH::CopDIn2:ct="<<ct<<
",p="<<p<<
",ps="<<ps<<
",ph="<<phi<<
",v="<<pVect<<
G4endl;
522 f4Mom.
setE(sqrt(fM2+p2));
524 s4Mom.
setE(sqrt(sM2+p2));
527 G4cout<<
"G4QHadr::CopDecIn2:p2="<<p2<<
",v="<<ltb<<
",f4M="<<f4Mom<<
" + s4M="<<s4Mom<<
" = "
528 <<f4Mom+s4Mom<<
", M="<<iM<<
G4endl;
530 if(f4Mom.
e()+.001<f4Mom.
rho())
G4cerr<<
"*G4QH::RDIn2:*Boost* f4M="<<f4Mom<<
",e-p="
533 if(s4Mom.
e()+.001<s4Mom.
rho())
G4cerr<<
"*G4QH::RDIn2:*Boost* s4M="<<s4Mom<<
",e-p="
537 G4cout<<
"G4QHadron::CopDecayIn2:Output, f4Mom="<<f4Mom<<
" + s4Mom="<<s4Mom<<
" = "
556 G4cout<<
"G4QHadron::DecIn2: iM="<<iM<<
" => fM="<<fM<<
" + sM="<<sM<<
" = "<<fM+sM<<
G4endl;
559 if (fabs(iM-fM-sM)<.0000001)
567 else if (iM+.001<fM+sM || iM==0.)
570 G4cerr<<
"***G4QHadron::DecayIn2*** fM="<<fM<<
" + sM="<<sM<<
"="<<fM+sM<<
" > iM="<<iM
571 <<
", d="<<iM-fM-sM<<
G4endl;
577 G4double p2 = (d2*d2/4.-fM2*sM2)/iM2;
581 G4cerr<<
"***G4QH::DI2:p2="<<p2<<
"<0,d2^2="<<d2*d2/4.<<
"<4*fM2*sM2="<<4*fM2*sM2<<
G4endl;
588 G4cout<<
"G4QHadron::DecayIn2: ct="<<ct<<
", p="<<p<<
G4endl;
595 f4Mom.
setE(sqrt(fM2+p2));
597 s4Mom.
setE(sqrt(sM2+p2));
616 G4cerr<<
"G4QHadron::DecayIn2: *Boost* E-p shift is corrected to "<<emodif<<
G4endl;
622 G4cout<<
"G4QHadron::DecIn2:LorTrans v="<<ltb<<
",f4Mom="<<f4Mom<<
",s4Mom="<<s4Mom<<
G4endl;
624 if(f4Mom.
e()+.001<f4Mom.
rho())
G4cerr<<
"*G4QH::DecIn2:*Boost* f4M="<<f4Mom<<
G4endl;
626 if(s4Mom.
e()+.001<s4Mom.
rho())
G4cerr<<
"*G4QH::DecIn2:*Boost* s4M="<<s4Mom<<
G4endl;
629 G4cout<<
"G4QHadron::DecayIn2: ROOT OUTPUT f4Mom="<<f4Mom<<
", s4Mom="<<s4Mom<<
G4endl;
641 G4cout<<
"G4QH::CMDIn2: iM="<<iM<<comp<<
"=>fM="<<fM<<
"+corM="<<corM<<
"="<<fM+corM<<
G4endl;
653 else if (dE<-.001 || iM==0.)
655 G4cerr<<
"***G4QH::CorMDIn2***fM="<<fM<<
" + cM="<<corM<<
" > iM="<<iM<<
",d="<<dE<<
G4endl;
662 G4double p2 = (d2*d2/4.-fM2*corM2)/iM2;
666 G4cerr<<
"**G4QH::CMDI2:p2="<<p2<<
"<0,d="<<d2*d2/4.<<
"<4*fM2*hM2="<<4*fM2*corM2<<
G4endl;
671 if(comp.
e()<comp.
rho())
G4cerr<<
"*G4QH::CorMDecayIn2:*Boost* comp4M="<<comp<<
",e-p="
676 if(cm4Mom.
e()<cm4Mom.
rho())
678 G4cerr<<
"*G4QH::CorMDecIn2:*Boost* c4M="<<cm4Mom<<
G4endl;
714 G4cout<<
"G4QHadron::CorMDecayIn2: ct="<<ct<<
", p="<<p<<
G4endl;
719 fr4Mom.
setE(sqrt(fM2+p2));
726 if(fr4Mom.
e()+.001<fr4Mom.
rho())
G4cerr<<
"*G4QH::CorMDecIn2:*Boost*fr4M="<<fr4Mom<<
G4endl;
752 G4cerr<<
"***G4QHadron::CorEDecIn2*** fE="<<fE<<
"<corE="<<corE<<
", d="<<corE-fE<<
G4endl;
761 G4double fP2=iPx*iPx+iPy*iPy+iPz*iPz;
763 G4double rP = sqrt((finE*finE-fM2)/fP2);
793 if (fabs(iM-fM-sM-tM)<=eps)
805 G4cout<<
"***G4QHadron::DecayIn3:fM="<<fM<<
" + sM="<<sM<<
" + tM="<<tM<<
" > iM="<<iM
806 <<
",d="<<iM-fM-sM-tM<<
G4endl;
813 G4double m13sBase=(iM-sM)*(iM-sM)-(fM+tM)*(fM+tM);
815 G4double m12sBase=(iM-tM)*(iM-tM)-m12sMin;
829 G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2);
833 if(dif<-.01)
G4cerr<<
"*G4QHadron::DecayIn3:iM="<<iM<<
",tM="<<tM<<
",sM="<<sM<<
",fM="
834 <<fM<<
",m12(s+f)="<<sqrt(m12s)<<
", d="<<iM-fM-sM-tM<<
G4endl;
837 else m13sRange=sqrt(dif)/m12s;
838 rR = m13sRange/m13sBase;
841 G4cout<<
"G4QHadron::DecayIn3: try to decay #"<<++tr<<
", rR="<<rR<<
",rnd="<<rnd<<
G4endl;
854 G4cout<<
"G4QHadron::DecayIn3: Now the last decay of m12="<<dh4Mom.
m()<<
G4endl;
858 G4cerr<<
"***G4QHadron::DecayIn3: Error in DecayIn2 -> Exception2"<<
G4endl;
878 if (fabs(iM-fM-sM-tM)<=eps)
890 G4cout<<
"***G4QHadron::RelDecayIn3:fM="<<fM<<
" + sM="<<sM<<
" + tM="<<tM<<
" > iM="<<iM
891 <<
",d="<<iM-fM-sM-tM<<
G4endl;
898 G4double m13sBase=(iM-sM)*(iM-sM)-(fM+tM)*(fM+tM);
900 G4double m12sBase=(iM-tM)*(iM-tM)-m12sMin;
914 G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2);
918 if(dif<-.01)
G4cerr<<
"G4QHadron::RelDecayIn3:iM="<<iM<<
",tM="<<tM<<
",sM="<<sM<<
",fM="
919 <<fM<<
",m12(s+f)="<<sqrt(m12s)<<
", d="<<iM-fM-sM-tM<<
G4endl;
922 else m13sRange=sqrt(dif)/m12s;
923 rR = m13sRange/m13sBase;
926 G4cout<<
"G4QHadron::RelDecayIn3: try decay #"<<++tr<<
", rR="<<rR<<
",rnd="<<rnd<<
G4endl;
934 G4cerr<<
"***G4QHadron::RelDecayIn3: Exception1"<<
G4endl;
939 G4cout<<
"G4QHadron::RelDecayIn3: Now the last decay of m12="<<dh4Mom.
m()<<
G4endl;
943 G4cerr<<
"***G4QHadron::RelDecayIn3: Error in DecayIn2 -> Exception2"<<
G4endl;
962 if (fabs(iM-fM-sM-tM)<=eps)
974 G4cout<<
"***G4QHadron::CopDecayIn3:fM="<<fM<<
" + sM="<<sM<<
" + tM="<<tM<<
" > iM="<<iM
975 <<
",d="<<iM-fM-sM-tM<<
G4endl;
982 G4double m13sBase=(iM-sM)*(iM-sM)-(fM+tM)*(fM+tM);
984 G4double m12sBase=(iM-tM)*(iM-tM)-m12sMin;
998 G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2);
1002 if(dif<-.01)
G4cerr<<
"G4QHadron::CopDecayIn3:iM="<<iM<<
",tM="<<tM<<
",sM="<<sM<<
",fM="
1003 <<fM<<
",m12(s+f)="<<sqrt(m12s)<<
", d="<<iM-fM-sM-tM<<
G4endl;
1006 else m13sRange=sqrt(dif)/m12s;
1007 rR = m13sRange/m13sBase;
1010 G4cout<<
"G4QHadron::CopDecayIn3: try decay #"<<++tr<<
", rR="<<rR<<
",rnd="<<rnd<<
G4endl;
1018 G4cerr<<
"***G4QHadron::CopDecayIn3: Exception1"<<
G4endl;
1023 G4cout<<
"G4QHadron::DecayIn3: Now the last decay of m12="<<dh4Mom.
m()<<
G4endl;
1027 G4cerr<<
"***G4QHadron::CopDecayIn3: Error in DecayIn2 -> Exception2"<<
G4endl;
1040 G4cout<<
"G4QHadron::RandomizeMass: meanM="<<meanM<<
", halfWidth="<<width<<
G4endl;
1042 if(maxM<meanM-3*width)
1045 G4cout<<
"***G4QH::RandM:m=0 maxM="<<maxM<<
"<meanM="<<meanM<<
"-3*halfW="<<width<<
G4endl;
1053 if(meanM>maxM)
G4cerr<<
"***G4QHadron::RandM:Stable m="<<meanM<<
">maxM="<<maxM<<
G4endl;
1063 ed <<
"width of the Hadron < 0. : width=" << width <<
"<0,PDGC="
1071 G4cout<<
"***G4QHadron::RandomizeMass:for PDG="<<theQPDG.
GetPDGCode()<<
" minM="<<minM
1072 <<
" > maxM="<<maxM<<
G4endl;
1077 G4double v1=atan((minM-meanM)/width);
1078 G4double v2=atan((maxM-meanM)/width);
1081 G4cout<<
"G4QHadr::RandM:Mi="<<minM<<
",i="<<v1<<
",Ma="<<maxM<<
",a="<<v2<<
","<<dv<<
G4endl;
1089 if (isSplit)
return;
1091 G4cout<<
"G4QHadron::SplitUp ***IsCalled***, before Splitting nC="<<Color.size()
1092 <<
", SoftColCount="<<theCollisionCount<<
G4endl;
1095 if (!Color.empty())
return;
1096 if (!theCollisionCount)
1100 GetValenceQuarkFlavors(Left, Right);
1113 G4double transverseMass2 = theMomPlus*theMomMinus;
1114 if(transverseMass2<0.) transverseMass2=0.;
1115 G4double maxAvailMomentum2 =
sqr(std::sqrt(transverseMass2) - std::sqrt(pt2));
1117 if(maxAvailMomentum2/widthOfPtSquare > 0.01)
1118 pt=GaussianPt(widthOfPtSquare, maxAvailMomentum2);
1120 G4cout<<
"G4QHadron::SplitUp: *Dif* maxMom2="<<maxAvailMomentum2<<
", pt="<<pt<<
G4endl;
1127 G4cout<<
"G4QHadron::SplitUp: *Dif* right4m="<<RightMom<<
", left4M="<<LeftMom<<
G4endl;
1130 G4double Local2 = std::sqrt(std::max(0., Local1*Local1 -
1131 4*RightMom.
perp2()*theMomMinus / theMomPlus));
1133 G4cout<<
"G4QHadron::SplitUp:Dif,L1="<<Local1<<
",L2="<<Local2<<
",D="<<Direction<<
G4endl;
1135 if (Direction) Local2 = -Local2;
1136 G4double RightMinus = 0.5*(Local1 + Local2);
1139 G4cout<<
"G4QHadron::SplitUp: *Dif* Rminus="<<RightMinus<<
",Lminus="<<LeftMinus<<
",hmm="
1143 if(LeftMinus) LeftPlus = LeftMom.
perp2()/LeftMinus;
1146 G4cout<<
"G4QHadron::SplitUp: *Dif* Rplus="<<RightPlus<<
", Lplus="<<LeftPlus<<
G4endl;
1148 LeftMom.
setPz(0.5*(LeftPlus - LeftMinus));
1149 LeftMom.
setE (0.5*(LeftPlus + LeftMinus));
1150 RightMom.
setPz(0.5*(RightPlus - RightMinus));
1151 RightMom.
setE (0.5*(RightPlus + RightMinus));
1154 G4cout<<
"G4QHadron::SplitUp: *Dif* -final- R4m="<<RightMom<<
", L4M="<<LeftMom<<
", L+R="
1159 Color.push_back(Left);
1160 AntiColor.push_back(Right);
1168 G4int nSeaPair = theCollisionCount-1;
1170 G4cout<<
"G4QHadron::SplitUp:*Soft* Pos="<<
Pos<<
", nSeaPair="<<nSeaPair<<
G4endl;
1174 for (
G4int aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
1181 G4QParton* aParton = BuildSeaQuark(
false, aPDGCode);
1187 G4cout<<
"G4QHadron::SplitUp:*Soft* Part1 PDG="<<aPDGCode<<
", Col="<<firstPartonColour
1191 Color.push_back(aParton);
1194 aParton = BuildSeaQuark(
true, aPDGCode);
1195 aParton->
SetSpinZ(-firstPartonSpinZ);
1202 AntiColor.push_back(aParton);
1204 G4cout<<
"G4QHadron::SplUp:*Sft* Antiquark is filled, i="<<aSeaPair<<
G4endl;
1210 GetValenceQuarkFlavors(pColorParton, pAntiColorParton);
1214 G4cout<<
"G4QHadron::SplUp:*Sft*,C="<<ColorEncoding<<
", AC="<<AntiColorEncoding<<
G4endl;
1219 G4cout<<
"G4QHadron::SplitUp: *Sft*, ptr="<<ptr<<
G4endl;
1222 if (ColorEncoding < 0)
1236 Color.push_back(pColorParton);
1237 AntiColor.push_back(pAntiColorParton);
1242 G4int nColor=Color.size();
1243 G4int nAntiColor=AntiColor.size();
1244 if(nColor!=nAntiColor || nColor != nSeaPair+1)
1246 G4cerr<<
"***G4QHadron::SplitUp: nA="<<nAntiColor<<
",nAC="<<nColor<<
",nSea="<<nSeaPair
1251 G4cout<<
"G4QHad::SpUp:,nPartons="<<nColor+nColor<<
G4endl;
1253 G4int dnCol=nColor+nColor;
1259 G4cout<<
"G4QHadron::SplitUp:*Sft* Loop ColorX="<<ColorX<<
G4endl;
1261 std::list<G4QParton*>::iterator icolor = Color.begin();
1262 std::list<G4QParton*>::iterator ecolor = Color.end();
1263 std::list<G4QParton*>::iterator ianticolor = AntiColor.begin();
1264 std::list<G4QParton*>::iterator eanticolor = AntiColor.end();
1267 for ( ; icolor != ecolor && ianticolor != eanticolor; ++icolor, ++ianticolor)
1269 (*icolor)->SetX(xs[++xi]);
1276 (*ianticolor)->SetX(xs[++xi]);
1286 G4cout<<
"G4QHadron::SplitUp: *Soft* ===> End, ColSize="<<Color.size()<<
G4endl;
1305 if (isAntiQuark) aPDGCode*=-1;
1320 G4cout<<
"-Warning-G4QHadron::RandomX: nPart="<<nPart<<
" < 2"<<
G4endl;
1326 for(
G4int i=1; i<nP1; ++i)
1330 for( ; j<i; ++j)
if(r < x[j])
1332 for(
G4int k=i; k>j; --k) x[k]=x[k-1];
1339 for(
G4int i=nP1; i>0; --i) x[i]-=x[i-1];
1347 if(nSea<1 || anXtot<=0.)
G4cout<<
"-Warning-G4QHad::SCX:N="<<nSea<<
",tX="<<anXtot<<
G4endl;
1348 if(nSea<2)
return anXtot;
1360 else SplitBaryon(HadronEncoding, &aEnd, &bEnd);
1410 G4int absPDGcode = std::abs(PDGcode);
1411 if (absPDGcode >= 1000)
return false;
1412 if(absPDGcode == 22 || absPDGcode == 111)
1419 else if(absPDGcode == 130 || absPDGcode == 310)
1424 if(it>0) *bEnd = -3;
1429 G4int heavy = absPDGcode/100;
1430 G4int light = (absPDGcode%100)/10;
1431 G4int anti = 1 - 2*(std::max(heavy, light)%2);
1432 if (PDGcode < 0 ) anti = -anti;
1435 if ( anti < 0)
G4SwapObj(&heavy, &light);
1451 std::pair<G4int,G4int> qdq[5];
1454 G4int aPDGcode=std::abs(PDGcode);
1458 qdq[0]=make_pair(2203, 1); prb[0]=r3;
1459 qdq[1]=make_pair(2103, 2); prb[1]=r6;
1460 qdq[2]=make_pair(2101, 2); prb[2]=r2;
1462 else if(aPDGcode==2112)
1465 qdq[0]=make_pair(2103, 1); prb[0]=r6;
1466 qdq[1]=make_pair(2101, 1); prb[1]=r2;
1467 qdq[2]=make_pair(1103, 2); prb[2]=r3;
1469 else if(aPDGcode%10<3)
1474 qdq[0]=make_pair(2103, 3); prb[0]=r3;
1475 qdq[1]=make_pair(3203, 1); prb[1]=r4;
1476 qdq[2]=make_pair(3201, 1); prb[2]=r12;
1477 qdq[3]=make_pair(3103, 2); prb[3]=r4;
1478 qdq[4]=make_pair(3101, 2); prb[4]=r12;
1480 else if(aPDGcode==3222)
1483 qdq[0]=make_pair(2203, 3); prb[0]=r3;
1484 qdq[1]=make_pair(3203, 2); prb[1]=r6;
1485 qdq[2]=make_pair(3201, 2); prb[2]=r2;
1487 else if(aPDGcode==3212)
1490 qdq[0]=make_pair(2103, 3); prb[0]=r3;
1491 qdq[1]=make_pair(3203, 1); prb[1]=r12;
1492 qdq[2]=make_pair(3201, 1); prb[2]=r4;
1493 qdq[3]=make_pair(3103, 2); prb[3]=r12;
1494 qdq[4]=make_pair(3101, 2); prb[4]=r4;
1496 else if(aPDGcode==3112)
1499 qdq[0]=make_pair(1103, 3); prb[0]=r3;
1500 qdq[1]=make_pair(3103, 1); prb[1]=r6;
1501 qdq[2]=make_pair(3101, 1); prb[2]=r2;
1503 else if(aPDGcode==3312)
1506 qdq[0]=make_pair(3103, 3); prb[0]=r6;
1507 qdq[1]=make_pair(3101, 3); prb[1]=r2;
1508 qdq[2]=make_pair(3303, 1); prb[2]=r3;
1510 else if(aPDGcode==3322)
1513 qdq[0]=make_pair(3203, 3); prb[0]=r6;
1514 qdq[1]=make_pair(3201, 3); prb[1]=r2;
1515 qdq[2]=make_pair(3303, 2); prb[2]=r3;
1524 qdq[0]=make_pair(3303, 3); prb[0]=1.;
1526 else if(aPDGcode==2224)
1529 qdq[0]=make_pair(2203, 2); prb[0]=1.;
1531 else if(aPDGcode==2214)
1534 qdq[0]=make_pair(2203, 1); prb[0]=r3;
1535 qdq[1]=make_pair(2103, 2); prb[1]=d3;
1537 else if(aPDGcode==2114)
1540 qdq[0]=make_pair(1103, 2); prb[0]=r3;
1541 qdq[1]=make_pair(2103, 1); prb[1]=d3;
1543 else if(aPDGcode==1114)
1546 qdq[0]=make_pair(1103, 1); prb[0]=1.;
1548 else if(aPDGcode==3224)
1551 qdq[0]=make_pair(2203, 3); prb[0]=r3;
1552 qdq[1]=make_pair(3203, 2); prb[1]=d3;
1554 else if(aPDGcode==3214)
1557 qdq[0]=make_pair(2103, 3); prb[0]=r3;
1558 qdq[1]=make_pair(3203, 1); prb[1]=r3;
1559 qdq[2]=make_pair(3103, 2); prb[2]=r3;
1561 else if(aPDGcode==3114)
1564 qdq[0]=make_pair(1103, 3); prb[0]=r3;
1565 qdq[1]=make_pair(3103, 1); prb[1]=d3;
1567 else if(aPDGcode==3324)
1570 qdq[0]=make_pair(3203, 3); prb[0]=r3;
1571 qdq[1]=make_pair(3303, 2); prb[1]=d3;
1573 else if(aPDGcode==3314)
1576 qdq[0]=make_pair(3103, 3); prb[0]=d3;
1577 qdq[1]=make_pair(3303, 1); prb[1]=r3;
1583 for(
G4int i=0; i<nc; i++)
1590 *diQuark= qdq[i].first;
1591 *quark = qdq[i].second;
1595 *diQuark= -qdq[i].second;
1596 *quark = -qdq[i].first;
1608 while ((R = -widthSquare*std::log(
G4UniformRand())) > maxPtSquare){}
1616 if(Color.size()==0)
return 0;
1624 if(AntiColor.size() == 0)
return 0;
1626 AntiColor.pop_front();
1635 G4cerr<<
"***G4QHadron::SplitInTwoPartons: Can not split QC="<<valQ<<
G4endl;
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
double dot(const HepLorentzVector &) const
void setVect(const Hep3Vector &)
G4int GetBaryonNumber() const
G4int GetSPDGCode() const
G4int GetZNSPDGCode() const
std::pair< G4int, G4int > MakePartonPair() const
G4bool RelDecayIn3(G4LorentzVector &fh4M, G4LorentzVector &sh4M, G4LorentzVector &th4Mom, G4LorentzVector &dir, G4double maxCost=1., G4double minCost=-1.)
const G4QHadron & operator=(const G4QHadron &right)
G4int GetBaryonNumber() const
G4QParton * GetNextParton()
G4bool CorMDecayIn2(G4double corM, G4LorentzVector &fr4Mom)
G4bool DecayIn2(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom)
void Boost(const G4LorentzVector &theBoost)
G4double RandomizeMass(G4QParticle *pPart, G4double maxM)
G4bool CopDecayIn2(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom, G4LorentzVector &dir, G4double cop)
const G4ThreeVector & GetPosition() const
G4bool DecayIn3(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom, G4LorentzVector &t4Mom)
G4bool CopDecayIn3(G4LorentzVector &fh4M, G4LorentzVector &sh4M, G4LorentzVector &th4Mom, G4LorentzVector &dir, G4double cosp)
G4LorentzVector theMomentum
void SetQPDG(const G4QPDGCode &QPDG)
G4QPartonPair * SplitInTwoPartons()
G4QParton * GetNextAntiParton()
G4bool RelDecayIn2(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom, G4LorentzVector &dir, G4double maxCost=1., G4double minCost=-1.)
G4bool CorEDecayIn2(G4double corE, G4LorentzVector &fr4Mom)
G4QContent GetQuarkContent() const
void InitByQCont(G4QContent QCont)
void SetPDGCode(G4int newPDGCode)
G4double MinMassOfFragm()
void SetSpinZ(G4double aSpinZ)
void SetPosition(const G4ThreeVector &aPosition)
void SetColour(G4int aColour)
const G4LorentzVector & Get4Momentum() const
void Set4Momentum(const G4LorentzVector &aMomentum)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription
void G4SwapObj(T *a, T *b)