// // ******************************************************************** // * 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: G4QContent.cc,v 1.49 2009/08/07 14:20:57 mkossov Exp $ // GEANT4 tag $Name: hadr-chips-V09-03-08 $ // // ---------------- G4QContent ---------------- // by Mikhail Kossov, Sept 1999. // class for Quasmon initiated Contents used by CHIPS Model // -------------------------------------------------------------------- // Short description: This is the basic class of the CHIPS model. It // describes the quark content of the Quasmon, which is a generalized // hadronic state. All Quasmons are bags, characterized by the quark // Content (QContent), but the spin is not fixed and only light (u,d,s) // quarks are considered (SU(3)). The hadrons are the ground states for // the corresponding quasmons. The Chipolino (G4QChipolino) or nuclear // cluster are examples for another Quark Content. // -------------------------------------------------------------------- // @@ In future total spin & c,b,t of the Hadron can be added @@ M.K.@@ // -------------------------------------------------------------------- //#define debug //#define pdebug //#define ppdebug //#define erdebug #include "G4QContent.hh" #include using namespace std; // Constructors // Initialize by the full quark content G4QContent::G4QContent(G4int d, G4int u, G4int s, G4int ad, G4int au, G4int as): nD(d),nU(u),nS(s),nAD(ad),nAU(au),nAS(as) { if(d<0||u<0||s<0||ad<0||au<0||as<0) { #ifdef erdebug G4cerr<<"***G4QContent:"< PP): nD(0),nU(0),nS(0),nAD(0),nAU(0),nAS(0) { G4int P1=PP.first; G4int P2=PP.second; if(!P1 || !P2) { G4cerr<<"***G4QContent::Constr(pair): Zero parton P1="< 7) A2= P2/100; else if(P2 <-7) A2=(-P2)/100; else if(P2 < 0) A2= -P2; G4int P21=0; G4int P22=0; if(A2>7) { P21=A2/10; P22=A2%10; } if(P2>0) { if(!P21) { if (A2==1) ++nD; else if(A2==2) ++nU; else if(A2==3) ++nS; else suc=false; } else { if (P21==1) ++nD; else if(P21==2) ++nU; else if(P21==3) ++nS; else suc=false; if (P22==1) ++nD; else if(P22==2) ++nU; else if(P22==3) ++nS; else suc=false; } } else // negative parton { if(!P21) { if (A2==1) ++nAD; else if(A2==2) ++nAU; else if(A2==3) ++nAS; else suc=false; } else { if (P21==1) ++nAD; else if(P21==2) ++nAU; else if(P21==3) ++nAS; else suc=false; if (P22==1) ++nAD; else if(P22==2) ++nAU; else if(P22==3) ++nAS; else suc=false; } } if(!suc) { G4cerr<<"***G4QContent::Constr(pair): Impossible partons, P1="<nU; nD = right->nD; nS = right->nS; nAU = right->nAU; nAD = right->nAD; nAS = right->nAS; } // Assignment operator (copy stile for possible Vector extention) const G4QContent& G4QContent::operator=(const G4QContent &right) {// ============================================== if(this != &right) // Beware of self assignment { nU = right.nU; nD = right.nD; nS = right.nS; nAU = right.nAU; nAD = right.nAD; nAS = right.nAS; } return *this; } // Standard output for QC {d,u,s,ad,au,as} ostream& operator<<(ostream& lhs, G4QContent& rhs) {// ========================================= lhs << "{" << rhs.GetD() << "," << rhs.GetU() << "," << rhs.GetS() << "," << rhs.GetAD() << "," << rhs.GetAU() << "," << rhs.GetAS() << "}"; return lhs; } // Standard output for const QC {d,u,s,ad,au,as} ostream& operator<<(ostream& lhs, const G4QContent& rhs) {// =============================================== lhs << "{" << rhs.GetD() << "," << rhs.GetU() << "," << rhs.GetS() << "," << rhs.GetAD() << "," << rhs.GetAU() << "," << rhs.GetAS() << "}"; return lhs; } // Subtract Quark Content G4QContent G4QContent::operator-=(const G4QContent& rhs) // ============================================= { #ifdef debug G4cout<<"G4QC::-=(const): is called:"<0||dAU>0) { G4int kU=dU; if(kU0||dAD>0) { G4int kD=dD; if(kDrU&&nAU>rAU) { rU +=1; rAU+=1; } else { rD +=1; rAD+=1; } } nD -= rD; if (nD<0) { nAD -= nD; nD = 0; } nU -= rU; if (nU<0) { nAU -= nU; nU = 0; } nS -= rS; if (nS<0) { nAS -= nS; nS = 0; } nAD -= rAD; if (nAD<0) { nD -= nAD; nAD = 0; } nAU -= rAU; if (nAU<0) { nU -= nAU; nAU = 0; } nAS -= rAS; if (nAS<0) { nS -= nAS; nAS = 0; } return *this; } // Subtract Quark Content G4QContent G4QContent::operator-=(G4QContent& rhs) // ======================================= { #ifdef debug G4cout<<"G4QC::-=: is called:"<0||dAU>0) { G4int kU=dU; if(kU0||dAD>0) { G4int kD=dD; if(kDrU&&nAU>rAU) { rU +=1; rAU+=1; } else { rD +=1; rAD+=1; } } nD -= rD; if (nD<0) { nAD -= nD; nD = 0; } nU -= rU; if (nU<0) { nAU -= nU; nU = 0; } nS -= rS; if (nS<0) { nAS -= nS; nS = 0; } nAD -= rAD; if (nAD<0) { nD -= nAD; nAD = 0; } nAU -= rAU; if (nAU<0) { nU -= nAU; nAU = 0; } nAS -= rAS; if (nAS<0) { nS -= nAS; nAS = 0; } return *this; } // Overloading of QC addition G4QContent operator+(const G4QContent& lhs, const G4QContent& rhs) {// ======================================================= G4QContent s = lhs; return s += rhs; } // Overloading of QC subtraction G4QContent operator-(const G4QContent& lhs, const G4QContent& rhs) {// ======================================================= G4QContent s = lhs; return s -= rhs; } // Overloading of QC multiplication by Int G4QContent operator*(const G4QContent& lhs, const G4int& rhs) {// ======================================================= G4QContent s = lhs; return s *= rhs; } // Overloading of Int times QC multiplication G4QContent operator*(const G4int& lhs, const G4QContent& rhs) {// ======================================================= G4QContent s = rhs; return s *= lhs; } // Destructor - - - - - - - G4QContent::~G4QContent() {} // Subtract neutral pion from Quark Content (with possible hidden strangeness) G4bool G4QContent::SubtractPi0() {// ========================= #ifdef debug G4cout<<"G4QC::SubtractPi0: U="<0) // baryonium { G4QContent la(1,1,1,0,0,0); G4QContent nt(2,1,0,0,0,0); G4QContent pr(1,2,0,0,0,0); G4QContent ks(0,1,2,0,0,0); if (nD>nU) ks=G4QContent(1,0,2,0,0,0); G4QContent dm(3,0,0,0,0,0); G4QContent dp(0,3,0,0,0,0); G4QContent om(0,0,3,0,0,0); if (nU>=nD&&nU>=nS) { if (r.SubtractHadron(pr)) r-=pr; // These functions only check else if(r.SubtractHadron(dp)) r-=dp; else if(r.SubtractHadron(nt)) r-=nt; else if(r.SubtractHadron(la)) r-=la; else if(r.SubtractHadron(dm)) r-=dm; else { //#ifdef erdebug G4cerr<<"***G4QCont::SplitChipo:Dibar (1) tot=6, b=2, qCont="<=nU&&nD>=nS) { if (r.SubtractHadron(nt)) r-=nt; // These functions only check else if(r.SubtractHadron(dm)) r-=dm; else if(r.SubtractHadron(pr)) r-=pr; else if(r.SubtractHadron(dp)) r-=dp; else if(r.SubtractHadron(la)) r-=la; else { //#ifdef erdebug G4cerr<<"***G4QContent::SplitChipo:Dib(2) tot=6, b=2, qCont="<=nAU) nUP=nAU; else nUP= nU; G4int nDP=0; // D/AD min factor (a#of d which can be subtracted) if (nD>=nAD) nDP=nAD; else nDP= nD; G4int nSP=0; // S/AS min factor (a#of s which can be subtracted) if (nS>=nAS) nSP=nAS; else nSP= nS; G4int nLP =nUP+nDP; // a#of light quark pairs which can be subtracted G4int nTotP=nLP+nSP; // total#of existing pairs which can be subtracted G4int nReal=nQAQ; // demanded #of pairs for reduction (by demand) G4int nRet =nTotP-nQAQ; // a#of additional pairs for further reduction if (nQAQ<0) // === Limited reduction case @@ not tuned for baryons !! { G4int res=tot+nQAQ; #ifdef debug G4cout<<"G4QC::DecQC: tot="<(base*G4UniformRand()); // Random integer "SortOfQuark" if (nUP && j2 || nUP>1 || (nD<2 && nS<2)))// --- U-Ubar pair { #ifdef debug G4cout<<"G4QC::DecQC: decrementing UAU pair UP="<>>OUT<<< nRet="<nAU && nAU>0) { mU=nU-nAU; n-=nAU+nAU; } if (nAU>nU && nU>0) { mU=nAU-nU; n-=nU+nU; } if ( nD>nAD && nAD>0) { mD=nD-nAD; n-=nAD+nAD; } if (nAD>nD && nD>0) { mD=nAD-nD; n-=nD+nD; } if ( nS>nAS && nAS>0) { mS=nS-nAS; n-=nAS+nAS; } if (nAS>nS && nS>0) { mS= nAS-nS; n-=nS+nS; } // ---------------------- Cancelation of q-qbar pairs in case of an equality if (nAD==nD && nD>0) { G4int dD=nD+nD; if(n>dD) { mD=0; n-=dD; } else if (n==dD) { mD=2; n=2; } else { #ifdef debug G4cout<<"***G4QC::SPDG:CanD U="<0) { G4int dU=nU+nU; if(n>dU) { mU=0; n-=dU; } else if (n==dU) { mU=2; n=2; } else { #ifdef debug G4cout<<"***G4QC::SPDG:CanU U="<0) //@@ Starts with S-quarks - should be randomized and mass limited { G4int dS=nS+nS; if(n>dS) { mS=0; n-=dS; } else if (n==dS) { mS=2; n=2; } else { #ifdef debug G4cout<<"***G4QC::SPDG:CanS U="<4) // Super Exotics { #ifdef debug G4cout<<"G4QC::SPDG:n>4 SEx:U="<1) { #ifdef debug G4cout<<"**G4QC::SPDG:Stran="<0) // Strange Mesons { p=301; if (mS==2) { //if (G4UniformRand()<0.333) p=221; // eta //else p+=30; // eta' p=221; } else if (mU==1 && mD==0) p+=20; else if (mU==0 && mD==1) p+=10; else { #ifdef debug G4cout<<"*G4QC::SPDG:ExMS U="<0) // Isotopic Mesons { p=201; //if (mU==2 && mD==0) p=221; // Performance problems if (mU==2 && mD==0) p=111; else if (mU==1 && mD==1) p+=10; else { #ifdef debug G4cout<<"*G4QC::SPDG:ExMU U="<>>>>>> Answer is anti-d else if(AU) return -2; // >>>>>>> Answer is anti-u else return -3; // >>>>>>> Answer is anti-s } else // ... Hadron is aMeson with annihilatedAntiQuark { if (QS) // --------- There is an s-quark { if (QS==2) return 3303; // >>>>>>> Answer is ss (3301 does not exist) else if(QU) return 3201; // >>>>>>> Answer is su (@@ only lightest) else return 3101; // >>>>>>> Answer is sd (@@ only lightest) } else if(QU) // --------- There is an u quark { if (QU==2) return 2203; // >>>>>>> Answer is uu (2201 does not exist) else return 2101; // >>>>>>> Answer is ud (@@ only lightest) } else return 1103; // >>>>>>> Answer is dd (1101 does not exist) } } else // -- antiDiQuark { #ifdef debug G4cout<<"G4QContent::AddParton: AntiDiQuark,P1="< anti-s-anti-s DiQuark { if(HBN>0 && QS>1) QS-=2; // >> Annihilation of anti-ss-DiQuark with Baryon else if(!HBN && QS==1) { QS=0; ++AS; } else if(HBN || (!HBN && !QS)) return 0; } else if(P1==3 && P2==2) // ----> anti-s-anti-u DiQuark { if(HBN>0 && QS && QU) // >> Annihilation of anti-su-DiQuark with Baryon { --QS; --QU; } else if(!HBN && (QS || QU)) { if(QS) { --QS; ++AU; } else { --QU; ++AS; } } else if(HBN || (!HBN && !QS && !QU)) return 0; } else if(P1==3 && P2==1) // ----> anti-s-anti-d DiQuark { if(HBN>0 && QS && QD) // >> Annihilation of anti-sd-DiQuark with Baryon { --QS; --QD; } else if(!HBN && (QS || QD)) { if(QS) { --QS; ++AD; } else { --QD; ++AS; } } else if(HBN || (!HBN && !QS && !QD)) return 0; } else if(P1==2 && P2==2) // ----> anti-u-anti-u DiQuark { if(HBN>0 && QU>1) QU-=2; // >> Annihilation of anti-uu-DiQuark with Baryon else if(!HBN && QU==1) { QU=0; ++AU; } else if(HBN || (!HBN && !QU)) return 0; } else if(P1==2 && P2==1) // ----> anti-u-anti-d DiQuark { if(HBN>0 && QU && QD) // >> Annihilation of anti-ud-DiQuark with Baryon { --QU; --QD; } else if(!HBN && (QU || QD)) { if(QU) { --QU; ++AD; } else { --QD; ++AU; } } else if(HBN || (!HBN && !QU && !QD)) return 0; } else // ----> anti-d=anti-d DiQuark { if(HBN>0 && QD>1) QD-=2; // >> Annihilation of anti-dd-DiQuark with Baryon else if(!HBN && QD==1) { QD=0; ++AD; } else if(HBN || (!HBN && !QD)) return 0; } #ifdef debug G4cout<<"G4QContent::AddParton:ADQ, QC="<0) // ....... Hadron is an Baryon { if (QD) return 1; // >>>>>>> Answer is d else if(QU) return 2; // >>>>>>> Answer is u else return 3; // >>>>>>> Answer is s } else // ....... Meson with annihilated Anti-Quark { if (AS) // --------- There is an anti-s quark { if (AS==2) return -3303; // >>>>>>> Answer is anti-ss (3301 does not exist) else if(AU) return -3201; // >>>>>>> Answer is anti-su (@@ only lightest) else return -3101; // >>>>>>> Answer is anti-sd (@@ only lightest) } else if(AU) // --------- There is an anti-u quark { if (AU==2) return -2203; // >>>>>>> Answer is anti-uu (2201 does not exist) else return -2101; // >>>>>>> Answer is anti-ud (@@ only lightest) } else return -1103; // >>>>>>> Answer is anti-dd (1101 does not exist) } } } else // Parton is Quark/antiQuark { if(pPDG>0) // -- Quark { #ifdef debug G4cout<<"G4QContent::AddParton: Quark, A="< d quark { if(HBN<0 && AD) AD--; // ====> Annihilation of d-quark with anti-Baryon else if(HBN || (!HBN && !AD)) return 0; } else if(aPDG==2) // ----> u quark { if(HBN<0 && AU) AU--; // ====> Annihilation of u-quark with anti-Baryon else if(HBN || (!HBN && !AU)) return 0; } else // ----> s quark { if(HBN<0 && AS) AS--; // ====> Annihilation of s-quark with anti-Baryon else if(HBN || (!HBN && !AS)) return 0; } #ifdef debug G4cout<<"G4QContent::AddParton: Q, QC="<>>>>>> Answer is d else if(QU) return 2; // >>>>>>> Answer is u else return 3; // >>>>>>> Answer is s } else // ....... AntiBaryon with annihilated AntiQuark { if (AS) // --------- There is an anti-s quark { if (AS==2) return -3303; // >>>>>>> Answer is ss (3301 does not exist) else if(AU) return -3201; // >>>>>>> Answer is su (@@ only lightest) else return -3101; // >>>>>>> Answer is sd (@@ only lightest) } else if(AU) { if (AU==2) return -2203; // >>>>>>> Answer is uu (2201 does not exist) else return -2101; // >>>>>>> Answer is ud (@@ only lightest) } else return -1103; // >>>>>>> Answer is dd (1101 does not exist) } } else // -- antiQuark { #ifdef debug G4cout<<"G4QContent::AddParton: antiQ, Q="< anti-d quark { if(HBN>0 && QD) QD--; // ====> Annihilation of anti-d-quark with Baryon else if(HBN || (!HBN && !QD)) return 0; } else if(aPDG==2) // ----> anti-u quark { if(HBN>0 && QU) QU--; // ====> Annihilation of anti-u-quark with Baryon else if(HBN || (!HBN && !QU)) return 0; } else // ----> anti-s quark { if(HBN>0 && QS) QS--; // ====> Annihilation of anti-s-quark with Baryon else if(HBN || (!HBN && !QS)) return 0; } #ifdef debug G4cout<<"G4QContent::AddParton: AQ, QC="<>>>>>> Answer is anti-d else if(AU) return -2; // >>>>>>> Answer is anti-u else return -3; // >>>>>>> Answer is anti-s } else // ....... Baryon with annihilated Quark { if (QS) // --------- There is an anti-s quark { if (QS==2) return 3303; // >>>>>>> Answer is ss (3301 does not exist) else if(QU) return 3201; // >>>>>>> Answer is su (@@ only lightest) else return 3101; // >>>>>>> Answer is sd (@@ only lightest) } else if(QU) { if (QU==2) return 2203; // >>>>>>> Answer is uu (2201 does not exist) else return 2101; // >>>>>>> Answer is ud (@@ only lightest) } else return 1103; // >>>>>>> Answer is dd (1101 does not exist) } } } }