// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: G4QDiffractionRatio.cc,v 1.7.2.1 2008/04/23 14:57:21 gcosmo Exp $ // GEANT4 tag $Name: geant4-09-01-patch-02 $ // // // G4 Physics class: G4QDiffractionRatio for N+A elastic cross sections // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-06 // //================================================================================ //#define debug //#define pdebug //#define fdebug //#define nandebug #include "G4QDiffractionRatio.hh" // Returns Pointer to the G4VQCrossSection class G4QDiffractionRatio* G4QDiffractionRatio::GetPointer() { static G4QDiffractionRatio theRatios; // *** Static body of the Diffraction Ratio *** return &theRatios; } // Calculation of pair(QuasiFree/Inelastic,QuasiElastic/QuasiFree) G4double G4QDiffractionRatio::GetRatio(G4double pIU, G4int pPDG, G4int tgZ, G4int tgN) { static const G4double mNeut= G4QPDGCode(2112).GetMass(); static const G4double mProt= G4QPDGCode(2212).GetMass(); static const G4double mN=.5*(mNeut+mProt); static const G4double dmN=mN+mN; static const G4double mN2=mN*mN; // Table parameters static const G4int nps=100; // Number of steps in the R(s) LinTable static const G4int mps=nps+1; // Number of elements in the R(s) LinTable static const G4double sma=6.; // The first LinTabEl(sqs=0)=1., sqs>sma -> logTab static const G4double ds=sma/nps; // Step of the linear Table static const G4int nls=150; // Number of steps in the R(lns) logTable static const G4int mls=nls+1; // Number of elements in the R(lns) logTable static const G4double lsi=1.79; // The min ln(sqs) logTabEl(sqs=5.99 < sma=6.) static const G4double lsa=8.; // The max ln(sqs) logTabEl(sqs=5.99 - 2981 GeV) static const G4double mi=std::exp(lsi);// The min s of logTabEl(~ 5.99 GeV) static const G4double ms=std::exp(lsa);// The max s of logTabEl(~ 2981 GeV) static const G4double dl=(lsa-lsi)/nls;// Step of the logarithmic Table static const G4double edl=std::exp(dl);// Multiplication step of the logarithmic Table static const G4double toler=.0001; // Tolarence (GeV) defining the same sqs static G4double lastS=0.; // Last sqs value for which R was calculated static G4double lastR=0.; // Last ratio R which was calculated // Local Associative Data Base: static std::vector vA; // Vector of calculated A static std::vector vH; // Vector of max sqs initialized in the LinTable static std::vector vN; // Vector of topBin number initialized in LinTable static std::vector vM; // Vector of relMax ln(sqs) initialized in LogTable static std::vector vK; // Vector of topBin number initialized in LogTable static std::vector vT; // Vector of pointers to LinTable in C++ heap static std::vector vL; // Vector of pointers to LogTable in C++ heap // Last values of the Associative Data Base: static G4int lastPDG=0; // Last PDG for which R was calculated (now indep) static G4int lastA=0; // theLast of calculated A static G4double lastH=0.; // theLast of max sqs initialized in the LinTable static G4int lastN=0; // theLast of topBin number initialized in LinTable static G4double lastM=0.; // theLast of relMax ln(sqs) initialized in LogTab. static G4int lastK=0; // theLast of topBin number initialized in LogTable static G4double* lastT=0; // theLast of pointer to LinTable in the C++ heap static G4double* lastL=0; // theLast of pointer to LogTable in the C++ heap // LogTable is created only if necessary. R(sqs>2981GeV) calcul by formula for any nuclei G4int A=tgN+tgZ; if(pIU238) { G4cout<<"-*-Warning-*-G4QuasiFreeRatio::GetRatio: A="<238, return zero"<ms) { lastR=CalcDiff2Prod_Ratio(s,A); // @@ Probably user ought to be notified about bigS return lastR; } G4bool found=false; G4int i=-1; if(nDB) for (i=0; i(s/ds)+1; // MaxBin to be initialized if(lastN>nps) { lastN=nps; lastH=sma; } else lastH = lastN*ds; // Calculate max initialized s for LinTab G4double sv=0; lastT[0]=1.; for(G4int j=1; j<=lastN; j++) // Calculate LinTab values { sv+=ds; lastT[j]=CalcDiff2Prod_Ratio(sv,A); } if(s>sma) // Initialize the logarithmic Table { lastL=new G4double[mls]; // Create the logarithmic Table G4double ls=std::log(s); lastK = static_cast((ls-lsi)/dl)+1; // MaxBin to be initialized in LogTaB if(lastK>nls) { lastK=nls; lastM=lsa-lsi; } else lastM = lastK*dl; // Calculate max initialized ln(s)-lsi for LogTab sv=mi; for(G4int j=0; j<=lastK; j++) // Calculate LogTab values { lastL[j]=CalcDiff2Prod_Ratio(sv,A); if(j!=lastK) sv*=edl; } } else // LogTab is not initialized { lastL = 0; lastK = 0; lastM = 0.; } i++; // Make a new record to AMDB and position on it vA.push_back(lastA); vH.push_back(lastH); vN.push_back(lastN); vM.push_back(lastM); vK.push_back(lastK); vT.push_back(lastT); vL.push_back(lastL); } else // The A value was found in AMDB { lastA=vA[i]; lastH=vH[i]; lastN=vN[i]; lastM=vM[i]; lastK=vK[i]; lastT=vT[i]; lastL=vL[i]; if(s>lastM) // At least LinTab must be updated { G4int nextN=lastN+1; // The next bin to be initialized if(lastN(s/ds)+1;// MaxBin to be initialized if(lastN>nps) { lastN=nps; lastH=sma; } else lastH = lastN*ds; // Calculate max initialized s for LinTab G4double sv=lastM; for(G4int j=nextN; j<=lastN; j++)// Calculate LogTab values { sv+=ds; lastT[j]=CalcDiff2Prod_Ratio(sv,A); } } // End of LinTab update if(lastN>=nextN) { vH[i]=lastH; vN[i]=lastN; } G4int nextK=lastK+1; if(s>sma && lastK((ls-lsi)/dl)+1; // MaxBin to be initialized in LogTaB if(lastK>nls) { lastK=nls; lastM=lsa-lsi; } else lastM = lastK*dl; // Calculate max initialized ln(s)-lsi for LogTab for(G4int j=nextK; j<=lastK; j++)// Calculate LogTab values { sv*=edl; lastL[j]=CalcDiff2Prod_Ratio(sv,A); } } // End of LogTab update if(lastK>=nextK) { vM[i]=lastM; vK[i]=lastK; } } } // Now one can use tabeles to calculate the value if(s(s/ds); // Low edge number of the bin G4double d=s-n*ds; // Linear shift G4double v=lastT[n]; // Base lastR=v+d*(lastT[n+1]-v)/ds; // Result } else // Use log table { G4double ls=std::log(s)-lsi; // ln(s)-l_min G4int n=static_cast(ls/dl); // Low edge number of the bin G4double d=ls-n*dl; // Log shift G4double v=lastL[n]; // Base lastR=v+d*(lastL[n+1]-v)/dl; // Result } if(lastR<0.) lastR=0.; if(lastR>1.) lastR=1.; return lastR; } // End of CalcDiff2Prod_Ratio // Calculate Diffraction/Production Ratio as a function of total sq(s)(hN) (in GeV), A=Z+N G4double G4QDiffractionRatio::CalcDiff2Prod_Ratio(G4double s, G4int A) { static G4int mA=0; static G4double S=.1; // s=SQRT(M_N^2+M_h^2+2*E_h*M_N) static G4double R=0.; // Prototype of the result static G4double p1=0.; static G4double p2=0.; static G4double p4=0.; static G4double p5=0.; static G4double p6=0.; static G4double p7=0.; if(s<=0. || A<=1) return 0.; if(A!=mA && A!=1) { mA=A; G4double a=mA; G4double sa=std::sqrt(a); G4double a2=a*a; G4double a3=a2*a; G4double a4=a3*a; G4double a5=a4*a; G4double a6=a5*a; G4double a7=a6*a; G4double a8=a7*a; G4double a11=a8*a3; G4double a12=a8*a4; G4double p=std::pow(a,0.37); p1=(.023*p+3.5/a3+2.1e6/a12+4.e-14*a5)/(1.+7.6e-4*a*sa+2.15e7/a11); p2=(1.42*std::pow(a,0.61)+1.6e5/a8+4.5e-8*a4)/(1.+4.e-8*a4+1.2e4/a6); G4double q=std::pow(a,0.7); p4=(.036/q+.0009*q)/(1.+6./a3+1.e-7*a3); p5=1.3*std::pow(a,0.1168)/(1.+1.2e-8*a3); p6=.00046*(a+11830./a2); p7=1./(1.+6.17/a2+.00406*a); } else if(A==1 && mA!=1) { p1=.0315; p2=.73417; p4=.01109; p5=1.0972; p6=.065787; p7=.62976; } else if(std::fabs(s-S)/S<.0001) return R; G4double s2=s*s; G4double s4=s2*s2; G4double dl=std::log(s)-p5; R=1./(1.+1./(p1+p2/s4+p4*dl*dl/(1.+p6*std::pow(s,p7)))); return R; } // End of CalcQF2IN_Ratio G4QHadronVector* G4QDiffractionRatio::TargFragment(G4int pPDG, G4LorentzVector p4M, G4int tgZ, G4int tgN) { static const G4double pFm= 0.; // Fermi momentum in MeV (delta function) //static const G4double pFm= 250.; // Fermi momentum in MeV (delta function) static const G4double pFm2= pFm*pFm; // Squared Fermi momentum in MeV^2 (delta function) static const G4double mPi0= G4QPDGCode(111).GetMass(); // pi0 mass (MeV =min diffraction) //static const G4double mPi= G4QPDGCode(211).GetMass(); // pi+- mass (MeV) static const G4double mNeut= G4QPDGCode(2112).GetMass(); static const G4double mNeut2=mNeut*mNeut; static const G4double dmNeut=mNeut+mNeut; static const G4double mProt= G4QPDGCode(2212).GetMass(); static const G4double mProt2=mProt*mProt; static const G4double dmProt=mProt+mProt; static const G4double maxDM=mProt*12.; //static const G4double mLamb= G4QPDGCode(3122).GetMass(); //static const G4double mSigZ= G4QPDGCode(3212).GetMass(); //static const G4double mSigM= G4QPDGCode(3112).GetMass(); //static const G4double mSigP= G4QPDGCode(3222).GetMass(); //static const G4double eps=.003; static const G4double third=1./3.; // G4LorentzVector pr4M=p4M/megaelectronvolt; // Convert 4-momenta in MeV (keep p4M) // prepare the DONOTHING answer G4QHadronVector* ResHV = new G4QHadronVector;// !! MUST BE DESTROYE/DDELETER by CALLER !! G4QHadron* hadron = new G4QHadron(pPDG,p4M); // Hadron for not scattered projectile ResHV->push_back(hadron); // It must be cleaned up for real scattering sec // @@ diffraction is simulated as noncoherent (coherent is small) G4int tgA=tgZ+tgN; // A of the target G4int tPDG=90000000+tgZ*1000+tgN; // PDG code of the targetNucleus/recoilNucleus G4double tgM=G4QPDGCode(tPDG).GetMass(); // Mass of the target nucleus G4int rPDG=2112; // prototype of PDG code of the recoiled nucleon if(tgA*G4UniformRand()>tgN) // Substitute by a proton { rPDG=2212; // PDG code of the recoiled QF nucleon tPDG-=1000; // PDG code of the recoiled nucleus } else tPDG-=1; // PDG code of the recoiled nucleus G4double tM=G4QPDGCode(tPDG).GetMass(); // Mass of the recoiled nucleus G4double tE=std::sqrt(tM*tM+pFm2); // Free energy of the recoil nucleus G4ThreeVector tP=pFm*G4RandomDirection();// 3-mom of the recoiled nucleus G4LorentzVector t4M(tP,tE); // 4M of the recoil nucleus G4LorentzVector tg4M(0.,0.,0.,tgM); // Full target 4-momentum G4LorentzVector N4M=tg4M-t4M; // 4-mom of Quasi-free target nucleon G4LorentzVector tot4M=N4M+p4M; // total momentum of quasi-free diffraction G4double mT=mNeut; // Prototype of mass of QF nucleon G4double mT2=mNeut2; // Squared mass of a free nucleon to be excited G4double dmT=dmNeut; // Doubled mass G4int Z=0; // Prototype of the isotope Z G4int N=1; // Prototype of the Isotope N if(rPDG==2212) // Correct it, if this is a proton { mT=mProt; // Prototype of mass of QF nucleon to be excited mT2=mProt2; // Squared mass of the free nucleon dmT=dmProt; // Doubled mass Z=1; // Z of the isotope N=0; // N of the Isotope } G4double mP2=pr4M.m2(); // Squared mass of the projectile if(mP2<0.) mP2=0.; // Can be a problem for photon (m_min = 2*m_pi0) G4double s=tot4M.m2(); // @@ Check <0 ... G4double E=(s-mT2-mP2)/dmT; // Effective interactinEnergy (virt.nucl.target) G4double E2=E*E; if(E<0. || E2E="<P+Pi0 G4double dmP=mP+mP; // Doubled mass of the projectile G4double mMin=mP+mPi0; // Minimum diffractive mass G4double tA=tgA; // Real A of the target G4double sA=5./std::pow(tA,third); // Mass-screaning //mMin+=mPi0+G4UniformRand()*(mP*sA+mPi0); // *Experimental* mMin+=G4UniformRand()*(mP*sA+mPi0); // *Experimental* G4double ss=std::sqrt(s); // CM compound mass (sqrt(s)) G4double mMax=ss-mP; // Maximum diffraction mass of the projectile if(mMax>maxDM) mMax=maxDM; // Restriction to avoid too big masses if(mMin>=mMax) { #ifdef pdebug G4cerr<<"Warning-G4DifR::TFra:ZeroDiffractionMRange, mi="<-.0000001); // To make the Warning for NAN else G4cout<<"******G4QDiffractionRatio::TargFragment: -t="<size(); // A#of collected hadrons from diff.frag. | if(qNH) for(G4int iq=0; iqpush_back(loh); // Fill in the result | } // | delete leadhs; // <----<----<----<----<----<----<----<----<----<----<----<----<----<---* return ResHV; // Result } // End of TargFragment G4QHadronVector* G4QDiffractionRatio::ProjFragment(G4int pPDG, G4LorentzVector p4M, G4int tgZ, G4int tgN) { static const G4double pFm= 250.; // Fermi momentum in MeV (delta function) static const G4double pFm2= pFm*pFm; // Squared Fermi momentum in MeV^2 (delta function) static const G4double mPi0= G4QPDGCode(111).GetMass(); // pi0 mass (MeV =min diffraction) static const G4double mPi= G4QPDGCode(211).GetMass(); // pi+- mass (MeV) static const G4double mNeut= G4QPDGCode(2112).GetMass(); static const G4double mNeut2=mNeut*mNeut; static const G4double dmNeut=mNeut+mNeut; static const G4double mProt= G4QPDGCode(2212).GetMass(); static const G4double mProt2=mProt*mProt; static const G4double dmProt=mProt+mProt; static const G4double maxDM=mProt*12.; static const G4double mLamb= G4QPDGCode(3122).GetMass(); static const G4double mSigZ= G4QPDGCode(3212).GetMass(); static const G4double mSigM= G4QPDGCode(3112).GetMass(); static const G4double mSigP= G4QPDGCode(3222).GetMass(); static const G4double eps=.003; // G4LorentzVector pr4M=p4M/megaelectronvolt; // Convert 4-momenta in MeV (keep p4M) // prepare the DONOTHING answer G4QHadronVector* ResHV = new G4QHadronVector;// !! MUST BE DESTROYE/DDELETER by CALLER !! G4QHadron* hadron = new G4QHadron(pPDG,p4M); // Hadron for not scattered projectile ResHV->push_back(hadron); // It must be cleaned up for real scattering sec // @@ diffraction is simulated as noncoherent (coherent is small) G4int tgA=tgZ+tgN; // A of the target G4int tPDG=90000000+tgZ*1000+tgN; // PDG code of the targetNucleus/recoilNucleus G4double tgM=G4QPDGCode(tPDG).GetMass(); // Mass of the target nucleus G4int rPDG=2112; // prototype of PDG code of the recoiled nucleon if(tgA*G4UniformRand()>tgN) // Substitute by a proton { rPDG=2212; // PDG code of the recoiled QF nucleon tPDG-=1000; // PDG code of the recoiled nucleus } else tPDG-=1; // PDG code of the recoiled nucleus G4double tM=G4QPDGCode(tPDG).GetMass(); // Mass of the recoiled nucleus G4double tE=std::sqrt(tM*tM+pFm2); G4ThreeVector tP=pFm*G4RandomDirection(); G4LorentzVector t4M(tP,tE); // 4M of the recoil nucleus G4LorentzVector tg4M(0.,0.,0.,tgM); G4LorentzVector N4M=tg4M-t4M; // Quasi-free target nucleon G4LorentzVector tot4M=N4M+p4M; // total momentum of quasi-free diffraction G4double mT=mNeut; G4double mT2=mNeut2; // Squared mass of the free nucleon spectator G4double dmT=dmNeut; G4int Z=0; G4int N=1; if(rPDG==2212) { mT=mProt; mT2=mProt2; dmT=dmProt; Z=1; N=0; } G4double mP2=pr4M.m2(); // Squared mass of the projectile if(mP2<0.) mP2=0.; // A possible problem for photon (m_min = 2*m_pi0) G4double s=tot4M.m2(); // @@ Check <0 ... G4double E=(s-mT2-mP2)/dmT; // Effective interactin energy (virt. nucl. target) G4double E2=E*E; if(E<0. || E2E="<Pi0+Pi0 G4double mMin=mP+mPi0; // Minimum diffractive mass G4double ss=std::sqrt(s); // CM compound mass (sqrt(s)) G4double mMax=ss-mT; // Maximum diffraction mass if(mMax>maxDM) mMax=maxDM; // Restriction to avoid too big masses if(mMin>=mMax) { #ifdef pdebug G4cerr<<"Warning-G4DifR::PFra:ZeroDiffractionMRange, mi="<-.0000001); // To make the Warning for NAN else G4cout<<"******G4QDiffractionRatio::ProjFragment: -t="<size(); // A#of collected hadrons from diff.frag. | if(qNH) for(G4int iq=0; iqGetStrangeness(); // A number of Lambdas in the Hypernucleus | G4int nB=loh->GetBaryonNumber(); // Total Baryon Number of the Hypernucleus | G4int nC = loh->GetCharge(); // Charge of the Hypernucleus | G4int oPDG = loh->GetPDGCode(); // Original CHIPS PDG Code of the hadron | //if((nC>nB || nC<0) && nB>0 && nL>=0 && nL<=nB && oPDG>80000000) // Iso-nucleus | if(2>3) // Closed because "G4QDR::F:90002999,M=-7.768507e-04,B=2,S=0,C=3" is found | { G4LorentzVector q4M = loh->Get4Momentum(); // Get 4-momentum of the Isonucleus | G4double qM=q4M.m(); // Real mass of the Isonucleus #ifdef fdebug G4cout<<"G4QDR::PF:"<SetQPDG(G4QPDGCode(3112)); // This is Sigma- | cont=false; // Skip decay | } else if(qM>mLamb+mPi) //(2) Sigma- => Lambda + Pi- decay | { fPDG = 3122; fMass= mLamb; } else if(qM>mSigM) //(2) Sigma+=>Sigma++gamma decay | { fPDG = 3112; fMass= mSigM; sPDG = 22; sMass= 0.; } else //(2) Sigma-=>Neutron+Pi- decay | { fPDG = 2112; fMass= mNeut; } qPN = 1; // #of (Pi+ or gamma)'s = 1 | } else if(-nC==nL) //(2) a few Sigma- like | { qPN = 1; // One separated Sigma- | fPDG = 3112; sPDG = 3112; sMass= mSigM; nB--; fMass= mSigM; } else if(-nC>nL) //(2) n*(Sigma-)+m*(Pi-) | { qPN = -nC-nL; // #of Pi-'s | fPDG = 3112; fMass= mSigM; } else //(2) n*(Sigma-)+m*Lambda(-nCn*Lamb+m*Neut+k*(Pi-) State (nLnPin) //(3) m*P+n*(Sigma+)+k*Lambda | { nL-=nPin; // #of Lambdas | qPN = nPin; // #of Sigma+ | sPDG = 3112; sMass= mSigM; } else //(3) m*N+n*(Sigma-)+k*(Pi-) (nL1 && nB==nL) //(2) m*Lamb(m>1) ***Should not be here*** | { qPN = 1; fPDG = 3122; sPDG = 3122; sMass= mLamb; nB--; fMass= mLamb; } else if(!nL && nB>1) //(2) n*Neut(n>1) ***Should not be here*** | { qPN = 1; fPDG = 2112; sPDG = 2112; sMass= mNeut; nB--; fMass= mNeut; } else G4cout<<"*?*G4QDiffractionRatio::ProjFragment: (1) oPDG="<0) // n*Lamb+(m*P)+(k*Pi+) | { if(nL && nL+nC==nB) //(2) n*Lamb+m*P ***Should not be here*** | { qPN = nL; nL = 0; fPDG = 2212; sPDG = 3122; sMass= mLamb; nB = nC; fMass= mProt; } else if(nL && nC n*L+m*Pi+ State | { if(nC==nL && nL==1) // Only one Sigma+ like State | { if(std::fabs(qM-mSigP)SetQPDG(G4QPDGCode(3222)); // This is GS Sigma+ | cont=false; // Skip decay | } else if(qM>mLamb+mPi) //(2) Sigma+=>Lambda+Pi+ decay | { fPDG = 3122; fMass= mLamb; } else if(qM>mNeut+mPi) //(2) Sigma+=>Neutron+Pi+ decay | { fPDG = 2112; fMass= mNeut; } else if(qM>mSigP) //(2) Sigma+=>Sigma++gamma decay | { fPDG = 3222; fMass= mSigP; sPDG = 22; sMass= 0.; } else //(2) Sigma+=>Proton+gamma decay | { fPDG = 2212; fMass= mProt; sPDG = 22; sMass= 0.; } qPN = 1; // #of (Pi+ or gamma)'s = 1 | } else if(nC==nL) //(2) a few Sigma+ like hyperons | { qPN = 1; fPDG = 3222; sPDG = 3222; sMass= mSigP; nB--; fMass= mSigP; } else if(nC>nL) //(2) n*(Sigma+)+m*(Pi+) | { qPN = nC-nL; // #of Pi+'s | fPDG = 3222; nB = nL; // #of Sigma+'s | fMass= mSigP; } else //(2) n*(Sigma+)+m*Lambda | { nB -= nC; // #of Lambda's | fPDG = 3122; fMass= mLamb; qPN = nC; // #of Sigma+'s | sPDG = 3222; sMass= mSigP; } nL = 0; // All above are decays in 2 | } else if(nL && nC>nB-nL) // n*Lamb+m*P+k*Pi+ | { nB -= nL; // #of protons | G4int nPip = nC-nB; // #of Pi+'s | if(nL==nPip) //(2) m*P+n*Sigma+ | { qPN = nL; // #of Sigma+ | sPDG = 3222; sMass= mSigP; nL = 0; } else if(nL>nPip) //(3) m*P+n*(Sigma+)+k*Lambda | { nL -= nPip; // #of Lambdas | qPN = nPip; // #of Sigma+ | sPDG = 3222; sMass= mSigP; } else //(3) m*P+n*(Sigma+)+k*(Pi+) | { qPN = nPip-nL; // #of Pi+ | tPDG = 3222; tMass= mSigP; } } if(nC1) //(2) m*Prot(m>1) ***Should not be here*** | { qPN = 1; fPDG = 2212; sPDG = 2212; sMass= mProt; nB--; fMass= mProt; } else if(nC<=nB||!nB) G4cout<<"*?*G4QDR::ProjFragm: (2) oPDG="<nB //(2) Default condition n*P+m*(Pi+) | } if(cont) // Make a decay | { G4double tfM=nB*fMass; G4double tsM=qPN*sMass; G4double ttM=0.; if(nL) ttM=nL*tMass; G4LorentzVector f4Mom(0.,0.,0.,tfM); G4LorentzVector s4Mom(0.,0.,0.,tsM); G4LorentzVector t4Mom(0.,0.,0.,ttM); G4double sum=tfM+tsM+ttM; if(std::fabs(qM-sum) TM="< TotM="< ImproveIt"< add decay in 3) | if(nSP) nL+=nSP; // Convert Sigma+ to Lambda | else nL+=nSM; // Convert Sigma- to Lambda | } if(nSP) // Sibma+ should be decayed | { nL=nSP; // #of decaying hyperons | sPDG=3222; // PDG code of decaying hyperons | MLa=mSigP; // Mass of decaying hyperons | } else // Sibma+ should be decayed | { nL=nSM; // #of decaying hyperons | sPDG=3112; // PDG code of decaying hyperons | MLa=mSigM; // Mass of decaying hyperons | } } #ifdef fdebug G4cout<<"G4QDiffRat::ProjFrag:*G4*mS="<1) MLa*=nL; // Total mass of the decaying hyperons | G4double rlM=G4QNucleus(rlPDG).GetMZNS();// Mass of the NonstrangeNucleus | if(!nSP&&!nSM&&nL==1&&reM>rlM+mSigZ&&G4UniformRand()>.5) // Conv Lambda->Sigma0 | { sPDG=3212; // PDG code of a decaying hyperon | MLa=mSigZ; // Mass of the decaying hyperon | } G4int rnPDG = hPDG-nL*999999; // Convert Lambdas to neutrons (for convInN) | G4QNucleus rnN(rnPDG); // New nonstrange nucleus | G4double rnM=rnN.GetMZNS(); // Mass of the new nonstrange nucleus | // @@ In future take into account Iso-Hypernucleus (Add PI+,R & Pi-,R decays) | if(rlPDG==90000000) // Multy Hyperon (HyperNuc of only hyperons) | { if(nL>1) r4M=r4M/nL; // split the 4-mom for the MultyLambda | for(G4int il=0; ilpush_back(theLam); // Fill in the Lambda | #ifdef fdebug sum4M+=r4M; // Sum 4-momenta for the EnMom check | G4cout<<"G4QDR::ProjFrag: *additional Lambda*="<rlM+MLa-eps) // Lambda (or Sigma) can be split | { G4LorentzVector n4M(0.,0.,0.,rlM); // 4-mom of the residual nucleus | G4LorentzVector h4M(0.,0.,0.,MLa); // 4-mom of the Hyperon | G4double sum=rlM+MLa; // Safety sum | if(std::fabs(reM-sum)A="<Set4Momentum(n4M); // ! Update the Hadron ! | if(anti && rlPDG==90000001) rlPDG=-2112; // Convert to anti-neutron | if(anti && rlPDG==90001000) rlPDG=-2212; // Convert to anti-proton | loh->SetQPDG(G4QPDGCode(rlPDG)); // ConvertedHypernucleus to nonstrange(@anti)| if(rlPDG==90000002) // Additional action with loH changed to 2n | { G4LorentzVector newLV=n4M/2.; // Split 4-momentum | loh->Set4Momentum(newLV); // Reupdate the hadron | if(anti) loh->SetQPDG(G4QPDGCode(-2112)); // Make anti-neutron PDG | else loh->SetQPDG(G4QPDGCode(2112)); // Make neutron PDG | G4QHadron* secHadr = new G4QHadron(loh); // Duplicate the neutron | ResHV->push_back(secHadr); // Fill in the additional neutron | #ifdef fdebug sum4M+=r4M; // Sum 4-momenta for the EnMom check | G4cout<<"G4QDR::ProgFrag: *additional Neutron*="<Set4Momentum(newLV); // Reupdate the hadron | if(anti) loh->SetQPDG(G4QPDGCode(-2212)); // Make anti-neutron PDG | else loh->SetQPDG(G4QPDGCode(2112)); // Make neutron PDG | G4QHadron* secHadr = new G4QHadron(loh); // Duplicate the proton | ResHV->push_back(secHadr); // Fill in the additional neutron | #ifdef fdebug sum4M+=r4M; // Sum 4-momenta for the EnMom check | G4cout<<"G4QDR::ProjFrag: *additional Proton*="<Set4Momentum(n4M); // ! Update the Hadron ! | if(anti && rnPDG==90000001) rnPDG=-2112; // Convert to anti-neutron | if(anti && rnPDG==90001000) rnPDG=-2212; // Convert to anti-proton | loh->SetQPDG(G4QPDGCode(rnPDG)); // convert hyperNuc to nonstrangeNuc(@@anti) | #ifdef fdebug G4cout<<"*G4QDR::PF:R="<A="<1) h4M=h4M/nPi; // Split the 4-mom if necessary | for(G4int ihn=0; ihnpush_back(thePion); // Fill in the Pion | #ifdef fdebug sum4M+=r4M; // Sum 4-momenta for the EnMom check | G4cout<<"G4QDR::ProjFrag: *additional Pion*="<Set4Momentum(newLV); // Reupdate the hadron | if(anti) loh->SetQPDG(G4QPDGCode(-2112)); // Make anti-neutron PDG | else loh->SetQPDG(G4QPDGCode(2112)); // Make neutron PDG | G4QHadron* secHadr = new G4QHadron(loh); // Duplicate the neutron | ResHV->push_back(secHadr); // Fill in the additional neutron | #ifdef fdebug sum4M+=r4M; // Sum 4-momenta for the EnMom check | G4cout<<"G4QDR::ProjFrag: *additional Neutron*="<Set4Momentum(newLV); // Reupdate the hadron | if(anti) loh->SetQPDG(G4QPDGCode(-2212)); // Make anti-neutron PDG | else loh->SetQPDG(G4QPDGCode(2112)); // Make neutron PDG | G4QHadron* secHadr = new G4QHadron(loh); // Duplicate the proton | ResHV->push_back(secHadr); // Fill in the additional neutron | #ifdef fdebug sum4M+=r4M; // Sum 4-momenta for the EnMom check | G4cout<<"G4QDR::ProjFrag: *additional Proton*="< include gamma decay | { G4double d=rlM+MLa-reM; // Hyperon Excessive energy | G4cerr<<"G4QDR::PF:R="< End of G4 Hypernuclear decay | ResHV->push_back(loh); // Fill in the result | #ifdef debug sum4M+=loh->Get4Momentum(); // Sum 4-momenta for the EnMom check | G4cout<<"G4QDR::PrFra:#"<Get4Momentum()<GetPDGCode()<