#include <G4QuasiFreeRatios.hh>
Public Member Functions | |
~G4QuasiFreeRatios () | |
std::pair< G4double, G4double > | GetRatios (G4double pIU, G4int prPDG, G4int tgZ, G4int tgN) |
std::pair< G4double, G4double > | GetChExFactor (G4double pIU, G4int pPDG, G4int Z, G4int N) |
std::pair< G4LorentzVector, G4LorentzVector > | Scatter (G4int NPDG, G4LorentzVector N4M, G4int pPDG, G4LorentzVector p4M) |
std::pair< G4LorentzVector, G4LorentzVector > | ChExer (G4int NPDG, G4LorentzVector N4M, G4int pPDG, G4LorentzVector p4M) |
std::pair< G4double, G4double > | GetElTot (G4double pIU, G4int hPDG, G4int Z, G4int N) |
G4double | ChExElCoef (G4double p, G4int Z, G4int N, G4int pPDG) |
std::pair< G4double, G4double > | GetElTotXS (G4double Mom, G4int PDG, G4bool F) |
Static Public Member Functions | |
static G4QuasiFreeRatios * | GetPointer () |
Protected Member Functions | |
G4QuasiFreeRatios () |
Definition at line 52 of file G4QuasiFreeRatios.hh.
G4QuasiFreeRatios::G4QuasiFreeRatios | ( | ) | [protected] |
Definition at line 51 of file G4QuasiFreeRatios.cc.
References G4cout, G4endl, and G4QFreeScattering::GetPointer().
00052 { 00053 #ifdef pdebug 00054 G4cout<<"***^^^*** G4QuasiFreeRatios singletone is created ***^^^***"<<G4endl; 00055 #endif 00056 QFreeScat=G4QFreeScattering::GetPointer(); 00057 }
G4QuasiFreeRatios::~G4QuasiFreeRatios | ( | ) |
Definition at line 59 of file G4QuasiFreeRatios.cc.
00060 { 00061 std::vector<G4double*>::iterator pos; 00062 for(pos=vT.begin(); pos<vT.end(); ++pos) delete [] *pos; 00063 vT.clear(); 00064 for(pos=vL.begin(); pos<vL.end(); ++pos) delete [] *pos; 00065 vL.clear(); 00066 }
Definition at line 734 of file G4QuasiFreeRatios.cc.
References G4cout, and G4InuclParticleNames::sp.
Referenced by G4QInelastic::PostStepDoIt().
00735 { 00736 p/=MeV; // Converted from independent units 00737 G4double A=Z+N; 00738 if(A<1.5) return 0.; 00739 G4double C=0.; 00740 if (pPDG==2212) C=N/(A+Z); 00741 else if(pPDG==2112) C=Z/(A+N); 00742 else G4cout<<"*Warning*G4QCohChrgExchange::ChExElCoef: wrong PDG="<<pPDG<<G4endl; 00743 C*=C; // Coherent processes squares the amplitude 00744 // @@ This is true only for nucleons: other projectiles must be treated differently 00745 G4double sp=std::sqrt(p); 00746 G4double p2=p*p; 00747 G4double p4=p2*p2; 00748 G4double dl1=std::log(p)-5.; 00749 G4double T=(6.75+.14*dl1*dl1+13./p)/(1.+.14/p4)+.6/(p4+.00013); 00750 G4double U=(6.25+8.33e-5/p4/p)*(p*sp+.34)/p2/p; 00751 G4double R=U/T; 00752 return C*R*R; 00753 }
std::pair< G4LorentzVector, G4LorentzVector > G4QuasiFreeRatios::ChExer | ( | G4int | NPDG, | |
G4LorentzVector | N4M, | |||
G4int | pPDG, | |||
G4LorentzVector | p4M | |||
) |
Definition at line 590 of file G4QuasiFreeRatios.cc.
References FatalException, G4cerr, G4cout, G4Exception(), G4UniformRand, G4VQCrossSection::GetCrossSection(), G4VQCrossSection::GetExchangeT(), G4VQCrossSection::GetHMaxT(), G4QNeutronElasticCrossSection::GetPointer(), and G4QProtonElasticCrossSection::GetPointer().
00592 { 00593 static const G4double mNeut= G4QPDGCode(2112).GetMass(); 00594 static const G4double mProt= G4QPDGCode(2212).GetMass(); 00595 G4LorentzVector pr4M=p4M/megaelectronvolt; // Convert 4-momenta in MeV(keep p4M) 00596 N4M/=megaelectronvolt; 00597 G4LorentzVector tot4M=N4M+p4M; 00598 G4int Z=0; 00599 G4int N=1; 00600 G4int sPDG=0; // PDG code of the scattered hadron 00601 G4double mS=0.; // proto of mass of scattered hadron 00602 G4double mT=mProt; // mass of the recoil nucleon 00603 G4cout<<"-Warning-G4QFR::ChEx: Impossible for Omega-"<<G4endl; // Omega- 00604 if(NPDG==2212) 00605 { 00606 mT=mNeut; 00607 Z=1; 00608 N=0; 00609 if(pPDG==-211) sPDG=111; // pi+ -> pi0 00610 else if(pPDG==-321) 00611 { 00612 sPDG=310; // K+ -> K0S 00613 if(G4UniformRand()>.5) sPDG=130; // K+ -> K0L 00614 } 00615 else if(pPDG==-311||pPDG==311||pPDG==130||pPDG==310) sPDG=321; // K0 -> K+ (?) 00616 else if(pPDG==3112) sPDG=3212; // Sigma- -> Sigma0 00617 else if(pPDG==3212) sPDG=3222; // Sigma0 -> Sigma+ 00618 else if(pPDG==3312) sPDG=3322; // Xi- -> Xi0 00619 } 00620 else if(NPDG==2112) // Default 00621 { 00622 if(pPDG==211) sPDG=111; // pi+ -> pi0 00623 else if(pPDG==321) 00624 { 00625 sPDG=310; // K+ -> K0S 00626 if(G4UniformRand()>.5) sPDG=130; // K+ -> K0L 00627 } 00628 else if(pPDG==-311||pPDG==311||pPDG==130||pPDG==310) sPDG=-321; // K0 -> K- (?) 00629 else if(pPDG==3222) sPDG=3212; // Sigma+ -> Sigma0 00630 else if(pPDG==3212) sPDG=3112; // Sigma0 -> Sigma- 00631 else if(pPDG==3322) sPDG=3312; // Xi0 -> Xi- 00632 } 00633 else 00634 { 00635 G4cout<<"Error:G4QuasiFreeRatios::ChExer: NPDG="<<NPDG<<" is not 2212 or 2112"<<G4endl; 00636 G4Exception("G4QuasiFreeRatios::ChExer:","21",FatalException,"CHIPS complain"); 00637 //return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M);// Use this if not exception 00638 } 00639 if(sPDG) mS=mNeut; 00640 else 00641 { 00642 G4cout<<"Error:G4QuasiFreeRatios::ChExer: BAD pPDG="<<pPDG<<", NPDG="<<NPDG<<G4endl; 00643 G4Exception("G4QuasiFreeRatios::ChExer:","21",FatalException,"CHIPS complain"); 00644 //return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M);// Use this if not exception 00645 } 00646 G4double mT2=mT*mT; 00647 G4double mS2=mS*mS; 00648 G4double E=(tot4M.m2()-mT2-mS2)/(mT+mT); 00649 G4double E2=E*E; 00650 if(E<0. || E2<mS2) 00651 { 00652 #ifdef pdebug 00653 G4cerr<<"-Warning-G4QFR::ChEx:*Negative Energy*E="<<E<<",E2="<<E2<<"<M2="<<mS2<<G4endl; 00654 #endif 00655 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action 00656 } 00657 G4double P=std::sqrt(E2-mS2); // Momentum in pseudo laboratory system 00658 G4VQCrossSection* PCSmanager=G4QProtonElasticCrossSection::GetPointer(); 00659 G4VQCrossSection* NCSmanager=G4QNeutronElasticCrossSection::GetPointer(); 00660 #ifdef debug 00661 G4cout<<"G4QFR::ChExer: Before XS, P="<<P<<", Z="<<Z<<", N="<<N<<", PDG="<<pPDG<<G4endl; 00662 #endif 00663 // @@ Temporary NN t-dependence for all hadrons 00664 G4int PDG=2212; // *TMP* instead of pPDG 00665 if(pPDG==2112||pPDG==-211||pPDG==-321) PDG=2112; // *TMP* instead of pPDG 00666 if(!Z && N==1) // Change for Quasi-Elastic on neutron 00667 { 00668 Z=1; 00669 N=0; 00670 if (PDG==2212) PDG=2112; 00671 else if(PDG==2112) PDG=2212; 00672 } 00673 G4double xSec=0.; // Prototype of Recalculated Cross Section *TMP* 00674 if(PDG==2212) xSec=PCSmanager->GetCrossSection(false, P, Z, N, PDG); // P CrossSect *TMP* 00675 else xSec=NCSmanager->GetCrossSection(false, P, Z, N, PDG); // N CrossSect *TMP* 00676 #ifdef debug 00677 G4cout<<"G4QuasiFreeRat::ChExer: pPDG="<<pPDG<<",P="<<P<<", CS="<<xSec/millibarn<<G4endl; 00678 #endif 00679 #ifdef nandebug 00680 if(xSec>0. || xSec<0. || xSec==0); 00681 else G4cout<<"*Warning*G4QuasiFreeRatios::ChExer: xSec="<<xSec/millibarn<<G4endl; 00682 #endif 00683 // @@ check a possibility to separate p, n, or alpha (!) 00684 if(xSec <= 0.) // The cross-section iz 0 -> Do Nothing 00685 { 00686 #ifdef pdebug 00687 G4cerr<<"-Warning-G4QFR::ChEx:**Zero XS**PDG="<<pPDG<<",NPDG="<<NPDG<<",P="<<P<<G4endl; 00688 #endif 00689 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); //Do Nothing Action 00690 } 00691 G4double mint=0.; // Prototype of functional rand -t (MeV^2) *TMP* 00692 if(PDG==2212) mint=PCSmanager->GetExchangeT(Z,N,PDG);// P functional rand -t(MeV^2) *TMP* 00693 else mint=NCSmanager->GetExchangeT(Z,N,PDG);// N functional rand -t(MeV^2) *TMP* 00694 #ifdef pdebug 00695 G4cout<<"G4QFR::ChEx:PDG="<<pPDG<<", P="<<P<<", CS="<<xSec<<", -t="<<mint<<G4endl; 00696 #endif 00697 #ifdef nandebug 00698 if(mint>-.0000001); 00699 else G4cout<<"*Warning*G4QFR::ChExer: -t="<<mint<<G4endl; 00700 #endif 00701 G4double maxt=0.; // Prototype of max possible -t 00702 if(PDG==2212) maxt=PCSmanager->GetHMaxT(); // max possible -t 00703 else maxt=NCSmanager->GetHMaxT(); // max possible -t 00704 G4double cost=1.-mint/maxt; // cos(theta) in CMS 00705 #ifdef pdebug 00706 G4cout<<"G4QuasiFfreeRatio::ChExer: -t="<<mint<<", maxt="<<maxt<<", cost="<<cost<<G4endl; 00707 #endif 00708 if(cost>1. || cost<-1. || !(cost>-1. || cost<=1.)) 00709 { 00710 if (cost>1.) cost=1.; 00711 else if(cost<-1.) cost=-1.; 00712 else 00713 { 00714 G4cerr<<"G4QuasiFreeRatio::ChExer:*NAN* c="<<cost<<",t="<<mint<<",tm="<<maxt<<G4endl; 00715 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action 00716 } 00717 } 00718 G4LorentzVector reco4M=G4LorentzVector(0.,0.,0.,mT); // 4mom of the recoil nucleon 00719 pr4M=G4LorentzVector(0.,0.,0.,mS); // 4mom of the scattered hadron 00720 G4LorentzVector dir4M=tot4M-G4LorentzVector(0.,0.,0.,(tot4M.e()-mT)*.01); 00721 if(!G4QHadron(tot4M).RelDecayIn2(pr4M, reco4M, dir4M, cost, cost)) 00722 { 00723 G4cerr<<"G4QFR::ChEx:t="<<tot4M<<tot4M.m()<<",mT="<<mT<<",mP="<<mS<<G4endl; 00724 //G4Exception("G4QFR::ChExer:","009",FatalException,"Decay of ElasticComp"); 00725 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action 00726 } 00727 #ifdef debug 00728 G4cout<<"G4QFR::ChEx:p4M="<<p4M<<"+r4M="<<reco4M<<"="<<p4M+reco4M<<"="<<tot4M<<G4endl; 00729 #endif 00730 return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result 00731 } // End of ChExer
std::pair< G4double, G4double > G4QuasiFreeRatios::GetChExFactor | ( | G4double | pIU, | |
G4int | pPDG, | |||
G4int | Z, | |||
G4int | N | |||
) |
Definition at line 389 of file G4QuasiFreeRatios.cc.
References G4QFreeScattering::FetchElTot(), and G4cout.
00391 { 00392 G4double pGeV=pIU/gigaelectronvolt; 00393 G4double resP=0.; 00394 G4double resN=0.; 00395 if(Z<1 && N<1) 00396 { 00397 G4cout<<"-Warning-G4QuasiFreeRatio::GetChExF:Z="<<Z<<",N="<<N<<", return zero"<<G4endl; 00398 return std::make_pair(resP,resN); 00399 } 00400 G4double A=Z+N; 00401 G4double pf=0.; // Possibility to interact with a proton 00402 G4double nf=0.; // Possibility to interact with a neutron 00403 if (hPDG==-211||hPDG==-321||hPDG==3112||hPDG==3212||hPDG==3312||hPDG==3334) pf=Z/(A+N); 00404 else if(hPDG==211||hPDG==321||hPDG==3222||hPDG==3212||hPDG==3322) nf=N/(A+Z); 00405 else if(hPDG==-311||hPDG==311||hPDG==130||hPDG==310) 00406 { 00407 G4double dA=A+A; 00408 pf=Z/(dA+N+N); 00409 nf=N/(dA+Z+Z); 00410 } 00411 G4double mult=1.; // Factor of increasing multiplicity ( ? @@) 00412 if(pGeV>.5) 00413 { 00414 mult=1./(1.+std::log(pGeV+pGeV))/pGeV; 00415 if(mult>1.) mult=1.; 00416 } 00417 if(pf) 00418 { 00419 std::pair<G4double,G4double> hp=QFreeScat->FetchElTot(pGeV, hPDG, true); 00420 resP=pf*(hp.second/hp.first-1.)*mult; 00421 } 00422 if(nf) 00423 { 00424 std::pair<G4double,G4double> hn=QFreeScat->FetchElTot(pGeV, hPDG, false); 00425 resN=nf*(hn.second/hn.first-1.)*mult; 00426 } 00427 return std::make_pair(resP,resN); 00428 } // End of GetChExFactor
std::pair< G4double, G4double > G4QuasiFreeRatios::GetElTot | ( | G4double | pIU, | |
G4int | hPDG, | |||
G4int | Z, | |||
G4int | N | |||
) |
Definition at line 366 of file G4QuasiFreeRatios.cc.
References G4QFreeScattering::FetchElTot(), and G4cout.
Referenced by GetRatios().
00368 { 00369 G4double pGeV=pIU/gigaelectronvolt; 00370 #ifdef pdebug 00371 G4cout<<"-->G4QuasiFreeR::GetElTot: P="<<pIU<<",pPDG="<<hPDG<<",Z="<<Z<<",N="<<N<<G4endl; 00372 #endif 00373 if(Z<1 && N<1) 00374 { 00375 G4cout<<"-Warning-G4QuasiFreeRatio::GetElTot:Z="<<Z<<",N="<<N<<", return zero"<<G4endl; 00376 return std::make_pair(0.,0.); 00377 } 00378 std::pair<G4double,G4double> hp=QFreeScat->FetchElTot(pGeV, hPDG, true); 00379 std::pair<G4double,G4double> hn=QFreeScat->FetchElTot(pGeV, hPDG, false); 00380 #ifdef pdebug 00381 G4cout<<"-OUT->G4QFRat::GetElTot: hp("<<hp.first<<","<<hp.second<<"), hn("<<hn.first<<"," 00382 <<hn.second<<")"<<G4endl; 00383 #endif 00384 G4double A=(Z+N)/millibarn; // To make the result in independent units(IU) 00385 return std::make_pair((Z*hp.first+N*hn.first)/A,(Z*hp.second+N*hn.second)/A); 00386 } // End of GetElTot
Definition at line 339 of file G4QuasiFreeRatios.cc.
References G4QFreeScattering::CalcElTot(), FatalException, G4cout, G4Exception(), and G4UniformRand.
00340 { 00341 G4int ind=0; // Prototype of the reaction index 00342 G4bool kfl=true; // Flag of K0/aK0 oscillation 00343 G4bool kf=false; 00344 if(PDG==130||PDG==310) 00345 { 00346 kf=true; 00347 if(G4UniformRand()>.5) kfl=false; 00348 } 00349 if ( (PDG == 2212 && F) || (PDG == 2112 && !F) ) ind=0; // pp/nn 00350 else if ( (PDG == 2112 && F) || (PDG == 2212 && !F) ) ind=1; // np/pn 00351 else if ( (PDG == -211 && F) || (PDG == 211 && !F) ) ind=2; // pimp/pipn 00352 else if ( (PDG == 211 && F) || (PDG == -211 && !F) ) ind=3; // pipp/pimn 00353 else if ( PDG == -321 || PDG == -311 || (kf && !kfl) ) ind=4; // KmN/K0N 00354 else if ( PDG == 321 || PDG == 311 || (kf && kfl) ) ind=5; // KpN/aK0N 00355 else if ( PDG > 3000 && PDG < 3335) ind=6; // @@ for all hyperons - take Lambda 00356 else if ( PDG > -3335 && PDG < -2000) ind=7; // @@ for all anti-baryons (anti-p/anti-n) 00357 else { 00358 G4cout<<"*Error*G4QuasiFreeRatios::CalcElTotXS: PDG="<<PDG 00359 <<", while it is defined only for p,n,hyperons,anti-baryons,pi,K/antiK"<<G4endl; 00360 G4Exception("G4QuasiFreeRatio::CalcElTotXS:","22",FatalException,"CHIPScrash"); 00361 } 00362 return QFreeScat->CalcElTot(p,ind); 00363 }
G4QuasiFreeRatios * G4QuasiFreeRatios::GetPointer | ( | ) | [static] |
Definition at line 69 of file G4QuasiFreeRatios.cc.
Referenced by G4QFragmentation::G4QFragmentation(), and G4QInelastic::PostStepDoIt().
00070 { 00071 static G4QuasiFreeRatios theRatios; // *** Static body of the QEl Cross Section *** 00072 return &theRatios; 00073 }
std::pair< G4double, G4double > G4QuasiFreeRatios::GetRatios | ( | G4double | pIU, | |
G4int | prPDG, | |||
G4int | tgZ, | |||
G4int | tgN | |||
) |
Definition at line 76 of file G4QuasiFreeRatios.cc.
References G4cout, G4endl, and GetElTot().
Referenced by G4QFragmentation::G4QFragmentation(), and G4QInelastic::PostStepDoIt().
00078 { 00079 #ifdef pdebug 00080 G4cout<<">>>IN>>>G4QFRat::GetQF:P="<<pIU<<",pPDG="<<pPDG<<",Z="<<tgZ<<",N="<<tgN<<G4endl; 00081 #endif 00082 G4double R=0.; 00083 G4double QF2In=1.; // Prototype of QuasiFree/Inel ratio for hN_tot 00084 G4int tgA=tgZ+tgN; 00085 if(tgA<2) return std::make_pair(QF2In,R); // No quasi-elastic on the only nucleon 00086 std::pair<G4double,G4double> ElTot=GetElTot(pIU, pPDG, tgZ, tgN); // mean (IU) 00087 //if( ( (pPDG>999 && pIU<227.) || pIU<27.) && tgA>1) R=1.; // @@ TMP to accelerate @lowE 00088 if(pPDG>999 && pIU<227. && tgZ+tgN>1) R=1.; // To accelerate @lowE 00089 else if(ElTot.second>0.) 00090 { 00091 R=ElTot.first/ElTot.second; // El/Total ratio (does not depend on units 00092 QF2In=GetQF2IN_Ratio(ElTot.second/millibarn, tgZ+tgN); // QuasiFree/Inelastic ratio 00093 } 00094 #ifdef pdebug 00095 G4cout<<">>>OUT>>>G4QuasiFreeRatio::GetQF2IN_Ratio: QF2In="<<QF2In<<", R="<<R<<G4endl; 00096 #endif 00097 return std::make_pair(QF2In,R); 00098 }
std::pair< G4LorentzVector, G4LorentzVector > G4QuasiFreeRatios::Scatter | ( | G4int | NPDG, | |
G4LorentzVector | N4M, | |||
G4int | pPDG, | |||
G4LorentzVector | p4M | |||
) |
Definition at line 432 of file G4QuasiFreeRatios.cc.
References FatalException, G4cerr, G4cout, G4Exception(), G4VQCrossSection::GetCrossSection(), G4VQCrossSection::GetExchangeT(), G4VQCrossSection::GetHMaxT(), G4QNeutronElasticCrossSection::GetPointer(), and G4QProtonElasticCrossSection::GetPointer().
Referenced by G4QFragmentation::G4QFragmentation(), and G4QInelastic::PostStepDoIt().
00434 { 00435 static const G4double mNeut= G4QPDGCode(2112).GetMass(); 00436 static const G4double mProt= G4QPDGCode(2212).GetMass(); 00437 static const G4double mDeut= G4QPDGCode(2112).GetNuclMass(1,1,0);// Mass of deuteron 00438 static const G4double mTrit= G4QPDGCode(2112).GetNuclMass(1,2,0);// Mass of tritium 00439 static const G4double mHel3= G4QPDGCode(2112).GetNuclMass(2,1,0);// Mass of Helium3 00440 static const G4double mAlph= G4QPDGCode(2112).GetNuclMass(2,2,0);// Mass of alpha 00441 static const G4double two3d= 2./3.; 00442 static const G4double two3d2= std::pow(2.,two3d); // The slope reductions for fragments 00443 static const G4double two3d3= std::pow(3.,two3d); 00444 static const G4double two3d4= std::pow(4.,two3d); 00445 G4LorentzVector pr4M=p4M/megaelectronvolt; // Convert 4-momenta in MeV (keep p4M) 00446 N4M/=megaelectronvolt; 00447 G4LorentzVector tot4M=N4M+p4M; 00448 #ifdef ppdebug 00449 G4cerr<<"->G4QFR::Scat:p4M="<<pr4M<<",N4M="<<N4M<<",t4M="<<tot4M<<",NPDG="<<NPDG<<G4endl; 00450 #endif 00451 G4double mT=mNeut; 00452 G4int Z=0; 00453 G4int N=1; 00454 if(NPDG==2212||NPDG==90001000) 00455 { 00456 mT=mProt; 00457 Z=1; 00458 N=0; 00459 } 00460 else if(NPDG==90001001) 00461 { 00462 mT=mDeut; 00463 Z=1; 00464 N=1; 00465 } 00466 else if(NPDG==90002001) 00467 { 00468 mT=mHel3; 00469 Z=2; 00470 N=1; 00471 } 00472 else if(NPDG==90001002) 00473 { 00474 mT=mTrit; 00475 Z=1; 00476 N=2; 00477 } 00478 else if(NPDG==90002002) 00479 { 00480 mT=mAlph; 00481 Z=2; 00482 N=2; 00483 } 00484 else if(NPDG!=2112&&NPDG!=90000001) 00485 { 00486 G4cout<<"Error:G4QuasiFreeRatios::Scatter:NPDG="<<NPDG<<" is not 2212 or 2112"<<G4endl; 00487 G4Exception("G4QuasiFreeRatios::Scatter:","21",FatalException,"CHIPScomplain"); 00488 //return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M);// Use this if not exception 00489 } 00490 G4double mT2=mT*mT; 00491 G4double mP2=pr4M.m2(); 00492 G4double E=(tot4M.m2()-mT2-mP2)/(mT+mT); 00493 #ifdef pdebug 00494 G4cerr<<"G4QFR::Scat:qM="<<mT<<",qM2="<<mT2<<",pM2="<<mP2<<",totM2="<<tot4M.m2()<<G4endl; 00495 #endif 00496 G4double E2=E*E; 00497 if(E<0. || E2<mP2) 00498 { 00499 #ifdef ppdebug 00500 G4cerr<<"-Warning-G4QFR::Scat:*Negative Energy*E="<<E<<",E2="<<E2<<"<M2="<<mP2<<G4endl; 00501 #endif 00502 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action 00503 } 00504 G4double P=std::sqrt(E2-mP2); // Momentum in pseudo laboratory system 00505 G4VQCrossSection* PCSmanager=G4QProtonElasticCrossSection::GetPointer(); 00506 G4VQCrossSection* NCSmanager=G4QNeutronElasticCrossSection::GetPointer(); 00507 #ifdef ppdebug 00508 G4cout<<"G4QFR::Scatter: Before XS, P="<<P<<", Z="<<Z<<", N="<<N<<", PDG="<<pPDG<<G4endl; 00509 #endif 00510 // @@ Temporary NN t-dependence for all hadrons 00511 if(pPDG>3400 || pPDG<-3400) G4cout<<"-Warning-G4QuasiFree::Scatter: pPDG="<<pPDG<<G4endl; 00512 G4int PDG=2212; // *TMP* instead of pPDG 00513 if(pPDG==2112||pPDG==-211||pPDG==-321) PDG=2112; // *TMP* instead of pPDG 00514 if(!Z && N==1) // Change for Quasi-Elastic on neutron 00515 { 00516 Z=1; 00517 N=0; 00518 if (PDG==2212) PDG=2112; 00519 else if(PDG==2112) PDG=2212; 00520 } 00521 G4double xSec=0.; // Prototype of Recalculated Cross Section *TMP* 00522 if(PDG==2212) xSec=PCSmanager->GetCrossSection(false, P, Z, N, PDG); // P CrossSect *TMP* 00523 else xSec=NCSmanager->GetCrossSection(false, P, Z, N, PDG); // N CrossSect *TMP* 00524 #ifdef ppdebug 00525 G4cout<<"G4QuasiFreeRat::Scatter: pPDG="<<pPDG<<",P="<<P<<",CS="<<xSec/millibarn<<G4endl; 00526 #endif 00527 #ifdef nandebug 00528 if(xSec>0. || xSec<0. || xSec==0); 00529 else G4cout<<"*Warning*G4QuasiFreeRatios::Scatter: xSec="<<xSec/millibarn<<G4endl; 00530 #endif 00531 // @@ check a possibility to separate p, n, or alpha (!) 00532 if(xSec <= 0.) // The cross-section iz 0 -> Do Nothing 00533 { 00534 #ifdef ppdebug 00535 G4cerr<<"-Warning-G4QFR::Scat:**Zero XS**PDG="<<pPDG<<",NPDG="<<NPDG<<",P="<<P<<G4endl; 00536 #endif 00537 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); //Do Nothing Action 00538 } 00539 G4double mint=0.; // Prototype of functional rand -t (MeV^2) *TMP* 00540 if(PDG==2212) mint=PCSmanager->GetExchangeT(Z,N,PDG);// P functional rand -t(MeV^2) *TMP* 00541 else mint=NCSmanager->GetExchangeT(Z,N,PDG);// N functional rand -t(MeV^2) *TMP* 00542 if (mT==mDeut) mint/=two3d2; 00543 else if(mT==mTrit || mT==mHel3) mint/=two3d3; 00544 else if(mT==mAlph) mint/=two3d4; 00545 G4double maxt=0.; // Prototype of max possible -t 00546 if(PDG==2212) maxt=PCSmanager->GetHMaxT(); // max possible -t 00547 else maxt=NCSmanager->GetHMaxT(); // max possible -t 00548 #ifdef ppdebug 00549 G4cout<<"G4QFR::Scat:PDG="<<PDG<<",P="<<P<<",X="<<xSec<<",-t="<<mint<<"<"<<maxt<<", Z=" 00550 <<Z<<",N="<<N<<G4endl; 00551 #endif 00552 #ifdef nandebug 00553 if(mint>-.0000001); 00554 else G4cout<<"*Warning*G4QFR::Scat: -t="<<mint<<G4endl; 00555 #endif 00556 G4double cost=1.-(mint+mint)/maxt; // cos(theta) in CMS 00557 #ifdef ppdebug 00558 G4cout<<"G4QFR::Scat:-t="<<mint<<"<"<<maxt<<", cost="<<cost<<", Z="<<Z<<",N="<<N<<G4endl; 00559 #endif 00560 if(cost>1. || cost<-1. || !(cost>-1. || cost<=1.)) 00561 { 00562 if (cost>1.) cost=1.; 00563 else if(cost<-1.) cost=-1.; 00564 else 00565 { 00566 G4double tm=0.; 00567 if(PDG==2212) tm=PCSmanager->GetHMaxT(); 00568 else tm=NCSmanager->GetHMaxT(); 00569 G4cerr<<"G4QuasiFreeRatio::Scat:*NAN* cost="<<cost<<",-t="<<mint<<",tm="<<tm<<G4endl; 00570 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action 00571 } 00572 } 00573 G4LorentzVector reco4M=G4LorentzVector(0.,0.,0.,mT); // 4mom of the recoil nucleon 00574 G4LorentzVector dir4M=tot4M-G4LorentzVector(0.,0.,0.,(tot4M.e()-mT)*.01); 00575 if(!G4QHadron(tot4M).RelDecayIn2(pr4M, reco4M, dir4M, cost, cost)) 00576 { 00577 G4cerr<<"G4QFR::Scat:t="<<tot4M<<tot4M.m()<<",mT="<<mT<<",mP="<<std::sqrt(mP2)<<G4endl; 00578 //G4Exception("G4QFR::Scat:","009",FatalException,"Decay of ElasticComp"); 00579 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action 00580 } 00581 #ifdef ppdebug 00582 G4cout<<"G4QFR::Scat:p4M="<<pr4M<<"+r4M="<<reco4M<<",dr="<<dir4M<<",t4M="<<tot4M<<G4endl; 00583 #endif 00584 return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result 00585 } // End of Scatter