00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "G4LundStringFragmentation.hh"
00036 #include "G4PhysicalConstants.hh"
00037 #include "G4SystemOfUnits.hh"
00038 #include "Randomize.hh"
00039 #include "G4FragmentingString.hh"
00040 #include "G4DiQuarks.hh"
00041 #include "G4Quarks.hh"
00042
00043
00044
00045
00046 G4LundStringFragmentation::G4LundStringFragmentation()
00047 {
00048
00049 Mass_of_light_quark =140.*MeV;
00050 Mass_of_heavy_quark =500.*MeV;
00051 Mass_of_string_junction=720.*MeV;
00052
00053 MinimalStringMass = 0.;
00054 MinimalStringMass2 = 0.;
00055
00056 WminLUND = 0.45*GeV;
00057
00058
00059 SmoothParam = 0.2;
00060
00061
00062 SetStringTensionParameter(1.);
00063 SetDiquarkSuppression(0.087);
00064 SetDiquarkBreakProbability(0.05);
00065 SetStrangenessSuppression(0.47);
00066
00067
00068 for(G4int i=0; i<3; i++)
00069 { for(G4int j=0; j<3; j++)
00070 { for(G4int k=0; k<6; k++)
00071 { Meson[i][j][k]=0; MesonWeight[i][j][k]=0.;
00072 }
00073 }
00074 }
00075
00076 Meson[0][0][0]=111;
00077 MesonWeight[0][0][0]=(1.-pspin_meson)*(1.-scalarMesonMix[0]);
00078
00079 Meson[0][0][1]=221;
00080 MesonWeight[0][0][1]=(1.-pspin_meson)*(scalarMesonMix[0]-scalarMesonMix[1]);
00081
00082 Meson[0][0][2]=331;
00083 MesonWeight[0][0][2]=(1.-pspin_meson)*(scalarMesonMix[1]);
00084
00085 Meson[0][0][3]=113;
00086 MesonWeight[0][0][3]=pspin_meson*(1.-vectorMesonMix[0]);
00087
00088 Meson[0][0][4]=223;
00089 MesonWeight[0][0][4]=pspin_meson*(vectorMesonMix[0]);
00090
00091
00092 Meson[0][1][0]=211;
00093 MesonWeight[0][1][0]=(1.-pspin_meson);
00094
00095 Meson[0][1][1]=213;
00096 MesonWeight[0][1][1]=pspin_meson;
00097
00098
00099 Meson[0][2][0]=311;
00100 MesonWeight[0][2][0]=(1.-pspin_meson);
00101
00102 Meson[0][2][1]=313;
00103 MesonWeight[0][2][1]=pspin_meson;
00104
00105
00106 Meson[1][0][0]=211;
00107 MesonWeight[1][0][0]=(1.-pspin_meson);
00108
00109 Meson[1][0][1]=213;
00110 MesonWeight[1][0][1]=pspin_meson;
00111
00112
00113 Meson[1][1][0]=111;
00114 MesonWeight[1][1][0]=(1.-pspin_meson)*(1.-scalarMesonMix[0]);
00115
00116 Meson[1][1][1]=221;
00117 MesonWeight[1][1][1]=(1.-pspin_meson)*(scalarMesonMix[0]-scalarMesonMix[1]);
00118
00119 Meson[1][1][2]=331;
00120 MesonWeight[1][1][2]=(1.-pspin_meson)*(scalarMesonMix[1]);
00121
00122 Meson[1][1][3]=113;
00123 MesonWeight[1][1][3]=pspin_meson*(1.-vectorMesonMix[0]);
00124
00125 Meson[1][1][4]=223;
00126 MesonWeight[1][1][4]=pspin_meson*(scalarMesonMix[0]);
00127
00128
00129 Meson[1][2][0]=321;
00130 MesonWeight[1][2][0]=(1.-pspin_meson);
00131
00132 Meson[1][2][1]=323;
00133 MesonWeight[1][2][1]=pspin_meson;
00134
00135
00136
00137 Meson[2][0][0]=311;
00138 MesonWeight[2][0][0]=(1.-pspin_meson);
00139
00140 Meson[2][0][1]=313;
00141 MesonWeight[2][0][1]=pspin_meson;
00142
00143
00144 Meson[2][1][0]=321;
00145 MesonWeight[2][1][0]=(1.-pspin_meson);
00146
00147 Meson[2][1][1]=323;
00148 MesonWeight[2][1][1]=pspin_meson;
00149
00150
00151 Meson[2][2][0]=221;
00152 MesonWeight[2][2][0]=(1.-pspin_meson)*(1.-scalarMesonMix[5]);
00153
00154 Meson[2][2][1]=331;
00155 MesonWeight[2][2][1]=(1.-pspin_meson)*(1.-scalarMesonMix[5]);
00156
00157 Meson[2][2][3]=333;
00158 MesonWeight[2][2][3]=pspin_meson*(vectorMesonMix[5]);
00159
00160
00161 for(G4int i=0; i<3; i++)
00162 { for(G4int j=0; j<3; j++)
00163 { for(G4int k=0; k<3; k++)
00164 { for(G4int l=0; l<4; l++)
00165 { Baryon[i][j][k][l]=0; BaryonWeight[i][j][k][l]=0.;}
00166 }
00167 }
00168 }
00169
00170 G4double pspin_barion_in=pspin_barion;
00171
00172
00173 Baryon[0][0][0][0]=1114;
00174 BaryonWeight[0][0][0][0]=1.;
00175
00176
00177 Baryon[0][0][1][0]=2112;
00178 BaryonWeight[0][0][1][0]=1.-pspin_barion;
00179
00180 Baryon[0][0][1][1]=2114;
00181 BaryonWeight[0][0][1][1]=pspin_barion;
00182
00183
00184 Baryon[0][0][2][0]=3112;
00185 BaryonWeight[0][0][2][0]=1.-pspin_barion;
00186
00187 Baryon[0][0][2][1]=3114;
00188 BaryonWeight[0][0][2][1]=pspin_barion;
00189
00190
00191 Baryon[0][1][0][0]=2112;
00192 BaryonWeight[0][1][0][0]=1.-pspin_barion;
00193
00194 Baryon[0][1][0][1]=2114;
00195 BaryonWeight[0][1][0][1]=pspin_barion;
00196
00197
00198 Baryon[0][1][1][0]=2212;
00199 BaryonWeight[0][1][1][0]=1.-pspin_barion;
00200
00201 Baryon[0][1][1][1]=2214;
00202 BaryonWeight[0][1][1][1]=pspin_barion;
00203
00204
00205 Baryon[0][1][2][0]=3122;
00206 BaryonWeight[0][1][2][0]=(1.-pspin_barion)*0.5;
00207
00208 Baryon[0][1][2][1]=3212;
00209 BaryonWeight[0][1][2][2]=(1.-pspin_barion)*0.5;
00210
00211 Baryon[0][1][2][2]=3214;
00212 BaryonWeight[0][1][2][2]=pspin_barion;
00213
00214
00215 Baryon[0][2][0][0]=3112;
00216 BaryonWeight[0][2][0][0]=1.-pspin_barion;
00217
00218 Baryon[0][2][0][1]=3114;
00219 BaryonWeight[0][2][0][1]=pspin_barion;
00220
00221
00222 Baryon[0][2][1][0]=3122;
00223 BaryonWeight[0][2][1][0]=(1.-pspin_barion)*0.5;
00224
00225 Baryon[0][2][1][1]=3212;
00226 BaryonWeight[0][2][1][1]=(1.-pspin_barion)*0.5;
00227
00228 Baryon[0][2][1][2]=3214;
00229 BaryonWeight[0][2][1][2]=pspin_barion;
00230
00231
00232 Baryon[0][2][2][0]=3312;
00233 BaryonWeight[0][2][2][0]=1.-pspin_barion;
00234
00235 Baryon[0][2][2][1]=3314;
00236 BaryonWeight[0][2][2][1]=pspin_barion;
00237
00238
00239
00240 Baryon[1][0][0][0]=2112;
00241 BaryonWeight[1][0][0][0]=1.-pspin_barion;
00242
00243 Baryon[1][0][0][1]=2114;
00244 BaryonWeight[1][0][0][1]=pspin_barion;
00245
00246
00247 Baryon[1][0][1][0]=2212;
00248 BaryonWeight[1][0][1][0]=1.-pspin_barion;
00249
00250 Baryon[1][0][1][1]=2214;
00251 BaryonWeight[1][0][1][1]=pspin_barion;
00252
00253
00254 Baryon[1][0][2][0]=3122;
00255 BaryonWeight[1][0][2][0]=(1.-pspin_barion)*0.5;
00256
00257 Baryon[1][0][2][1]=3212;
00258 BaryonWeight[1][0][2][1]=(1.-pspin_barion)*0.5;
00259
00260 Baryon[1][0][2][2]=3214;
00261 BaryonWeight[1][0][2][2]=pspin_barion;
00262
00263
00264 Baryon[1][1][0][0]=2212;
00265 BaryonWeight[1][1][0][0]=1.-pspin_barion;
00266
00267 Baryon[1][1][0][1]=2214;
00268 BaryonWeight[1][1][0][1]=pspin_barion;
00269
00270
00271 Baryon[1][1][1][0]=2224;
00272 BaryonWeight[1][1][1][0]=1.;
00273
00274
00275 Baryon[1][1][2][0]=3222;
00276 BaryonWeight[1][1][2][0]=1.-pspin_barion;
00277
00278 Baryon[1][1][2][1]=3224;
00279 BaryonWeight[1][1][2][1]=pspin_barion;
00280
00281
00282 Baryon[1][2][0][0]=3122;
00283 BaryonWeight[1][2][0][0]=(1.-pspin_barion)*0.5;
00284
00285 Baryon[1][2][0][1]=3212;
00286 BaryonWeight[1][2][0][1]=(1.-pspin_barion)*0.5;
00287
00288 Baryon[1][2][0][2]=3214;
00289 BaryonWeight[1][2][0][2]=pspin_barion;
00290
00291
00292 Baryon[1][2][1][0]=3222;
00293 BaryonWeight[1][2][1][0]=1.-pspin_barion;
00294
00295 Baryon[1][2][1][1]=3224;
00296 BaryonWeight[1][2][1][1]=pspin_barion;
00297
00298
00299 Baryon[1][2][2][0]=3322;
00300 BaryonWeight[1][2][2][0]=1.-pspin_barion;
00301
00302 Baryon[1][2][2][1]=3324;
00303 BaryonWeight[1][2][2][1]=pspin_barion;
00304
00305
00306
00307 Baryon[2][0][0][0]=3112;
00308 BaryonWeight[2][0][0][0]=1.-pspin_barion;
00309
00310 Baryon[2][0][0][1]=3114;
00311 BaryonWeight[2][0][0][1]=pspin_barion;
00312
00313
00314 Baryon[2][0][1][0]=3122;
00315 BaryonWeight[2][0][1][0]=(1.-pspin_barion)*0.5;
00316
00317 Baryon[2][0][1][1]=3212;
00318 BaryonWeight[2][0][1][1]=(1.-pspin_barion)*0.5;
00319
00320 Baryon[2][0][1][2]=3214;
00321 BaryonWeight[2][0][1][2]=pspin_barion;
00322
00323
00324 Baryon[2][0][2][0]=3312;
00325 BaryonWeight[2][0][2][0]=1.-pspin_barion;
00326
00327 Baryon[2][0][2][1]=3314;
00328 BaryonWeight[2][0][2][1]=pspin_barion;
00329
00330
00331 Baryon[2][1][0][0]=3122;
00332 BaryonWeight[2][1][0][0]=(1.-pspin_barion)*0.5;
00333
00334 Baryon[2][1][0][1]=3212;
00335 BaryonWeight[2][1][0][1]=(1.-pspin_barion)*0.5;
00336
00337 Baryon[2][1][0][2]=3214;
00338 BaryonWeight[2][1][0][2]=pspin_barion;
00339
00340
00341 Baryon[2][1][1][0]=3222;
00342 BaryonWeight[2][1][1][0]=1.-pspin_barion;
00343
00344 Baryon[2][1][1][1]=3224;
00345 BaryonWeight[2][1][1][1]=pspin_barion;
00346
00347
00348 Baryon[2][1][2][0]=3322;
00349 BaryonWeight[2][1][2][0]=1.-pspin_barion;
00350
00351 Baryon[2][1][2][1]=3324;
00352 BaryonWeight[2][1][2][2]=pspin_barion;
00353
00354
00355 Baryon[2][2][0][0]=3312;
00356 BaryonWeight[2][2][0][0]=1.-pspin_barion;
00357
00358 Baryon[2][2][0][1]=3314;
00359 BaryonWeight[2][2][0][1]=pspin_barion;
00360
00361
00362 Baryon[2][2][1][0]=3322;
00363 BaryonWeight[2][2][1][0]=1.-pspin_barion;
00364
00365 Baryon[2][2][1][1]=3324;
00366 BaryonWeight[2][2][1][1]=pspin_barion;
00367
00368
00369 Baryon[2][2][2][0]=3334;
00370 BaryonWeight[2][2][2][0]=1.;
00371
00372
00373 pspin_barion=pspin_barion_in;
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387 Prob_QQbar[0]=StrangeSuppress;
00388 Prob_QQbar[1]=StrangeSuppress;
00389 Prob_QQbar[2]=StrangeSuppress/(2.+StrangeSuppress);
00390
00391
00392 for ( G4int i=0 ; i<35 ; i++ ) {
00393 FS_LeftHadron[i] = 0;
00394 FS_RightHadron[i] = 0;
00395 FS_Weight[i] = 0.0;
00396 }
00397 NumberOf_FS = 0;
00398
00399 }
00400
00401
00402 G4LundStringFragmentation::~G4LundStringFragmentation()
00403 {}
00404
00405
00406
00407 void G4LundStringFragmentation::SetMinimalStringMass(const G4FragmentingString * const string)
00408 {
00409 G4double EstimatedMass=0.;
00410 G4int Number_of_quarks=0;
00411
00412 G4double StringM=string->Get4Momentum().mag();
00413
00414 G4int Qleft =std::abs(string->GetLeftParton()->GetPDGEncoding());
00415
00416
00417
00418 if( Qleft > 1000)
00419 {
00420 Number_of_quarks+=2;
00421 G4int q1=Qleft/1000;
00422 if( q1 < 3) {EstimatedMass +=Mass_of_light_quark;}
00423 if( q1 > 2) {EstimatedMass +=Mass_of_heavy_quark;}
00424
00425 G4int q2=(Qleft/100)%10;
00426 if( q2 < 3) {EstimatedMass +=Mass_of_light_quark;}
00427 if( q2 > 2) {EstimatedMass +=Mass_of_heavy_quark;}
00428 EstimatedMass +=Mass_of_string_junction;
00429 }
00430 else
00431 {
00432 Number_of_quarks++;
00433 if( Qleft < 3) {EstimatedMass +=Mass_of_light_quark;}
00434 if( Qleft > 2) {EstimatedMass +=Mass_of_heavy_quark;}
00435 }
00436
00437
00438
00439 G4int Qright=std::abs(string->GetRightParton()->GetPDGEncoding());
00440
00441 if( Qright > 1000)
00442 {
00443 Number_of_quarks+=2;
00444 G4int q1=Qright/1000;
00445 if( q1 < 3) {EstimatedMass +=Mass_of_light_quark;}
00446 if( q1 > 2) {EstimatedMass +=Mass_of_heavy_quark;}
00447
00448 G4int q2=(Qright/100)%10;
00449 if( q2 < 3) {EstimatedMass +=Mass_of_light_quark;}
00450 if( q2 > 2) {EstimatedMass +=Mass_of_heavy_quark;}
00451 EstimatedMass +=Mass_of_string_junction;
00452 }
00453 else
00454 {
00455 Number_of_quarks++;
00456 if( Qright < 3) {EstimatedMass +=Mass_of_light_quark;}
00457 if( Qright > 2) {EstimatedMass +=Mass_of_heavy_quark;}
00458 }
00459
00460
00461
00462 if(Number_of_quarks==2){EstimatedMass +=100.*MeV;}
00463 if(Number_of_quarks==3){EstimatedMass += 20.*MeV;}
00464 if(Number_of_quarks==4)
00465 {
00466 if((StringM > 1880.) && ( EstimatedMass < 2100)) {EstimatedMass = 2020.;}
00467
00468 else if((StringM > 2232.) && ( EstimatedMass < 2730)){EstimatedMass = 2570.;}
00469 else if((StringM > 5130.) && ( EstimatedMass < 3450)){EstimatedMass = 5130.;}
00470 else
00471 {
00472 EstimatedMass -=2.*Mass_of_string_junction;
00473 if(EstimatedMass <= 1600.*MeV){EstimatedMass-=200.*MeV;}
00474 else {EstimatedMass+=100.*MeV;}
00475 }
00476 }
00477
00478
00479
00480 MinimalStringMass=EstimatedMass;
00481 SetMinimalStringMass2(EstimatedMass);
00482 }
00483
00484
00485 void G4LundStringFragmentation::SetMinimalStringMass2(
00486 const G4double aValue)
00487 {
00488 MinimalStringMass2=aValue * aValue;
00489 }
00490
00491
00492 G4KineticTrackVector* G4LundStringFragmentation::FragmentString(
00493 const G4ExcitedString& theString)
00494 {
00495
00496 PastInitPhase=true;
00497
00498 SetMassCut(160.*MeV);
00499
00500
00501 G4FragmentingString aString(theString);
00502 SetMinimalStringMass(&aString);
00503
00504 G4KineticTrackVector * LeftVector(0);
00505
00506 if(!IsFragmentable(&aString))
00507 {
00508
00509 SetMassCut(1000.*MeV);
00510 LeftVector=LightFragmentationTest(&theString);
00511 SetMassCut(160.*MeV);
00512 }
00513
00514 if ( LeftVector != 0 ) {
00515
00516 LeftVector->operator[](0)->SetFormationTime(theString.GetTimeOfCreation());
00517 LeftVector->operator[](0)->SetPosition(theString.GetPosition());
00518 if(LeftVector->size() > 1)
00519 {
00520
00521 LeftVector->operator[](1)->SetFormationTime(theString.GetTimeOfCreation());
00522 LeftVector->operator[](1)->SetPosition(theString.GetPosition());
00523 }
00524 return LeftVector;
00525 }
00526
00527
00528 LeftVector =new G4KineticTrackVector;
00529 G4KineticTrackVector * RightVector=new G4KineticTrackVector;
00530
00531 G4ExcitedString *theStringInCMS=CPExcited(theString);
00532 G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms();
00533
00534 G4bool success = Loop_toFragmentString(theStringInCMS, LeftVector, RightVector);
00535
00536 delete theStringInCMS;
00537
00538 if ( ! success )
00539 {
00540 std::for_each(LeftVector->begin(), LeftVector->end(), DeleteKineticTrack());
00541 LeftVector->clear();
00542 std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack());
00543 delete RightVector;
00544 return LeftVector;
00545 }
00546
00547
00548 while(!RightVector->empty())
00549 {
00550 LeftVector->push_back(RightVector->back());
00551 RightVector->erase(RightVector->end()-1);
00552 }
00553 delete RightVector;
00554
00555 CalculateHadronTimePosition(theString.Get4Momentum().mag(), LeftVector);
00556
00557 G4LorentzRotation toObserverFrame(toCms.inverse());
00558
00559 G4double TimeOftheStringCreation=theString.GetTimeOfCreation();
00560 G4ThreeVector PositionOftheStringCreation(theString.GetPosition());
00561
00562
00563 for(size_t C1 = 0; C1 < LeftVector->size(); C1++)
00564 {
00565 G4KineticTrack* Hadron = LeftVector->operator[](C1);
00566 G4LorentzVector Momentum = Hadron->Get4Momentum();
00567
00568 Momentum = toObserverFrame*Momentum;
00569 Hadron->Set4Momentum(Momentum);
00570
00571 G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime());
00572 Momentum = toObserverFrame*Coordinate;
00573 Hadron->SetFormationTime(TimeOftheStringCreation + Momentum.e() - fermi/c_light);
00574 G4ThreeVector aPosition(Momentum.vect());
00575 Hadron->SetPosition(PositionOftheStringCreation+aPosition);
00576 };
00577
00578 return LeftVector;
00579 }
00580
00581
00582 G4bool G4LundStringFragmentation::IsFragmentable(const G4FragmentingString * const string)
00583 {
00584 SetMinimalStringMass(string);
00585
00586 return MinimalStringMass < string->Get4Momentum().mag();
00587 }
00588
00589
00590 G4bool G4LundStringFragmentation::StopFragmenting(const G4FragmentingString * const string)
00591 {
00592 SetMinimalStringMass(string);
00593
00594 if (string->FourQuarkString())
00595 {
00596 return G4UniformRand() < std::exp(-0.0005*(string->Mass() - MinimalStringMass));
00597 } else {
00598 return G4UniformRand() < std::exp(-0.88e-6*(string->Mass()*string->Mass() -
00599 MinimalStringMass*MinimalStringMass));
00600 }
00601 }
00602
00603
00604 G4bool G4LundStringFragmentation::SplitLast(G4FragmentingString * string,
00605 G4KineticTrackVector * LeftVector,
00606 G4KineticTrackVector * RightVector)
00607 {
00608
00609
00610 G4LorentzVector Str4Mom=string->Get4Momentum();
00611 G4ThreeVector ClusterVel=string->Get4Momentum().boostVector();
00612 G4double StringMass=string->Mass();
00613
00614 G4ParticleDefinition * LeftHadron(0), * RightHadron(0);
00615
00616 NumberOf_FS=0;
00617 for(G4int i=0; i<35; i++) {FS_Weight[i]=0.;}
00618
00619
00620
00621 string->SetLeftPartonStable();
00622
00623 if (string->FourQuarkString() )
00624 {
00625
00626
00627
00628 if(StringMass-MinimalStringMass < 0.)
00629 {
00630 if (! Diquark_AntiDiquark_belowThreshold_lastSplitting(string, LeftHadron, RightHadron) )
00631 {
00632 return false;
00633 }
00634 } else
00635 {
00636 Diquark_AntiDiquark_aboveThreshold_lastSplitting(string, LeftHadron, RightHadron);
00637
00638 if(NumberOf_FS == 0) return false;
00639
00640 G4int sampledState = SampleState();
00641
00642 if(string->GetLeftParton()->GetPDGEncoding() < 0)
00643 {
00644 LeftHadron =FS_LeftHadron[sampledState];
00645 RightHadron=FS_RightHadron[sampledState];
00646 } else
00647 {
00648 LeftHadron =FS_RightHadron[sampledState];
00649 RightHadron=FS_LeftHadron[sampledState];
00650 }
00651
00652 }
00653 } else
00654 {
00655 if (string->DecayIsQuark() && string->StableIsQuark() )
00656 {
00657
00658 Quark_AntiQuark_lastSplitting(string, LeftHadron, RightHadron);
00659 } else
00660 {
00661
00662 Quark_Diquark_lastSplitting(string, LeftHadron, RightHadron);
00663 }
00664
00665 if(NumberOf_FS == 0) return false;
00666
00667 G4int sampledState = SampleState();
00668
00669 LeftHadron =FS_LeftHadron[sampledState];
00670 RightHadron=FS_RightHadron[sampledState];
00671
00672
00673
00674 }
00675
00676 G4LorentzVector LeftMom, RightMom;
00677 G4ThreeVector Pos;
00678
00679 Sample4Momentum(&LeftMom, LeftHadron->GetPDGMass(),
00680 &RightMom, RightHadron->GetPDGMass(),
00681 StringMass);
00682
00683 LeftMom.boost(ClusterVel);
00684 RightMom.boost(ClusterVel);
00685
00686 LeftVector->push_back(new G4KineticTrack(LeftHadron, 0, Pos, LeftMom));
00687 RightVector->push_back(new G4KineticTrack(RightHadron, 0, Pos, RightMom));
00688
00689 return true;
00690
00691 }
00692
00693
00694 void G4LundStringFragmentation::Sample4Momentum(G4LorentzVector* Mom, G4double Mass, G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass)
00695 {
00696
00697 G4ThreeVector Pt;
00698 G4double MassMt2, AntiMassMt2;
00699 G4double AvailablePz, AvailablePz2;
00700
00701
00702
00703
00704 if((Mass > 930. || AntiMass > 930.))
00705 {
00706
00707 G4double r_val = sqr(InitialMass*InitialMass - Mass*Mass - AntiMass*AntiMass) -
00708 sqr(2.*Mass*AntiMass);
00709 G4double Pabs = (r_val > 0.)? std::sqrt(r_val)/(2.*InitialMass) : 0;
00710
00711
00712
00713 G4double pz =1. - 2.*G4UniformRand();
00714 G4double st = std::sqrt(1. - pz * pz)*Pabs;
00715 G4double phi = 2.*pi*G4UniformRand();
00716 G4double px = st*std::cos(phi);
00717 G4double py = st*std::sin(phi);
00718 pz *= Pabs;
00719
00720 Mom->setPx(px); Mom->setPy(py); Mom->setPz(pz);
00721 Mom->setE(std::sqrt(Pabs*Pabs + Mass*Mass));
00722
00723 AntiMom->setPx(-px); AntiMom->setPy(-py); AntiMom->setPz(-pz);
00724 AntiMom->setE (std::sqrt(Pabs*Pabs + AntiMass*AntiMass));
00725
00726 }
00727 else
00728
00729 {
00730 do
00731 {
00732
00733
00734 G4double termD = InitialMass*InitialMass -Mass*Mass - AntiMass*AntiMass;
00735 G4double termab = 4*sqr(Mass*AntiMass);
00736 G4double termN = 2*termD + 4*Mass*Mass + 4*AntiMass*AntiMass;
00737 G4double pt2max=(termD*termD - termab )/ termN ;
00738
00739
00740 Pt=SampleQuarkPt(std::sqrt(pt2max)); Pt.setZ(0); G4double Pt2=Pt.mag2();
00741
00742 MassMt2 = Mass * Mass + Pt2;
00743 AntiMassMt2= AntiMass * AntiMass + Pt2;
00744
00745 AvailablePz2= sqr(InitialMass*InitialMass - MassMt2 - AntiMassMt2) -
00746 4.*MassMt2*AntiMassMt2;
00747 }
00748 while(AvailablePz2 < 0.);
00749
00750 AvailablePz2 /=(4.*InitialMass*InitialMass);
00751 AvailablePz = std::sqrt(AvailablePz2);
00752
00753 G4double Px=Pt.getX();
00754 G4double Py=Pt.getY();
00755
00756 Mom->setPx(Px); Mom->setPy(Py); Mom->setPz(AvailablePz);
00757 Mom->setE(std::sqrt(MassMt2+AvailablePz2));
00758
00759 AntiMom->setPx(-Px); AntiMom->setPy(-Py); AntiMom->setPz(-AvailablePz);
00760 AntiMom->setE (std::sqrt(AntiMassMt2+AvailablePz2));
00761 }
00762 }
00763
00764
00765 G4LorentzVector * G4LundStringFragmentation::SplitEandP(G4ParticleDefinition * pHadron,
00766 G4FragmentingString * string, G4FragmentingString * newString)
00767 {
00768
00769 G4LorentzVector String4Momentum=string->Get4Momentum();
00770 G4double StringMT2=string->Get4Momentum().mt2();
00771
00772 G4double HadronMass = pHadron->GetPDGMass();
00773
00774 SetMinimalStringMass(newString);
00775
00776
00777 if(HadronMass + MinimalStringMass > String4Momentum.mag()) {return 0;}
00778 String4Momentum.setPz(0.);
00779 G4ThreeVector StringPt=String4Momentum.vect();
00780
00781
00782 G4ThreeVector thePt;
00783 thePt=SampleQuarkPt();
00784
00785 G4ThreeVector HadronPt = thePt +string->DecayPt();
00786 HadronPt.setZ(0);
00787
00788 G4ThreeVector RemSysPt = StringPt - HadronPt;
00789
00790
00791
00792
00793 G4double HadronMassT2 = sqr(HadronMass) + HadronPt.mag2();
00794 G4double ResidualMassT2=sqr(MinimalStringMass) + RemSysPt.mag2();
00795
00796 G4double Pz2 = (sqr(StringMT2 - HadronMassT2 - ResidualMassT2) -
00797 4*HadronMassT2 * ResidualMassT2)/4./StringMT2;
00798
00799 if(Pz2 < 0 ) {return 0;}
00800
00801
00802
00803 G4double Pz = std::sqrt(Pz2);
00804 G4double zMin = (std::sqrt(HadronMassT2+Pz2) - Pz)/std::sqrt(StringMT2);
00805 G4double zMax = (std::sqrt(HadronMassT2+Pz2) + Pz)/std::sqrt(StringMT2);
00806
00807
00808 if (zMin >= zMax) return 0;
00809
00810 G4double z = GetLightConeZ(zMin, zMax,
00811 string->GetDecayParton()->GetPDGEncoding(), pHadron,
00812 HadronPt.x(), HadronPt.y());
00813
00814
00815
00816
00817 HadronPt.setZ(0.5* string->GetDecayDirection() *
00818 (z * string->LightConeDecay() -
00819 HadronMassT2/(z * string->LightConeDecay())));
00820
00821 G4double HadronE = 0.5* (z * string->LightConeDecay() +
00822 HadronMassT2/(z * string->LightConeDecay()));
00823
00824 G4LorentzVector * a4Momentum= new G4LorentzVector(HadronPt,HadronE);
00825
00826 return a4Momentum;
00827 }
00828
00829
00830 G4double G4LundStringFragmentation::GetLightConeZ(G4double zmin, G4double zmax,
00831 G4int PDGEncodingOfDecayParton,
00832 G4ParticleDefinition* pHadron,
00833 G4double Px, G4double Py)
00834 {
00835
00836
00837
00838
00839 G4double Mass = pHadron->GetPDGMass();
00840
00841
00842 G4double Mt2 = Px*Px + Py*Py + Mass*Mass;
00843
00844 G4double alund;
00845 if(std::abs(PDGEncodingOfDecayParton) < 1000)
00846 {
00847 alund=0.35/GeV/GeV;
00848 }
00849 else
00850 {
00851 alund=0.7/GeV/GeV;
00852 }
00853 G4double zOfMaxyf=alund*Mt2/(alund*Mt2 + 1.);
00854 G4double maxYf=(1-zOfMaxyf)/zOfMaxyf * std::exp(-alund*Mt2/zOfMaxyf);
00855 G4double z, yf;
00856 do
00857 {
00858 z = zmin + G4UniformRand()*(zmax-zmin);
00859
00860 yf = (1-z)/z * std::exp(-alund*Mt2/z);
00861 }
00862 while (G4UniformRand()*maxYf > yf);
00863
00864
00865 return z;
00866 }
00867
00868
00869 G4double G4LundStringFragmentation::lambda(G4double S, G4double m1_Sqr, G4double m2_Sqr)
00870 {
00871 G4double lam = sqr(S - m1_Sqr - m2_Sqr) - 4.*m1_Sqr*m2_Sqr;
00872 return lam;
00873 }
00874
00875
00876
00877
00878
00879
00880
00881
00882
00883 G4bool G4LundStringFragmentation::Loop_toFragmentString(G4ExcitedString * & theStringInCMS,
00884 G4KineticTrackVector * & LeftVector,
00885 G4KineticTrackVector * & RightVector)
00886 {
00887 G4bool final_success=false;
00888 G4bool inner_success=true;
00889 G4int attempt=0;
00890 while ( ! final_success && attempt++ < StringLoopInterrupt )
00891 {
00892 G4FragmentingString *currentString=new G4FragmentingString(*theStringInCMS);
00893
00894
00895 std::for_each(LeftVector->begin(), LeftVector->end(), DeleteKineticTrack());
00896 LeftVector->clear();
00897 std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack());
00898 RightVector->clear();
00899
00900
00901 inner_success=true;
00902 while (! StopFragmenting(currentString) )
00903 {
00904 G4FragmentingString *newString=0;
00905 G4KineticTrack * Hadron=Splitup(currentString,newString);
00906 if ( Hadron != 0 )
00907 {
00908
00909 if ( currentString->GetDecayDirection() > 0 )
00910 {
00911 LeftVector->push_back(Hadron);
00912 } else
00913 {
00914 RightVector->push_back(Hadron);
00915 }
00916 delete currentString;
00917 currentString=newString;
00918 }
00919 };
00920
00921 if ( inner_success && SplitLast(currentString, LeftVector, RightVector) )
00922 {
00923 final_success=true;
00924 }
00925 delete currentString;
00926 }
00927 return final_success;
00928 }
00929
00930
00931 G4bool G4LundStringFragmentation::
00932 Diquark_AntiDiquark_belowThreshold_lastSplitting(G4FragmentingString * & string,
00933 G4ParticleDefinition * & LeftHadron,
00934 G4ParticleDefinition * & RightHadron)
00935 {
00936 G4double StringMass = string->Mass();
00937 G4int cClusterInterrupt = 0;
00938 do
00939 {
00940
00941 if (cClusterInterrupt++ >= ClusterLoopInterrupt)
00942 {
00943 return false;
00944 }
00945
00946 G4int LeftQuark1= string->GetLeftParton()->GetPDGEncoding()/1000;
00947 G4int LeftQuark2=(string->GetLeftParton()->GetPDGEncoding()/100)%10;
00948
00949 G4int RightQuark1= string->GetRightParton()->GetPDGEncoding()/1000;
00950 G4int RightQuark2=(string->GetRightParton()->GetPDGEncoding()/100)%10;
00951
00952 if(G4UniformRand()<0.5)
00953 {
00954 LeftHadron =hadronizer->Build(FindParticle( LeftQuark1),
00955 FindParticle(RightQuark1));
00956 RightHadron=hadronizer->Build(FindParticle( LeftQuark2),
00957 FindParticle(RightQuark2));
00958 } else
00959 {
00960 LeftHadron =hadronizer->Build(FindParticle( LeftQuark1),
00961 FindParticle(RightQuark2));
00962 RightHadron=hadronizer->Build(FindParticle( LeftQuark2),
00963 FindParticle(RightQuark1));
00964 }
00965
00966
00967
00968 }
00969 while ((StringMass <= LeftHadron->GetPDGMass() + RightHadron->GetPDGMass()));
00970
00971 return true;
00972 }
00973
00974
00975 G4bool G4LundStringFragmentation::
00976 Diquark_AntiDiquark_aboveThreshold_lastSplitting(G4FragmentingString * & string,
00977 G4ParticleDefinition * & LeftHadron,
00978 G4ParticleDefinition * & RightHadron)
00979 {
00980
00981
00982
00983
00984
00985 G4double StringMass = string->Mass();
00986 G4double StringMassSqr= sqr(StringMass);
00987 G4ParticleDefinition * Di_Quark;
00988 G4ParticleDefinition * Anti_Di_Quark;
00989
00990 if(string->GetLeftParton()->GetPDGEncoding() < 0)
00991 {
00992 Anti_Di_Quark =string->GetLeftParton();
00993 Di_Quark=string->GetRightParton();
00994 } else
00995 {
00996 Anti_Di_Quark =string->GetRightParton();
00997 Di_Quark=string->GetLeftParton();
00998 }
00999
01000 G4int IDAnti_di_quark =Anti_Di_Quark->GetPDGEncoding();
01001 G4int AbsIDAnti_di_quark =std::abs(IDAnti_di_quark);
01002 G4int IDdi_quark =Di_Quark->GetPDGEncoding();
01003 G4int AbsIDdi_quark =std::abs(IDdi_quark);
01004
01005 G4int ADi_q1=AbsIDAnti_di_quark/1000;
01006 G4int ADi_q2=(AbsIDAnti_di_quark-ADi_q1*1000)/100;
01007
01008 G4int Di_q1=AbsIDdi_quark/1000;
01009 G4int Di_q2=(AbsIDdi_quark-Di_q1*1000)/100;
01010
01011
01012
01013
01014 NumberOf_FS=0;
01015 for(G4int ProdQ=1; ProdQ < 4; ProdQ++)
01016 {
01017
01018
01019 G4int StateADiQ=0;
01020 do
01021 {
01022
01023
01024 LeftHadron=G4ParticleTable::GetParticleTable()->FindParticle(
01025 -Baryon[ADi_q1-1][ADi_q2-1][ProdQ-1][StateADiQ]);
01026 G4double LeftHadronMass=LeftHadron->GetPDGMass();
01027
01028
01029
01030 G4int StateDiQ=0;
01031 do
01032 {
01033
01034 RightHadron=G4ParticleTable::GetParticleTable()->FindParticle(
01035 +Baryon[Di_q1-1][Di_q2-1][ProdQ-1][StateDiQ]);
01036 G4double RightHadronMass=RightHadron->GetPDGMass();
01037
01038
01039
01040
01041
01042 if(StringMass >= LeftHadronMass + RightHadronMass)
01043 {
01044 G4double FS_Psqr=lambda(StringMassSqr,sqr(LeftHadronMass),
01045 sqr(RightHadronMass));
01046
01047 FS_Weight[NumberOf_FS]=std::sqrt(FS_Psqr)*FS_Psqr*
01048 BaryonWeight[ADi_q1-1][ADi_q2-1][ProdQ-1][StateADiQ]*
01049 BaryonWeight[Di_q1-1][Di_q2-1][ProdQ-1][StateDiQ]*
01050 Prob_QQbar[ProdQ-1];
01051
01052 FS_LeftHadron[NumberOf_FS] = LeftHadron;
01053 FS_RightHadron[NumberOf_FS]= RightHadron;
01054
01055
01056
01057 NumberOf_FS++;
01058
01059 if(NumberOf_FS > 34)
01060 {G4int Uzhi; G4cout<<"QQ_QQbar string #_FS "<<NumberOf_FS<<G4endl; G4cin>>Uzhi;}
01061 }
01062
01063 StateDiQ++;
01064
01065 } while(Baryon[Di_q1-1][Di_q2-1][ProdQ-1][StateDiQ]!=0);
01066
01067 StateADiQ++;
01068 } while(Baryon[ADi_q1-1][ADi_q2-1][ProdQ-1][StateADiQ]!=0);
01069 }
01070
01071 return true;
01072 }
01073
01074
01075 G4bool G4LundStringFragmentation::
01076 Quark_Diquark_lastSplitting(G4FragmentingString * & string,
01077 G4ParticleDefinition * & LeftHadron,
01078 G4ParticleDefinition * & RightHadron)
01079 {
01080 G4double StringMass = string->Mass();
01081 G4double StringMassSqr= sqr(StringMass);
01082
01083 G4ParticleDefinition * Di_Quark;
01084 G4ParticleDefinition * Quark;
01085
01086 if(string->GetLeftParton()->GetParticleSubType()== "quark")
01087 {
01088 Quark =string->GetLeftParton();
01089 Di_Quark=string->GetRightParton();
01090 } else
01091 {
01092 Quark =string->GetRightParton();
01093 Di_Quark=string->GetLeftParton();
01094 }
01095
01096 G4int IDquark =Quark->GetPDGEncoding();
01097 G4int AbsIDquark =std::abs(IDquark);
01098 G4int IDdi_quark =Di_Quark->GetPDGEncoding();
01099 G4int AbsIDdi_quark=std::abs(IDdi_quark);
01100 G4int Di_q1=AbsIDdi_quark/1000;
01101 G4int Di_q2=(AbsIDdi_quark-Di_q1*1000)/100;
01102
01103
01104 G4int SignDiQ= 1;
01105 if(IDdi_quark < 0) SignDiQ=-1;
01106
01107 NumberOf_FS=0;
01108 for(G4int ProdQ=1; ProdQ < 4; ProdQ++)
01109 {
01110 G4int SignQ;
01111 if(IDquark > 0)
01112 { SignQ=-1;
01113 if(IDquark == 2) SignQ= 1;
01114 if((IDquark == 1) && (ProdQ == 3)) SignQ= 1;
01115 if((IDquark == 3) && (ProdQ == 1)) SignQ=-1;
01116 } else
01117 {
01118 SignQ= 1;
01119 if(IDquark == -2) SignQ=-1;
01120 if((IDquark ==-1) && (ProdQ == 3)) SignQ=-1;
01121 if((IDquark ==-3) && (ProdQ == 1)) SignQ= 1;
01122 }
01123
01124 if(AbsIDquark == ProdQ) SignQ= 1;
01125
01126
01127
01128
01129 G4int StateQ=0;
01130 do
01131 {
01132
01133
01134 LeftHadron=G4ParticleTable::GetParticleTable()->FindParticle(SignQ*
01135 Meson[AbsIDquark-1][ProdQ-1][StateQ]);
01136 G4double LeftHadronMass=LeftHadron->GetPDGMass();
01137
01138
01139
01140 G4int StateDiQ=0;
01141 do
01142 {
01143
01144 RightHadron=G4ParticleTable::GetParticleTable()->FindParticle(SignDiQ*
01145 Baryon[Di_q1-1][Di_q2-1][ProdQ-1][StateDiQ]);
01146 G4double RightHadronMass=RightHadron->GetPDGMass();
01147
01148
01149
01150
01151
01152 if(StringMass >= LeftHadronMass + RightHadronMass)
01153 {
01154 G4double FS_Psqr=lambda(StringMassSqr,sqr(LeftHadronMass),
01155 sqr(RightHadronMass));
01156 FS_Weight[NumberOf_FS]=std::sqrt(FS_Psqr)*
01157 MesonWeight[AbsIDquark-1][ProdQ-1][StateQ]*
01158 BaryonWeight[Di_q1-1][Di_q2-1][ProdQ-1][StateDiQ]*
01159 Prob_QQbar[ProdQ-1];
01160
01161 FS_LeftHadron[NumberOf_FS] = LeftHadron;
01162 FS_RightHadron[NumberOf_FS]= RightHadron;
01163
01164
01165
01166 NumberOf_FS++;
01167
01168 if(NumberOf_FS > 34)
01169 {G4int Uzhi; G4cout<<"QQbar string #_FS "<<NumberOf_FS<<G4endl; G4cin>>Uzhi;}
01170 }
01171
01172 StateDiQ++;
01173
01174 } while(Baryon[Di_q1-1][Di_q2-1][ProdQ-1][StateDiQ]!=0);
01175
01176 StateQ++;
01177 } while(Meson[AbsIDquark-1][ProdQ-1][StateQ]!=0);
01178 }
01179
01180 return true;
01181 }
01182
01183
01184 G4bool G4LundStringFragmentation::
01185 Quark_AntiQuark_lastSplitting(G4FragmentingString * & string,
01186 G4ParticleDefinition * & LeftHadron,
01187 G4ParticleDefinition * & RightHadron)
01188 {
01189 G4double StringMass = string->Mass();
01190 G4double StringMassSqr= sqr(StringMass);
01191
01192 G4ParticleDefinition * Quark;
01193 G4ParticleDefinition * Anti_Quark;
01194
01195 if(string->GetLeftParton()->GetPDGEncoding()>0)
01196 {
01197 Quark =string->GetLeftParton();
01198 Anti_Quark=string->GetRightParton();
01199 } else
01200 {
01201 Quark =string->GetRightParton();
01202 Anti_Quark=string->GetLeftParton();
01203 }
01204
01205
01206 G4int IDquark =Quark->GetPDGEncoding();
01207 G4int AbsIDquark =std::abs(IDquark);
01208 G4int IDanti_quark =Anti_Quark->GetPDGEncoding();
01209 G4int AbsIDanti_quark=std::abs(IDanti_quark);
01210
01211 NumberOf_FS=0;
01212 for(G4int ProdQ=1; ProdQ < 4; ProdQ++)
01213 {
01214
01215 G4int SignQ=-1;
01216 if(IDquark == 2) SignQ= 1;
01217 if((IDquark == 1) && (ProdQ == 3)) SignQ= 1;
01218 if((IDquark == 3) && (ProdQ == 1)) SignQ=-1;
01219 if(IDquark == ProdQ) SignQ= 1;
01220
01221 G4int SignAQ= 1;
01222 if(IDanti_quark == -2) SignAQ=-1;
01223 if((IDanti_quark ==-1) && (ProdQ == 3)) SignAQ=-1;
01224 if((IDanti_quark ==-3) && (ProdQ == 1)) SignAQ= 1;
01225 if(AbsIDanti_quark == ProdQ) SignAQ= 1;
01226
01227 G4int StateQ=0;
01228 do
01229 {
01230 LeftHadron=G4ParticleTable::GetParticleTable()->FindParticle(SignQ*
01231 Meson[AbsIDquark-1][ProdQ-1][StateQ]);
01232 G4double LeftHadronMass=LeftHadron->GetPDGMass();
01233 StateQ++;
01234
01235 G4int StateAQ=0;
01236 do
01237 {
01238 RightHadron=G4ParticleTable::GetParticleTable()->FindParticle(SignAQ*
01239 Meson[AbsIDanti_quark-1][ProdQ-1][StateAQ]);
01240 G4double RightHadronMass=RightHadron->GetPDGMass();
01241 StateAQ++;
01242
01243 if(StringMass >= LeftHadronMass + RightHadronMass)
01244 {
01245 G4double FS_Psqr=lambda(StringMassSqr,sqr(LeftHadronMass),
01246 sqr(RightHadronMass));
01247
01248 FS_Weight[NumberOf_FS]=std::sqrt(FS_Psqr)*
01249 MesonWeight[AbsIDquark-1][ProdQ-1][StateQ]*
01250 MesonWeight[AbsIDanti_quark-1][ProdQ-1][StateAQ]*
01251 Prob_QQbar[ProdQ-1];
01252
01253 if(string->GetLeftParton()->GetPDGEncoding()>0)
01254 {
01255 FS_LeftHadron[NumberOf_FS] = RightHadron;
01256 FS_RightHadron[NumberOf_FS]= LeftHadron;
01257 } else
01258 {
01259 FS_LeftHadron[NumberOf_FS] = LeftHadron;
01260 FS_RightHadron[NumberOf_FS]= RightHadron;
01261 }
01262 NumberOf_FS++;
01263
01264
01265
01266 if(NumberOf_FS > 34)
01267 {G4int Uzhi; G4cout<<"QQbar string #_FS "<<NumberOf_FS<<G4endl; G4cin>>Uzhi;}
01268 }
01269 } while(Meson[AbsIDanti_quark-1][ProdQ-1][StateAQ]!=0);
01270 } while(Meson[AbsIDquark-1][ProdQ-1][StateQ]!=0);
01271 }
01272
01273 return true;
01274 }
01275
01276
01277 G4int G4LundStringFragmentation::SampleState(void)
01278 {
01279 G4double SumWeights=0.;
01280 for(G4int i=0; i<NumberOf_FS; i++) {SumWeights+=FS_Weight[i];}
01281
01282 G4double ksi=G4UniformRand();
01283 G4double Sum=0.;
01284 G4int indexPosition = 0;
01285
01286 for(G4int i=0; i<NumberOf_FS; i++)
01287 {
01288 Sum+=(FS_Weight[i]/SumWeights);
01289 indexPosition=i;
01290 if(Sum >= ksi) break;
01291 }
01292 return indexPosition;
01293 }
01294