- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- Location:
- trunk/source/processes/hadronic/models/parton_string/diffraction/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4DiffractiveExcitation.cc
r1228 r1340 25 25 // 26 26 // 27 // $Id: G4DiffractiveExcitation.cc,v 1.2 1 2009/12/15 19:14:31vuzhinsk Exp $27 // $Id: G4DiffractiveExcitation.cc,v 1.22 2010/09/20 15:50:46 vuzhinsk Exp $ 28 28 // ------------------------------------------------------------ 29 29 // GEANT 4 class implemetation file … … 108 108 G4int TargetPDGcode=target->GetDefinition()->GetPDGEncoding(); 109 109 G4int absTargetPDGcode=std::abs(TargetPDGcode); 110 //G4cout<<"Excit "<<ProjectilePDGcode<<" "<<TargetPDGcode<<G4endl; 110 111 111 112 G4LorentzVector Ptarget=target->Get4Momentum(); … … 113 114 G4double M0target = Ptarget.mag(); 114 115 115 116 // G4double TargetRapidity = Ptarget.rapidity(); 116 117 117 118 if(M0target < target->GetDefinition()->GetPDGMass()) … … 129 130 G4double AveragePt2=theParameters->GetAveragePt2(); 130 131 131 G4double ProbOfDiffraction=ProbProjectileDiffraction +132 ProbTargetDiffraction;132 // G4double ProbOfDiffraction=ProbProjectileDiffraction + 133 // ProbTargetDiffraction; 133 134 134 135 G4double SumMasses=M0projectile+M0target+200.*MeV; … … 162 163 163 164 G4double SqrtS=std::sqrt(S); 164 165 165 166 if(absProjectilePDGcode > 1000 && (SqrtS < 2300*MeV || SqrtS < SumMasses)) 166 167 {target->SetStatus(2); return false;} // The model cannot work for … … 215 216 216 217 G4double maxPtSquare; // = PZcms2; 217 218 /* 219 G4cout<<"Start --------------------"<<G4endl; 220 G4cout<<"Proj "<<M0projectile<<" "<<ProjectileDiffStateMinMass<<" "<<ProjectileNonDiffStateMinMass<<G4endl; 221 G4cout<<"Targ "<<M0target <<" "<<TargetDiffStateMinMass <<" "<<TargetNonDiffStateMinMass<<G4endl; 222 G4cout<<"SqrtS "<<SqrtS<<G4endl; 223 G4cout<<"Rapid "<<ProjectileRapidity<<" "<<TargetRapidity<<G4endl; 224 */ 218 225 // Charge exchange can be possible for baryons ----------------- 219 226 … … 223 230 G4double DeltaProbAtQuarkExchange=theParameters->GetDeltaProbAtQuarkExchange(); 224 231 232 //G4cout<<"Q exc "<<MagQuarkExchange<<" "<<SlopeQuarkExchange<<" "<<DeltaProbAtQuarkExchange<<G4endl; 225 233 // G4double NucleonMass= 226 234 // (G4ParticleTable::GetParticleTable()->FindParticle(2112))->GetPDGMass(); … … 228 236 (G4ParticleTable::GetParticleTable()->FindParticle(2224))->GetPDGMass(); 229 237 230 // Check for possible quark excjane ----------------------------------- 238 //G4cout<<MagQuarkExchange*std::exp(-SlopeQuarkExchange*(ProjectileRapidity - TargetRapidity))<<G4endl; 239 //G4cout<<MagQuarkExchange*std::exp(-SlopeQuarkExchange*(ProjectileRapidity))<<G4endl; 240 //G4cout<<MagQuarkExchange*std::exp(-SlopeQuarkExchange*(ProjectileRapidity - 1.36))<<G4endl; 241 //G4int Uzhi; G4cin>>Uzhi; 242 // Check for possible quark exchange ----------------------------------- 243 231 244 if(G4UniformRand() < MagQuarkExchange* 232 std::exp(-SlopeQuarkExchange* (ProjectileRapidity - TargetRapidity)))245 std::exp(-SlopeQuarkExchange*ProjectileRapidity)) //TargetRapidity))) 1.45 233 246 { 247 // std::exp(-SlopeQuarkExchange*(ProjectileRapidity - 1.36))) //TargetRapidity))) 1.45 248 //G4cout<<"Q exchange"<<G4endl; 234 249 G4int NewProjCode(0), NewTargCode(0); 235 250 … … 249 264 UnpackBaryon(TargetPDGcode, TargQ1, TargQ2, TargQ3); 250 265 266 //G4cout<<ProjQ1<<" "<<ProjQ2<<" "<<ProjQ3<<G4endl; 267 //G4cout<<TargQ1<<" "<<TargQ2<<" "<<TargQ3<<G4endl; 251 268 // Sampling of exchanged quarks ------------------- 252 269 G4int ProjExchangeQ(0); … … 326 343 {ProjExchangeQ = ProjQ3;} 327 344 345 //G4cout<<"ProjExchangeQ "<<ProjExchangeQ<<G4endl; 328 346 if((ProjExchangeQ != TargQ1)||(G4UniformRand()<Same)) 329 347 { … … 338 356 } 339 357 358 //G4cout<<"ProjExchangeQ "<<ProjExchangeQ<<G4endl; 359 //G4cout<<"TargExchangeQ "<<TargExchangeQ<<G4endl; 340 360 if( Ksi < 0.333333 ) 341 361 {ProjQ1=ProjExchangeQ;} … … 376 396 377 397 NewProjCode = NewNucleonId(ProjQ1, ProjQ2, ProjQ3); // ***************************** 398 399 //G4cout<<"ProjQ1, ProjQ2, ProjQ3 "<<ProjQ1<<" "<<ProjQ2<<" "<<ProjQ3<<" "<<NewProjCode<<G4endl; 400 401 G4int TestParticleID=NewProjCode; 402 G4ParticleDefinition* TestParticle=0; 403 G4double TestParticleMass=DBL_MAX; 404 405 TestParticle=G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode); 406 if(TestParticle) TestParticleMass=TestParticle->GetPDGMass(); 378 407 379 408 if((ProjQ1==ProjQ2) && (ProjQ1==ProjQ3)) {NewProjCode +=2; ProjDeltaHasCreated=true;} … … 390 419 } 391 420 421 G4ParticleDefinition* NewTestParticle= 422 G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode); 423 //G4cout<<"TestParticleMass NewTestParticle->GetPDGMass() "<<TestParticleMass<<" "<< NewTestParticle->GetPDGMass()<<G4endl; 424 //if(TestParticleMass < NewTestParticle->GetPDGMass()) {NewProjCode=TestParticleID;} 425 426 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= 427 392 428 NewTargCode = NewNucleonId(TargQ1, TargQ2, TargQ3); // ***************************** 429 430 //G4cout<<"TargQ1, TargQ2, TargQ3 "<<TargQ1<<" "<<TargQ2<<" "<<TargQ3<<" "<<NewTargCode<<G4endl; 431 432 TestParticleID=NewTargCode; 433 TestParticleMass=DBL_MAX; 434 435 TestParticle=G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode); 436 if(TestParticle) TestParticleMass=TestParticle->GetPDGMass(); 393 437 394 438 if((TargQ1==TargQ2) && (TargQ1==TargQ3)) {NewTargCode +=2; TargDeltaHasCreated=true;} … … 405 449 } 406 450 451 NewTestParticle=G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode); 452 //G4cout<<"TestParticleMass NewTestParticle->GetPDGMass() "<<TestParticleMass<<" "<< NewTestParticle->GetPDGMass()<<G4endl; 453 //if(TestParticleMass < NewTestParticle->GetPDGMass()) {NewTargCode=TestParticleID;} 454 455 //G4cout<<"NewProjCode NewTargCode "<<NewProjCode<<" "<<NewTargCode<<G4endl; 456 //G4int Uzhi; G4cin>>Uzhi; 457 407 458 if((absProjectilePDGcode == NewProjCode) && (absTargetPDGcode == NewTargCode)) 408 459 { // Nothing was changed! It is not right!? 409 460 } 410 461 // Forming baryons -------------------------------------------------- 411 462 if(ProjDeltaHasCreated) {ProbProjectileDiffraction=1.; ProbTargetDiffraction=0.;} 463 if(TargDeltaHasCreated) {ProbProjectileDiffraction=0.; ProbTargetDiffraction=1.;} 464 if(ProjDeltaHasCreated) 465 { 466 M0projectile= 467 (G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode))->GetPDGMass(); 468 M0projectile2 = M0projectile * M0projectile; 469 470 ProjectileDiffStateMinMass =M0projectile+210.*MeV; //210 MeV=m_pi+70 MeV 471 ProjectileNonDiffStateMinMass=M0projectile+210.*MeV; //210 MeV=m_pi+70 MeV 472 } 473 474 // if(M0target < 475 // (G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode))->GetPDGMass()) 476 if(TargDeltaHasCreated) 477 { 478 M0target= 479 (G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode))->GetPDGMass(); 480 M0target2 = M0target * M0target; 481 482 TargetDiffStateMinMass =M0target+210.*MeV; //210 MeV=m_pi+70 MeV; 483 TargetNonDiffStateMinMass=M0target+210.*MeV; //210 MeV=m_pi+70 MeV; 484 } 412 485 } // End of if projectile is baryon --------------------------- 413 486 … … 416 489 // in the ground states, we have to put ---------------------------------- 417 490 418 if(M0projectile < 419 (G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode))->GetPDGMass()) 491 /* 492 // if(M0projectile < 493 // (G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode))->GetPDGMass()) 494 if(ProjDeltaHasCreated) 420 495 { 421 496 M0projectile= 422 497 (G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode))->GetPDGMass(); 423 498 M0projectile2 = M0projectile * M0projectile; 499 500 ProjectileDiffStateMinMass =M0projectile+160.*MeV; //160 MeV=m_pi+20 MeV 501 ProjectileNonDiffStateMinMass=M0projectile+160.*MeV; //160 MeV=m_pi+20 MeV 424 502 } 425 503 426 if(M0target < 427 (G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode))->GetPDGMass()) 504 // if(M0target < 505 // (G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode))->GetPDGMass()) 506 if(TargDeltaHasCreated) 428 507 { 429 508 M0target= 430 509 (G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode))->GetPDGMass(); 431 510 M0target2 = M0target * M0target; 511 512 TargetDiffStateMinMass =M0target+160.*MeV; //160 MeV=m_pi+20 MeV; 513 TargetNonDiffStateMinMass=M0target+160.*MeV; //160 MeV=m_pi+20 MeV; 432 514 } 433 515 */ 434 516 PZcms2=(S*S+M0projectile2*M0projectile2+M0target2*M0target2- 435 517 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2) 436 518 /4./S; 437 519 //G4cout<<"PZcms2 1 "<<PZcms2<<G4endl; 438 520 if(PZcms2 < 0) {return false;} // It can be if energy is not sufficient for Delta 439 521 //---------------------------------------------------------- … … 452 534 Ptarget.setE(std::sqrt(M0target2+PZcms2)); 453 535 454 { 536 // ---------------------------------------------------------- 537 538 // G4double Wexcit=1.-1.97*std::exp(-0.5*ProjectileRapidity); 539 G4double Wexcit=1.-2.256*std::exp(-0.6*ProjectileRapidity); 540 541 //G4cout<<ProjectileRapidity<<" "<<1.72*std::exp(-0.4*ProjectileRapidity)<<" "<<std::exp(0.4*ProjectileRapidity)<<G4endl; 542 //G4int Uzhi;G4cin>>Uzhi; 543 //Wexcit=0.; 544 if(G4UniformRand() > Wexcit) 545 { // Make elastic scattering 546 //G4cout<<"Make elastic scattering"<<G4endl; 455 547 Pprojectile.transform(toLab); 456 548 Ptarget.transform(toLab); … … 463 555 464 556 G4bool Result= theElastic->ElasticScattering (projectile,target,theParameters); 465 466 557 return Result; 467 } 558 } // end of if(G4UniformRand() > Wexcit) 468 559 } // End of charge exchange part ------------------------------ 469 560 470 561 // ------------------------------------------------------------------ 562 G4double ProbOfDiffraction=ProbProjectileDiffraction + ProbTargetDiffraction; 563 /* 564 G4cout<<"Excite --------------------"<<G4endl; 565 G4cout<<"Proj "<<M0projectile<<" "<<ProjectileDiffStateMinMass<<" "<<ProjectileNonDiffStateMinMass<<G4endl; 566 G4cout<<"Targ "<<M0target <<" "<<TargetDiffStateMinMass <<" "<<TargetNonDiffStateMinMass<<G4endl; 567 G4cout<<"SqrtS "<<SqrtS<<G4endl; 568 569 G4cout<<"Prob ProjDiff TargDiff "<<ProbProjectileDiffraction<<" "<<ProbTargetDiffraction<<" "<<ProbOfDiffraction<<G4endl; 570 G4cout<<"Pr Y "<<Pprojectile.rapidity()<<" Tr Y "<<Ptarget.rapidity()<<G4endl; 571 //G4int Uzhi; G4cin>>Uzhi; 572 */ 573 /* 574 if(ProjectileNonDiffStateMinMass + TargetNonDiffStateMinMass > SqrtS) // 24.07.10 575 { 576 if(ProbOfDiffraction!=0.) 577 { 578 ProbProjectileDiffraction/=ProbOfDiffraction; 579 ProbOfDiffraction=1.; 580 } else {return false;} 581 } 582 583 */ 584 471 585 if(ProbOfDiffraction!=0.) 472 586 { … … 478 592 } 479 593 594 //G4cout<<"Prob ProjDiff TargDiff "<<ProbProjectileDiffraction<<" "<<ProbTargetDiffraction<<" "<<ProbOfDiffraction<<G4endl; 595 480 596 G4double ProjectileDiffStateMinMass2 = ProjectileDiffStateMinMass * 481 597 ProjectileDiffStateMinMass; … … 500 616 501 617 G4int whilecount=0; 618 502 619 // Choose a process --------------------------- 503 620 … … 506 623 if(G4UniformRand() < ProbProjectileDiffraction) 507 624 { //-------- projectile diffraction --------------- 625 //G4cout<<"projectile diffraction"<<G4endl; 626 508 627 do { 509 628 // Generate pt … … 512 631 // << ", loop count/ maxPtSquare : " 513 632 // << whilecount << " / " << maxPtSquare << G4endl; 633 634 // whilecount++; 514 635 if (whilecount > 1000 ) 515 636 { … … 517 638 target->SetStatus(2); return false; // Ignore this interaction 518 639 }; 640 519 641 // --------------- Check that the interaction is possible ----------- 520 642 ProjMassT2=ProjectileDiffStateMinMass2; … … 523 645 TargMassT2=M0target2; 524 646 TargMassT =M0target; 525 647 //G4cout<<"Masses "<<ProjMassT<<" "<<TargMassT<<" "<<SqrtS<<" "<<ProjMassT+TargMassT<<G4endl; 526 648 PZcms2=(S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2- 527 649 2.*S*ProjMassT2-2.*S*TargMassT2-2.*ProjMassT2*TargMassT2) 528 650 /4./S; 529 651 652 //G4cout<<"PZcms2 PrD"<<PZcms2<<G4endl; 530 653 if(PZcms2 < 0 ) 531 654 { … … 556 679 PMinusNew=ChooseP(PMinusMin, PMinusMax); 557 680 // PMinusNew=1./sqrt(1./PMinusMin-G4UniformRand()*(1./PMinusMin-1./PMinusMax)); 681 //PMinusNew=1./sqr(1./std::sqrt(PMinusMin)-G4UniformRand()*(1./std::sqrt(PMinusMin)-1./std::sqrt(PMinusMax))); 558 682 559 683 TMinusNew=SqrtS-PMinusNew; … … 564 688 Qmomentum.setPz( (Qplus-Qminus)/2 ); 565 689 Qmomentum.setE( (Qplus+Qminus)/2 ); 566 } while ( 567 ((Pprojectile+Qmomentum).mag2() < ProjectileDiffStateMinMass2) || //No without excitation 568 ((Ptarget -Qmomentum).mag2() < M0target2 )); 690 691 } while ((Pprojectile+Qmomentum).mag2() < ProjectileDiffStateMinMass2); //|| 692 //Repeat the sampling because there was not any excitation 693 //((Ptarget -Qmomentum).mag2() < M0target2 )) ); 569 694 } 570 695 else 571 696 { // -------------- Target diffraction ---------------- 697 698 //G4cout<<"Target diffraction"<<G4endl; 572 699 do { 573 700 // Generate pt … … 576 703 // << ", loop count/ maxPtSquare : " 577 704 // << whilecount << " / " << maxPtSquare << G4endl; 705 706 // whilecount++; 578 707 if (whilecount > 1000 ) 579 708 { … … 581 710 target->SetStatus(2); return false; // Ignore this interaction 582 711 }; 712 //G4cout<<"Qm while "<<Qmomentum<<" "<<whilecount<<G4endl; 583 713 // --------------- Check that the interaction is possible ----------- 584 714 ProjMassT2=M0projectile2; … … 592 722 /4./S; 593 723 724 //G4cout<<"PZcms2 TrD <0 "<<PZcms2<<" return"<<G4endl; 594 725 if(PZcms2 < 0 ) 595 726 { … … 600 731 601 732 Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0); 733 734 //G4cout<<"Qm while "<<Qmomentum<<" "<<whilecount<<G4endl; 602 735 Pt2=G4ThreeVector(Qmomentum.vect()).mag2(); 603 736 … … 612 745 /4./S; 613 746 747 //G4cout<<"PZcms2 <0 "<<PZcms2<<" continue"<<G4endl; 614 748 if(PZcms2 < 0 ) continue; 615 749 PZcms =std::sqrt(PZcms2); … … 619 753 620 754 TPlusNew=ChooseP(TPlusMin, TPlusMax); 755 //TPlusNew=1./sqr(1./std::sqrt(TPlusMin)-G4UniformRand()*(1./std::sqrt(TPlusMin)-1./std::sqrt(TPlusMax))); 621 756 622 757 //TPlusNew=TPlusMax; … … 630 765 Qmomentum.setE( (Qplus+Qminus)/2 ); 631 766 632 } while ( 633 ((Pprojectile+Qmomentum).mag2() < M0projectile2 ) || //No without excitation 634 ((Ptarget -Qmomentum).mag2() < TargetDiffStateMinMass2)); 635 } 767 /* 768 G4cout<<(Pprojectile+Qmomentum).mag()<<" "<<M0projectile<<G4endl; 769 G4bool First=(Pprojectile+Qmomentum).mag2() < M0projectile2; 770 G4cout<<First<<G4endl; 771 772 G4cout<<(Ptarget -Qmomentum).mag()<<" "<<TargetDiffStateMinMass<<" "<<TargetDiffStateMinMass2<<G4endl; 773 G4bool Seco=(Ptarget -Qmomentum).mag2() < TargetDiffStateMinMass2; 774 G4cout<<Seco<<G4endl; 775 */ 776 777 } while ((Ptarget -Qmomentum).mag2() < TargetDiffStateMinMass2); 778 // Repeat the sampling because there was not any excitation 779 // (((Pprojectile+Qmomentum).mag2() < M0projectile2 ) || //No without excitation 780 // ((Ptarget -Qmomentum).mag2() < TargetDiffStateMinMass2)) ); 781 //G4cout<<"Go out"<<G4endl; 782 } // End of if(G4UniformRand() < ProbProjectileDiffraction) 636 783 } 637 784 else //----------- Non-diffraction process ------------ 638 785 { 786 787 //G4cout<<"Non-diffraction process"<<G4endl; 639 788 do { 640 789 // Generate pt … … 643 792 // << ", loop count/ maxPtSquare : " 644 793 // << whilecount << " / " << maxPtSquare << G4endl; 794 795 // whilecount++; 645 796 if (whilecount > 1000 ) 646 797 { … … 677 828 2.*S*ProjMassT2-2.*S*TargMassT2-2.*ProjMassT2*TargMassT2) 678 829 /4./S; 830 //G4cout<<"PZcms2 ND"<<PZcms2<<G4endl; 679 831 680 832 if(PZcms2 < 0 ) continue; … … 698 850 Qmomentum.setPz( (Qplus-Qminus)/2 ); 699 851 Qmomentum.setE( (Qplus+Qminus)/2 ); 700 852 /* 853 G4cout<<(Pprojectile+Qmomentum).mag2()<<" "<<ProjectileNonDiffStateMinMass2<<G4endl; 854 G4cout<<(Ptarget -Qmomentum).mag2()<<" "<<TargetNonDiffStateMinMass2<<G4endl; 855 G4int Uzhi; G4cin>>Uzhi; 856 */ 701 857 } while ( 702 858 ((Pprojectile+Qmomentum).mag2() < ProjectileNonDiffStateMinMass2) || //No double Diffraction 703 859 ((Ptarget -Qmomentum).mag2() < TargetNonDiffStateMinMass2 )); 704 } 705 706 Pprojectile += Qmomentum; 707 Ptarget -= Qmomentum; 860 } 861 862 Pprojectile += Qmomentum; 863 Ptarget -= Qmomentum; 864 865 //G4cout<<"Pr Y "<<Pprojectile.rapidity()<<" Tr Y "<<Ptarget.rapidity()<<G4endl; 708 866 709 867 // Transform back and update SplitableHadron Participant. 710 711 868 Pprojectile.transform(toLab); 869 Ptarget.transform(toLab); 712 870 713 871 // Calculation of the creation time --------------------- 714 715 872 projectile->SetTimeOfCreation(target->GetTimeOfCreation()); 873 projectile->SetPosition(target->GetPosition()); 716 874 // Creation time and position of target nucleon were determined at 717 875 // ReggeonCascade() of G4FTFModel 718 876 // ------------------------------------------------------ 719 877 720 projectile->Set4Momentum(Pprojectile); 721 target->Set4Momentum(Ptarget); 722 723 projectile->IncrementCollisionCount(1); 724 target->IncrementCollisionCount(1); 725 726 return true; 878 //G4cout<<"Mproj "<<Pprojectile.mag()<<G4endl; 879 //G4cout<<"Mtarg "<<Ptarget.mag()<<G4endl; 880 projectile->Set4Momentum(Pprojectile); 881 target->Set4Momentum(Ptarget); 882 883 projectile->IncrementCollisionCount(1); 884 target->IncrementCollisionCount(1); 885 886 return true; 727 887 } 728 888 -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4DiffractiveSplitableHadron.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4DiffractiveSplitableHadron.cc,v 1. 8 2009/07/31 11:03:00vuzhinsk Exp $28 // GEANT4 tag $Name: geant4-09-0 4-beta-01$27 // $Id: G4DiffractiveSplitableHadron.cc,v 1.9 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFModel.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4FTFModel.cc,v 1.3 4 2009/12/15 19:14:31vuzhinsk Exp $28 // GEANT4 tag $Name: geant4-09-0 4-beta-01$27 // $Id: G4FTFModel.cc,v 1.36 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 29 // 30 30 … … 99 99 { 100 100 theProjectile = aProjectile; 101 theParticipants.Init(aNucleus.GetN(),aNucleus.GetZ()); 101 102 theParticipants.Init(aNucleus.GetA_asInt(),aNucleus.GetZ_asInt()); 103 102 104 // ----------- N-mass number Z-charge ------------------------- 103 105 … … 113 115 114 116 //theParameters->SetProbabilityOfElasticScatt(0.); 117 //G4cout<<theParameters->GetProbabilityOfElasticScatt()<<G4endl; 118 //G4int Uzhi; G4cin>>Uzhi; 115 119 // To turn on/off (1/0) elastic scattering 116 120 … … 125 129 { 126 130 G4ExcitedStringVector * theStrings(0); 127 131 //G4cout<<"GetString"<<G4endl; 128 132 theParticipants.GetList(theProjectile,theParameters); 129 133 //G4cout<<"Reggeon"<<G4endl; 130 134 ReggeonCascade(); 131 135 … … 133 137 if( PutOnMassShell() ) 134 138 { 139 //G4cout<<"PutOn mass Shell OK"<<G4endl; 135 140 if( ExciteParticipants() ) 136 141 { 142 //G4cout<<"Excite partic OK"<<G4endl; 137 143 theStrings = BuildStrings(); 138 144 //G4cout<<"Build String OK"<<G4endl; 139 145 GetResidualNucleus(); 140 146 … … 194 200 TheInvolvedNucleon[NumberOfInvolvedNucleon]=TargetNucleon; 195 201 NumberOfInvolvedNucleon++; 196 202 //G4cout<<"Prim NumberOfInvolvedNucleon "<<NumberOfInvolvedNucleon<<G4endl; 197 203 G4double XofWoundedNucleon = TargetNucleon->GetPosition().x(); 198 204 G4double YofWoundedNucleon = TargetNucleon->GetPosition().y(); … … 214 220 TheInvolvedNucleon[NumberOfInvolvedNucleon]=Neighbour; 215 221 NumberOfInvolvedNucleon++; 222 //G4cout<<"Seco NumberOfInvolvedNucleon "<<NumberOfInvolvedNucleon<<G4endl; 216 223 217 224 G4VSplitableHadron *targetSplitable; … … 274 281 G4LorentzVector Pprojectile=primary->Get4Momentum(); 275 282 283 //G4cout<<"Pprojectile "<<Pprojectile<<G4endl; 276 284 // To get original projectile particle 277 285 … … 284 292 G4double SumMasses = Mprojectile + 20.*MeV; // 13.12.09 285 293 // Separation energy for projectile 286 294 //G4cout<<"SumMasses Pr "<<SumMasses<<G4endl; 287 295 //--------------- Target nucleus ------------------------------ 288 296 G4V3DNucleus *theNucleus = GetWoundedNucleus(); … … 305 313 SumMasses += aNucleon->GetDefinition()->GetPDGMass(); 306 314 SumMasses += 20.*MeV; // 13.12.09 Separation energy for a nucleon 315 //G4cout<<"SumMasses Tr "<<SumMasses<<G4endl; 307 316 ResidualMassNumber--; 308 317 ResidualCharge-=(G4int) aNucleon->GetDefinition()->GetPDGCharge(); … … 316 325 317 326 Psum += PnuclearResidual; 318 327 //G4cout<<"ResidualCharge ,ResidualMassNumber "<<ResidualCharge<<" "<<ResidualMassNumber<<G4endl; 319 328 G4double ResidualMass(0.); 320 329 if(ResidualMassNumber == 0) … … 331 340 332 341 // ResidualMass +=ResidualExcitationEnergy; // Will be given after checks 342 //G4cout<<"SumMasses End ResidualMass "<<SumMasses<<" "<<ResidualMass<<G4endl; 333 343 SumMasses += ResidualMass; 334 344 //G4cout<<"SumMasses + ResM "<<SumMasses<<G4endl; 345 //G4cout<<"Psum "<<Psum<<G4endl; 335 346 //------------------------------------------------------------- 336 347 … … 338 349 G4double S=Psum.mag2(); 339 350 351 //G4cout<<"SqrtS < SumMasses "<<SqrtS<<" "<<SumMasses<<G4endl; 340 352 if(SqrtS < SumMasses) {return false;} // It is impossible to simulate 341 353 // after putting nuclear nucleons … … 346 358 ResidualMass +=ResidualExcitationEnergy; 347 359 SumMasses +=ResidualExcitationEnergy; 348 360 //G4cout<<"ResidualMass "<<ResidualMass<<" "<<SumMasses<<G4endl; 349 361 //------------------------------------------------------------- 350 362 // Sampling of nucleons what are transfered to delta-isobars -- … … 373 385 } // end of if(theNucleus.GetMassNumber() != 1) 374 386 //------------------------------------------------------------- 387 375 388 G4LorentzRotation toCms(-1*Psum.boostVector()); 376 389 G4LorentzVector Ptmp=toCms*Pprojectile; … … 393 406 G4double AveragePt2 = theParameters->GetPt2ofNuclearDestruction(); 394 407 G4double maxPtSquare = theParameters->GetMaxPt2ofNuclearDestruction(); 395 408 //G4cout<<"Dcor "<<Dcor<<" AveragePt2 "<<AveragePt2<<G4endl; 396 409 G4double M2target(0.); 397 410 G4double WminusTarget(0.); … … 409 422 410 423 NumberOfTries++; 424 //G4cout<<"NumberOfTries "<<NumberOfTries<<G4endl; 411 425 if(NumberOfTries == 100*(NumberOfTries/100)) // 100 412 426 { // At large number of tries it would be better to reduce the values … … 439 453 440 454 G4LorentzVector tmp(tmpPt.x(),tmpPt.y(),Xminus,0.); 455 //G4cout<<"Inv i mom "<<i<<" "<<tmp<<G4endl; 441 456 aNucleon->SetMomentum(tmp); 442 457 } // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ ) … … 447 462 G4double DeltaXminus(0.); 448 463 464 //G4cout<<"ResidualMassNumber "<<ResidualMassNumber<<" "<<PtSum<<G4endl; 449 465 if(ResidualMassNumber == 0) 450 466 { … … 457 473 DeltaXminus = -1./theNucleus->GetMassNumber(); 458 474 } 459 475 //G4cout<<"Dx y xmin "<<DeltaX<<" "<<DeltaY<<" "<<DeltaXminus<<G4endl; 460 476 XminusSum=1.; 461 477 M2target =0.; … … 467 483 Xminus = aNucleon->Get4Momentum().pz() - DeltaXminus; 468 484 XminusSum-=Xminus; 469 470 if((Xminus <= 0.) || (Xminus > 1.) || 471 (XminusSum <=0.) || (XminusSum > 1.)) {InerSuccess=false; break;} 472 485 //G4cout<<" i X-sum "<<i<<" "<<Xminus<<" "<<XminusSum<<G4endl; 486 if(ResidualMassNumber == 0) // Uzhi 5.07.10 487 { 488 if((Xminus <= 0.) || (Xminus > 1.)) {InerSuccess=false; break;} 489 } else 490 { 491 if((Xminus <= 0.) || (Xminus > 1.) || 492 (XminusSum <=0.) || (XminusSum > 1.)) {InerSuccess=false; break;} 493 } // Uzhi 5.07.10 494 473 495 G4double Px=aNucleon->Get4Momentum().px() - DeltaX; 474 496 G4double Py=aNucleon->Get4Momentum().py() - DeltaY; … … 482 504 } // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ ) 483 505 506 //G4cout<<"Rescale O.K."<<G4endl; 507 484 508 if(InerSuccess && (ResidualMassNumber != 0)) 485 509 { 486 510 M2target +=(ResidualMass*ResidualMass + PtSum.mag2())/XminusSum; 487 511 } 512 //G4cout<<"InerSuccess "<<InerSuccess<<G4endl; 513 //G4int Uzhi;G4cin>>Uzhi; 488 514 } while(!InerSuccess); 489 515 } while (SqrtS < Mprojectile + std::sqrt(M2target)); … … 495 521 WminusTarget=(S-M2projectile+M2target+std::sqrt(DecayMomentum2))/2./SqrtS; 496 522 WplusProjectile=SqrtS - M2target/WminusTarget; 523 //G4cout<<"DecayMomentum2 "<<DecayMomentum2<<G4endl; 497 524 //------------------------------------------------------------- 498 525 for(G4int i=0; i < NumberOfInvolvedNucleon; i++ ) … … 511 538 if( E+Pz > WplusProjectile ){OuterSuccess=false; break;} 512 539 } // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ ) 540 //G4int Uzhi;G4cin>>Uzhi; 513 541 } while(!OuterSuccess); 514 542 … … 575 603 Successfull=false; 576 604 theParticipants.StartLoop(); 605 606 G4int MaxNumOfInelCollisions=G4int(theParameters->GetMaxNumberOfCollisions()); 607 G4double NumberOfInel(0.); 608 // 609 if(MaxNumOfInelCollisions > 0) 610 { // Plab > Pbound, Normal application of FTF is possible 611 G4double ProbMaxNumber=theParameters->GetMaxNumberOfCollisions()-MaxNumOfInelCollisions; 612 if(G4UniformRand() < ProbMaxNumber) {MaxNumOfInelCollisions++;} 613 NumberOfInel=MaxNumOfInelCollisions; 614 } else 615 { // Plab < Pbound, Normal application of FTF is impossible, low energy corrections 616 if(theParticipants.theNucleus->GetMassNumber() > 1) 617 { 618 NumberOfInel = theParameters->GetProbOfInteraction(); 619 MaxNumOfInelCollisions = 1; 620 } else 621 { // Special case for hadron-nucleon interactions 622 NumberOfInel = 1.; 623 MaxNumOfInelCollisions = 1; 624 } 625 } // end of if(MaxNumOfInelCollisions > 0) 626 // 577 627 while (theParticipants.Next()) 578 628 { … … 581 631 G4VSplitableHadron * projectile=collision.GetProjectile(); 582 632 G4VSplitableHadron * target=collision.GetTarget(); 583 633 //G4cout<<"ProbabilityOfElasticScatt "<<theParameters->GetProbabilityOfElasticScatt()<<G4endl; 584 634 if(G4UniformRand()< theParameters->GetProbabilityOfElasticScatt()) 585 635 { // Elastic scattering ------------------------- 636 //G4cout<<"Elastic FTF"<<G4endl; 586 637 if(theElastic->ElasticScattering(projectile, target, theParameters)) 587 638 { … … 595 646 else 596 647 { // Inelastic scattering ---------------------- 648 /* 597 649 if(theExcitation->ExciteParticipants(projectile, target, 598 650 theParameters, theElastic)) … … 604 656 target->SetStatus(2); 605 657 } 658 */ 659 //G4cout<<"InElastic FTF"<<G4endl; 660 if(G4UniformRand()< NumberOfInel/MaxNumOfInelCollisions) 661 { 662 if(theExcitation->ExciteParticipants(projectile, target, 663 theParameters, theElastic)) 664 { 665 Successfull = Successfull || true; 666 NumberOfInel--; 667 } else 668 { 669 Successfull = Successfull || false; 670 target->SetStatus(2); 671 } 672 } else // If NumOfInel 673 { 674 if(theElastic->ElasticScattering(projectile, target, theParameters)) 675 { 676 Successfull = Successfull || true; 677 } else 678 { 679 Successfull = Successfull || false; 680 target->SetStatus(2); 681 } 682 } // end if NumOfInel 606 683 } 607 684 } // end of while (theParticipants.Next()) … … 624 701 625 702 theParticipants.StartLoop(); // restart a loop 626 703 // 627 704 while ( theParticipants.Next() ) 628 705 { … … 634 711 primaries.push_back(interaction.GetProjectile()); 635 712 } 636 713 637 714 unsigned int ahadron; 638 715 for ( ahadron=0; ahadron < primaries.size() ; ahadron++) … … 650 727 if(SecondString != 0) strings->push_back(SecondString); 651 728 } 652 729 // 653 730 for (G4int ahadron=0; ahadron < NumberOfInvolvedNucleon ; ahadron++) 654 731 { … … 669 746 std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron()); 670 747 primaries.clear(); 671 672 748 return strings; 673 749 } -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFParameters.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4FTFParameters.cc,v 1.1 3 2009/12/16 17:51:15 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 4-beta-01$27 // $Id: G4FTFParameters.cc,v 1.14 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 29 // 30 30 … … 56 56 G4double Plab = std::sqrt(Elab * Elab - ProjectileMass*ProjectileMass); 57 57 58 G4double Ylab=0.5*std::log((Elab+Plab)/(Elab-Plab)); 59 60 Plab/=GeV; // Uzhi 8.07.10 58 61 G4double LogPlab = std::log( Plab ); 59 62 G4double sqrLogPlab = LogPlab * LogPlab; … … 186 189 SetInelasticCrossSection(Xtotal-Xelastic); 187 190 191 //G4cout<<"Xtotal, Xelastic "<<Xtotal<<" "<<Xelastic<<G4endl; 188 192 // // Interactions with elastic and inelastic collisions 189 193 SetProbabilityOfElasticScatt(Xtotal, Xelastic); … … 196 200 197 201 //----------------------------------------------------------------------------------- 202 198 203 SetSlope( Xtotal*Xtotal/16./pi/Xelastic/0.3894 ); // Slope parameter of elastic scattering 199 204 // (GeV/c)^(-2)) … … 209 214 if( absPDGcode > 1000 ) //------Projectile is baryon -------- 210 215 { 211 SetMagQuarkExchange(3.4); //3.8); 212 SetSlopeQuarkExchange(1.2); 213 SetDeltaProbAtQuarkExchange(0.1); //(0.1*4.); 214 215 SetProjMinDiffMass(1.1); // GeV 216 SetProjMinNonDiffMass(1.1); // GeV 217 SetProbabilityOfProjDiff(0.76*std::pow(s/GeV/GeV,-0.35)); 218 219 SetTarMinDiffMass(1.1); // GeV 220 SetTarMinNonDiffMass(1.1); // GeV 221 SetProbabilityOfTarDiff(0.76*std::pow(s/GeV/GeV,-0.35)); 222 223 SetAveragePt2(0.3); // GeV^2 216 SetMagQuarkExchange(1.84);//(3.63); 217 SetSlopeQuarkExchange(0.7);//(1.2); 218 SetDeltaProbAtQuarkExchange(0.); 219 220 SetProjMinDiffMass(1.16); // GeV 221 SetProjMinNonDiffMass(1.16); // GeV 222 223 SetProbabilityOfProjDiff(0.805*std::exp(-0.35*Ylab));// 0.5 224 225 SetTarMinDiffMass(1.16); // GeV 226 SetTarMinNonDiffMass(1.16); // GeV 227 228 SetProbabilityOfTarDiff(0.805*std::exp(-0.35*Ylab));// 0.5 229 230 SetAveragePt2(0.15); // 0.15 GeV^2 224 231 } 225 232 else if( absPDGcode == 211 || PDGcode == 111) //------Projectile is Pion ----------- … … 286 293 if( absPDGcode < 1000 ) 287 294 { 288 SetCofNuclearDestruction(1.); //1.0); // for meson projectile 289 } else if( theA > 20. ) 295 SetMaxNumberOfCollisions(1000.,1.); //(Plab,2.); //3.); ############################## 296 297 SetCofNuclearDestruction(0.3); //1.0); // for meson projectile 298 299 SetDofNuclearDestruction(0.4); 300 SetPt2ofNuclearDestruction(0.17*GeV*GeV); 301 SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV); 302 303 SetExcitationEnergyPerWoundedNucleon(100*MeV); 304 } else // for baryon projectile 290 305 { 291 SetCofNuclearDestruction(0.2); //2); // for baryon projectile and heavy target 292 } else 293 { 294 SetCofNuclearDestruction(0.2); //1.0); // for baryon projectile and light target 306 // SetMaxNumberOfCollisions(Plab,0.1); //6.); // ############################## 307 SetMaxNumberOfCollisions(Plab,4.); //6.); // ############################## 308 309 SetCofNuclearDestruction(0.62*std::exp(4.*(Ylab-2.1))/(1.+std::exp(4.*(Ylab-2.1)))); 310 311 SetDofNuclearDestruction(0.4); 312 SetPt2ofNuclearDestruction((0.035+ 313 0.04*std::exp(4.*(Ylab-2.5))/(1.+std::exp(4.*(Ylab-2.5))))*GeV*GeV); //0.09 314 SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV); 315 316 SetExcitationEnergyPerWoundedNucleon(75.*MeV); 295 317 } 296 318 297 319 SetR2ofNuclearDestruction(1.5*fermi*fermi); 298 320 299 SetExcitationEnergyPerWoundedNucleon(100*MeV); 300 301 SetDofNuclearDestruction(0.4); 302 SetPt2ofNuclearDestruction(0.17*GeV*GeV); 303 SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV); 321 //SetCofNuclearDestruction(0.47*std::exp(2.*(Ylab-2.5))/(1.+std::exp(2.*(Ylab-2.5)))); 322 //SetPt2ofNuclearDestruction((0.035+0.1*std::exp(4.*(Ylab-3.))/(1.+std::exp(4.*(Ylab-3.))))*GeV*GeV); 323 324 //SetProbabilityOfElasticScatt(1.,1.); //(Xtotal, Xelastic); 325 //SetProbabilityOfProjDiff(1.*0.62*std::pow(s/GeV/GeV,-0.51)); // 0->1 326 //SetProbabilityOfTarDiff(4.*0.62*std::pow(s/GeV/GeV,-0.51)); // 2->4 327 //SetAveragePt2(0.3); //(0.15); 328 //SetAvaragePt2ofElasticScattering(0.); 329 330 //SetCofNuclearDestruction(0.6); //(0.4); 331 SetExcitationEnergyPerWoundedNucleon(75.*MeV); //(75.*MeV); 332 //SetDofNuclearDestruction(0.6); //(0.4); 333 //SetPt2ofNuclearDestruction(0.12*GeV*GeV); //(0.168*GeV*GeV); 334 304 335 } 305 336 //********************************************************************************************** -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFParticipants.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4FTFParticipants.cc,v 1.1 6 2009/11/25 09:14:03vuzhinsk Exp $28 // GEANT4 tag $Name: geant4-09-0 4-beta-01$27 // $Id: G4FTFParticipants.cc,v 1.17 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 29 // 30 30 // ------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.