Changeset 1340 for trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFModel.cc
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.