123 Kappa = 1.0 * GeV/fermi;
151 pDefPair hadrons(
nullptr,
nullptr );
154 #ifdef debug_VStringDecay
155 G4cout<<
"G4VLongitudinalStringDecay::ProduceOneHadron: PossibleHmass StrMass "
162 if ( hadrons.first !=
nullptr ) {
163 if ( hadrons.second ==
nullptr ) {
166 #ifdef debug_VStringDecay
167 G4cout <<
"VlongSD Warning replacing string by single hadron (G4VLongitudinalStringDecay)" <<
G4endl;
169 <<
"string .. " <<
string->Get4Momentum() <<
" "
170 <<
string->Get4Momentum().m() <<
G4endl;
179 #ifdef debug_VStringDecay
180 G4cout <<
"VlongSD Warning replacing qq-qqbar string by TWO hadrons (G4VLongitudinalStringDecay)"
181 << hadrons.first->GetParticleName() <<
" / "
182 << hadrons.second->GetParticleName()
183 <<
"string .. " <<
string->Get4Momentum() <<
" "
184 <<
string->Get4Momentum().m() <<
G4endl;
189 &Mom2, hadrons.second->GetPDGMass(),
195 G4ThreeVector Velocity =
string->Get4Momentum().boostVector();
196 result->
Boost(Velocity);
219 #ifdef debug_VStringDecay
221 G4cout<<
"VlongSD Quarks at the string ends "<<
string->GetLeftParton()->GetParticleName()
222 <<
" "<<
string->GetRightParton()->GetParticleName()<<
G4endl;
223 if ( Hadron1 !=
nullptr) {
228 if ( Hadron1 !=
nullptr) { mass = (Hadron1)->GetPDGMass();}
234 #ifdef debug_VStringDecay
236 G4cout<<
"VlongSD string is qq--qqbar: Build two stable hadrons"<<
G4endl;
239 G4double StringMass =
string->Mass();
240 G4int cClusterInterrupt = 0;
245 G4int LeftQuark1=
string->GetLeftParton()->GetPDGEncoding()/1000;
246 G4int LeftQuark2=(
string->GetLeftParton()->GetPDGEncoding()/100)%10;
248 G4int RightQuark1=
string->GetRightParton()->GetPDGEncoding()/1000;
249 G4int RightQuark2=(
string->GetRightParton()->GetPDGEncoding()/100)%10;
261 while ( Hadron1 ==
nullptr || Hadron2 ==
nullptr ||
262 ( StringMass <= Hadron1->GetPDGMass() + Hadron2->
GetPDGMass() ) );
264 mass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass();
267 #ifdef debug_VStringDecay
268 G4cout<<
"VlongSD *Hadrons 1 and 2, proposed mass "<<Hadron1<<
" "<<Hadron2<<
" "<<mass<<
G4endl;
273 pdefs->first = Hadron1;
274 pdefs->second = Hadron2;
340 #ifdef debug_VStringDecay
341 G4cout<<
"VlongSD QuarkSplitup: quark ID "<<decay->GetPDGEncoding()<<
G4endl;
344 G4int IsParticle=(decay->GetPDGEncoding()>0) ? -1 : +1;
347 created = QuarkPair.second;
352 #ifdef debug_VStringDecay
353 G4cout<<
"VlongSD QuarkSplitup: "<<decay->GetPDGEncoding()<<
" -> "<<QuarkPair.second->GetPDGEncoding()<<
G4endl;
354 G4cout<<
"hadronizer->Build(QuarkPair.first, decay)"<<
G4endl;
369 #ifdef debug_VStringDecay
370 G4cout<<
"VlongSD Create a Diquark - AntiDiquark pair"<<
G4endl;
372 G4int q1(0), q2(0), spin(0), PDGcode(0);
379 PDGcode = (std::max(q1,q2) * 1000 + std::min(q1,q2) * 100 + spin) * NeedParticle;
385 #ifdef debug_VStringDecay
386 G4cout<<
"VlongSD Create a Quark - AntiQuark pair"<<
G4endl;
402 #ifdef debug_heavyHadrons
403 G4cout <<
"G4VLongitudinalStringDecay::SampleQuarkFlavor : sampled from the vacuum HEAVY quark = "
409 #ifdef debug_VStringDecay
410 G4cout<<
"VlongSD SampleQuarkFlavor "<<quark<<
" (ProbCB ProbCCbar ProbBBbar "<<
ProbCB
428 Pt = -
G4Log(G4RandFlat::shoot(ymin, 1.));
432 return G4ThreeVector(Pt * std::cos(phi),Pt * std::sin(phi),0);
443 for (
size_t c1 = 0; c1 < Hadrons->size(); c1++)
447 for (
size_t c2 = 0; c2 < c1; c2++)
449 SumPz += Hadrons->operator[](c2)->Get4Momentum().pz();
450 SumE += Hadrons->operator[](c2)->Get4Momentum().e();
452 G4double HadronE = Hadrons->operator[](c1)->Get4Momentum().e();
453 G4double HadronPz = Hadrons->operator[](c1)->Get4Momentum().pz();
454 Hadrons->operator[](c1)->SetFormationTime(
455 (theInitialStringMass - 2.*SumPz + HadronE - HadronPz ) / (2.*kappa) / c_light );
457 (theInitialStringMass - 2.*SumE - HadronE + HadronPz) / (2.*kappa) );
458 Hadrons->operator[](c1)->SetPosition(aPosition);
468 "G4VLongitudinalStringDecay::SetSigmaTransverseMomentum after FragmentString() not allowed");
494 "G4VLongitudinalStringDecay::SetDiquarkBreakProbability after FragmentString() not allowed");
506 "G4VLongitudinalStringDecay::SetSpinThreeHalfBarionProbability after FragmentString() not allowed");
521 "G4VLongitudinalStringDecay::SetScalarMesonMixings after FragmentString() not allowed");
523 if ( aVector.size() < 6 )
525 "G4VLongitudinalStringDecay::SetScalarMesonMixings( argument Vector too small");
544 "G4VLongitudinalStringDecay::SetVectorMesonMixings after FragmentString() not allowed");
546 if ( aVector.size() < 6 )
548 "G4VLongitudinalStringDecay::SetVectorMesonMixings( argument Vector too small");
595 Kappa = aValue * GeV/fermi;
612 for (
G4int i=1; i < 6; i++) {
613 Code1 = 100*i + 10*1 + 1;
616 if (hadron1 !=
nullptr) {
617 for (
G4int j=1; j < 6; j++) {
618 Code2 = 100*j + 10*1 + 1;
620 if (hadron2 !=
nullptr) {
634 for (
G4int i=1; i < 6; i++) {
635 Code1 = 100*i + 10*1 + 1;
637 for (
G4int j=1; j < 6; j++) {
638 for (
G4int k=1; k < 6; k++) {
639 kfla = std::max(j,k);
640 kflb = std::min(j,k);
643 Code2 = 1000*kfla + 100*kflb + 10*1 + 2;
644 if ( (j == 1) && (k==1)) Code2 = 1000*2 + 100*1 + 10*1 + 2;
649 if ((hadron2 ==
nullptr) && (hadron3 ==
nullptr)) {
minMassQDiQStr[i-1][j-1][k-1] =
MaxMass;
continue;};
651 if ((hadron2 !=
nullptr) && (hadron3 !=
nullptr)) {
655 if ((hadron2 !=
nullptr) && (hadron3 ==
nullptr)) {};
657 if ((hadron2 ==
nullptr) && (hadron3 !=
nullptr)) {hadron2 = hadron3;};
671 for (
G4int i=0; i<5; i++)
672 {
for (
G4int j=0; j<5; j++)
673 {
for (
G4int k=0; k<7; k++)
682 for (
G4int i=0; i<5; i++)
684 if( i >= 2 ) StrangeQ=1;
685 for (
G4int j=0; j<5; j++)
688 if( j >= 2 ) StrangeAQ=1;
689 Meson[i][j][0] = 100 * (std::max(i,j)+1) + 10 * (std::min(i,j)+1) + 1;
691 Meson[i][j][1] = 100 * (std::max(i,j)+1) + 10 * (std::min(i,j)+1) + 3;
750 for (
G4int i=0; i<5; i++)
751 {
for (
G4int j=0; j<5; j++)
752 {
for (
G4int k=0; k<5; k++)
753 {
for (
G4int l=0; l<4; l++)
760 G4int kflc(0), kfld(0), kfle(0), kflf(0);
761 for (
G4int i=0; i<5; i++)
762 {
for (
G4int j=0; j<5; j++)
763 {
for (
G4int k=0; k<5; k++)
765 kfla = i+1; kflb = j+1; kflc = k+1;
766 kfld = std::max(kfla,kflb);
767 kfld = std::max(kfld,kflc);
769 kflf = std::min(kfla,kflb);
770 kflf = std::min(kflf,kflc);
772 kfle = kfla + kflb + kflc - kfld - kflf;
774 Baryon[i][j][k][0] = 1000 * kfld + 100 * kfle + 10 * kflf + 2;
776 Baryon[i][j][k][1] = 1000 * kfld + 100 * kfle + 10 * kflf + 4;
907 for (
G4int i=0; i<5; i++)
908 {
for (
G4int j=0; j<5; j++)
909 {
for (
G4int k=0; k<5; k++)
910 {
for (
G4int l=0; l<4; l++)
921 if ((TestHadron ==
nullptr)&&(
Baryon[i][j][k][l] != 0))
Baryon[i][j][k][l] = 0;
935 for (
G4int i=0 ; i<350 ; i++ ) {
957 "G4VLongitudinalStringDecay::SetMinimalStringMass: Illegal quark content as input");
964 "G4VLongitudinalStringDecay::SetMinimalStringMass: Illegal quark content as input");
971 if ((Qleft < 6) && (Qright < 6)) {
978 if ((Qleft < 6) && (Qright > 1000)) {
979 G4int q1=Qright/1000;
980 G4int q2=(Qright/100)%10;
987 if ((Qleft > 1000) && (Qright < 6)) {
989 G4int q2=(Qleft/100)%10;
998 G4double StringM=
string->Get4Momentum().mag();
1000 #ifdef debug_LUNDfragmentation
1004 G4int q1= Qleft/1000 ;
1005 G4int q2=(Qleft/100)%10 ;
1007 G4int q3= Qright/1000 ;
1008 G4int q4=(Qright/100)%10;
1016 if ( (EstimatedMass1 > 0.) && (EstimatedMass2 > 0.)) {
1017 EstimatedMass = EstimatedMass1 + EstimatedMass2;
1018 if ( StringM > EstimatedMass ) {
1025 if ( (EstimatedMass1 < 0.) && (EstimatedMass2 > 0.)) {
1032 if ( (EstimatedMass1 > 0.) && (EstimatedMass2 < 0.)) {
1033 EstimatedMass = EstimatedMass1;
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetPosition() const
G4int GetDirection(void) const
G4Parton * GetRightParton(void) const
G4Parton * GetLeftParton(void) const
G4LorentzVector Get4Momentum() const
G4bool IsAFourQuarkString(void) const
G4ParticleDefinition * GetLeftParton(void) const
G4ParticleDefinition * GetRightParton(void) const
G4ParticleDefinition * Build(G4ParticleDefinition *black, G4ParticleDefinition *white)
G4ParticleDefinition * BuildLowSpin(G4ParticleDefinition *black, G4ParticleDefinition *white)
void Boost(G4ThreeVector &Velocity)
G4double GetPDGMass() const
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
const G4String & GetParticleSubType() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
std::vector< G4double > scalarMesonMix
G4ThreeVector SampleQuarkPt(G4double ptMax=-1.)
G4HadronBuilder * hadronizer
void SetSpinThreeHalfBarionProbability(G4double aValue)
G4int SampleQuarkFlavor(void)
G4double MinimalStringMass
std::pair< G4ParticleDefinition *, G4ParticleDefinition * > pDefPair
void SetProbBBbar(G4double aValue)
G4ParticleDefinition * FindParticle(G4int Encoding)
std::vector< G4double > pspin_meson
void SetMinimalStringMass2(const G4double aValue)
void SetProbEta_b(G4double aValue)
G4double minMassQQbarStr[5][5]
void SetProbEta_c(G4double aValue)
G4double minMassQDiQStr[5][5][5]
G4KineticTrackVector * ProduceOneHadron(const G4ExcitedString *const theString)
std::vector< G4double > vectorMesonMix
G4double GetStringTensionParameter()
G4double MinimalStringMass2
G4double PossibleHadronMass(const G4FragmentingString *const string, Pcreate build=0, pDefPair *pdefs=0)
virtual G4ParticleDefinition * QuarkSplitup(G4ParticleDefinition *decay, G4ParticleDefinition *&created)
G4ParticleDefinition * FS_RightHadron[350]
G4HadFinalState * ApplyYourself(const G4HadProjectile &, G4Nucleus &) final
void SetScalarMesonMixings(std::vector< G4double > aVector)
G4int ClusterLoopInterrupt
virtual void SetMassCut(G4double aValue)
void SetDiquarkSuppression(G4double aValue)
G4double Mass_of_light_quark
void SetStrangenessSuppression(G4double aValue)
virtual void Sample4Momentum(G4LorentzVector *Mom, G4double Mass, G4LorentzVector *AntiMom, G4double AntiMass, G4double InitialMass)=0
G4double Mass_of_string_junction
G4int StringLoopInterrupt
void SetProbCCbar(G4double aValue)
void SetVectorMesonMixings(std::vector< G4double > aVector)
G4ParticleDefinition * FS_LeftHadron[350]
void SetDiquarkBreakProbability(G4double aValue)
pDefPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true)
void SetSigmaTransverseMomentum(G4double aQT)
G4double MesonWeight[5][5][7]
virtual ~G4VLongitudinalStringDecay()
void SetStringTensionParameter(G4double aValue)
std::vector< G4ParticleDefinition * > NewParticles
void CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector *)
void SetMinimalStringMass(const G4FragmentingString *const string)
G4double DiquarkBreakProb
G4VLongitudinalStringDecay(const G4String &name="StringDecay")
G4double BaryonWeight[5][5][5][4]
G4ExcitedString * CopyExcited(const G4ExcitedString &string)