// // ******************************************************************** // * 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: G4QPDGCode.cc,v 1.57 2009/02/23 09:49:24 mkossov Exp $ // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ // // ---------------- G4QPDGCode ---------------- // by Mikhail Kossov, Sept 1999. // class for Hadron definitions in CHIPS Model // ------------------------------------------------------------------- // Short description: The PDG Code is made on the basis of the Quark // Content (G4QuarkContent) of the hadronic state (including nuclear // fragments). The PDG code of the ground state (e.g. pi, N, etc.) is // calculated. It includes a complicated algortithm of the G.S. mass // calculation for nuclear fragments (now it is synchronised with the // G4 nuclear massess). // ------------------------------------------------------------------- //#define debug //#define pdebug //#define qdebug //#define idebug //#define sdebug #include "G4QPDGCodeVector.hh" #include #include using namespace std; G4QPDGCode::G4QPDGCode(G4int PDGCode): thePDGCode(PDGCode) { #ifdef sdebug G4cout<<"G4QPDGCode:Constructer is called with PDGCode="<0 && PDGCode<999) // RealNeutral are always positive && mesons { if(PDGCode==22) return false; // Photon G4int p=PDGCode/10; if(p/10==p%10) return false; // This is a RealNeutral } return true; } // Make a Q Code out of the PDG Code G4int G4QPDGCode::MakePDGCode(const G4int& QCode) {// =========================================== //static const G4int modi = 81; // Q Codes for more than di-baryon nuclei //static const G4int modi = 89; // Q Codes for more than di-baryon nuclei "IsoNuclei" static const G4int modi = 122; // Q Codes for more than quarta-baryon nuclei "Lept/Hyper" static G4int qC[modi] = { 11, 12, 13, 14, 15, 16, 22, 23, 24, 25, // 10 37, 110, 220, 330, 111, 211, 221, 311, 321, 331, // 20 2112, 2212, 3122, 3112, 3212, 3222, 3312, 3322, 113, 213, // 30 223, 313, 323, 333, 1114, 2114, 2214, 2224, 3124, 3114, // 40 3214, 3224, 3314, 3324, 3334, 115, 215, 225, 315, 325, // 50 335, 2116, 2216, 3126, 3116, 3216, 3226, 3316, 3326, 117, // 60 217, 227, 317, 327, 337, 1118, 2118, 2218, 2228, 3128, // 70 3118, 3218, 3228, 3318, 3328, 3338, 119, 219, 229, 319, // 80 329, 339, 90002999 , 89999003 , 90003998 , 89998004 , 90003999 , 89999004 , 90004998 , 89998005 , // 90 90000001 , 90001000 , 91000000 , 90999001 , 91000999 , 91999000 , 91999999 , 92999000 , 90000002 , 90001001 , //100 90002000 , 91000001 , 91001000 , 92000000 , 90999002 , 91001999 , 90001002 , 90002001 , 91000002 , 91001001 , //110 91002000 , 92000001 , 92001000 , 90999003 , 90001003 , 90002002 , 90003001 , 91001002 , 91002001 , 92000002 , //120 92001001 , 92002000}; static G4int aC[15] = {1,1000,999001,1000000,1000999,1999000,1999999, // sum 1 2,1001,2000,1000001,1001000,1999001,2000000,2000999}; // sum 2 if (QCode<0) { G4cerr<<"***G4QPDGCode::MakePDGCode: negative Q Code ="<=modi) { //G4int q=QCode-modi; // Starting BarNum=3 //G4int a=q/15+1; // BarNum/2 //G4int b=q%15; G4int q=QCode-modi; // Starting BarNum=5 G4int a=q/15+2; // BarNum/2 G4int b=q%15; return 90000000+a*1001+aC[b]; } return qC[theQCode]; } // Hadronic masses synhronized with the Geant4 hadronic masses G4double G4QPDGCode:: QHaM(G4int nQ) {// =========================== static G4bool iniFlag=true; static G4double m[nQHM]={.511, 0., 105.65837, 0., 1777., 0., 0., 91.188, 80.425, 140.00 ,120.000, 800., 980., 1370., 134.98, 139.57, 547.75, 497.65, 493.68, 957.78 ,939.5654,938.272, 1115.683, 1197.45, 1192.64, 1189.37, 1321.3, 1314.8, 775.8, 775.8 , 782.6, 896.1, 891.66, 1019.456, 1232., 1232., 1232., 1232., 1519.5, 1387.2 , 1383.7, 1382.8, 1535., 1531.8, 1672.45, 1318.3, 1318.3, 1275.4, 1432.4, 1425.6 , 1525., 1680., 1680., 1820., 1915., 1915., 1915., 2025., 2025., 1691. , 1691., 1667., 1776., 1776., 1854., 1950., 1950., 1950., 1950., 2100. , 2030., 2030., 2030., 2127., 2127., 2252., 2020., 2020., 2044., 2045. , 2045., 2297., 2170.272, 2171.565, 2464., 2464., 3108.544, 3111.13,3402.272,3403.565}; if(iniFlag) // Initialization of the Geant4 hadronic masses { m[ 0]= G4Electron::Electron()->GetPDGMass(); m[ 1]= G4NeutrinoE::NeutrinoE()->GetPDGMass(); m[ 2]= G4MuonMinus::MuonMinus()->GetPDGMass(); m[ 3]= G4NeutrinoMu::NeutrinoMu()->GetPDGMass(); m[ 4]= G4TauMinus::TauMinus()->GetPDGMass(); m[ 5]=G4NeutrinoTau::NeutrinoTau()->GetPDGMass(); m[14]= G4PionZero::PionZero()->GetPDGMass(); m[15]= G4PionMinus::PionMinus()->GetPDGMass(); m[16]= G4Eta::Eta()->GetPDGMass(); m[17]= G4KaonZero::KaonZero()->GetPDGMass(); m[18]= G4KaonMinus::KaonMinus()->GetPDGMass(); m[19]= G4EtaPrime::EtaPrime()->GetPDGMass(); m[20]= G4Neutron::Neutron()->GetPDGMass(); m[21]= G4Proton::Proton()->GetPDGMass(); m[22]= G4Lambda::Lambda()->GetPDGMass(); m[23]= G4SigmaMinus::SigmaMinus()->GetPDGMass(); m[24]= G4SigmaZero::SigmaZero()->GetPDGMass(); m[25]= G4SigmaPlus::SigmaPlus()->GetPDGMass(); m[26]= G4XiMinus::XiMinus()->GetPDGMass(); m[27]= G4XiZero::XiZero()->GetPDGMass(); m[44]= G4OmegaMinus::OmegaMinus()->GetPDGMass(); iniFlag=false; } if(nQ<0 || nQ>=nQHM) { G4cout<<"***G4QPDGCode::QHaM: negative Q-code or Q="<= nQmax = "<100000000) // Not supported { #ifdef debug G4cout<<"***G4QPDGCode::MakeQCode: Unknown in Q-System code: "<80000000&&PDGC<100000000) // Try to convert the NUCCoding to PDGCoding { if(PDGC==90000000) return 6; ConvertPDGToZNS(PDGC, z, n, s); G4int b=n+z+s; // Baryon number #ifdef debug G4cout<<"***G4QPDGCode::Z="< Baryons & Fragments { b=-b; n=-n; z=-z; s=-s; PDGC=90000000+s*1000000+z*1000+n; // New PDGC for anti-baryons } else if(!b) // --> Mesons { //G4bool anti=false; // For the PDG conversion if(z<0) // --> Mesons conversion { n=-n; z=-z; s=-s; //anti=true; // For the PDG conversion } if(!z) { if(s>0) { n=-n; s=-s; //anti=true; // For the PDG conversion } if (s==-1) return 17; // K0 else if(s==-2) return -1; // K0+K0 chipolino else return -2; // Not supported by Q Code } else // --> z>0 { if(z==1) { if (s==-1) return 18; // K+ else return 15; // pi+ } else if(z==2) return -1; // Chipolino else return -2; // Not supported by Q Code } } // End of meson case if(b>0) // --> Baryon case { if(b==1) { if(!s) // --> Baryons { if(z==-1) return 34; // Delta- else if(!z) return 91; // neutron else if(z==1)return 91; // proton else if(z==2)return 37; // Delta++ else if(z==3||z==-2)return -1; // Delta+pi Chipolino else return -2; // Not supported by Q Code } else if(s==1) // --> Hyperons { if(z==-1) return 93; // Sigma- else if(!z) return 92; // Lambda (@@ 24->Sigma0) else if(z==1)return 94; // Sigma+ else if(z==2||z==-2) return -1; // Sigma+pi Chipolino else return -2; // Not supported by Q Code } else if(s==2) // --> Xi Hyperons { if(z==-1) return 95; // Xi- else if(!z) return 96; // Xi0 else if(z==1||z==-2)return -1; // Xi+pi Chipolino else return -2; // Not supported by Q Code } else if(s==3) // --> Xi Hyperons { if(z==-1) return 97; // Omega- else if(!z||z==-2) return -1; // Omega+pi Chipolino else return -2; // Not supported by Q Code } } else { if(b==2) { if (PDGC==90002999) return 82; // p DEL++ else if(PDGC==89999003) return 83; // n DEL- else if(PDGC==90003998) return 84; // DEL++ DEL++ else if(PDGC==89998004) return 85; // DEL- DEL- else if(PDGC==90999002) return 104; // n Sigma- else if(PDGC==91001999) return 105; // p Sigma+ } if(b==3) { if (PDGC==90003999) return 86; // p p DEL++ else if(PDGC==89999004) return 87; // n n DEL- else if(PDGC==90004998) return 88; // p DEL++ DEL++ else if(PDGC==89998005) return 89; // n DEL- DEL- else if(PDGC==90999003) return 113; // n n Sigma- } } } } if (PDGC<80000000) // ----> Direct Baryons & Mesons { if (PDGC<100) // => Leptons and field bosons { if (PDGC==10) return -1; // Chipolino else if(PDGC==11) return 0; // e- else if(PDGC==12) return 1; // nu_e else if(PDGC==13) return 2; // mu- else if(PDGC==14) return 3; // nu_mu else if(PDGC==15) return 4; // tau- else if(PDGC==16) return 5; // nu_tau else if(PDGC==22) return 6; // Photon else if(PDGC==23) return 7; // Z0 boson else if(PDGC==24) return 8; // W- boson else if(PDGC==25) return 9; // H0 (neutral Higs boson) else if(PDGC==37) return 10; // H- (charged Higs boson) } G4int r=PDGC%10; // 2s+1 G4int Q= 0; if (!r) { // Internal CHIPS codes for the wide f_0 states must be 9000221, 9010221, 10221 if (PDGC==110) return 11; // Low R-P: Sigma (pi,pi S-wave) else if(PDGC==220) return 12; // Midle Regeon-Pomeron else if(PDGC==330) return 13; // High Regeon-Pomeron #ifdef pdebug G4cout<<"***G4QPDGCode::MakeQCode: (0) Unknown in Q-System code: "<-1 && abZ="<-2 nuclei static G4int Smax= 2; // Dynamic Associated memory is implemented for S< 3 nuclei static G4int NZmin= 0; // Dynamic Associated memory is implemented for Z>-1 nuclei static G4int NNmin= 0; // Dynamic Associated memory is implemented for N>-1 nuclei static G4int NZS1max= 0; // Dynamic Associated memory is implemented for S<3, Z=-1, N<2 static G4int NNS1max= 0; // Dynamic Associated memory is implemented for S<3, Z=-1, N<2 #endif // ------------------------------------------------------------------------------------- G4double rm=0.; G4int nz=n+z; G4int zns=nz+s; if(nz+s<0) { z=-z; n=-n; s=-s; nz=-nz; zns=-zns; } if(z<0) { if(z==-1) { if(!s) { if(n==1) return mPiC; // pi- else return mPiC+(n-1)*mNeut; // Delta- + (N-1)*n } else if(s==1) // Strange negative hadron { if(!n) return mKM; // K- else if(n==1) return mSiM; // Sigma- else if(n==2) return mSmN ; // Sigma- + n DiBaryon else if(n==3) return mSmNN; // Sigma- +2n TriBaryon else return mSigM+mNeut*(n-1); // Sigma- + (N-1)*n } else if(s==2) // --> Double-strange negative hadrons { if(!n) return mKsM; // Ksi- else if(n==1) return mKsiM+mNeut; // Ksi- + n else if(n==2) return mKsiM+mNeut+mNeut; // Ksi- + 2n else return mKsiM+mNeut*n; // Ksi- + Z*n } else if(s==-2) { if (nz==2) return mDiKZ+mPiC; // 2K0 + Pi- else return mDiKZ+mPiC+(nz-2)*mProt; } else if(s==3) // --> Triple-strange negative hadrons { if (n==-1) return mOmM; // Triple-strange Omega minus else if(!n ) return mOmN; // Triple-strange (Omega-) + n DiBaryon else if(n==-2) return mDiKZ+mKM; // Triple-strange K- + 2*K0 else return mOmeg+mNeut*(n+2); } else if(s==4) { if(n==-2) return mOmeg+mKM; // Omega- + K- else if(n==-1) return mOmeg+mLamb;// Omega- + Lambda else return mOmeg+mLamb+(n+1)*mNeut; // Omega- + Lambda + (n+1)*Neutrons } else if(!n) return mOmeg+(s-2)*mLamb; // Multy-Lambda + Omega minus else { #ifdef qdebug if(s>NZS1max) { NZS1max=s; G4cout<<">>>>>>>>>>>>>G4QPDGCode::GetMass: Z=-1, S="<2 with N="<0) return anb+s*mKM+n*mPiC; // s*K- + n*Pi- else return anb-s*mKZ-z*mPiC; // (-s)*aK0 + (-z)*Pi- } else if(s==1) { if(!nz) { if(n==2) return mSmPi; else return mSmPi+(n-2)*mPiC; } else return mSigM+nz*mNeut-(z+1)*mPiC; } else if(s==-1) return mKZa-z*mPiC+(nz-1)*mNeut; // aK0+(nz-1)n+(-z)*Pi- else if(s==2) { if (nz==-1) return mKsiM+n*mPiC; else if(!nz) return mKsiM+mNeut-(z+1)*mPiC; else return mKsiM+(nz+1)*mNeut-(z+1)*mPiC; } else if(s==-2) return mDiKZ-z*mPiC+(nz-2)*mNeut; else if(s==3) { if (nz==-2) return mOmeg+(n+1)*mPiC; // Omega- + (n+1)* Pi- else if(nz==-1) return mOmeg+mNeut+n*mPiC; // Omega- + n * Pi- else if(!nz) return mOmeg+mDiNt+(n-1)*mPiC; // Omega- + 2N + (n-1)*Pi- else return mOmeg+(nz+2)*mProt-(z+1)*mPiC; } else if(s<-2) return anb-s*mKZ-z*mPiC+(nz+s)*mNeut; else if(s==4) { if (nz==-3) return mOmeg+mKM+(n+1)*mPiC; // Om- + K- + (n+1)*Pi- else if(nz==-2) return mOmeg+mSigM+n*mPiC; // Om- + Sig- + n*Pi- else if(nz==-1) return mOmeg+mSigM+mNeut+(n-1)*mPiC;//Om- + Sig- +N +(n-1)*Pi- else if(!nz) return mOmeg+mSigM+mDiNt+(n-2)*mPiC;//Om- +Sig- +2N +(n-2)*Pi- else return mOmeg+mSigM+(nz+2)*mDiNt-(z+2)*mPiC;//+(nz+2)N-(z+2)Pi- } // s=5: 2*K-, Ksi-; s=6: 3*K-, Omega-; s>6 adds K- and Sigma- instead of Protons else // !!All s<0 are done and s>4 can be easy extended if appear!! { #ifdef qdebug if(z>>>>>>>>G4QPDGCode::GetMass: Z="<>>>>>>>>>>>>G4QPDGCode::GetMass: N=-1, S="<2 with Z="<0) return anb+s*mKZ+z*mPiC; // s*K0 + n*Pi+ else return anb-s*mKM-n*mPiC; // (-s)*aK+ + (-n)*Pi+ } else if(s==1) { if(!nz) { if(z==2) return mSpPi; else return mSpPi+(z-2)*mPiC; } else return mSigP+nz*mProt-(n+1)*mPiC; } else if(s==-1) return mKMa-n*mPiC+(nz-1)*mProt; // K+ + (nz-1)*P + (-n)*Pi+ else if(s==2) { if (nz==-1) return mKsiZ+z*mPiC; else if(!nz) return mKsiZ+mProt-(n+1)*mPiC; else return mKsiZ+(nz+1)*mProt-(n+1)*mPiC; } else if(s==-2) return mDiKM-n*mPiC+(nz-2)*mProt; else if(s==3) { if (nz==-2) return mOmeg+(z+1)*mPiC; // Omega + (z+1)*Pi+ else if(nz==-1) return mOmeg+mProt+z*mPiC; // Omega- + P +z*Pi+ else if(!nz) return mOmeg+mDiPr+(z-1)*mPiC; // Omega- + 2P + (z-1)* Pi+ else return mOmeg+(nz+2)*mProt-(n+1)*mPiC; } else if(s<-2) return anb-s*mKM-n*mPiC+(nz+s)*mProt; else if(s==4) { if (nz==-3) return mOmeg+mKZ+(z+1)*mPiC; // Om- + K0 + (z+1)*Pi+ else if(nz==-2) return mOmeg+mSigP+z*mPiC; // Om- + Sig+ + z*Pi+ else if(nz==-1) return mOmeg+mSigP+mProt+(z-1)*mPiC;// Om- +Sig+ +P +(z-1)*Pi+ else if(!nz) return mOmeg+mSigP+mDiPr+(z-2)*mPiC;//Om- +Sig+ +2P +(z-2)*Pi+ else return mOmeg+mSigP+(nz+2)*mProt-(n+2)*mPiC;//+(nz+2)P-(n+2)Pi+ } // s=5: 2*KZ, Ksi0; s=6: 3*KZ, Omega-; s>6 adds K0 and Sigma+ instead of Protons else // !!All s<0 are done and s>4 can be easy extended if appear!! { #ifdef qdebug if(n>>>>>>>>G4QPDGCode::GetMass: N="<G4QPDGCode::GetMass:Z="<>>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<">G4QPDGCode::GetMass:Z="<"< S=1 nucleus { G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) if(!iNin1[z]) // ====> This element is already initialized { #ifdef idebug G4cout<<"**>G4QPDGCode::GetMass:Z="<>>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<">G4QPDGCode::GetMass:Z="<"< S=-1 nucleus { G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) if(!iNin9[z]) // ====> This element is already initialized { #ifdef idebug G4cout<<"*>G4QPDGCode::GetMass:Z="<>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<"G4QPDGCode::GetMass:Z="<"< S=2 nucleus { G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) if(!iNin2[z]) // ====> This element is already initialized { #ifdef idebug G4cout<<"**>G4QPDGCode::GetMass:Z="<>>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<">G4QPDGCode::GetMass:Z="<"< S=-2 nucleus { G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) if(!iNin8[z]) // ====> This element is already initialized { #ifdef idebug G4cout<<"*>G4QPDGCode::GetMass:Z="<>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<"G4QPDGCode::GetMass:Z="<"< S=-3 nucleus { G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) if(!iNin7[z]) // ====> This element is already initialized { #ifdef idebug G4cout<<"*>G4QPDGCode::GetMass:Z="<>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<"G4QPDGCode::GetMass:Z="<"< S=3 nucleus { G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) if(!iNin3[z]) // ====> This element is already initialized { #ifdef idebug G4cout<<"**>G4QPDGCode::GetMass:Z="<>>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<">G4QPDGCode::GetMass:Z="<"< S=-4 nucleus { G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) if(!iNin6[z]) // ====> This element is already initialized { #ifdef idebug G4cout<<"*>G4QPDGCode::GetMass:Z="<>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<"G4QPDGCode::GetMass:Z="<"< S=4 nucleus { G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) if(!iNin4[z]) // ====> This element is already initialized { #ifdef idebug G4cout<<"*>G4QPDGCode::GetMass:Z="<>>>G4QPDGCode::GetMass:Z="< The maximum N must be increased { #ifdef qdebug if(dNn>iNmax) { G4cout<<"**>>G4QPDGCode::GetMass:Z="<"<iNran[z]) { G4cout<<">G4QPDGCode::GetMass:Z="<"<Smax) { if(sSmax) Smax=s; G4cout<<">>G4QPDGCode::GetMass:Z="<107, N="<1) return mL*S+eps; else if(!N&&Z>1&&!S) return mP*Z+eps; else if(N>1&&!Z&&!S) return mN*N+eps; G4int A=Z+N; G4int Bn=A+S; //if((Z<0||N<0)&&!Bn) //{ // if (N<0) return Bn*mL-Z*mK - N*mK0+eps* S ; // else return Bn*mL+N*mPi-A*mK +eps*(N+S); //} //if(A<0&&Bn>=0) // Bn*LAMBDA's + (-(N+Z))*antiKaons //{ // if (N<0&&Z<0) return Bn*mL-Z*mK -N*mK0+eps* S ; // else if(N<0) return Bn*mL+Z*mPi-A*mK0+eps*(Z+S); // else return Bn*mL+N*mPi-A*mK +eps*(N+S); //} if(!Bn) // => "GS Mesons - octet" case (without eta&pi0) { if (!S&&Z<0) return mPi*N; else if(!S&&N<0) return mPi*Z; else if ( (N == 1 && S == -1) || (N == -1 && S == 1) ) return mK0; // Simple decision else if ( (S == 1 && Z == -1) || (S == -1 && Z == 1) ) return mK; // Simple decision else if(S>0) // General decision { if (-Z>S) return S*mK-(S+Z)*mPi+eps; else if(Z>=0) return S*mK0+Z*mPi+eps; else return (S+Z)*mK0-Z*mK+eps; } else if(S<0) // General decision { if (Z>-S) return -S*mK+(S+Z)*mPi+eps; else if(Z<=0) return -S*mK0-Z*mPi+eps; else return -(S+Z)*mK0+Z*mK+eps; } } else if(Bn==1) // => "GS Baryons - octet" case (withoutSigma0) { if (Z== 1 && N== 0 && S== 0) return mP; else if(Z== 0 && N== 1 && S== 0) return mN; else if(Z== 0 && N== 0 && S== 1) return mL; else if(Z== 1 && N==-1 && S== 1) return mSp; // Lower than Sigma+ (Simp.Decis) else if(Z==-1 && N== 1 && S== 1) return mSm; // Lower than Sigma- (Simp.Decis) else if(Z== 0 && N==-1 && S== 2) return mXz; // Lower than Xi0 (Simp.Decis) else if(Z==-1 && N== 0 && S== 2) return mXm; // Lower than Xi- (Simp.Decis) else if(Z==-1 && N==-1 && S== 3) return mOm; // Lower than Omega- (Simp.Decis) else if(!S&&Z<0) return mN-mPi*Z+eps; // Negative Isonuclei else if(!S&&N<0) return mP-mPi*N+eps; // Positive Isonuclei else if(S==1) // --> General decision { if (N>1) return mSm+(N-1)*mPi+eps; // (Sigma-)+(n*PI-) else if(Z>1) return mSp+(Z-1)*mPi+eps; // (Sigma+)+(n*PI+) } else if(S==2) // --> General decision { if (N>0) return mXm+N*mPi+eps; // (Xi-)+(n*PI-) else if(Z>0) return mXz+Z*mPi+eps; // (Xi0)+(n*PI+) } else if(S==3) // --> General decision { if (N>-1) return mOm+(N+1)*mPi+eps; // (Omega-)+(n*PI-) else if(Z>-1) return mOm+(Z+1)*mPi+eps; // (Omega-)+(n*PI+) } else if(S>3) // --> General Omega- decision { if (-Z>S-2) return mOm+(S-3)*mK +(2-Z-S)*mPi+eps; else if(Z>-1) return mOm+(S-3)*mK0+(Z+1)+mPi+eps; else return mOm+(S+Z-2)*mK0-(Z+1)*mK+eps; } } else if(Bn==2) // => "GS Baryons - decuplet" case (NP,LP, and LN are made below) { if (Z== 2 && N== 0 && S== 0) return dmP; //else if(Z== 1 && N== 1 && S== 0) return 1875.61282; // Exact deuteron PDG Mass else if(Z== 1 && N== 1 && S== 0) return mD; // Exact deuteron PDG Mass else if(Z== 0 && N== 2 && S== 0) return dmN; else if(Z== 2 && N==-1 && S== 1) return dSP; else if(Z== 1 && N== 0 && S== 1) return dLP; else if(Z== 0 && N== 1 && S== 1) return dLN; else if(Z==-1 && N== 2 && S== 1) return dSN; else if(Z== 1 && N==-1 && S== 2) return dXP; else if(Z== 0 && N== 0 && S== 2) return dmL; else if(Z==-1 && N== 1 && S== 2) return dXN; else if(Z== 0 && N==-1 && S== 3) return dOP; else if(Z==-1 && N== 0 && S== 3) return dON; else if(!S&&Z<0) return dmN-mPi*Z+eps; // Negative Isonuclei else if(!S&&N<0) return dmP-mPi*N+eps; // Positive Isonuclei else if(S==1) // --> General decision { if (N>2) return dSP+(N-2)*mPi+eps; // (nSigma-)+(n*PI-) else if(Z>2) return dSN+(Z-1)*mPi+eps; // (pSigma+)+(n*PI+) } else if(S==2) // --> General decision { if (N>1) return dXN+(N-1)*mPi+eps; // (nXi-)+(n*PI-) else if(Z>1) return dXP+(Z-1)*mPi+eps; // (pXi0)+(n*PI+) } else if(S==3) // --> General decision { if (N>0) return dON+N*mPi+eps; // (nOmega-)+(n*PI-) else if(Z>0) return dOP+Z*mPi+eps; // (pOmega-)+(n*PI+) } else if(S>3) // --> General Omega- decision { if (-Z>S-2) return dON+(S-3)*mK +(2-Z-S)*mPi+eps; else if(Z>0) return dOP+(S-3)*mK0+Z+mPi+eps; else return dOP+(S+Z-3)*mK0-Z*mK+eps; } //else if(S>0) // @@ Implement General Decision //{ // //#ifdef debug // G4cout<<"***G4QPDGCode::GetNuclMass:B=2, Z="<A) return A*mP+(Z-A)*mPi+eps; // Multybaryon Positive Isonuclei } // === Start mesonic extraction === G4double km=0.; // Mass Sum of K mesons (G4E::DecayAntiStrang.) G4int Zm=Z; G4int Nm=N; G4int Sm=S; if(S<0&&Bn>0) // NEW: the free mass minimum { if(Zm>=-S) // Enough charge for K+'s { km=-S*mK; // Anti-Lambdas are compensated by protons Zm+=S; } else if(Zm>0) { km=Zm*mK-(S+Zm)*mK0; // Anti-Lambdas are partially compensated by neutrons Zm=0; Nm+=S+Zm; } } else Sm=0; // No alternative calculations // Old algorithm G4double k=0.; // Mass Sum of K mesons if(S<0&&Bn>0) // OLD @@ Can be improved by K0/K+ search of minimum { G4int sH=(-S)/2; // SmallHalfS || The algorithm must be the same G4int bH=-S-sH; // BigHalhS || as in G4QE::DecayAntiStrange if(Z>0 && Z>N) { if(Z>=bH) // => "Enough protons in nucleus" case { if(N>=sH) { k=bH*mK+sH*mK0; Z-=bH; N-=sH; } else { G4int dN=Z-N; if(dN>=-S) { k=-S*mK; Z+=S; } else { G4int sS=(-S-dN)/2; G4int bS=-S-dN-sS; sS+=dN; if(Z>=sS&&N>=bS) { k=sS*mK+bS*mK0; Z-=sS; N-=bS; } else if(ZFindIon(Zm,Am,0,Zm) creates new Ion! if(A==256 && Z==128) m=256000.; else m=k+G4NucleiProperties::GetNuclearMass(A,Z); //if(G4NucleiPropertiesTable::IsInTable(Z,A)) // m=k+G4NucleiProperties::GetNuclearMass(A,Z); //else if(A==256 && Z==128) m=256000.; //else // m=k+G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z)->GetPDGMass(); //m+=-sh[Z]-sh[N]+b1*D*D*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*D)))+Z*Z*(b5*pow(fA,b9)+b6/fA); } //@@//G4double maxM= k+Z*mP+N*mN+S*mL+eps; // @@ eps -- Wings of the Mass parabola //@@//if(m>maxM) m=maxM; G4double mm=m; if(Sm<0) // For the new algorithm of calculation { if(Nm<0) { km+=-Nm*mPi; Zm+=Nm; Nm=0; } if(Zm<0) { km+=-Zm*mPi; Nm+=Zm; Zm=0; } G4int Am=Zm+Nm; if(!Am) return km+eps; mm=km+Am*um; // Expected mass in atomic units //G4double Dm=Nm-Zm; // Isotopic shift of the nucleus if ( (Am < 1 && km==0.) || Zm < 0 || Nm < 0 ) { // @@ Can be generalized to anti-nuclei #ifdef debug G4cerr<<"*G4QPDGCode::CalcNucM:A="<FindIon(Zm,Am,0,Zm) creates new Ion! mm=km+G4NucleiProperties::GetNuclearMass(Am,Zm); //G4double fA=Am; //if(G4NucleiPropertiesTable::IsInTable(Zm,Am)) // mm=km+G4NucleiProperties::GetNuclearMass(Am,Zm); //else // mm=km+G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm)->GetPDGMass(); // //mm+=-sh[Zm]-sh[Nm]+b1*Dm*Dm*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*Dm))) // // +Zm*Zm*(b5*pow(fA,b9)+b6/Am); } //@@//G4double mM= km+Zm*mP+Nm*mN+eps; //@@//if(mm>mM) mm=mM; } if(m>mm) m=mm; if(S>0) { G4double bs=0.; if (A==2) bs=a2; else if(A==3) bs=a3; else if(A>3) bs=b7*exp(-b8/(A+1.)); m+=S*(mL-bs); } #ifdef debug G4cout<<"G4QPDGCode::CalcNuclMass: >>>OUT<<< m="<700) { n-=1000; dz--; } G4int z =sz%1000-dz; if(z>700) { z-=1000; ds--; } s =sz/1000-ds; G4int b=z+n+s; d=n+b; u=z+b; if (d<0&&u<0&&s<0) return G4QContent(0,0,0,-d,-u,-s); else if (u<0&&s<0) return G4QContent(d,0,0,0,-u,-s); else if (d<0&&s<0) return G4QContent(0,u,0,-d,0,-s); else if (d<0&&u<0) return G4QContent(0,0,s,-d,-u,0); else if (u<0) return G4QContent(d,0,s,0,-u,0); else if (s<0) return G4QContent(d,u,0,0,0,-s); else if (d<0) return G4QContent(0,u,s,-d,0,0); else return G4QContent(d,u,s,0,0,0); } return G4QContent(0,0,0,0,0,0); } // Quark Content of pseudo-meson for q_i->q_o Quark Exchange G4QContent G4QPDGCode::GetExQContent(G4int i, G4int o) const {// ================================================== G4QContent cQC(0,0,0,0,0,0); if (!i) cQC.IncAD(); else if(i==1) cQC.IncAU(); else if(i==2) cQC.IncAS(); else G4cerr<<"***G4QPDGCode::GetExQContent: strange entering quark i="< 1 && sub < 8) || sub == 15) return 7;//Why they are in clusters?-Residuals(?) G4int rel=sub; // case of nuclear baryons and isonuclei if (sub>31)rel =(sub-32)%15; // case of heavy fragments (BaryNum>3) else if(sub>15)rel = sub-16; // case of nuclear di-baryon & tri-baryons #ifdef debug G4cout<<"G4QPDGCode::RelGetCrossIndex:i="< input quark = 0(d) (d=-1/3) { if (!o) return 0; // -> output quark = 0(d) => 0 = the same cluster else if(o==1) // -> output quark = 1(u) (ch--) { if (sub<16) return b01[rel]; else if(sub<32) return d01[rel]; else return m01[rel]; } else if(o==2) { if (sub<16) return b02[rel]; else if(sub<32) return d02[rel]; else return m02[rel]; } } else if(i==1) // ==> input quark = 1(u) (u=2/3) { if (!o) // -> output quark = 0(d) (ch++) { if (sub<16) return b10[rel]; else if(sub<32) return d10[rel]; else return m10[rel]; } else if(o==1) return 0; // -> output quark = 1(u) => 0 = the same cluster else if(o==2) { if (sub<16) return b12[rel]; else if(sub<32) return d12[rel]; else return m12[rel]; } } else if(i==2) { if (!o) { if (sub<16) return b20[rel]; else if(sub<32) return d20[rel]; else return m20[rel]; } else if(o==1) { if (sub<16) return b21[rel]; else if(sub<32) return d21[rel]; else return m21[rel]; } else if(o==2) return 0; } return 7; } // Get number of Combinations for q_i->q_o G4int G4QPDGCode::GetNumOfComb(G4int i, G4int o) const {// ================================================ if(i>-1&&i<3) { G4int shiftQ=GetRelCrossIndex(i, o); G4int sQCode=theQCode; // QCode of the parent cluster if (shiftQ==7) return 0; // A parent cluster doesn't exist else if(!shiftQ) sQCode+=shiftQ; // Shift QCode of son to QCode of his parent G4QPDGCode parent; // Create a temporary (fake) parent cluster parent.InitByQCode(sQCode); // Initialize it by Q-Code G4QContent parentQC=parent.GetQuarkContent();// Quark Content of the parent cluster if (!o) return parentQC.GetD(); else if(o==1) return parentQC.GetU(); else if(o==2) return parentQC.GetS(); else G4cerr<<"***G4QPDGCode:::GetNumOfComb: strange exiting quark o="<