85 alaC = an - arho/2.0 + aJPs/2.0;
86 alaB = an - arho/2.0 + aUps/2.0;
99 G4int Index[5][5] = { { 0, 1, 2, 3, 4 },
102 { 3, 7, 10, 12, 13 },
103 { 4, 8, 11, 13, 14 } };
104 for (
G4int i = 0; i < 5; i++ ) {
105 for (
G4int j = 0; j < 5; j++ ) {
106 IndexDiQ[i][j] = Index[i][j];
122 #ifdef debug_QGSMfragmentation
126 <<
"------------------------------------"<<
G4endl;
141 if ( !IsItFragmentable(&aString) ) {
144 #ifdef debug_QGSMfragmentation
145 if ( LeftVector != 0 )
G4cout<<
"Non fragmentable - the string is converted to one hadron "<<
G4endl;
152 #ifdef debug_QGSMfragmentation
162 G4bool success=
false, inner_sucess=
true;
166 #ifdef debug_QGSMfragmentation
177 RightVector->clear();
180 const G4int maxNumberOfLoops = 1000;
181 G4int loopCounter = -1;
182 while (! StopFragmenting(currentString) && ++loopCounter < maxNumberOfLoops )
185 #ifdef debug_QGSMfragmentation
193 #ifdef debug_QGSMfragmentation
198 LeftVector->push_back(Hadron);
200 RightVector->push_back(Hadron);
202 delete currentString;
203 currentString=newString;
207 #ifdef debug_QGSMfragmentation
208 G4cout<<
"abandon ... start from the beginning ---------------"<<
G4endl;
212 if (newString)
delete newString;
217 if ( loopCounter >= maxNumberOfLoops ) {
222 #ifdef debug_QGSMfragmentation
224 G4cout<<
"Split remaining string into 2 final hadrons."<<
G4endl;
231 SplitLast(currentString,LeftVector, RightVector) )
235 delete currentString;
238 delete theStringInCMS;
250 while(!RightVector->empty())
252 LeftVector->push_back(RightVector->back());
253 RightVector->erase(RightVector->end()-1);
261 for (
size_t C1 = 0;
C1 < LeftVector->size();
C1++)
265 Momentum = toObserverFrame*Momentum;
268 Momentum = toObserverFrame*Coordinate;
307 #ifdef debug_QGSMfragmentation
309 G4cout<<
"Start SplitUP (G4VLongitudinalStringDecay) ========================="<<
G4endl;
310 G4cout<<
"String partons: " <<
string->GetLeftParton()->GetPDGEncoding()<<
" "
311 <<
string->GetRightParton()->GetPDGEncoding()<<
" "
312 <<
"Direction " <<
string->GetDecayDirection()<<
G4endl;
319 string->SetLeftPartonStable();
322 string->SetRightPartonStable();
331 G4int NumberOfpossibleBaryons = 2;
337 ActualProb *= (1.0-
G4Exp(2.0*(1.0 - string->
Mass()/(NumberOfpossibleBaryons*1400.0))));
345 HadronDefinition= DiQuarkSplitup(string->
GetDecayParton(), newStringEnd);
348 if ( HadronDefinition == NULL )
return NULL;
350 #ifdef debug_QGSMfragmentation
351 G4cout<<
"The parton "<<
string->GetDecayParton()->GetPDGEncoding()<<
" "
354 G4cout<<
"The side of the string decay Left/Right (1/-1) "<<SideOfDecay<<
G4endl;
361 #ifdef debug_QGSMfragmentation
362 G4cout<<
"An attempt to determine its energy (SplitEandP)"<<
G4endl;
364 G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition,
string, newString);
366 delete newString; newString=0;
369 if ( HadronMomentum != 0 ) {
371 #ifdef debug_QGSMfragmentation
379 delete HadronMomentum;
383 #ifdef debug_QGSMfragmentation
388 #ifdef debug_VStringDecay
389 G4cout<<
"End SplitUP (G4VLongitudinalStringDecay) ====================="<<
G4endl;
403 G4int stableQuarkEncoding =
decay->GetPDGEncoding()/1000;
404 G4int decayQuarkEncoding = (
decay->GetPDGEncoding()/100)%10;
408 G4int Swap = stableQuarkEncoding;
409 stableQuarkEncoding = decayQuarkEncoding;
410 decayQuarkEncoding = Swap;
413 G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1;
421 G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();
422 G4int i10 = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
423 G4int i20 = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
425 G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin);
438 G4int IsParticle=(
decay->GetPDGEncoding()>0) ? +1 : -1;
444 created = QuarkPair.second;
447 NewQuark = created->GetPDGEncoding();
466 #ifdef debug_QGSMfragmentation
468 G4cout<<
"String 4 mom, String M "<<
string->Get4Momentum()<<
" "<<
string->Mass()<<
G4endl;
475 #ifdef debug_QGSMfragmentation
476 G4cout<<
"Mass of the string is not sufficient to produce the hadron!"<<
G4endl;
482 G4double StringMT2 =
string->MassT2();
483 G4double StringMT = std::sqrt(StringMT2);
486 String4Momentum.
setPz(0.);
490 G4double HadronMassT2, ResidualMassT2;
502 Pt2 =
sqr(HadronMt)-
sqr(HadronMass); Pt=std::sqrt(Pt2);
505 HadronPt =SampleQuarkPtw +
string->DecayPt();
508 RemSysPt = StringPt - HadronPt;
510 HadronMassT2 =
sqr(HadronMass) + HadronPt.mag2();
513 }
while (std::sqrt(HadronMassT2) + std::sqrt(ResidualMassT2) > StringMT);
518 G4double Pz2 = (
sqr(StringMT2 - HadronMassT2 - ResidualMassT2) -
519 4*HadronMassT2 * ResidualMassT2)/4./StringMT2;
521 if ( Pz2 < 0 ) {
return 0;}
526 G4double zMin = (std::sqrt(HadronMassT2+Pz2) - Pz)/std::sqrt(StringMT2);
527 G4double zMax = (std::sqrt(HadronMassT2+Pz2) + Pz)/std::sqrt(StringMT2);
529 if (zMin >= zMax)
return 0;
531 G4double z = GetLightConeZ(zMin, zMax,
533 HadronPt.x(), HadronPt.y());
541 G4double HadronE = 0.5* (z *
string->LightConeDecay() +
542 HadronMassT2/(z *
string->LightConeDecay()) );
546 #ifdef debug_QGSMfragmentation
547 G4cout<<
"string->GetDecayDirection() string->LightConeDecay() "
548 <<
string->GetDecayDirection()<<
" "<<
string->LightConeDecay()<<
G4endl;
549 G4cout<<
"HadronPt,HadronE "<<HadronPt<<
" "<<HadronE<<
G4endl;
563 #ifdef debug_QGSMfragmentation
564 G4cout<<
"GetLightConeZ zmin zmax Parton pHadron "<<zmin<<
" "<<zmax<<
" "
569 G4int DiQold(0), DiQnew(0);
571 G4double invD1(0.),invD2(0.), r1(0.),r2(0.),r12(0.);
582 if ( (absDecayQuarkCode < 6) && (absNewQuarkCode < 6) ) {
583 d1 = FFq2q[absDecayQuarkCode-1][absNewQuarkCode-1][0]; d2 = FFq2q[absDecayQuarkCode-1][absNewQuarkCode-1][1];
586 if ( (absDecayQuarkCode < 6) && (absNewQuarkCode > 6) ) {
587 qA = absNewQuarkCode/1000; qB = (absNewQuarkCode % 1000)/100; DiQnew = IndexDiQ[qA-1][qB-1];
588 d1 = FFq2qq[absDecayQuarkCode-1][DiQnew][0]; d2 = FFq2q[absDecayQuarkCode-1][DiQnew][1];
591 if ( (absDecayQuarkCode > 6) && (absNewQuarkCode < 6) ) {
592 q1 = absDecayQuarkCode/1000; q2 = (absDecayQuarkCode % 1000)/100; DiQold = IndexDiQ[q1-1][q2-1];
593 d1 = FFqq2q[DiQold][absNewQuarkCode-1][0]; d2 = FFqq2q[DiQold][absNewQuarkCode-1][1];
597 q1 = absDecayQuarkCode/1000; q2 = (absDecayQuarkCode % 1000)/100; DiQold = IndexDiQ[q1-1][q2-1];
598 d1 = FFqq2qq[DiQold][absNewQuarkCode-1][0]; d2 = FFqq2qq[DiQold][absNewQuarkCode-1][1];
604 invD1=1./d1; invD2=1./d2;
606 const G4int maxNumberOfLoops = 10000;
607 G4int loopCounter = 0;
614 }
while ( ( (r12 > 1.0) || !((zmin <= z)&&(z <= zmax))) &&
615 ++loopCounter < maxNumberOfLoops );
617 if ( loopCounter >= maxNumberOfLoops ) {
618 z = 0.5*(zmin + zmax);
632 G4ThreeVector ClusterVel =
string->Get4Momentum().boostVector();
633 G4double ResidualMass =
string->Mass();
635 #ifdef debug_QGSMfragmentation
636 G4cout<<
"Split last-----------------------------------------"<<
G4endl;
637 G4cout<<
"StrMass "<<ResidualMass<<
" q's "
638 <<
string->GetLeftParton()->GetParticleName()<<
" "
639 <<
string->GetRightParton()->GetParticleName()<<
G4endl;
642 G4int cClusterInterrupt = 0;
645 const G4int maxNumberOfLoops = 1000;
646 G4int loopCounter = 0;
655 string->SetLeftPartonStable();
661 G4int IsParticle=(
string->GetLeftParton()->GetPDGEncoding()>0) ? -1 : +1;
665 quark = QuarkPair.second;
668 if ( LeftHadron == NULL )
continue;
670 if ( RightHadron == NULL )
continue;
676 IsParticle=(
string->GetLeftParton()->GetPDGEncoding()>0) ? -1 : +1;
678 IsParticle=(
string->GetLeftParton()->GetPDGEncoding()>0) ? +1 : -1;
687 quark = QuarkPair.second;
689 if ( LeftHadron == NULL )
continue;
691 if ( RightHadron == NULL )
continue;
697 G4int LeftQuark2=(
string->GetLeftParton()->GetPDGEncoding()/100)%10;
698 G4int RightQuark1=
string->GetRightParton()->GetPDGEncoding()/1000;
699 G4int RightQuark2=(
string->GetRightParton()->GetPDGEncoding()/100)%10;
707 if ( (LeftHadron == NULL) || (RightHadron == NULL) )
continue;
713 }
while ( ( ResidualMass <= LeftHadronMass + RightHadronMass )
714 && ++loopCounter < maxNumberOfLoops );
716 if ( loopCounter >= maxNumberOfLoops ) {
723 Sample4Momentum(&LeftMom , LeftHadron->
GetPDGMass() ,
724 &RightMom, RightHadron->
GetPDGMass(), ResidualMass);
725 LeftMom.
boost(ClusterVel);
726 RightMom.
boost(ClusterVel);
728 #ifdef debug_QGSMfragmentation
745 #ifdef debug_QGSMfragmentation
746 G4cout<<
"Sample4Momentum Last-----------------------------------------"<<
G4endl;
747 G4cout<<
" StrMass "<<InitialMass<<
" Mass1 "<<Mass<<
" Mass2 "<<AntiMass<<
G4endl;
751 G4double r_val =
sqr(InitialMass*InitialMass - Mass*Mass - AntiMass*AntiMass) -
sqr(2.*Mass*AntiMass);
752 G4double Pabs = (r_val > 0.)? std::sqrt(r_val)/(2.*InitialMass) : 0;
756 G4double st = std::sqrt(1. - pz * pz)*Pabs;
763 Mom->
setE(std::sqrt(Pabs*Pabs + Mass*Mass));
766 AntiMom->
setE (std::sqrt(Pabs*Pabs + AntiMass*AntiMass));
771void G4QGSMFragmentation::SetFFq2q()
773 for (
G4int i=0; i < 5; i++) {
774 FFq2q[i][0][0] = 2.0 ; FFq2q[i][0][1] = -arho + alft;
775 FFq2q[i][1][0] = 2.0 ; FFq2q[i][1][1] = -arho + alft;
776 FFq2q[i][2][0] = 1.0 ; FFq2q[i][2][1] = -aphi + alft;
777 FFq2q[i][3][0] = 1.0 ; FFq2q[i][3][1] = -aJPs + alft;
778 FFq2q[i][4][0] = 1.0 ; FFq2q[i][4][1] = -aUps + alft;
784void G4QGSMFragmentation::SetFFq2qq()
786 for (
G4int i=0; i < 5; i++) {
787 FFq2qq[i][ 0][0] = 0.0 ; FFq2qq[i][ 0][1] = arho - 2.0*an + alft;
788 FFq2qq[i][ 1][0] = 0.0 ; FFq2qq[i][ 1][1] = arho - 2.0*an + alft;
789 FFq2qq[i][ 2][0] = 0.0 ; FFq2qq[i][ 2][1] = arho - 2.0*ala + alft;
790 FFq2qq[i][ 3][0] = 0.0 ; FFq2qq[i][ 3][1] = arho - 2.0*alaC + alft;
791 FFq2qq[i][ 4][0] = 0.0 ; FFq2qq[i][ 4][1] = arho - 2.0*alaB + alft;
792 FFq2qq[i][ 5][0] = 0.0 ; FFq2qq[i][ 5][1] = arho - 2.0*an + alft;
793 FFq2qq[i][ 6][0] = 0.0 ; FFq2qq[i][ 6][1] = arho - 2.0*ala + alft;
794 FFq2qq[i][ 7][0] = 0.0 ; FFq2qq[i][ 7][1] = arho - 2.0*alaC + alft;
795 FFq2qq[i][ 8][0] = 0.0 ; FFq2qq[i][ 8][1] = arho - 2.0*alaB + alft;
796 FFq2qq[i][ 9][0] = 0.0 ; FFq2qq[i][ 9][1] = arho - 2.0*aXi + alft;
797 FFq2qq[i][10][0] = 0.0 ; FFq2qq[i][10][1] = arho - 2.0*aXiC + alft;
798 FFq2qq[i][11][0] = 0.0 ; FFq2qq[i][11][1] = arho - 2.0*aXiB + alft;
799 FFq2qq[i][12][0] = 0.0 ; FFq2qq[i][12][1] = arho - 2.0*aXiCC + alft;
800 FFq2qq[i][13][0] = 0.0 ; FFq2qq[i][13][1] = arho - 2.0*aXiCB + alft;
801 FFq2qq[i][14][0] = 0.0 ; FFq2qq[i][14][1] = arho - 2.0*aXiBB + alft;
807void G4QGSMFragmentation::SetFFqq2q()
809 for (
G4int i=0; i < 15; i++) {
810 FFqq2q[i][0][0] = 2.0*(arho - an); FFqq2q[i][0][1] = -arho + alft;
811 FFqq2q[i][1][0] = 2.0*(arho - an); FFqq2q[i][1][1] = -arho + alft;
812 FFqq2q[i][2][0] = 2.0*(arho - an); FFqq2q[i][2][1] = -aphi + alft;
813 FFqq2q[i][3][0] = 2.0*(arho - an); FFqq2q[i][3][1] = -aJPs + alft;
814 FFqq2q[i][4][0] = 2.0*(arho - an); FFqq2q[i][4][1] = -aUps + alft;
820void G4QGSMFragmentation::SetFFqq2qq()
822 for (
G4int i=0; i < 15; i++) {
823 FFqq2qq[i][0][0] = 0. ; FFqq2qq[i][0][1] = 2.0*arho - 2.0*an -arho + alft;
824 FFqq2qq[i][1][0] = 0. ; FFqq2qq[i][1][1] = 2.0*arho - 2.0*an -arho + alft;
825 FFqq2qq[i][2][0] = 0. ; FFqq2qq[i][2][1] = 2.0*arho - 2.0*an -aphi + alft;
826 FFqq2qq[i][3][0] = 0. ; FFqq2qq[i][3][1] = 2.0*arho - 2.0*an -aJPs + alft;
827 FFqq2qq[i][4][0] = 0. ; FFqq2qq[i][4][1] = 2.0*arho - 2.0*an -aUps + alft;
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
HepLorentzRotation inverse() const
HepLorentzVector & boost(double, double, double)
const G4ThreeVector & GetPosition() const
G4int GetDirection(void) const
G4LorentzRotation TransformToAlignedCms()
G4Parton * GetRightParton(void) const
G4Parton * GetLeftParton(void) const
G4LorentzVector Get4Momentum() const
G4double LightConeDecay()
G4ParticleDefinition * GetLeftParton(void) const
G4ParticleDefinition * GetRightParton(void) const
G4ParticleDefinition * GetDecayParton() const
G4int GetDecayDirection() const
G4ParticleDefinition * Build(G4ParticleDefinition *black, G4ParticleDefinition *white)
G4ParticleDefinition * BuildLowSpin(G4ParticleDefinition *black, G4ParticleDefinition *white)
static G4HadronicParameters * Instance()
G4double GetFormationTime() const
void SetPosition(const G4ThreeVector aPosition)
void Set4Momentum(const G4LorentzVector &a4Momentum)
const G4ThreeVector & GetPosition() const
const G4ParticleDefinition * GetDefinition() const
void SetFormationTime(G4double aFormationTime)
const G4LorentzVector & Get4Momentum() const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
const G4String & GetParticleSubType() const
const G4LorentzVector & Get4Momentum() const
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
virtual G4KineticTrackVector * FragmentString(const G4ExcitedString &theString)
G4HadronBuilder * hadronizer
G4double MinimalStringMass
std::pair< G4ParticleDefinition *, G4ParticleDefinition * > pDefPair
void SetProbBBbar(G4double aValue)
G4ParticleDefinition * FindParticle(G4int Encoding)
G4double GetStrangeSuppress()
G4KineticTrackVector * ProduceOneHadron(const G4ExcitedString *const theString)
virtual G4ParticleDefinition * QuarkSplitup(G4ParticleDefinition *decay, G4ParticleDefinition *&created)
G4int ClusterLoopInterrupt
void SetDiquarkSuppression(G4double aValue)
void SetStrangenessSuppression(G4double aValue)
G4int StringLoopInterrupt
void SetProbCCbar(G4double aValue)
void SetDiquarkBreakProbability(G4double aValue)
pDefPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true)
void CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector *)
void SetMinimalStringMass(const G4FragmentingString *const string)
G4double DiquarkBreakProb
G4double GetDiquarkSuppress()
G4ExcitedString * CopyExcited(const G4ExcitedString &string)
ParticleList decay(Cluster *const c)
Carries out a cluster decay.