Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QPDGCode Class Reference

#include <G4QPDGCode.hh>

Public Member Functions

 G4QPDGCode (G4int PDGCode=0)
 
 G4QPDGCode (G4bool f, G4int QCode)
 
 G4QPDGCode (G4QContent QCont)
 
 G4QPDGCode (const G4QPDGCode &rhs)
 
 G4QPDGCode (G4QPDGCode *rhs)
 
 ~G4QPDGCode ()
 
const G4QPDGCodeoperator= (const G4QPDGCode &rhs)
 
G4bool operator== (const G4QPDGCode &rhs) const
 
G4bool operator== (const G4int &rhs) const
 
G4bool operator!= (const G4QPDGCode &rhs) const
 
G4bool operator!= (const G4int &rhs) const
 
G4QPDGCode operator+= (const G4int &rhs)
 
G4QPDGCode operator+= (const G4QPDGCode &rhs)
 
G4QPDGCode operator-= (const G4int &rhs)
 
G4QPDGCode operator-= (const G4QPDGCode &rhs)
 
G4QPDGCode operator*= (const G4int &rhs)
 
G4QPDGCode operator/= (const G4int &rhs)
 
G4int GetNQHadr ()
 
G4double GetMass ()
 
G4double GetMass2 ()
 
G4double GetWidth ()
 
G4double GetNuclMass (G4int Z, G4int N, G4int S)
 
G4double GetNuclMass (G4int PDGCode)
 
G4QContent GetQuarkContent () const
 
G4int GetBaryNum () const
 
G4int GetSpin () const
 
G4int GetCharge () const
 
G4int GetPDGCode () const
 
G4int GetQCode () const
 
G4QContent GetExQContent (G4int i, G4int o) const
 
G4int GetRelCrossIndex (G4int i, G4int o) const
 
G4int GetNumOfComb (G4int i, G4int o) const
 
G4int GetTotNumOfComb (G4int i) const
 
void SetPDGCode (G4int newPDGCode)
 
void InitByQCont (G4QContent QCont)
 
void InitByQCode (G4int QCode)
 
G4bool TestRealNeutral ()
 
void NegPDGCode ()
 
void ConvertPDGToZNS (G4int PDG, G4int &z, G4int &n, G4int &s)
 
std::pair< G4int, G4intMakeTwoBaryons (G4int L1, G4int L2, G4int R1, G4int R2)
 

Detailed Description

Definition at line 141 of file G4QPDGCode.hh.

Constructor & Destructor Documentation

◆ G4QPDGCode() [1/5]

G4QPDGCode::G4QPDGCode ( G4int  PDGCode = 0)

Definition at line 54 of file G4QPDGCode.cc.

54 : thePDGCode(PDGCode)
55{
56#ifdef sdebug
57 G4cout<<"G4QPDGCode:Constructer is called with PDGCode="<<PDGCode<<G4endl;
58#endif
59 if(PDGCode==130) PDGCode= 311; // Safety. Should not happen.
60 if(PDGCode==310) PDGCode=-311; // Safety. Should not happen.
61 if(PDGCode==90000000)
62 {
63 thePDGCode=22;
64 theQCode=6;
65 }
66 else if(PDGCode) theQCode=MakeQCode(PDGCode);
67 else
68 {
69#ifdef sdebug
70 G4cout<<"***G4QPDGCode: Constructed with PDGCode=0, QCode=-2"<<G4endl;
71#endif
72 theQCode=-2;
73 }
74#ifdef debug
75 if(PDGCode==3222)G4cout<<"G4QPDGCd:Con(PDG) PDG="<<PDGCode<<", QCode="<<theQCode<<G4endl;
76#endif
77}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

◆ G4QPDGCode() [2/5]

G4QPDGCode::G4QPDGCode ( G4bool  f,
G4int  QCode 
)

Definition at line 79 of file G4QPDGCode.cc.

79 : theQCode(QCode)
80{
81 if(f&&QCode<0)G4cerr<<"***G4QPDGCode::Constr. QCode="<<QCode<<G4endl;
82 thePDGCode = MakePDGCode(QCode);
83#ifdef debug
84 G4cout<<"G4QPDGCode::Constr: PDGCode="<<thePDGCode<<G4endl;
85#endif
86}
G4DLLIMPORT std::ostream G4cerr

◆ G4QPDGCode() [3/5]

G4QPDGCode::G4QPDGCode ( G4QContent  QCont)

Definition at line 88 of file G4QPDGCode.cc.

89{
90 InitByQCont(QCont);
91}
void InitByQCont(G4QContent QCont)
Definition: G4QPDGCode.hh:348

◆ G4QPDGCode() [4/5]

G4QPDGCode::G4QPDGCode ( const G4QPDGCode rhs)

Definition at line 93 of file G4QPDGCode.cc.

94{
95 thePDGCode =rhs.thePDGCode;
96 theQCode =rhs.theQCode;
97}

◆ G4QPDGCode() [5/5]

G4QPDGCode::G4QPDGCode ( G4QPDGCode rhs)

Definition at line 99 of file G4QPDGCode.cc.

100{
101 thePDGCode =rhs->thePDGCode;
102 theQCode =rhs->theQCode;
103}

◆ ~G4QPDGCode()

G4QPDGCode::~G4QPDGCode ( )

Definition at line 115 of file G4QPDGCode.cc.

115{}

Member Function Documentation

◆ ConvertPDGToZNS()

void G4QPDGCode::ConvertPDGToZNS ( G4int  PDG,
G4int z,
G4int n,
G4int s 
)

Definition at line 2377 of file G4QPDGCode.cc.

2378{
2379 if(nucPDG>80000000&&nucPDG<100000000) // Condition of conversion
2380 {
2381 z=0;
2382 n=0;
2383 s_value=0;
2384 G4int r=nucPDG;
2385 if(r==90000000) return;
2386 G4int cn =r%1000; // candidate to #of neutrons
2387 if(cn)
2388 {
2389 if(cn>500) cn-=1000; // AntiNeutrons
2390 n=cn; // Increment neutrons
2391 r-=cn; // Subtract them from the residual
2392 if(r==90000000) return;
2393 }
2394 G4int cz =r%1000000; // candidate to #of neutrons
2395 if(cz)
2396 {
2397 if(cz>500000) cz-=1000000; // AntiProtons
2398 z=cz/1000; // Number of protons
2399 r-=cz; // Subtract them from the residual
2400 if(r==90000000) return;
2401 }
2402 G4int cs =r%10000000; // candidate to #of neutrons
2403 if(cs)
2404 {
2405 if(cs>5000000) cs-=10000000; // AntiLambda
2406 s_value=cs/1000000; // Number of Lambdas
2407 }
2408 }
2409 return;
2410}
int G4int
Definition: G4Types.hh:66

Referenced by GetMass(), and G4QNucleus::InitByPDG().

◆ GetBaryNum()

G4int G4QPDGCode::GetBaryNum ( ) const
inline

Definition at line 329 of file G4QPDGCode.hh.

G4int GetBaryonNumber() const
Definition: G4QContent.cc:1182
G4QContent GetQuarkContent() const
Definition: G4QPDGCode.cc:2057

Referenced by G4QEnvironment::G4QEnvironment().

◆ GetCharge()

G4int G4QPDGCode::GetCharge ( ) const
inline

Definition at line 328 of file G4QPDGCode.hh.

328{return GetQuarkContent().GetCharge();}
G4int GetCharge() const
Definition: G4QContent.cc:1159

Referenced by G4QEnvironment::G4QEnvironment().

◆ GetExQContent()

G4QContent G4QPDGCode::GetExQContent ( G4int  i,
G4int  o 
) const

Definition at line 2244 of file G4QPDGCode.cc.

2245{
2246 G4QContent cQC(0,0,0,0,0,0);
2247 if (!i) cQC.IncAD();
2248 else if(i==1) cQC.IncAU();
2249 else if(i==2) cQC.IncAS();
2250 else G4cerr<<"***G4QPDGCode::GetExQContent: strange entering quark i="<<i<<G4endl;
2251 if (!o) cQC.IncD();
2252 else if(o==1) cQC.IncU();
2253 else if(o==2) cQC.IncS();
2254 else G4cerr<<"***G4QPDGCode::GetExQContent: strange exiting quark o="<<o<<G4endl;
2255 return cQC;
2256}

◆ GetMass()

G4double G4QPDGCode::GetMass ( )

Definition at line 693 of file G4QPDGCode.cc.

694{
695 G4int ab=theQCode;
696#ifdef pdebug
697 G4bool pPrint = thePDGCode == 3222 || ab == 25;
698 if(pPrint)
699 G4cout<<"G4QPDGCode::GetMass: Mass for Q="<<ab<<",PDG="<<thePDGCode<<",N="<<nQHM<<G4endl;
700#endif
701 if ( (ab < 0 && thePDGCode < 80000000) || !thePDGCode) {
702#ifdef pdebug
703 if(thePDGCode!=10 && pPrint)
704 G4cout<<"**G4QPDGCode::GetMass:m=100000.,QC="<<theQCode<<",PDG="<<thePDGCode<<G4endl;
705#endif
706 return 100000.;
707 }
708 else if(ab>-1 && ab<nQHM)
709 {
710 G4double mass = QHaM(ab);
711#ifdef pdebug
712 //if(pPrint)
713 if(thePDGCode == 3222 || ab == 25)
714 G4cout<<"G4QPDGCode::GetMa:m="<<mass<<",Q="<<theQCode<<",PDG="<<thePDGCode<<G4endl;
715#endif
716 return mass; // Get mass from the table
717 }
718 //if(szn==0) return m[15]; // @@ mPi0 @@ MK ?
719 if(thePDGCode==90000000)
720 {
721#ifdef pdebug
722 if(pPrint)
723 G4cout<<"G4QPDGCode::GetMass:***m=0, QC="<<theQCode<<",PDG="<<thePDGCode<<G4endl;
724#endif
725 return 0.;
726 }
727 G4int s_value=0;
728 G4int z=0;
729 G4int n=0;
730 ConvertPDGToZNS(thePDGCode, z, n, s_value);
731 G4double m_value=GetNuclMass(z,n,s_value);
732#ifdef pdebug
733 if(pPrint)
734 G4cout<<"G4QPDG::GetM:PDG="<<thePDGCode<<"=>Z="<<z<<",N="<<n<<",S="<<s_value<<",M="<<m_value<<G4endl;
735#endif
736 return m_value;
737}
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
G4double GetNuclMass(G4int Z, G4int N, G4int S)
Definition: G4QPDGCode.cc:766
void ConvertPDGToZNS(G4int PDG, G4int &z, G4int &n, G4int &s)
Definition: G4QPDGCode.cc:2377

Referenced by G4QCaptureAtRest::AtRestDoIt(), G4QNucleus::BindingEnergy(), G4QFragmentation::Breeder(), G4QIonIonCollision::Breeder(), G4Quasmon::CalculateNumberOfQPartons(), G4QEnvironment::CheckMassShell(), G4QuasiFreeRatios::ChExer(), G4QNucleus::ChooseFermiMomenta(), G4QNucleus::ChoosePositions(), G4QNucleus::CoulBarPenProb(), G4QNucleus::DecayAlphaBar(), G4QNucleus::DecayAlphaDiN(), G4QNucleus::DecayAntiDibaryon(), G4QEnvironment::DecayAntistrange(), G4QNucleus::DecayAntiStrange(), G4QEnvironment::DecayBaryon(), G4QNucleus::DecayDibaryon(), G4QNucleus::DecayIsonucleus(), G4QEnvironment::DecayMeson(), G4QNucleus::DecayMultyBaryon(), G4QNucleus::EvaporateBaryon(), G4QNucleus::EvaporateNucleus(), G4QFragmentation::EvaporateResidual(), G4QFragmentation::Fragment(), G4QIonIonCollision::Fragment(), G4QCandidate::G4QCandidate(), G4QChipolino::G4QChipolino(), G4QDecayChan::G4QDecayChan(), G4QEnvironment::G4QEnvironment(), G4QFragmentation::G4QFragmentation(), G4QHadron::G4QHadron(), G4QIonIonCollision::G4QIonIonCollision(), G4QNucleus::G4QNucleus(), G4QNucleus::GetGSMass(), G4QParticle::GetMass(), GetMass2(), G4QIonIonElastic::GetMeanFreePath(), G4QDiffractionRatio::GetRatio(), G4QFreeScattering::InElF(), G4QNucleus::InitByPDG(), G4QAtomicElectronScattering::PostStepDoIt(), G4QCoherentChargeExchange::PostStepDoIt(), G4QDiffraction::PostStepDoIt(), G4QElastic::PostStepDoIt(), G4QInelastic::PostStepDoIt(), G4QIonIonElastic::PostStepDoIt(), G4QLowEnergy::PostStepDoIt(), G4QNGamma::PostStepDoIt(), G4QNucleus::PrepareCandidates(), G4QDiffractionRatio::ProjFragment(), G4QHadron::RandomizeMass(), G4QFreeScattering::Scatter(), G4QuasiFreeRatios::Scatter(), G4QNucleus::Split2Baryons(), G4QNucleus::SplitBaryon(), G4QDiffractionRatio::TargFragment(), and G4QIonIonCrossSection::ThresholdMomentum().

◆ GetMass2()

G4double G4QPDGCode::GetMass2 ( )
inline

Definition at line 281 of file G4QPDGCode.hh.

281{G4double mass=GetMass(); return mass*mass;}
G4double GetMass()
Definition: G4QPDGCode.cc:693

◆ GetNQHadr()

G4int G4QPDGCode::GetNQHadr ( )
inline

Definition at line 236 of file G4QPDGCode.hh.

236{return nQHM;} // Return # of predefined hadrons

Referenced by G4QNucleus::InitCandidateVector().

◆ GetNuclMass() [1/2]

G4double G4QPDGCode::GetNuclMass ( G4int  PDGCode)
inline

Definition at line 282 of file G4QPDGCode.hh.

283{
284 if(PDG>80000000)
285 {
286 G4int szn=PDG-90000000;
287 G4int ds=0;
288 G4int dz=0;
289 G4int dn=0;
290 if(szn<-100000)
291 {
292 G4int ns_value=(-szn)/1000000+1;
293 szn+=ns_value*1000000;
294 ds+=ns_value;
295 }
296 else if(szn<-100)
297 {
298 G4int nz=(-szn)/1000+1;
299 szn+=nz*1000;
300 dz+=nz;
301 }
302 else if(szn<0)
303 {
304 G4int nn=-szn;
305 szn=0;
306 dn+=nn;
307 }
308 G4int sz =szn/1000;
309 G4int n =szn%1000;
310 if(n>700)
311 {
312 n-=1000;
313 dz--;
314 }
315 G4int z =sz%1000-dz;
316 if(z>700)
317 {
318 z-=1000;
319 ds--;
320 }
321 G4int s_value =sz/1000-ds;
322 return GetNuclMass(z,n,s_value);
323 }
324 return 0.;
325}

◆ GetNuclMass() [2/2]

G4double G4QPDGCode::GetNuclMass ( G4int  Z,
G4int  N,
G4int  S 
)

Definition at line 766 of file G4QPDGCode.cc.

767{
768 static const G4double anb = .01; // Antibinding for Ksi-n,Sig-n,Sig+p,Sig-nn,
769 static const G4double mNeut= QHaM(20);
770 static const G4double mProt= QHaM(21);
771 static const G4double mLamb= QHaM(22);
772 static const G4double mPiC = QHaM(15);
773 static const G4double mKZ = QHaM(17);
774 static const G4double mKM = QHaM(18);
775 static const G4double mSiM = QHaM(23);
776 static const G4double mSiP = QHaM(25);
777 static const G4double mKsZ = QHaM(27);
778 static const G4double mKsM = QHaM(26);
779 static const G4double mOmM = QHaM(44);
780 static const G4double mKZa = mKZ +anb;
781 static const G4double mKMa = mKM +anb;
782 static const G4double mSigM= mSiM+anb;
783 static const G4double mSigP= mSiP+anb;
784 static const G4double mKsiZ= mKsZ+anb;
785 static const G4double mKsiM= mKsM+anb;
786 static const G4double mOmeg= mOmM+anb;
787 static const G4double mDiPi= mPiC+mPiC+anb;
788 static const G4double mDiKZ= mKZa+mKZ;
789 static const G4double mDiKM= mKMa+mKM;
790 static const G4double mDiPr= mProt+mProt;
791 static const G4double mDiNt= mNeut+mNeut;
792 static const G4double mSmPi= mSiM+mDiPi;
793 static const G4double mSpPi= mSiP+mDiPi;
794 static const G4double mOmN = mOmeg+mNeut;
795 static const G4double mSpP = mSigP+mProt;
796 static const G4double mSpPP= mSpP +mProt;
797 static const G4double mSmN = mSigM+mNeut;
798 static const G4double mSmNN= mSmN +mNeut;
799 // -------------- DAM Arrays ----------------------
800 static const G4int iNR=76; // Neutron maximum range for each Z
801 static const G4int nEl = 105; // Maximum Z of the associative memory is "nEl-1=104"
802 static const G4int iNF[nEl]={0,0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 14
803 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // 29
804 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44
805 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59
806 56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, // 74
807 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, // 89
808 86 , 87, 88, 89, 91, 94, 98,103,109,115,122,128,134,140,146};//104
809#ifdef qdebug
810 static G4int iNmin[nEl]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 14
811 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // 29
812 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44
813 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59
814 56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, // 74
815 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, // 89
816 86 , 87, 88, 89, 91, 94, 98,103,109,115,122,128,134,140,146};//104
817 static G4int iNmax=iNR;
818 static G4int iNran[nEl]={19,20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, // 14
819 34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52, // 29
820 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44
821 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59
822 73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76, // 74
823 76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69, // 89
824 68 , 68, 68, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23};//104
825#endif
826 static const G4int iNL[nEl]={19,20,21,22,23,24, 25, 26, 27, 28, 29, 30, 31, 32, 33, // 14
827 34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52, // 29
828 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44
829 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59
830 73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76, // 74
831 76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69, // 89
832 68 , 68, 68, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23};//104
833 // ********* S=-4 vectors *************
834 static G4bool iNin6[nEl]={false,false,false,false,false,false,false,
835 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
836 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
837 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
838 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
839 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
840 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
841 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
842 static G4double VZ6[nEl][iNR];
843 //********* S=-3 vectors *************
844 static G4bool iNin7[nEl]={false,false,false,false,false,false,false,
845 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
846 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
847 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
848 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
849 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
850 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
851 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
852 static G4double VZ7[nEl][iNR];
853 // ********* S=-2 vectors *************
854 static G4bool iNin8[nEl]={false,false,false,false,false,false,false,
855 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
856 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
857 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
858 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
859 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
860 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
861 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
862 static G4double VZ8[nEl][iNR];
863 // ********* S=-1 vectors *************
864 static G4bool iNin9[nEl]={false,false,false,false,false,false,false,
865 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
866 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
867 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
868 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
869 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
870 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
871 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
872 static G4double VZ9[nEl][iNR];
873 // ********* S=0 vectors *************
874 static G4bool iNin0[nEl]={false,false,false,false,false,false,false,
875 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
876 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
877 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
878 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
879 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
880 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
881 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
882 static G4double VZ0[nEl][iNR];
883 // ********* S=1 vectors *************
884 static G4bool iNin1[nEl]={false,false,false,false,false,false,false,
885 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
886 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
887 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
888 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
889 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
890 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
891 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
892 static G4double VZ1[nEl][iNR];
893 // ********* S=2 vectors *************
894 static G4bool iNin2[nEl]={false,false,false,false,false,false,false,
895 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
896 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
897 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
898 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
899 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
900 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
901 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
902 static G4double VZ2[nEl][iNR];
903 // ********* S=3 vectors *************
904 static G4bool iNin3[nEl]={false,false,false,false,false,false,false,
905 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
906 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
907 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
908 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
909 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
910 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
911 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
912 static G4double VZ3[nEl][iNR];
913 // ********* S=2 vectors *************
914 static G4bool iNin4[nEl]={false,false,false,false,false,false,false,
915 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
916 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
917 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
918 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
919 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
920 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
921 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
922 static G4double VZ4[nEl][iNR];
923 //
924#ifdef qdebug
925 static G4int Smin=-1; // Dynamic Associated memory is implemented for S>-2 nuclei
926 static G4int Smax= 2; // Dynamic Associated memory is implemented for S< 3 nuclei
927 static G4int NZmin= 0; // Dynamic Associated memory is implemented for Z>-1 nuclei
928 static G4int NNmin= 0; // Dynamic Associated memory is implemented for N>-1 nuclei
929 static G4int NZS1max= 0; // Dynamic Associated memory is implemented for S<3, Z=-1, N<2
930 static G4int NNS1max= 0; // Dynamic Associated memory is implemented for S<3, Z=-1, N<2
931#endif
932 // -------------------------------------------------------------------------------------
933 G4double rm=0.;
934 G4int nz=n+z;
935 G4int zns=nz+s_value;
936 if(nz+s_value<0)
937 {
938 z=-z;
939 n=-n;
940 s_value=-s_value;
941 nz=-nz;
942 zns=-zns;
943 }
944 if(z<0)
945 {
946 if(z==-1)
947 {
948 if(!s_value)
949 {
950 if(n==1) return mPiC; // pi-
951 else return mPiC+(n-1)*mNeut; // Delta- + (N-1)*n
952 }
953 else if(s_value==1) // Strange negative hadron
954 {
955 if(!n) return mKM; // K-
956 else if(n==1) return mSiM; // Sigma-
957 else if(n==2) return mSmN ; // Sigma- + n DiBaryon
958 else if(n==3) return mSmNN; // Sigma- +2n TriBaryon
959 else return mSigM+mNeut*(n-1); // Sigma- + (N-1)*n
960 }
961 else if(s_value==2) // --> Double-strange negative hadrons
962 {
963 if(!n) return mKsM; // Ksi-
964 else if(n==1) return mKsiM+mNeut; // Ksi- + n
965 else if(n==2) return mKsiM+mNeut+mNeut; // Ksi- + 2n
966 else return mKsiM+mNeut*n; // Ksi- + Z*n
967 }
968 else if(s_value==-2)
969 {
970 if (nz==2) return mDiKZ+mPiC; // 2K0 + Pi-
971 else return mDiKZ+mPiC+(nz-2)*mProt;
972 }
973 else if(s_value==3) // --> Triple-strange negative hadrons
974 {
975 if (n==-1) return mOmM; // Triple-strange Omega minus
976 else if(!n ) return mOmN; // Triple-strange (Omega-) + n DiBaryon
977 else if(n==-2) return mDiKZ+mKM; // Triple-strange K- + 2*K0
978 else return mOmeg+mNeut*(n+2);
979 }
980 else if(s_value==4)
981 {
982 if(n==-2) return mOmeg+mKM; // Omega- + K-
983 else if(n==-1) return mOmeg+mLamb;// Omega- + Lambda
984 else return mOmeg+mLamb+(n+1)*mNeut; // Omega- + Lambda + (n+1)*Neutrons
985 }
986 else if(!n) return mOmeg+(s_value-2)*mLamb; // Multy-Lambda + Omega minus
987 else
988 {
989#ifdef qdebug
990 if(s_value>NZS1max)
991 {
992 NZS1max=s_value;
993 G4cout<<"-------->>G4QPDGCode::GetNucMass: Z=-1, S="<<s_value<<">2 with N="<<n<<G4endl;
994 }
995#endif
996 return CalculateNuclMass(z,n,s_value);
997 }
998 }
999 else if(!s_value)
1000 {
1001 if(!nz)
1002 {
1003 if(n==2) return mDiPi;
1004 else return mDiPi+(n-2)*mPiC;
1005 }
1006 else return mNeut*nz-z*mPiC+anb;
1007 }
1008 else if(!zns) // !!! s=0 is treated above !!
1009 {
1010 if(s_value>0) return anb+s_value*mKM+n*mPiC; // s*K- + n*Pi-
1011 else return anb-s_value*mKZ-z*mPiC; // (-s)*aK0 + (-z)*Pi-
1012 }
1013 else if(s_value==1)
1014 {
1015 if(!nz)
1016 {
1017 if(n==2) return mSmPi;
1018 else return mSmPi+(n-2)*mPiC;
1019 }
1020 else return mSigM+nz*mNeut-(z+1)*mPiC;
1021 }
1022 else if(s_value==-1) return mKZa-z*mPiC+(nz-1)*mNeut; // aK0+(nz-1)n+(-z)*Pi-
1023 else if(s_value==2)
1024 {
1025 if (nz==-1) return mKsiM+n*mPiC;
1026 else if(!nz) return mKsiM+mNeut-(z+1)*mPiC;
1027 else return mKsiM+(nz+1)*mNeut-(z+1)*mPiC;
1028 }
1029 else if(s_value==-2) return mDiKZ-z*mPiC+(nz-2)*mNeut;
1030 else if(s_value==3)
1031 {
1032 if (nz==-2) return mOmeg+(n+1)*mPiC; // Omega- + (n+1)* Pi-
1033 else if(nz==-1) return mOmeg+mNeut+n*mPiC; // Omega- + n * Pi-
1034 else if(!nz) return mOmeg+mDiNt+(n-1)*mPiC; // Omega- + 2N + (n-1)*Pi-
1035 else return mOmeg+(nz+2)*mProt-(z+1)*mPiC;
1036 }
1037 else if(s_value<-2) return anb-s_value*mKZ-z*mPiC+(nz+s_value)*mNeut;
1038 else if(s_value==4)
1039 {
1040 if (nz==-3) return mOmeg+mKM+(n+1)*mPiC; // Om- + K- + (n+1)*Pi-
1041 else if(nz==-2) return mOmeg+mSigM+n*mPiC; // Om- + Sig- + n*Pi-
1042 else if(nz==-1) return mOmeg+mSigM+mNeut+(n-1)*mPiC;//Om- + Sig- +N +(n-1)*Pi-
1043 else if(!nz) return mOmeg+mSigM+mDiNt+(n-2)*mPiC;//Om- +Sig- +2N +(n-2)*Pi-
1044 else return mOmeg+mSigM+(nz+2)*mDiNt-(z+2)*mPiC;//+(nz+2)N-(z+2)Pi-
1045 }
1046 // s=5: 2*K-, Ksi-; s=6: 3*K-, Omega-; s>6 adds K- and Sigma- instead of Protons
1047 else // !!All s<0 are done and s>4 can be easy extended if appear!!
1048 {
1049#ifdef qdebug
1050 if(z<NZmin)
1051 {
1052 NZmin=z;
1053 G4cout<<"---->>G4QPDGCode::GetNucMass: Z="<<z<<"<-1 with N="<<n<<", S="<<s_value<<G4endl;
1054 }
1055#endif
1056 return CalculateNuclMass(z,n,s_value);
1057 }
1058 }
1059 else if(n<0)
1060 {
1061 if(n==-1)
1062 {
1063 if(!s_value)
1064 {
1065 if(z==1) return mPiC; // pi+
1066 else return mPiC+(z-1)*mProt; // Delta++ + (Z-1)*p
1067 }
1068 else if(s_value==1) // --> Strange neutral hadrons
1069 {
1070 if(!z) return mKZ; // K0
1071 else if(z==1) return mSiP; // Sigma+
1072 else if(z==2) return mSpP ; // Sigma+ + p DiBaryon
1073 else if(z==3) return mSpPP; // Sigma+ +2p TriBaryon
1074 else return mSigP+mProt*(z-1); // Sigma+ + (Z-1)*p
1075 }
1076 else if(s_value==2) // --> Double-strange negative hadrons
1077 {
1078 if(!z) return mKsZ; // Ksi0
1079 else if(z==1) return mKsiZ+mProt; // Ksi- + p
1080 else if(z==2) return mKsiZ+mProt+mProt; // Ksi- + 2p
1081 else return mKsiZ+mProt*z; // Ksi- + Z*p
1082 }
1083 else if(s_value==-2)
1084 {
1085 if (nz==2) return mDiKM+mPiC; // 2K+ + Pi+
1086 else return mDiKM+mPiC+(nz-2)*mProt;
1087 }
1088 else if(s_value==3)
1089 {
1090 if(z==1) return mOmeg+mDiPr;
1091 else return mOmeg+(z+1)*mProt;
1092 }
1093 else if(s_value==4) return mOmeg+mLamb+(z+1)*mProt;
1094 else if(!z) return mKZa+(s_value-1)*mLamb; // Multy-Lambda + K0
1095 else
1096 {
1097#ifdef qdebug
1098 if(s_value>NNS1max)
1099 {
1100 NNS1max=s_value;
1101 G4cout<<"-------->>G4QPDGCode::GetNucMass: N=-1, S="<<s_value<<">2 with Z="<<z<<G4endl;
1102 }
1103#endif
1104 return CalculateNuclMass(z,n,s_value);
1105 }
1106 }
1107 else if(!s_value)
1108 {
1109 if(!nz)
1110 {
1111 if(z==2) return mDiPi;
1112 else return mDiPi+(z-2)*mPiC;
1113 }
1114 else return mProt*nz-n*mPiC+anb;
1115 }
1116 else if(!zns) // !!! s=0 is treated above !!
1117 {
1118 if(s_value>0) return anb+s_value*mKZ+z*mPiC; // s*K0 + n*Pi+
1119 else return anb-s_value*mKM-n*mPiC; // (-s)*aK+ + (-n)*Pi+
1120 }
1121 else if(s_value==1)
1122 {
1123 if(!nz)
1124 {
1125 if(z==2) return mSpPi;
1126 else return mSpPi+(z-2)*mPiC;
1127 }
1128 else return mSigP+nz*mProt-(n+1)*mPiC;
1129 }
1130 else if(s_value==-1) return mKMa-n*mPiC+(nz-1)*mProt; // K+ + (nz-1)*P + (-n)*Pi+
1131 else if(s_value==2)
1132 {
1133 if (nz==-1) return mKsiZ+z*mPiC;
1134 else if(!nz) return mKsiZ+mProt-(n+1)*mPiC;
1135 else return mKsiZ+(nz+1)*mProt-(n+1)*mPiC;
1136 }
1137 else if(s_value==-2) return mDiKM-n*mPiC+(nz-2)*mProt;
1138 else if(s_value==3)
1139 {
1140 if (nz==-2) return mOmeg+(z+1)*mPiC; // Omega + (z+1)*Pi+
1141 else if(nz==-1) return mOmeg+mProt+z*mPiC; // Omega- + P +z*Pi+
1142 else if(!nz) return mOmeg+mDiPr+(z-1)*mPiC; // Omega- + 2P + (z-1)* Pi+
1143 else return mOmeg+(nz+2)*mProt-(n+1)*mPiC;
1144 }
1145 else if(s_value<-2) return anb-s_value*mKM-n*mPiC+(nz+s_value)*mProt;
1146 else if(s_value==4)
1147 {
1148 if (nz==-3) return mOmeg+mKZ+(z+1)*mPiC; // Om- + K0 + (z+1)*Pi+
1149 else if(nz==-2) return mOmeg+mSigP+z*mPiC; // Om- + Sig+ + z*Pi+
1150 else if(nz==-1) return mOmeg+mSigP+mProt+(z-1)*mPiC;// Om- +Sig+ +P +(z-1)*Pi+
1151 else if(!nz) return mOmeg+mSigP+mDiPr+(z-2)*mPiC;//Om- +Sig+ +2P +(z-2)*Pi+
1152 else return mOmeg+mSigP+(nz+2)*mProt-(n+2)*mPiC;//+(nz+2)P-(n+2)Pi+
1153 }
1154 // s=5: 2*KZ, Ksi0; s=6: 3*KZ, Omega-; s>6 adds K0 and Sigma+ instead of Protons
1155 else // !!All s<0 are done and s>4 can be easy extended if appear!!
1156 {
1157#ifdef qdebug
1158 if(n<NNmin)
1159 {
1160 NNmin=n;
1161 G4cout<<"---->>G4QPDGCode::GetNucMass: N="<<n<<"<-1 with Z="<<z<<", S="<<s_value<<G4endl;
1162 }
1163#endif
1164 return CalculateNuclMass(z,n,s_value);
1165 }
1166 }
1167 //return CalculateNuclMass(z,n,s_value); // @@ This is just to compare the calculation time @@
1168 if(nz >= 256 || z >= nEl) return 256000.;
1169 if(!s_value) // **************> S=0 nucleus
1170 {
1171 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1172 if(!iNin0[z]) // =--=> This element is already initialized
1173 {
1174#ifdef idebug
1175 G4cout<<"**>G4QPDGCode::GetNucM:Z="<<z<<", S=0 is initialized. F="<<iNin0[z]<<G4endl;
1176#endif
1177 G4int iNfin=iNL[z];
1178 if(iNfin>iNR) iNfin=iNR;
1179 for (G4int in=0; in<iNfin; in++) VZ0[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1180 iNin0[z]=true;
1181 }
1182 G4int dNn=n-Nmin;
1183 if(dNn<0) // --> The minimum N must be reduced
1184 {
1185#ifdef qdebug
1186 if(n<iNmin[z])
1187 {
1188 G4cout<<"-->>G4QPDGCode::GetNucM:Z="<<z<<", S=0 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1189 iNmin[z]=n;
1190 }
1191#endif
1192 return CalculateNuclMass(z,n,s_value);
1193 }
1194 else if(dNn<iNL[z]) return VZ0[z][dNn]; // Found in DAM
1195 else // --> The maximum N must be increased
1196 {
1197#ifdef qdebug
1198 if(dNn>iNmax)
1199 {
1200 G4cout<<"**>>G4QPDGCode::GetNucM:Z="<<z<<", S=0 with dN="<<dNn<<">"<<iNmax<<G4endl;
1201 iNmax=dNn;
1202 }
1203 if(dNn>iNran[z])
1204 {
1205 G4cout<<">G4QPDGCode::GetNucM:Z="<<z<<", S=0 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1206 iNran[z]=dNn;
1207 }
1208#endif
1209 return CalculateNuclMass(z,n,s_value);
1210 }
1211 }
1212 else if(s_value==1) // ******************> S=1 nucleus
1213 {
1214 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1215#ifdef pdebug
1216 G4bool pPrint = !z && !n;
1217 if(pPrint)
1218 G4cout<<"G4QPDGC::GetNucM:Nmin="<<Nmin<<",iNin1="<<iNin1[0]<<",iNL="<<iNL[0]<<G4endl;
1219#endif
1220 if(!iNin1[z]) // =--=> This element is already initialized
1221 {
1222#ifdef pdebug
1223 if(pPrint)
1224 G4cout<<"**>G4QPDGCode::GetNucM:Z="<<z<<", S=1 is initialized. F="<<iNin1[z]<<G4endl;
1225#endif
1226 G4int iNfin=iNL[z];
1227 if(iNfin>iNR) iNfin=iNR;
1228 for (G4int in=0; in<iNfin; in++) VZ1[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1229 iNin1[z]=true;
1230 }
1231 G4int dNn=n-Nmin;
1232 if(dNn<0) // --> The minimum N must be reduced
1233 {
1234#ifdef qdebug
1235 if(n<iNmin[z])
1236 {
1237 G4cout<<"-->>G4QPDGCode::GetNucM:Z="<<z<<", S=1 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1238 iNmin[z]=n;
1239 }
1240#endif
1241 return CalculateNuclMass(z,n,s_value);
1242 }
1243 else if(dNn<iNL[z]) return VZ1[z][dNn]; // Found in DAM
1244 else // --> The maximum N must be increased
1245 {
1246#ifdef qdebug
1247 if(dNn>iNmax)
1248 {
1249 G4cout<<"**>>G4QPDGCode::GetNucM:Z="<<z<<", S=1 with dN="<<dNn<<">"<<iNmax<<G4endl;
1250 iNmax=dNn;
1251 }
1252 if(dNn>iNran[z])
1253 {
1254 G4cout<<">G4QPDGCode::GetNucM:Z="<<z<<", S=1 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1255 iNran[z]=dNn;
1256 }
1257#endif
1258 return CalculateNuclMass(z,n,s_value);
1259 }
1260 }
1261 else if(s_value==-1) // ******************> S=-1 nucleus
1262 {
1263 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1264 if(!iNin9[z]) // =--=> This element is already initialized
1265 {
1266#ifdef idebug
1267 G4cout<<"*>G4QPDGCode::GetNucM:Z="<<z<<", S=-1 is initialized. F="<<iNin9[z]<<G4endl;
1268#endif
1269 G4int iNfin=iNL[z];
1270 if(iNfin>iNR) iNfin=iNR;
1271 for (G4int in=0; in<iNfin; in++) VZ9[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1272 iNin9[z]=true;
1273 }
1274 G4int dNn=n-Nmin;
1275 if(dNn<0) // --> The minimum N must be reduced
1276 {
1277#ifdef qdebug
1278 if(n<iNmin[z])
1279 {
1280 G4cout<<"->>G4QPDGCode::GetNucM:Z="<<z<<" ,S=-1 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1281 iNmin[z]=n;
1282 }
1283#endif
1284 return CalculateNuclMass(z,n,s_value);
1285 }
1286 else if(dNn<iNL[z]) return VZ9[z][dNn]; // Found in DAM
1287 else // --> The maximum N must be increased
1288 {
1289#ifdef qdebug
1290 if(dNn>iNmax)
1291 {
1292 G4cout<<"**>G4QPDGCode::GetNucM:Z="<<z<<", S=-1 with dN="<<dNn<<">"<<iNmax<<G4endl;
1293 iNmax=dNn;
1294 }
1295 if(dNn>iNran[z])
1296 {
1297 G4cout<<"G4QPDGCode::GetNucM:Z="<<z<<", S=-1 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1298 iNran[z]=dNn;
1299 }
1300#endif
1301 return CalculateNuclMass(z,n,s_value);
1302 }
1303 }
1304 else if(s_value==2) // ******************> S=2 nucleus
1305 {
1306 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1307 if(!iNin2[z]) // =--=> This element is already initialized
1308 {
1309#ifdef idebug
1310 G4cout<<"**>G4QPDGCode::GetNucM:Z="<<z<<", S=2 is initialized. F="<<iNin2[z]<<G4endl;
1311#endif
1312 G4int iNfin=iNL[z];
1313 if(iNfin>iNR) iNfin=iNR;
1314 for (G4int in=0; in<iNfin; in++) VZ2[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1315 iNin2[z]=true;
1316 }
1317 G4int dNn=n-Nmin;
1318 if(dNn<0) // --> The minimum N must be reduced
1319 {
1320#ifdef qdebug
1321 if(n<iNmin[z])
1322 {
1323 G4cout<<"-->>G4QPDGCode::GetNucM:Z="<<z<<", S=2 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1324 iNmin[z]=n;
1325 }
1326#endif
1327 return CalculateNuclMass(z,n,s_value);
1328 }
1329 else if(dNn<iNL[z]) return VZ2[z][dNn]; // Found in DAM
1330 else // --> The maximum N must be increased
1331 {
1332#ifdef qdebug
1333 if(dNn>iNmax)
1334 {
1335 G4cout<<"**>>G4QPDGCode::GetNucM:Z="<<z<<", S=2 with dN="<<dNn<<">"<<iNmax<<G4endl;
1336 iNmax=dNn;
1337 }
1338 if(dNn>iNran[z])
1339 {
1340 G4cout<<">G4QPDGCode::GetNucM:Z="<<z<<", S=2 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1341 iNran[z]=dNn;
1342 }
1343#endif
1344 return CalculateNuclMass(z,n,s_value);
1345 }
1346 }
1347 else if(s_value==-2) // ******************> S=-2 nucleus
1348 {
1349 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1350 if(!iNin8[z]) // =--=> This element is already initialized
1351 {
1352#ifdef idebug
1353 G4cout<<"*>G4QPDGCode::GetNucM:Z="<<z<<", S=-2 is initialized. F="<<iNin8[z]<<G4endl;
1354#endif
1355 G4int iNfin=iNL[z];
1356 if(iNfin>iNR) iNfin=iNR;
1357 for (G4int in=0; in<iNfin; in++) VZ8[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1358 iNin8[z]=true;
1359 }
1360 G4int dNn=n-Nmin;
1361 if(dNn<0) // --> The minimum N must be reduced
1362 {
1363#ifdef qdebug
1364 if(n<iNmin[z])
1365 {
1366 G4cout<<"->>G4QPDGCode::GetNucM:Z="<<z<<", S=-2 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1367 iNmin[z]=n;
1368 }
1369#endif
1370 return CalculateNuclMass(z,n,s_value);
1371 }
1372 else if(dNn<iNL[z]) return VZ8[z][dNn]; // Found in DAM
1373 else // --> The maximum N must be increased
1374 {
1375#ifdef qdebug
1376 if(dNn>iNmax)
1377 {
1378 G4cout<<"**>G4QPDGCode::GetNucM:Z="<<z<<", S=-2 with dN="<<dNn<<">"<<iNmax<<G4endl;
1379 iNmax=dNn;
1380 }
1381 if(dNn>iNran[z])
1382 {
1383 G4cout<<"G4QPDGCode::GetNucM:Z="<<z<<", S=-2 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1384 iNran[z]=dNn;
1385 }
1386#endif
1387 return CalculateNuclMass(z,n,s_value);
1388 }
1389 }
1390 else if(s_value==-3) // ******************> S=-3 nucleus
1391 {
1392 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1393 if(!iNin7[z]) // =--=> This element is already initialized
1394 {
1395#ifdef idebug
1396 G4cout<<"*>G4QPDGCode::GetNucM:Z="<<z<<", S=-3 is initialized. F="<<iNin7[z]<<G4endl;
1397#endif
1398 G4int iNfin=iNL[z];
1399 if(iNfin>iNR) iNfin=iNR;
1400 for (G4int in=0; in<iNfin; in++) VZ7[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1401 iNin7[z]=true;
1402 }
1403 G4int dNn=n-Nmin;
1404 if(dNn<0) // --> The minimum N must be reduced
1405 {
1406#ifdef qdebug
1407 if(n<iNmin[z])
1408 {
1409 G4cout<<"->>G4QPDGCode::GetNucM:Z="<<z<<", S=-3 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1410 iNmin[z]=n;
1411 }
1412#endif
1413 return CalculateNuclMass(z,n,s_value);
1414 }
1415 else if(dNn<iNL[z]) return VZ7[z][dNn]; // Found in DAM
1416 else // --> The maximum N must be increased
1417 {
1418#ifdef qdebug
1419 if(dNn>iNmax)
1420 {
1421 G4cout<<"**>G4QPDGCode::GetNucM:Z="<<z<<", S=-3 with dN="<<dNn<<">"<<iNmax<<G4endl;
1422 iNmax=dNn;
1423 }
1424 if(dNn>iNran[z])
1425 {
1426 G4cout<<"G4QPDGCode::GetNucM:Z="<<z<<", S=-3 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1427 iNran[z]=dNn;
1428 }
1429#endif
1430 return CalculateNuclMass(z,n,s_value);
1431 }
1432 }
1433 else if(s_value==3) // ******************> S=3 nucleus
1434 {
1435 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1436 if(!iNin3[z]) // =--=> This element is already initialized
1437 {
1438#ifdef idebug
1439 G4cout<<"**>G4QPDGCode::GetNucM:Z="<<z<<", S=3 is initialized. F="<<iNin3[z]<<G4endl;
1440#endif
1441 G4int iNfin=iNL[z];
1442 if(iNfin>iNR) iNfin=iNR;
1443 for (G4int in=0; in<iNfin; in++) VZ3[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1444 iNin3[z]=true;
1445 }
1446 G4int dNn=n-Nmin;
1447 if(dNn<0) // --> The minimum N must be reduced
1448 {
1449#ifdef qdebug
1450 if(n<iNmin[z])
1451 {
1452 G4cout<<"-->>G4QPDGCode::GetNucM:Z="<<z<<", S=3 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1453 iNmin[z]=n;
1454 }
1455#endif
1456 return CalculateNuclMass(z,n,s_value);
1457 }
1458 else if(dNn<iNL[z]) return VZ3[z][dNn]; // Found in DAM
1459 else // --> The maximum N must be increased
1460 {
1461#ifdef qdebug
1462 if(dNn>iNmax)
1463 {
1464 G4cout<<"**>>G4QPDGCode::GetNucM:Z="<<z<<", S=3 with dN="<<dNn<<">"<<iNmax<<G4endl;
1465 iNmax=dNn;
1466 }
1467 if(dNn>iNran[z])
1468 {
1469 G4cout<<">G4QPDGCode::GetNucM:Z="<<z<<", S=3 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1470 iNran[z]=dNn;
1471 }
1472#endif
1473 return CalculateNuclMass(z,n,s_value);
1474 }
1475 }
1476 else if(s_value==-4) // ******************> S=-4 nucleus
1477 {
1478 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1479 if(!iNin6[z]) // =--=> This element is already initialized
1480 {
1481#ifdef idebug
1482 G4cout<<"*>G4QPDGCode::GetNucM:Z="<<z<<", S=-4 is initialized. F="<<iNin6[z]<<G4endl;
1483#endif
1484 G4int iNfin=iNL[z];
1485 if(iNfin>iNR) iNfin=iNR;
1486 for (G4int in=0; in<iNfin; in++) VZ6[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1487 iNin6[z]=true;
1488 }
1489 G4int dNn=n-Nmin;
1490 if(dNn<0) // --> The minimum N must be reduced
1491 {
1492#ifdef qdebug
1493 if(n<iNmin[z])
1494 {
1495 G4cout<<"->>G4QPDGCode::GetNucM:Z="<<z<<", S=-4 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1496 iNmin[z]=n;
1497 }
1498#endif
1499 return CalculateNuclMass(z,n,s_value);
1500 }
1501 else if(dNn<iNL[z]) return VZ6[z][dNn]; // Found in DAM
1502 else // --> The maximum N must be increased
1503 {
1504#ifdef qdebug
1505 if(dNn>iNmax)
1506 {
1507 G4cout<<"**>G4QPDGCode::GetNucM:Z="<<z<<", S=-4 with dN="<<dNn<<">"<<iNmax<<G4endl;
1508 iNmax=dNn;
1509 }
1510 if(dNn>iNran[z])
1511 {
1512 G4cout<<"G4QPDGCode::GetNucM:Z="<<z<<", S=-4 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1513 iNran[z]=dNn;
1514 }
1515#endif
1516 return CalculateNuclMass(z,n,s_value);
1517 }
1518 }
1519 else if(s_value==4) // ******************> S=4 nucleus
1520 {
1521 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM)
1522 if(!iNin4[z]) // =--=> This element is already initialized
1523 {
1524#ifdef idebug
1525 G4cout<<"*>G4QPDGCode::GetNucM:Z="<<z<<", S=4 is initialized. F="<<iNin4[z]<<G4endl;
1526#endif
1527 G4int iNfin=iNL[z];
1528 if(iNfin>iNR) iNfin=iNR;
1529 for (G4int in=0; in<iNfin; in++) VZ4[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1530 iNin4[z]=true;
1531 }
1532 G4int dNn=n-Nmin;
1533 if(dNn<0) // --> The minimum N must be reduced
1534 {
1535#ifdef qdebug
1536 if(n<iNmin[z])
1537 {
1538 G4cout<<"-->>G4QPDGCode::GetNucM:Z="<<z<<", S=4 with N="<<n<<"<"<<iNmin[z]<<G4endl;
1539 iNmin[z]=n;
1540 }
1541#endif
1542 return CalculateNuclMass(z,n,s_value);
1543 }
1544 else if(dNn<iNL[z]) return VZ4[z][dNn]; // Found in DAM
1545 else // --> The maximum N must be increased
1546 {
1547#ifdef qdebug
1548 if(dNn>iNmax)
1549 {
1550 G4cout<<"**>>G4QPDGCode::GetNucM:Z="<<z<<", S=4 with dN="<<dNn<<">"<<iNmax<<G4endl;
1551 iNmax=dNn;
1552 }
1553 if(dNn>iNran[z])
1554 {
1555 G4cout<<">G4QPDGCode::GetNucM:Z="<<z<<", S=4 with dN="<<dNn<<">"<<iNran[z]<<G4endl;
1556 iNran[z]=dNn;
1557 }
1558#endif
1559 return CalculateNuclMass(z,n,s_value);
1560 }
1561 }
1562 else
1563 {
1564#ifdef qdebug
1565 if(s_value<Smin || s_value>Smax)
1566 {
1567 if(s_value<Smin) Smin=s_value;
1568 if(s_value>Smax) Smax=s_value;
1569 G4cout<<">>G4QPDGCode::GetNucM:Z="<<z<<" with S="<<s_value<<",N="<<n<<" (Improve)"<<G4endl;
1570 }
1571#endif
1572 rm=CalculateNuclMass(z,n,s_value);
1573 }
1574#ifdef debug
1575 G4cout<<"G4QPDGCode::GetMass:GetNuclMass="<<rm<<",Z="<<z<<",N="<<n<<",S="<<s_value<<G4endl;
1576#endif
1577 return rm;
1578} // End of GetNuclearMass

Referenced by G4QCaptureAtRest::AtRestDoIt(), G4QNucleus::CoulBarPenProb(), G4QNucleus::DecayAlphaAlpha(), G4QNucleus::DecayAlphaBar(), G4QNucleus::DecayAlphaDiN(), G4QNucleus::DecayAntiDibaryon(), G4QNucleus::DecayDibaryon(), G4QNucleus::EvaporateBaryon(), G4QNucleus::EvaporateNucleus(), G4QFragmentation::EvaporateResidual(), G4QNucleus::G4QNucleus(), GetMass(), G4QIonIonElastic::GetMeanFreePath(), G4QNucleus::GetMZNS(), GetNuclMass(), G4QInelastic::PostStepDoIt(), G4QLowEnergy::PostStepDoIt(), G4QuasiFreeRatios::Scatter(), and G4QNucleus::SplitBaryon().

◆ GetNumOfComb()

G4int G4QPDGCode::GetNumOfComb ( G4int  i,
G4int  o 
) const

Definition at line 2347 of file G4QPDGCode.cc.

2348{
2349 if(i>-1&&i<3)
2350 {
2351 G4int shiftQ=GetRelCrossIndex(i, o);
2352 G4int sQCode=theQCode; // QCode of the parent cluster
2353 if (shiftQ==7) return 0; // A parent cluster doesn't exist
2354 else if(!shiftQ) sQCode+=shiftQ; // Shift QCode of son to QCode of his parent
2355 G4QPDGCode parent; // Create a temporary (fake) parent cluster
2356 parent.InitByQCode(sQCode); // Initialize it by Q-Code
2357 G4QContent parentQC=parent.GetQuarkContent();// Quark Content of the parent cluster
2358 if (!o) return parentQC.GetD();
2359 else if(o==1) return parentQC.GetU();
2360 else if(o==2) return parentQC.GetS();
2361 else G4cerr<<"***G4QPDGCode:::GetNumOfComb: strange exiting quark o="<<o<<G4endl;
2362 }
2363 else G4cerr<<"***G4QPDGCode:::GetNumOfComb: strange entering quark i="<<i<<G4endl;
2364 return 0;
2365}
G4int GetU() const
Definition: G4QContent.hh:189
G4int GetS() const
Definition: G4QContent.hh:191
G4int GetD() const
Definition: G4QContent.hh:190
void InitByQCode(G4int QCode)
Definition: G4QPDGCode.hh:356
G4int GetRelCrossIndex(G4int i, G4int o) const
Definition: G4QPDGCode.cc:2259

Referenced by GetTotNumOfComb().

◆ GetPDGCode()

◆ GetQCode()

◆ GetQuarkContent()

G4QContent G4QPDGCode::GetQuarkContent ( ) const

Definition at line 2057 of file G4QPDGCode.cc.

2058{
2059 G4int a=0; // particle
2060 if(thePDGCode<0) a=1; // anti-particle
2061 G4int d=0;
2062 G4int u=0;
2063 G4int s_value=0;
2064 G4int ad=0;
2065 G4int au=0;
2066 G4int as=0;
2067 G4int ab=abs(thePDGCode);
2068 if (!ab)
2069 {
2070 G4cerr<<"***G4QPDGCode::GetQuarkContent: PDG=0, return (0,0,0,0,0,0)"<<G4endl;
2071 return G4QContent(0,0,0,0,0,0);
2072 }
2073 else if(ab<4) // @@ for SU(6) : ab<7
2074 {
2075 if (thePDGCode== 1) return G4QContent(1,0,0,0,0,0);
2076 else if(thePDGCode== 2) return G4QContent(0,1,0,0,0,0);
2077 else if(thePDGCode== 3) return G4QContent(0,0,1,0,0,0);
2078 else if(thePDGCode==-1) return G4QContent(0,0,0,1,0,0);
2079 else if(thePDGCode==-2) return G4QContent(0,0,0,0,1,0);
2080 else if(thePDGCode==-3) return G4QContent(0,0,0,0,0,1);
2081 }
2082 else if(ab<99)
2083 {
2084 if (thePDGCode== 11) return G4QContent(1,0,0,0,1,0);
2085 else if(thePDGCode==-11) return G4QContent(0,1,0,1,0,0);
2086 else if(thePDGCode== 13) return G4QContent(1,0,0,0,1,0);
2087 else if(thePDGCode==-13) return G4QContent(0,1,0,1,0,0);
2088 else if(thePDGCode== 15) return G4QContent(1,0,0,0,1,0);
2089 else if(thePDGCode==-15) return G4QContent(0,1,0,1,0,0);
2090#ifdef debug
2091 if (ab==22) G4cout<<"-W-G4QPDGC::GetQuarkCont: For the Photon? - Return 0"<<G4endl;
2092 else if(ab==10) G4cout<<"-W-G4QPDGC::GetQuarkCont: For Chipolino? - Return 0"<<G4endl;
2093 else G4cout<<"-W-G4QPDGCode::GetQuarkCont: For PDG="<<thePDGCode<<" Return 0"<<G4endl;
2094#endif
2095 return G4QContent(0,0,0,0,0,0); // Photon, bosons, leptons
2096 }
2097 else if(ab<80000000) // Baryons & Mesons
2098 {
2099 G4int c=ab/10; // temporary (quarks)
2100 G4int f=c%10; // (1) low quark
2101 G4int v=c/10; // (2,3) temporary(B) or (2) final(M) (high quarks, high quark)
2102 G4int t=0; // (3)prototype of highest quark (B)
2103#ifdef sdebug
2104 G4cout<<"G4QPDGCode::GetQuarkContent: a="<<ab<<", c="<<c<<", f="<<f<<", v="<<v<<G4endl;
2105#endif
2106 if(v>10) // Baryons
2107 {
2108 t=v/10; // (3) highest quark
2109 v%=10; // (2) high quark
2110 if (f==1)
2111 {
2112 if(a) ad++;
2113 else d++;
2114 }
2115 else if(f==2)
2116 {
2117 if(a) au++;
2118 else u++;
2119 }
2120 else if(f==3)
2121 {
2122 if(a) as++;
2123 else s_value++;
2124 }
2125 else G4cerr<<"*G4QPDGC::GetQCont:1 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
2126 if (v==1)
2127 {
2128 if(a) ad++;
2129 else d++;
2130 }
2131 else if(v==2)
2132 {
2133 if(a) au++;
2134 else u++;
2135 }
2136 else if(v==3)
2137 {
2138 if(a) as++;
2139 else s_value++;
2140 }
2141 else G4cerr<<"*G4QPDGC::GetQCont:2 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
2142 if (t==1)
2143 {
2144 if(a) ad++;
2145 else d++;
2146 }
2147 else if(t==2)
2148 {
2149 if(a) au++;
2150 else u++;
2151 }
2152 else if(t==3)
2153 {
2154 if(a) as++;
2155 else s_value++;
2156 }
2157 else G4cerr<<"*G4QPDGC::GetQCont:3 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
2158 return G4QContent(d,u,s_value,ad,au,as);
2159 }
2160 else // Mesons
2161 {
2162 if(f==v)
2163 {
2164 if (f==1) return G4QContent(1,0,0,1,0,0);
2165 else if(f==2) return G4QContent(0,1,0,0,1,0);
2166 else if(f==3) return G4QContent(0,0,1,0,0,1);
2167 else G4cerr<<"*G4QPDGC::GetQC:4 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
2168 }
2169 else
2170 {
2171 if (f==1 && v==2)
2172 {
2173 if(a)return G4QContent(1,0,0,0,1,0);
2174 else return G4QContent(0,1,0,1,0,0);
2175 }
2176 else if(f==1 && v==3)
2177 {
2178 if(a)return G4QContent(0,0,1,1,0,0);
2179 else return G4QContent(1,0,0,0,0,1);
2180 }
2181 else if(f==2 && v==3)
2182 {
2183 if(a)return G4QContent(0,0,1,0,1,0);
2184 else return G4QContent(0,1,0,0,0,1);
2185 }
2186 else G4cerr<<"*G4QPDGC::GetQC:5 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
2187 }
2188 }
2189 }
2190 else
2191 {
2192 G4int szn=ab-90000000;
2193 G4int ds=0;
2194 G4int dz=0;
2195 G4int dn=0;
2196 if(szn<-100000)
2197 {
2198 G4int ns_value=(-szn)/1000000+1;
2199 szn+=ns_value*1000000;
2200 ds+=ns_value;
2201 }
2202 else if(szn<-100)
2203 {
2204 G4int nz=(-szn)/1000+1;
2205 szn+=nz*1000;
2206 dz+=nz;
2207 }
2208 else if(szn<0)
2209 {
2210 G4int nn=-szn;
2211 szn=0;
2212 dn+=nn;
2213 }
2214 G4int sz =szn/1000;
2215 G4int n =szn%1000;
2216 if(n>700)
2217 {
2218 n-=1000;
2219 dz--;
2220 }
2221 G4int z =sz%1000-dz;
2222 if(z>700)
2223 {
2224 z-=1000;
2225 ds--;
2226 }
2227 s_value =sz/1000-ds;
2228 G4int b=z+n+s_value;
2229 d=n+b;
2230 u=z+b;
2231 if (d<0&&u<0&&s_value<0) return G4QContent(0,0,0,-d,-u,-s_value);
2232 else if (u<0&&s_value<0) return G4QContent(d,0,0,0,-u,-s_value);
2233 else if (d<0&&s_value<0) return G4QContent(0,u,0,-d,0,-s_value);
2234 else if (d<0&&u<0) return G4QContent(0,0,s_value,-d,-u,0);
2235 else if (u<0) return G4QContent(d,0,s_value,0,-u,0);
2236 else if (s_value<0) return G4QContent(d,u,0,0,0,-s_value);
2237 else if (d<0) return G4QContent(0,u,s_value,-d,0,0);
2238 else return G4QContent(d,u,s_value,0,0,0);
2239 }
2240 return G4QContent(0,0,0,0,0,0);
2241}

Referenced by G4QCandidate::G4QCandidate(), G4QChipolino::G4QChipolino(), G4QEnvironment::G4QEnvironment(), G4QHadron::G4QHadron(), G4QParticle::G4QParticle(), GetBaryNum(), GetCharge(), GetNumOfComb(), GetSpin(), G4QNucleus::InitCandidateVector(), G4QParticle::InitPDGParticle(), G4QParticle::InitQParticle(), G4QDiffractionRatio::ProjFragment(), G4QChipolino::SetHadronQPDG(), G4QHadron::SetQPDG(), and G4QDiffractionRatio::TargFragment().

◆ GetRelCrossIndex()

G4int G4QPDGCode::GetRelCrossIndex ( G4int  i,
G4int  o 
) const

Definition at line 2259 of file G4QPDGCode.cc.

2260{
2261 // pD,nD,DD,DD,ppDnnDpDDnDD n, p, L,S-,S+,X-,X0,O-
2262 static const G4int b01[16]={ 7,15, 7, 7, 7, 7, 7, 7, 1, 7, 7,-1, 7, 7, 7, 7};
2263 static const G4int b02[16]={ 7, 7, 7, 7, 7, 7, 7, 7, 2, 7, 7, 7, 7, 7, 7, 7};
2264 static const G4int b10[16]={18, 7, 7, 7, 7, 7, 7, 7, 7,-1, 7, 7,-2, 7, 7, 7}; // Iso+Bary
2265 static const G4int b12[16]={ 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 7, 7, 7, 7, 7, 7};
2266 static const G4int b20[16]={ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,-2, 7,-3, 7,-4, 7};
2267 static const G4int b21[16]={ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,-1,-3, 7,-3, 7, 7};
2268 // nn,np,pp,Ln,Lp,LL,nS,pS,nnpnppLnnLpnLppLLnLLpnnS
2269 static const G4int d01[16]={ 1, 1, 7, 1, 7, 7,-3, 7, 1, 7, 1, 1, 7, 1, 7,-5};
2270 static const G4int d02[16]={ 3, 3, 7, 2, 7, 7, 7, 7, 3, 3, 3, 3, 7, 7, 7, 7};
2271 static const G4int d10[16]={ 7,-1,-1, 7,-1, 7, 7,-4, 7,-1, 7,-1,-1, 7,-1, 7}; //B=2,3
2272 static const G4int d12[16]={ 7, 2, 2, 7, 1, 7, 7, 7, 2, 2, 7, 2, 2, 7, 7, 7};
2273 static const G4int d20[16]={ 7, 7, 7,-3,-3,-2, 7,-5, 7, 7, 7,-3,-3,-3,-3, 7};
2274 static const G4int d21[16]={ 7, 7, 7,-2,-2,-1,-6, 7, 7, 7,-2,-2, 7,-2,-2, 7};
2275 // nn,np,pp,Ln,Lp,nn,np,pp! n, p,nn,np,pp,Ln,Lp
2276 static const G4int m01[15]={ 1, 1, 7, 1, 7, 1, 1, 7, 1, 7, 1, 1, 7, 1, 7};// Multibaryons
2277 static const G4int m02[15]={ 3, 3, 7, 3, 3, 7, 7, 7, 3, 3, 3, 3, 7, 7, 7};// @@ Regular !
2278 static const G4int m10[15]={ 7,-1,-1, 7,-1, 7,-1,-1, 7,-1, 7,-1,-1, 7,-1};// 01->1,10->-1
2279 static const G4int m12[15]={ 7, 2, 2, 2, 2, 7, 7, 7, 2, 2, 7, 2, 2, 7, 7};// 12->2,21->-2
2280 static const G4int m20[15]={ 7, 7, 7,-3,-3, 7,-3,-3, 7, 7, 7,-3,-3,-3,-3};// 02->3,20->-3
2281 static const G4int m21[15]={ 7, 7, 7,-2,-2,-2,-2, 7, 7, 7,-2,-2, 7,-2,-2};
2282 //static const G4int fragmStart = 82; // "Isonuclei are added & Leptons are added"
2283 static const G4int fragmStart = 45; // "Isonuclei & Leptons are added, Reduced"
2284
2285 if(theQCode<fragmStart) return 7;
2286 G4int sub=theQCode-fragmStart;
2287 if ( (sub > 1 && sub < 8) || (sub > 12 && sub <16)) return 7; // SuperIso & SuperStrange
2288 G4int rel=sub; // case of nuclear baryons and isonuclei
2289 if (sub>31) rel =(sub-32)%15; // case of heavy fragments (BaryNum>3)
2290 else if(sub>15) rel = sub-16; // case of nuclear di-baryon & tri-baryons
2291#ifdef debug
2292 G4cout<<"G4QPDGCode::RelGetCrossIndex:i="<<i<<",o="<<o<<",su="<<sub<<",re="<<rel<<G4endl;
2293#endif
2294 //if ( (rel > 5 && rel < 9) || (rel > 13 && rel <16)) return 7; // SuperStrange're closed
2295 if (!i) // ==> input quark = 0(d) (d=-1/3)
2296 {
2297 if (!o) return 0; // -> output quark = 0(d) => 0 = the same cluster
2298 else if(o==1) // -> output quark = 1(u) (ch--)
2299 {
2300 if (sub<16) return b01[rel];
2301 else if(sub<32) return d01[rel];
2302 else return m01[rel];
2303 }
2304 else if(o==2)
2305 {
2306 if (sub<16) return b02[rel];
2307 else if(sub<32) return d02[rel];
2308 else return m02[rel];
2309 }
2310 }
2311 else if(i==1) // ==> input quark = 1(u) (u=2/3)
2312 {
2313 if (!o) // -> output quark = 0(d) (ch++)
2314 {
2315 if (sub<16) return b10[rel];
2316 else if(sub<32) return d10[rel];
2317 else return m10[rel];
2318 }
2319 else if(o==1) return 0; // -> output quark = 1(u) => 0 = the same cluster
2320 else if(o==2)
2321 {
2322 if (sub<16) return b12[rel];
2323 else if(sub<32) return d12[rel];
2324 else return m12[rel];
2325 }
2326 }
2327 else if(i==2)
2328 {
2329 if (!o)
2330 {
2331 if (sub<16) return b20[rel];
2332 else if(sub<32) return d20[rel];
2333 else return m20[rel];
2334 }
2335 else if(o==1)
2336 {
2337 if (sub<16) return b21[rel];
2338 else if(sub<32) return d21[rel];
2339 else return m21[rel];
2340 }
2341 else if(o==2) return 0;
2342 }
2343 return 7;
2344}

Referenced by GetNumOfComb().

◆ GetSpin()

G4int G4QPDGCode::GetSpin ( ) const
inline

Definition at line 330 of file G4QPDGCode.hh.

331{
332 if(thePDGCode<80000000) return thePDGCode%10;
333 else if(GetQuarkContent().GetTot()%2) return 3; // @@ Take into account higher resonances
334 else return 1;
335}

Referenced by G4QParticle::GetSpin().

◆ GetTotNumOfComb()

G4int G4QPDGCode::GetTotNumOfComb ( G4int  i) const

Definition at line 2368 of file G4QPDGCode.cc.

2369{
2370 G4int tot=0;
2371 if(i>-1&&i<3) for(int j=0; j<3; j++) tot+=GetNumOfComb(i, j);
2372 else G4cerr<<"***G4QPDGCode:::GetTotNumOfComb: strange entering quark i="<<i<<G4endl;
2373 return tot;
2374}
G4int GetNumOfComb(G4int i, G4int o) const
Definition: G4QPDGCode.cc:2347

◆ GetWidth()

G4double G4QPDGCode::GetWidth ( )

Definition at line 740 of file G4QPDGCode.cc.

741{
742 //static const int nW = 72;
743 //static const int nW = 80; // "Isobars"
744 //static G4double width[nQHM] = {0.,0.,0.,0.,0.,0.,0.,2.495,2.118,10.
745 // , 10., 800., 75., 350., 0., 0., .00118, 0., 0., .203
746 // , 0., 0., 0., 0., 0., 0., 0., 0., 160., 160.
747 // , 8.41, 50.5, 50.8, 4.43, 120., 120., 120., 120., 15.6, 39.
748 // , 36., 35.8, 10., 9., 0., 107., 107., 185.5, 109., 98.5
749 // , 76., 130., 130., 80., 120., 120., 120., 20., 20., 160.
750 // , 160., 168., 159., 159., 87., 300., 300., 300., 300., 200.
751 // , 180., 180., 180., 99., 99., 55., 387., 387., 208., 198.
752 // , 198., 149., 120., 120., 170., 170., 120., 120., 170., 170.};
753 // Reduced:
754 static G4double width[nQHM] = {0.,0.,0.,0.,0.,0.,0.,2.495,2.118,10.
755 , 10., 800., 75., 350., 0., 0., .00118, 0., 0., .203
756 , 0., 0., 0., 0., 0., 0., 0., 0., 160., 160.
757 , 8.41, 50.5, 50.8, 4.43, 120., 120., 120., 120., 15.6, 39.
758 , 36., 35.8, 10., 9., 0., 120., 120., 170., 170., 120.
759 , 120., 170., 170.};
760 G4int ab=abs(theQCode);
761 if(ab<nQHM) return width[ab];
762 return 0.; // @@ May be real width should be implemented for nuclei e.g. pp
763}

Referenced by G4QParticle::GetWidth(), and G4QHadron::RandomizeMass().

◆ InitByQCode()

void G4QPDGCode::InitByQCode ( G4int  QCode)
inline

Definition at line 356 of file G4QPDGCode.hh.

357{
358 theQCode = QCode;
359 thePDGCode = MakePDGCode(QCode);
360}

Referenced by GetNumOfComb(), G4QNucleus::InitCandidateVector(), and G4QParticle::InitQParticle().

◆ InitByQCont()

void G4QPDGCode::InitByQCont ( G4QContent  QCont)
inline

Definition at line 348 of file G4QPDGCode.hh.

349{
350 thePDGCode = QCont.GetSPDGCode();
351 if(!thePDGCode) theQCode = -2;
352 else theQCode = MakeQCode(thePDGCode);
353}
G4int GetSPDGCode() const
Definition: G4QContent.cc:1204

Referenced by G4QChipolino::G4QChipolino(), G4QHadron::G4QHadron(), and G4QPDGCode().

◆ MakeTwoBaryons()

std::pair< G4int, G4int > G4QPDGCode::MakeTwoBaryons ( G4int  L1,
G4int  L2,
G4int  R1,
G4int  R2 
)

Definition at line 2413 of file G4QPDGCode.cc.

2414{
2415 G4int dl=0;
2416 G4int ul=0;
2417 //G4int sl=0;
2418 if (L1==1) ++dl;
2419 else if(L1==2) ++ul;
2420 //else if(L1==3) ++sl;
2421 if (L2==1) ++dl;
2422 else if(L2==2) ++ul;
2423 //else if(L2==3) ++sl;
2424 if (R1==1) ++dl;
2425 else if(R1==2) ++ul;
2426 //else if(R1==3) ++sl;
2427 if (R2==1) ++dl;
2428 else if(R2==2) ++ul;
2429 //else if(R2==3) ++sl;
2430 if (dl==2 && ul==2) return make_pair(1114,2212); // @@ can be (2112,2224)
2431 else if(dl==1 && ul==2) return make_pair(3112,2212);
2432 else if(dl==0 && ul==2) return make_pair(3212,3212); // @@ can be (3312,2212)
2433 else if(dl==2 && ul==1) return make_pair(3222,2112);
2434 else if(dl==1 && ul==1) return make_pair(3312,2112); // @@ can be (3322,2212)
2435 else if(dl==2 && ul==0) return make_pair(3112,3112); // @@ can be (3322,1122)
2436 //#ifdef debug
2437 else G4cout<<"-Warning-G4QPDGCode::MakeTwoBaryons: Irreduceble? L1="<<L1<<",L2="<<L2
2438 <<",R1="<<R1<<",R2="<<R2<<G4endl;
2439 //#endif
2440 return make_pair(2212,2112); // @@ Just theMinimum, makeException
2441}

Referenced by G4QFragmentation::G4QFragmentation(), and G4QIonIonCollision::G4QIonIonCollision().

◆ NegPDGCode()

void G4QPDGCode::NegPDGCode ( )
inline

Definition at line 336 of file G4QPDGCode.hh.

336{thePDGCode=-thePDGCode;}

Referenced by G4QHadron::NegPDGCode().

◆ operator!=() [1/2]

G4bool G4QPDGCode::operator!= ( const G4int rhs) const
inline

Definition at line 234 of file G4QPDGCode.hh.

234{return thePDGCode!=rhs;}

◆ operator!=() [2/2]

G4bool G4QPDGCode::operator!= ( const G4QPDGCode rhs) const
inline

Definition at line 233 of file G4QPDGCode.hh.

233{return this!=&rhs;}

◆ operator*=()

G4QPDGCode G4QPDGCode::operator*= ( const G4int rhs)
inline

Definition at line 266 of file G4QPDGCode.hh.

267{
268 thePDGCode*=rhs;
269 if(!thePDGCode) theQCode = -2;
270 else theQCode = MakeQCode(thePDGCode);
271 return *this;
272}

◆ operator+=() [1/2]

G4QPDGCode G4QPDGCode::operator+= ( const G4int rhs)
inline

Definition at line 245 of file G4QPDGCode.hh.

246{
247 thePDGCode+=rhs;
248 if(!thePDGCode) theQCode = -2;
249 else theQCode = MakeQCode(thePDGCode);
250 return *this;
251}

◆ operator+=() [2/2]

G4QPDGCode G4QPDGCode::operator+= ( const G4QPDGCode rhs)
inline

Definition at line 238 of file G4QPDGCode.hh.

239{
240 thePDGCode+=rhs.GetPDGCode();
241 if(!thePDGCode) theQCode = -2;
242 else theQCode = MakeQCode(thePDGCode);
243 return *this;
244}
G4int GetPDGCode() const
Definition: G4QPDGCode.hh:326

◆ operator-=() [1/2]

G4QPDGCode G4QPDGCode::operator-= ( const G4int rhs)
inline

Definition at line 259 of file G4QPDGCode.hh.

260{
261 thePDGCode-=rhs;
262 if(!thePDGCode) theQCode = -2;
263 else theQCode = MakeQCode(thePDGCode);
264 return *this;
265}

◆ operator-=() [2/2]

G4QPDGCode G4QPDGCode::operator-= ( const G4QPDGCode rhs)
inline

Definition at line 252 of file G4QPDGCode.hh.

253{
254 thePDGCode-=rhs.GetPDGCode();
255 if(!thePDGCode) theQCode = -2;
256 else theQCode = MakeQCode(thePDGCode);
257 return *this;
258}

◆ operator/=()

G4QPDGCode G4QPDGCode::operator/= ( const G4int rhs)
inline

Definition at line 273 of file G4QPDGCode.hh.

274{
275 thePDGCode/=rhs;
276 if(!thePDGCode) theQCode = -2;
277 else theQCode = MakeQCode(thePDGCode);
278 return *this;
279}

◆ operator=()

const G4QPDGCode & G4QPDGCode::operator= ( const G4QPDGCode rhs)

Definition at line 105 of file G4QPDGCode.cc.

106{
107 if(this != &rhs) // Beware of self assignment
108 {
109 thePDGCode =rhs.thePDGCode;
110 theQCode =rhs.theQCode;
111 }
112 return *this;
113}

◆ operator==() [1/2]

G4bool G4QPDGCode::operator== ( const G4int rhs) const
inline

Definition at line 232 of file G4QPDGCode.hh.

232{return thePDGCode==rhs;}

◆ operator==() [2/2]

G4bool G4QPDGCode::operator== ( const G4QPDGCode rhs) const
inline

Definition at line 231 of file G4QPDGCode.hh.

231{return this==&rhs;}

◆ SetPDGCode()

void G4QPDGCode::SetPDGCode ( G4int  newPDGCode)
inline

Definition at line 340 of file G4QPDGCode.hh.

341{
342 thePDGCode=newPDGCode;
343 if(!thePDGCode) theQCode = -2;
344 else theQCode = MakeQCode(newPDGCode);
345}

Referenced by G4QHadron::G4QHadron(), and G4QChipolino::SetHadronPDGCode().

◆ TestRealNeutral()

G4bool G4QPDGCode::TestRealNeutral ( )
inline

Definition at line 337 of file G4QPDGCode.hh.

337{return TestRealNeutral(thePDGCode);}
G4bool TestRealNeutral()
Definition: G4QPDGCode.hh:337

Referenced by G4QHadron::TestRealNeutral(), and TestRealNeutral().


The documentation for this class was generated from the following files: