- Timestamp:
- Sep 30, 2010, 2:47:17 PM (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
r1315 r1337 25 25 // 26 26 // 27 // $Id: G4QFragmentation.cc,v 1.1 4 2010/06/11 10:35:18mkossov Exp $28 // GEANT4 tag $Name: geant4-09-04-beta- cand-01 $27 // $Id: G4QFragmentation.cc,v 1.15 2010/06/19 07:46:44 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 54 54 // Definition of static parameters 55 55 G4int G4QFragmentation::nCutMax=7; 56 G4double G4QFragmentation::stringTension= GeV/fermi;56 G4double G4QFragmentation::stringTension=2.*GeV/fermi; 57 57 //G4double G4QFragmentation::tubeDensity =1./fermi; 58 58 G4double G4QFragmentation::tubeDensity =0./fermi; … … 65 65 static const G4double mProt2= mProt*mProt; // SquaredMass of proton 66 66 static const G4double mPi0= G4QPDGCode(111).GetMass(); // Mass of Pi0 67 static const G4double thresh= 1000; // Diffraction threshold (MeV) 67 68 theWorld= G4QCHIPSWorld::Get(); // Pointer to CHIPS World 68 69 theQuasiElastic=G4QuasiFreeRatios::GetPointer(); // Pointer to CHIPS quasiElastic … … 113 114 std::pair<G4double,G4double> ratios=std::make_pair(0.,0.); 114 115 G4int apPDG=std::abs(pPDG); 115 if(apPDG>99) 116 if(apPDG>99) // Diffraction or Quasi-elastic 116 117 { 117 118 G4double pMom=proj4M.vect().mag(); // proj.Momentum in MeV (indepUnits) … … 119 120 G4double qeRat = ratios.first*ratios.second; // quasi-elastic part [qe/in] 120 121 G4double difRat= theDiffraction->GetRatio(pMom, pPDG, tZ, tN); // diffrPart [d/(in-qe)] 121 if(qeRat < 1.) difRat /= (1.-qeRat)*.5; // Double for Top/Bottom 122 //if(qeRat < 1.) difRat /= (1.-qeRat)*.5; // Double for Top/Bottom @@ ? 123 if(qeRat<1. && proj4M.e()>thresh) difRat /= 1.-qeRat; // Both Top & Bottom 124 else difRat=0.; // Close diffraction for low Energy 122 125 difRat += qeRat; // for the diffraction selection 123 126 G4double rnd=G4UniformRand(); … … 159 162 #endif 160 163 G4QHadronVector* out=0; 161 if(G4UniformRand()>0.5) out=theDiffraction->TargFragment(pPDG, proj4M, tZ, tN); 162 else out=theDiffraction->ProjFragment(pPDG, proj4M, tZ, tN); 164 //if(G4UniformRand()>0.5) out=theDiffraction->TargFragment(pPDG, proj4M, tZ, tN); 165 //else out=theDiffraction->ProjFragment(pPDG, proj4M, tZ, tN); 166 //theDiffraction->TargFragment(pPDG, proj4M, tZ, tN); // !! is not debugged !! 167 out=theDiffraction->ProjFragment(pPDG, proj4M, tZ, tN); 163 168 G4int nSec=out->size(); // #of secondaries in diffReaction 164 169 if(nSec>1) for(G4int i=0; i<nSec; i++) theResult->push_back((*out)[i]); … … 2247 2252 { // This is the member function, which returns the resulting vector of Hadrons & Quasmons 2248 2253 static const G4double eps = 0.001; // Tolerance in MeV 2254 //static const G4QContent vacQC(0,0,0,0,0,0); 2255 static const G4LorentzVector vac4M(0.,0.,0.,0.); 2249 2256 // 2250 2257 // ------------ At this point the strings are fragmenting to hadrons in LS ------------- … … 3726 3733 G4int hBaN=(*theResult)[i]->GetBaryonNumber(); 3727 3734 rBN-=hBaN; 3728 G4cout<<"-EMCLS-G4QFragmentation::Breeder: Hadron#"<<i<<", 4M="<<hI4M<<", PDG="3735 G4cout<<"-EMCLS-G4QFragmentation::Breeder:(1) Hadron#"<<i<<", 4M="<<hI4M<<", PDG=" 3729 3736 <<(*theResult)[i]->GetPDGCode()<<", C="<<hChg<<", B="<<hBaN<<G4endl; 3730 3737 } … … 3737 3744 G4int hBaN=theQuasmons[i]->GetBaryonNumber(); 3738 3745 rBN-=hBaN; 3739 G4cout<<"-EMCLS-G4QFragmentation::Breeder: Quasmon#"<<i<<", 4M="<<hI4M<<", C="<<hChg3746 G4cout<<"-EMCLS-G4QFragmentation::Breeder:(1) Quasmon#"<<i<<", 4M="<<hI4M<<", C="<<hChg 3740 3747 <<", B="<<hBaN<<G4endl; 3741 3748 } … … 3744 3751 // Now we need to coolect particles for creation of a Quasmon @@ improve !! 3745 3752 G4int nRes=theResult->size(); 3746 if(nRes>2) 3747 { 3748 G4QHadronVector::iterator ih; 3749 G4QHadronVector::iterator nih; 3750 G4QHadronVector::iterator mih; 3751 G4QHadronVector::iterator lst=theResult->end(); 3752 lst--; 3753 G4double minMesEn=DBL_MAX; 3754 G4double minBarEn=DBL_MAX; 3755 G4bool nfound=false; 3756 G4bool mfound=false; 3757 for(ih = theResult->begin(); ih < theResult->end(); ++ih) if(ih != lst) 3758 { 3759 G4LorentzVector h4M=(*ih)->Get4Momentum(); 3760 G4int hPDG=(*ih)->GetPDGCode(); 3761 #ifdef debug 3762 G4cout<<"%->G4QFragmentation::Breeder: TRY hPDG="<<hPDG<<", h4M="<<h4M<<G4endl; 3763 #endif 3764 if(hPDG>1111 && hPDG<3333) 3753 #ifdef ppdebug 3754 G4cout<<"G4QFragmentation::Breeder: Strings4M="<<ft4M<<", nRes="<<nRes<<G4endl; 3755 #endif 3756 G4ThreeVector LS3Mom=ft4M.v(); 3757 G4ThreeVector LSDir=LS3Mom.unit(); 3758 if(nRes > 2 && maxEn > 0.) 3759 { 3760 std::list<std::pair<G4double, G4QHadron*> > theSorted; // Output 3761 std::list<std::pair<G4double, G4QHadron*> >::iterator current; // Input 3762 G4int nRes=theResult->size(); 3763 for(G4int secondary = 0; secondary<nRes-1; ++secondary) 3764 { 3765 G4QHadron* ih =theResult->operator[](secondary); 3766 G4LorentzVector h4M =ih->Get4Momentum(); 3767 G4double hM2 =ih->GetMass2(); 3768 G4ThreeVector h3M =h4M.v(); 3769 G4double toSort=DBL_MAX; 3770 if(hM2>0.00001) toSort=h4M.e()+h3M.dot(LSDir)/std::sqrt(hM2);// monotonic as rapidity 3771 #ifdef ppdebug 3772 G4cout<<"G4QFragmentation::Breeder:#"<<secondary<<",M2="<<hM2<<",s="<<toSort<<G4endl; 3773 #endif 3774 std::pair<G4double, G4QHadron*> it; 3775 it.first = toSort; 3776 it.second = ih; 3777 G4bool inserted = false; 3778 for(current = theSorted.begin(); current!=theSorted.end(); ++current) 3765 3779 { 3766 G4double bE=h4M.e()-(*ih)->GetMass(); 3767 if(bE < minBarEn) 3780 if((*current).first > toSort) // The current is smaller then existing 3768 3781 { 3769 minBarEn=bE;3770 nih=ih;3771 nfound=true;3782 theSorted.insert(current, it); // It shifts the others up 3783 inserted = true; 3784 break; 3772 3785 } 3773 3786 } 3774 else if(hPDG>-1111) 3787 if(!inserted) theSorted.push_back(it); // It is bigger than any previous 3788 } 3789 theResult->clear(); // Clear and refill theResult by StriHardPart 3790 G4LorentzVector q4M(0.,0.,0.,0.); 3791 G4QContent qQC(0,0,0,0,0,0); 3792 for(current = theSorted.begin(); current!=theSorted.end(); ++current) 3793 { 3794 G4QHadron* ih= (*current).second; 3795 G4LorentzVector h4M= ih->Get4Momentum(); 3796 G4int hPDG= ih->GetPDGCode(); 3797 G4double dE= 0.; 3798 G4bool tested=true; 3799 if (hPDG> 1111 && hPDG< 3335) dE=h4M.e()-ih->GetMass(); // Baryons 3800 else if(hPDG>-1111 && hPDG<1111 && hPDG!=22) dE=h4M.e(); // Mesons (Photons Hard) 3801 //else if(hPDG<-1111 && hPDG>-3335) dE=h4M.e()+ih->GetMass(); // Antiaryons Don'tUse 3802 else tested=false; // Skip other 3803 #ifdef ppdebug 3804 G4cout<<"G4QFragmentation::Breeder:dE="<<dE<<",mE="<<maxEn<<",t="<<tested<<G4endl; 3805 #endif 3806 if(tested && dE < maxEn) 3775 3807 { 3776 G4double mE=h4M.e();3777 if(mE < minMesEn)3778 {3779 minMesEn=mE; 3780 mih=ih;3781 mfound=true; 3782 }3808 maxEn-=dE; 3809 q4M+=h4M; 3810 qQC+=ih->GetQC(); 3811 #ifdef debug 3812 G4cout<<"%->G4QFragmentation::Breeder:Exclude,4M="<<h4M<<",dE="<<maxEn<<G4endl; 3813 #endif 3814 delete ih; 3783 3815 } 3784 } 3785 if(nfound && mfound && minMesEn+minBarEn < maxEn) 3786 { 3787 G4QHadron* resNuc = (*theResult)[nRes-1]; // ResidualNucleus is theLastH 3788 theResult->pop_back(); // Fill the QHad-nucleus later 3789 G4LorentzVector q4M=(*nih)->Get4Momentum()+(*mih)->Get4Momentum(); 3790 G4QContent qQC=(*nih)->GetQC()+(*mih)->GetQC(); 3791 maxEn -= minBarEn+minMesEn; // Reduce the energy limit 3792 #ifdef debug 3793 G4cout<<"%->G4QFragmentation::Breeder:Exclude,4M="<<(*nih)->Get4Momentum()<<", & 4m=" 3794 <<(*mih)->Get4Momentum()<<G4endl; 3795 #endif 3796 delete (*nih); 3797 delete (*mih); 3798 if(nih > mih) // Exclude nucleon first 3799 { 3800 theResult->erase(nih); // erase Baryon from theResult 3801 theResult->erase(mih); // erase Meson from theResult 3802 } 3803 else // Exclude meson first 3804 { 3805 theResult->erase(mih); // erase Baryon from theResult 3806 theResult->erase(nih); // erase Meson from theResult 3807 } 3808 #ifdef debug 3809 G4cout<<"%->G4QF::Breed: BeforeLOOP, dE="<<maxEn<<", nR="<<theResult->size()<<G4endl; 3810 #endif 3811 if(maxEn > 0.) // More hadrons to absorbe 3812 { 3813 for(ih = theResult->begin(); ih < theResult->end(); ih++) 3814 { 3815 G4LorentzVector h4M=(*ih)->Get4Momentum(); 3816 G4int hPDG=(*ih)->GetPDGCode(); 3817 G4double dE=0.; 3818 if (hPDG> 1111 && hPDG<3333) dE=h4M.e()-(*ih)->GetMass(); // Baryons 3819 else if(hPDG>-1111) dE=h4M.e(); // Mesons 3820 else continue; // Don't consider anti-baryons 3821 if(dE < maxEn) 3822 { 3823 maxEn-=dE; 3824 q4M+=h4M; 3825 qQC+=(*ih)->GetQC(); 3826 #ifdef debug 3827 G4cout<<"%->G4QFragmentation::Breeder:Exclude,4M="<<h4M<<",dE="<<maxEn<<G4endl; 3828 #endif 3829 delete (*ih); 3830 theResult->erase(ih); // erase Hadron from theResult 3831 --ih; 3832 } 3833 } 3834 } 3835 G4Quasmon* softQuasmon = new G4Quasmon(qQC, q4M); // SoftPart -> Quasmon 3836 #ifdef debug 3837 G4cout<<"%->G4QFragmentation::Breeder:QuasmonIsFilled,4M="<<q4M<<",QC="<<qQC<<G4endl; 3838 #endif 3839 theQuasmons.push_back(softQuasmon); 3840 theResult->push_back(resNuc); 3841 } 3816 else theResult->push_back(ih); // Delete equivalent 3817 } // End of Loop over sorted pairs 3818 G4Quasmon* softQuasmon = new G4Quasmon(qQC, q4M); // SoftPart -> Quasmon 3819 #ifdef debug 3820 G4cout<<"%->G4QFragmentation::Breeder:QuasmonIsFilled,4M="<<q4M<<",QC="<<qQC<<G4endl; 3821 #endif 3822 if(q4M != vac4M) theQuasmons.push_back(softQuasmon); 3823 else delete softQuasmon; 3824 theResult->push_back(resNuc); 3842 3825 #ifdef edebug 3843 G4LorentzVector f4M(0.,0.,0.,0.); 3826 G4LorentzVector f4M(0.,0.,0.,0.); // Sum of the Result in LS 3844 3827 G4int fCh=totChg; 3845 3828 G4int fBN=totBaN; … … 3856 3839 G4int hBaN=(*theResult)[i]->GetBaryonNumber(); 3857 3840 fBN-=hBaN; 3858 G4cout<<"-EMCLS-G4QFragmentation::Breeder: Hadron#"<<i<<", 4M="<<hI4M<<", PDG="3841 G4cout<<"-EMCLS-G4QFragmentation::Breeder:(2) Hadron#"<<i<<", 4M="<<hI4M<<", PDG=" 3859 3842 <<(*theResult)[i]->GetPDGCode()<<", C="<<hChg<<", B="<<hBaN<<G4endl; 3860 3843 } … … 3867 3850 G4int hBaN=theQuasmons[i]->GetBaryonNumber(); 3868 3851 fBN-=hBaN; 3869 G4cout<<"-EMCLS-G4QFragmentation::Breeder: Quasmon#"<<i<<", 4M="<<hI4M<<", C="<<hChg3870 << ", B="<<hBaN<<G4endl;3852 G4cout<<"-EMCLS-G4QFragmentation::Breeder:(2) Quasmon#"<<i<<", 4M="<<hI4M<<", C=" 3853 <<hChg<<", B="<<hBaN<<G4endl; 3871 3854 } 3872 3855 G4cout<<"-EMCLS-G4QFragm::Breed:, r4M="<<f4M-totLS4M<<",rC="<<fCh<<",rB="<<fBN<<G4endl; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/fragmentation/src/G4QIonIonCollision.cc
r1315 r1337 25 25 // 26 26 // 27 // $Id: G4QIonIonCollision.cc,v 1. 8 2010/04/01 15:03:35mkossov Exp $28 // GEANT4 tag $Name: geant4-09-04-beta- cand-01 $27 // $Id: G4QIonIonCollision.cc,v 1.9 2010/06/19 07:46:44 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 3562 3562 } // End of ChooseX 3563 3563 3564 // Pt distribution @@ one can use 1/(1+A*Pt^2)^B3564 // Add CHIPS exponential Pt distribution (see Fragmentation) 3565 3565 G4ThreeVector G4QIonIonCollision::GaussianPt(G4double widthSq, G4double maxPtSquare) const 3566 3566 {
Note: See TracChangeset
for help on using the changeset viewer.