- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- Location:
- trunk/source/processes/hadronic/models/chiral_inv_phase_space/fragmentation/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/chiral_inv_phase_space/fragmentation/src/G4QFragmentation.cc
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4QFragmentation.cc,v 1. 6 2009/12/16 17:51:03 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4QFragmentation.cc,v 1.14 2010/06/11 10:35:18 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 54 54 // Definition of static parameters 55 55 G4int G4QFragmentation::nCutMax=7; 56 G4double G4QFragmentation::stringTension=1.5*GeV/fermi; 57 G4double G4QFragmentation::tubeDensity =1.5/fermi; 56 G4double G4QFragmentation::stringTension=GeV/fermi; 57 //G4double G4QFragmentation::tubeDensity =1./fermi; 58 G4double G4QFragmentation::tubeDensity =0./fermi; 58 59 // Parameters of diffractional fragmentation (was .72*) 59 60 G4double G4QFragmentation::widthOfPtSquare=-GeV*GeV;// pt -width2 forStringExcitation … … 473 474 aTarget=theInteractions[0]->GetTarget(); 474 475 aProjectile=theInteractions[0]->GetProjectile(); 476 delete theInteractions[0]; 475 477 theInteractions.clear(); 476 delete theInteractions[0];477 478 } 478 479 else // Create a new target nucleon … … 555 556 G4cout<<"G4QFragmentation::Construct: Creation ofSoftCollisionPartonPair STARTS"<<G4endl; 556 557 #endif 557 for(it = theInteractions.begin(); it != theInteractions.end(); ++it) 558 { 558 G4bool rep=true; 559 while(rep && theInteractions.size()) 560 { 561 for(it = theInteractions.begin(); it != theInteractions.end(); ++it) 562 { 559 563 G4QInteraction* anIniteraction = *it; 560 564 G4QPartonPair* aPair=0; … … 583 587 delete *it; 584 588 it=theInteractions.erase(it); // Soft interactions are converted & erased 585 it--; 586 } 589 if( it != theInteractions.begin() )// To avoid going below begin() (for Windows) 590 { 591 it--; 592 rep=false; 593 #ifdef debug 594 G4cout<<"G4QFragmentation::Construct: *** Decremented ***"<<G4endl; 595 #endif 596 } 597 else 598 { 599 rep=true; 600 #ifdef debug 601 G4cout<<"G4QFragmentation::Construct: *** IT Begin ***"<<G4endl; 602 #endif 603 break; 604 } 605 } 606 else rep=false; 607 #ifdef debug 608 G4cout<<"G4QFragmentation::Construct: #0fSC="<<nSoftCollisions<<", r="<<rep<<G4endl; 609 #endif 610 } 611 #ifdef debug 612 G4cout<<"G4QFragmentation::Construct: *** IT While *** , r="<<rep<<G4endl; 613 #endif 587 614 } 588 615 #ifdef debug … … 748 775 G4int problem=0; // 0="no problem", incremented by ASIS 749 776 G4QStringVector::iterator ist; 750 for(ist = strings.begin(); ist < strings.end(); ist++) 751 { 777 G4bool con=true; 778 while(con && strings.size()) 779 { 780 for(ist = strings.begin(); ist < strings.end(); ++ist) 781 { 752 782 G4bool bad=true; 753 783 G4LorentzVector cS4M=(*ist)->Get4Momentum(); … … 1580 1610 delete (*ist); 1581 1611 strings.erase(ist); 1582 ist--;1583 1612 #ifdef debug 1584 1613 G4LorentzVector ss4M=pL4M+pR4M; 1585 1614 G4cout<<"G4QFragmentation::Construct:Created,4M="<<ss4M<<",m2="<<ss4M.m2()<<G4endl; 1586 1615 #endif 1616 if( ist != strings.begin() ) // To avoid going below begin() (for Windows) 1617 { 1618 ist--; 1619 con=false; 1620 #ifdef debug 1621 G4cout<<"G4QFragmentation::Construct: *** IST Decremented ***"<<G4endl; 1622 #endif 1623 } 1624 else 1625 { 1626 con=true; 1627 #ifdef debug 1628 G4cout<<"G4QFragmentation::Construct: *** IST Begin ***"<<G4endl; 1629 #endif 1630 break; 1631 } 1587 1632 } // End of the IF(the best partnerString candidate was found) 1588 1633 else … … 1592 1637 #endif 1593 1638 ++problem; 1639 con=false; 1594 1640 } 1595 } 1596 } 1641 } // End of IF 1642 else con=false; 1643 } // End of loop over ist iterator 1644 #ifdef debug 1645 G4cout<<"G4QFragmentation::Construct: *** IST While *** , con="<<con<<G4endl; 1646 #endif 1647 } // End of "con" while 1597 1648 #ifdef edebug 1598 1649 // This print has meaning only if something appear between it and the StringFragmLOOP … … 1826 1877 G4int miPDG=qsumQC.GetSPDGCode(); // PDG of minM of hadron/fragm. 1827 1878 G4double gsM=0.; // Proto minM of had/frag forQC 1879 #ifdef debug 1880 G4cout<<"G4QFragmentation::Fragment: QC="<<qsumQC<<",PDG="<<miPDG<<G4endl; 1881 #endif 1828 1882 if(miPDG == 10) 1829 1883 { … … 1833 1887 // theWorld->GetQParticle(QCh.GetQPDG2())->MinMassOfFragm(); 1834 1888 } 1835 else if(miPDG>80000000) // Compound Nucleus 1836 { 1837 G4QNucleus rtN(qsumQC); // Create PseudoNucl for totCompound 1838 gsM=rtN.GetGSMass(); // MinMass of residQ+(Env-ParC) syst. } 1839 } 1840 else if(std::abs(miPDG)%10 > 2) 1889 // @@ it is not clear, why it does not work ?! 1890 //else if(miPDG>80000000) // Compound Nucleus 1891 //{ 1892 // G4QNucleus rtN(qsumQC); // CreatePseudoNucl for totComp 1893 // gsM=rtN.GetGSMass(); // MinMass of residQ+(Env-ParC) 1894 //} 1895 else if(miPDG < 80000000 && std::abs(miPDG)%10 > 2) 1841 1896 gsM=theWorld->GetQParticle(G4QPDGCode(miPDG))->MinMassOfFragm(); 1842 else gsM=G4QPDGCode(miPDG).GetMass(); // minM of hadron/fragm. for QC1897 else gsM=G4QPDGCode(miPDG).GetMass(); // minM of hadron/fragm. for QC 1843 1898 G4double reM=qsum4M.m(); // real mass of the compound 1844 1899 #ifdef debug … … 1861 1916 else 1862 1917 { 1863 G4cerr<<"* **G4QFragmentation::Fragm:PDG="<<miPDG<<",M="<<reM<<",GSM="<<gsM<<G4endl;1918 G4cerr<<"*G4QFr::Fr:PDG="<<miPDG<<",M="<<reM<<",GSM="<<gsM<<",QC="<<qsumQC<<G4endl; 1864 1919 G4Exception("G4QFragmentation::Fragment:","27",FatalException,"Can't recover GSM"); 1865 1920 } … … 2277 2332 G4QString* curString=strings[astring]; 2278 2333 if(!curString->GetDirection()) continue; // Historic for the dead strings: DoesNotWork 2279 #ifdef edebug2280 2334 G4int curStrChg = curString->GetCharge(); 2281 2335 G4int curStrBaN = curString->GetBaryonNumber(); 2282 #endif2283 2336 G4LorentzVector curString4M = curString->Get4Momentum(); 2284 2337 #ifdef debug … … 2816 2869 #endif 2817 2870 G4LorentzVector p4M=selHP->Get4Momentum(); 2871 // 2818 2872 curString4M+=p4M; 2819 #ifdef edebug2820 2873 G4int Chg=selHP->GetCharge(); 2821 2874 G4int BaN=selHP->GetBaryonNumber(); 2822 2875 curStrChg+=Chg; 2823 2876 curStrBaN+=BaN; 2877 #ifdef edebug 2824 2878 G4cout<<"-EMC->>>>G4QFragmentation::Breeder: S+=H, 4M="<<curString4M<<",M=" 2825 2879 <<curString4M.m()<<", Charge="<<curStrChg<<", B="<<curStrBaN<<G4endl; … … 3510 3564 G4QHadron* curHadron=(*theHadrons)[aTrack]; 3511 3565 G4int hPDG=curHadron->GetPDGCode(); 3512 #ifdef edebug3513 3566 G4LorentzVector curH4M=curHadron->Get4Momentum(); 3514 3567 G4int curHCh=curHadron->GetCharge(); 3515 3568 G4int curHBN=curHadron->GetBaryonNumber(); 3516 #endif3517 3569 #ifdef debug 3518 3570 G4cout<<">>>>>>>>G4QFragmentation::Breeder:S#"<<astring<<",H#"<<aTrack<<",PDG="<<hPDG … … 3531 3583 { 3532 3584 theResult->push_back((*tmpQHadVec)[aH]);// TheDecayProduct of TheHadron is filled 3533 #ifdef edebug 3585 // 3534 3586 G4QHadron* prodH =(*tmpQHadVec)[aH]; 3535 3587 G4LorentzVector p4M=prodH->Get4Momentum(); 3536 G4int PDG=prodH->GetPDGCode();3537 3588 G4int Chg=prodH->GetCharge(); 3538 3589 G4int BaN=prodH->GetBaryonNumber(); 3539 curH4M-=p4M;3540 3590 curString4M-=p4M; 3541 3591 curStrChg-=Chg; 3542 3592 curStrBaN-=BaN; 3593 curH4M-=p4M; 3543 3594 curHCh-=Chg; 3544 3595 curHBN-=BaN; 3596 #ifdef edebug 3597 G4int PDG=prodH->GetPDGCode(); 3545 3598 G4cout<<"-EMC->>>>G4QFragmentation::Breeder:Str*Filled, 4M="<<p4M<<", PDG="<<PDG 3546 3599 <<", Chg="<<Chg<<", BaN="<<BaN<<G4endl; … … 3556 3609 { 3557 3610 theResult->push_back(curHadron); // The original hadron is filled 3558 #ifdef edebug 3611 // 3559 3612 curString4M-=curH4M; 3560 3613 G4int curCh=curHadron->GetCharge(); … … 3562 3615 curStrChg-=curCh; 3563 3616 curStrBaN-=curBN; 3617 #ifdef edebug 3564 3618 G4cout<<"-EMC->>>>>>G4QFragmentation::Breeder: curH filled 4M="<<curH4M<<",PDG=" 3565 3619 <<curHadron->GetPDGCode()<<", Chg="<<curCh<<", BaN="<<curBN<<G4endl; … … 3573 3627 <<", rChg="<<curStrChg<<", rBaN="<<curStrBaN<<G4endl; 3574 3628 #endif 3629 // Trap with the debugging warning --- Starts --- 3630 if(curStrChg || curStrBaN || curString4M.t() > eps || std::fabs(curString4M.x()) > eps 3631 || std::fabs(curString4M.y()) > eps || std::fabs(curString4M.z()) > eps ) 3632 { 3633 G4double dEn=curString4M.t(); 3634 G4double dPx=curString4M.x(); 3635 G4double dPy=curString4M.y(); 3636 G4double dPz=curString4M.z(); 3637 G4int nHadr=theResult->size(); 3638 G4double hEn=0.; 3639 G4double hPx=0.; 3640 G4double hPy=0.; 3641 G4double hPz=0.; 3642 G4int hCh=0; 3643 G4int hBN=0; 3644 G4double mEn=0.; 3645 G4double mPx=0.; 3646 G4double mPy=0.; 3647 G4double mPz=0.; 3648 G4int mCh=0; 3649 G4int mBN=0; 3650 for(G4int i=0; i<nHadr; i++) 3651 { 3652 mEn=hEn; 3653 mPx=hPx; 3654 mPy=hPy; 3655 mPz=hPz; 3656 mCh=hCh; 3657 mBN=hBN; 3658 G4QHadron* curHadr = (*theResult)[i]; 3659 G4LorentzVector hI4M = curHadr->Get4Momentum(); 3660 hEn=hI4M.t(); 3661 hPx=hI4M.x(); 3662 hPy=hI4M.y(); 3663 hPz=hI4M.z(); 3664 hCh=curHadr->GetCharge(); 3665 hBN=curHadr->GetBaryonNumber(); 3666 G4cout<<"G4QFragmentation::Breeder: H#"<<i<<", d4M="<<curString4M+hI4M 3667 <<",dCh="<<hCh+curStrChg<<",dBN="<<hBN+curStrBaN<<G4endl; 3668 if( !(hCh+curStrChg) && !(hBN+curStrBaN) && std::fabs(dEn+hEn)<eps && 3669 std::fabs(dPx+hPx)<eps && std::fabs(dPy+hPy)<eps && std::fabs(dPz+hPz)<eps ) 3670 { 3671 G4cout<<"G4QFragmentation::Breeder: ***Cured*** Redundent Hadron # "<<i<<G4endl; 3672 G4QHadron* theLast = (*theResult)[nHadr-1]; 3673 curHadr->Set4Momentum(theLast->Get4Momentum()); //4-Mom of CurHadr 3674 G4QPDGCode lQP=theLast->GetQPDG(); 3675 if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); 3676 else curHadr->SetQC(theLast->GetQC()); 3677 theResult->pop_back(); // theLastQHadron is excluded from OUTPUT 3678 delete theLast; //*!!When kill, delete theLastQHadr as an Instance!* 3679 break; 3680 } 3681 if( !(hCh+mCh+curStrChg) && !(hBN+mBN+curStrBaN) && std::fabs(dEn+hEn+mEn)<eps && 3682 std::fabs(dPx+hPx+mPx)<eps && std::fabs(dPy+hPy+mPy)<eps && 3683 std::fabs(dPz+hPz+mPz)<eps ) 3684 { 3685 G4cout<<"G4QFragmentation::Breeder:***Cured*** Redundent 2Hadrons i="<<i<<G4endl; 3686 G4QHadron* theLast = (*theResult)[nHadr-1]; 3687 curHadr->Set4Momentum(theLast->Get4Momentum()); //4-Mom of CurHadr 3688 G4QPDGCode lQP=theLast->GetQPDG(); 3689 if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); 3690 else curHadr->SetQC(theLast->GetQC()); 3691 theResult->pop_back(); // theLastQHadron is excluded from OUTPUT 3692 delete theLast; //*!!When kill, delete theLastQHadr as an Instance!* 3693 theLast = (*theResult)[nHadr-2]; 3694 curHadr->Set4Momentum(theLast->Get4Momentum()); //4-Mom of CurHadr 3695 lQP=theLast->GetQPDG(); 3696 if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); 3697 else curHadr->SetQC(theLast->GetQC()); 3698 theResult->pop_back(); // theLastQHadron is excluded from OUTPUT 3699 delete theLast; //*!!When kill, delete theLastQHadr as an Instance!* 3700 break; 3701 } 3702 // If the redundent particle decay in 3 FS hadrons -> the corresponding Improvement 3703 G4cout<<"*Warning*G4QFragmentation::Breeder: Nonconservation isn't cured!"<<G4endl; 3704 } 3705 } 3706 // Trap with the debugging warning ^^^ Ends ^^^ 3575 3707 } // End of the main LOOP over decaying strings 3576 3708 G4LorentzVector r4M=theNucleus.Get4Momentum(); // Nucleus 4-momentum in LS -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/fragmentation/src/G4QIonIonCollision.cc
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4QIonIonCollision.cc,v 1. 2 2009/12/01 09:24:24mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4QIonIonCollision.cc,v 1.8 2010/04/01 15:03:35 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 57 57 G4double G4QIonIonCollision::tubeDensity =1./fermi; 58 58 // Parameters of diffractional fragmentation 59 G4double G4QIonIonCollision::widthOfPtSquare=-0.7 2*GeV*GeV; // ptWidth2 forStringExcitation59 G4double G4QIonIonCollision::widthOfPtSquare=-0.75*GeV*GeV; // ptWidth2 forStringExcitation 60 60 61 61 G4QIonIonCollision::G4QIonIonCollision(G4QNucleus &pNucleus, const G4QNucleus &tNucleus) … … 386 386 aTarget=theInteractions[0]->GetTarget(); 387 387 aProjectile=theInteractions[0]->GetProjectile(); 388 delete theInteractions[0]; 388 389 theInteractions.clear(); 389 delete theInteractions[0];390 390 } 391 391 else // Create a new target nucleon (?) … … 458 458 G4cout<<"G4QIonIonCollision::Constr: Creation ofSoftCollisionPartonPair STARTS"<<G4endl; 459 459 #endif 460 for(it = theInteractions.begin(); it != theInteractions.end(); ++it) 461 { 460 G4bool rep=true; 461 while(rep && theInteractions.size()) 462 { 463 for(it = theInteractions.begin(); it != theInteractions.end(); ++it) 464 { 462 465 G4QInteraction* anIniteraction = *it; 463 466 G4QPartonPair* aPair=0; … … 475 478 pProjectile->GetNextAntiParton(), 476 479 G4QPartonPair::SOFT, G4QPartonPair::TARGET); 477 thePartonPairs.push_back(aPair); 480 thePartonPairs.push_back(aPair); // A target pair (Why TAGRET?) 478 481 aPair = new G4QPartonPair(pProjectile->GetNextParton(), 479 482 pTarget->GetNextAntiParton(), 480 483 G4QPartonPair::SOFT, G4QPartonPair::PROJECTILE); 481 thePartonPairs.push_back(aPair); 484 thePartonPairs.push_back(aPair); // A projectile pair (Why Projectile?) 482 485 #ifdef debug 483 486 G4cout<<"--->G4QIonIonCollision::Constr: SOFT, 2 parton pairs are filled"<<G4endl; … … 485 488 } 486 489 delete *it; 487 it=theInteractions.erase(it); // SoftInteractions're converted&erased 488 it--; 489 } 490 it=theInteractions.erase(it); // SoftInteractions're converted&erased 491 if( it != theInteractions.begin() )// To avoid going below begin() (for Windows) 492 { 493 it--; 494 rep=false; 495 } 496 else 497 { 498 rep=true; 499 break; 500 } 501 } 502 else rep=false; 503 } 490 504 } 491 505 #ifdef debug … … 633 647 G4int problem=0; // 0="no problem", incremented by ASIS 634 648 G4QStringVector::iterator ist; 635 for(ist = strings.begin(); ist < strings.end(); ist++) 636 { 649 G4bool con=true; 650 while(con && strings.size()) 651 { 652 for(ist = strings.begin(); ist < strings.end(); ++ist) 653 { 637 654 G4bool bad=true; 638 655 G4LorentzVector cS4M=(*ist)->Get4Momentum(); … … 1400 1417 delete (*ist); 1401 1418 strings.erase(ist); 1402 ist--;1403 1419 #ifdef debug 1404 1420 G4LorentzVector ss4M=pL4M+pR4M; 1405 1421 G4cout<<"G4QIonIonCollision::Constr:Created,4M="<<ss4M<<",m2="<<ss4M.m2()<<G4endl; 1406 1422 #endif 1423 if( ist != strings.begin() ) // To avoid going below begin() (for Windows) 1424 { 1425 ist--; 1426 con=false; 1427 #ifdef debug 1428 G4cout<<"G4QIonIonCollision::Construct: *** IST Decremented ***"<<G4endl; 1429 #endif 1430 } 1431 else 1432 { 1433 con=true; 1434 #ifdef debug 1435 G4cout<<"G4QIonIonCollision::Construct: *** IST Begin ***"<<G4endl; 1436 #endif 1437 break; 1438 } 1407 1439 } // End of the IF(the best partnerString candidate was found) 1408 1440 else … … 1412 1444 #endif 1413 1445 ++problem; 1446 con=false; 1414 1447 } 1415 1448 } 1416 } 1449 else con=false; 1450 } // End of loop over ist iterator 1451 #ifdef debug 1452 G4cout<<"G4QIonIonCollision::Construct: *** IST While *** , con="<<con<<G4endl; 1453 #endif 1454 } // End of "con" while 1417 1455 #ifdef edebug 1418 1456 // This print has meaning only if something appear between it and the StringFragmLOOP … … 1645 1683 // theWorld->GetQParticle(QCh.GetQPDG2())->MinMassOfFragm(); 1646 1684 } 1647 else if(miPDG>80000000) // Compound Nucleus 1648 { 1649 G4QNucleus rtN(qsumQC); // Create PseudoNucl for totCompound 1650 gsM=rtN.GetGSMass(); // MinMass of residQ+(Env-ParC) syst. } 1651 } 1652 else if(std::abs(miPDG)%10 > 2) 1685 // @@ it is not clear, why it does not work ?! 1686 //else if(miPDG>80000000) // Compound Nucleus 1687 //{ 1688 // G4QNucleus rtN(qsumQC); // CreatePseudoNucl for totComp 1689 // gsM=rtN.GetGSMass(); // MinMass of residQ+(Env-ParC) 1690 //} 1691 else if(miPDG < 80000000 && std::abs(miPDG)%10 > 2) 1653 1692 gsM=theWorld->GetQParticle(G4QPDGCode(miPDG))->MinMassOfFragm(); 1654 else gsM=G4QPDGCode(miPDG).GetMass(); // minM of hadron/fragm. for QC1693 else gsM=G4QPDGCode(miPDG).GetMass(); // minM of hadron/fragm. for QC 1655 1694 G4double reM=qsum4M.m(); // real mass of the compound 1656 1695 #ifdef pdebug
Note: See TracChangeset
for help on using the changeset viewer.