57 G4cout<<
"G4QPDGCode:Constructer is called with PDGCode="<<PDGCode<<
G4endl;
59 if(PDGCode==130) PDGCode= 311;
60 if(PDGCode==310) PDGCode=-311;
66 else if(PDGCode) theQCode=MakeQCode(PDGCode);
70 G4cout<<
"***G4QPDGCode: Constructed with PDGCode=0, QCode=-2"<<
G4endl;
75 if(PDGCode==3222)
G4cout<<
"G4QPDGCd:Con(PDG) PDG="<<PDGCode<<
", QCode="<<theQCode<<
G4endl;
81 if(f&&QCode<0)
G4cerr<<
"***G4QPDGCode::Constr. QCode="<<QCode<<
G4endl;
82 thePDGCode = MakePDGCode(QCode);
84 G4cout<<
"G4QPDGCode::Constr: PDGCode="<<thePDGCode<<
G4endl;
95 thePDGCode =rhs.thePDGCode;
96 theQCode =rhs.theQCode;
101 thePDGCode =rhs->thePDGCode;
102 theQCode =rhs->theQCode;
109 thePDGCode =rhs.thePDGCode;
110 theQCode =rhs.theQCode;
140 return s_value += rhs;
157 return s_value -= rhs;
175 return s_value *= rhs;
194 return s_value /= rhs;
207 return s_value %= rhs;
213 if(PDGCode>0 && PDGCode<999)
215 if(PDGCode==22)
return false;
217 if(p/10==p%10)
return false;
223G4int G4QPDGCode::MakePDGCode(
const G4int& QCode)
228 static const G4int modi = 85;
246 static G4int qC[modi] ={ 11, 12, 13, 14, 15, 16, 22, 23, 24, 25,
247 37, 110, 220, 330, 111, 211, 221, 311, 321, 331,
248 2112, 2212, 3122, 3112, 3212, 3222, 3312, 3322, 113, 213,
249 223, 313, 323, 333, 1114, 2114, 2214, 2224, 3124, 3114,
250 3214, 3224, 3314, 3324, 3334,
251 90002999 , 89999003 , 90003998 , 89998004 , 90003999 ,
252 89999004 , 90004998 , 89998005 , 90000001 , 90001000 ,
253 91000000 , 90999001 , 91000999 , 91999000 , 91999999 ,
254 92999000 , 90000002 , 90001001 , 90002000 , 91000001 ,
255 91001000 , 92000000 , 90999002 , 91001999 , 90001002 ,
256 90002001 , 91000002 , 91001001 , 91002000 , 92000001 ,
257 92001000 , 90999003 , 90001003 , 90002002 , 90003001 ,
258 91001002 , 91002001 , 92000002 , 92001001 , 92002000};
259 static G4int aC[15] = {1,1000,999001,1000000,1000999,1999000,1999999,
260 2,1001,2000,1000001,1001000,1999001,2000000,2000999};
263 G4cerr<<
"***G4QPDGCode::MakePDGCode: negative Q Code ="<<QCode<<
G4endl;
266 else if (QCode>=modi)
274 return 90000000+a*1001+aC[b];
282 static G4bool iniFlag=
true;
293 static G4double mass[nQHM]={.511, 0., 105.65837, 0., 1777., 0., 0., 91188., 80403., 140.00
294 ,120.000, 800., 980., 1370., 134.98, 139.57, 547.51, 497.65, 493.68, 957.78
295 ,939.5654,938.272, 1115.683, 1197.45, 1192.64, 1189.37,1321.31,1314.83, 775.5, 775.5
296 , 782.65, 896.0, 891.66, 1019.46, 1232., 1232., 1232., 1232., 1519.5, 1387.2
297 , 1383.7, 1382.8, 1535., 1531.8, 1672.45,2170.272,2171.565, 2464., 2464.,3108.544
298 ,3111.13,3402.272, 3403.565};
326 G4cout<<
"***G4QPDGCode::QHaM: negative Q-code or Q="<<nQ<<
" >= nQmax = "<<nQHM<<
G4endl;
333G4int G4QPDGCode::MakeQCode(
const G4int& PDGCode)
335 static const G4int qr[10]={0,13,19,27,33,44,50,58,64,75};
336 G4int PDGC=abs(PDGCode);
343 G4cout<<
"***G4QPDGCode::MakeQCode: Unknown in Q-System code: "<<PDGCode<<
G4endl;
347 else if (PDGC>80000000 && PDGC<100000000)
353 G4cout<<
"***G4QPDGCode::Z="<<z<<
",N="<<
n<<
",S="<<s_value<<
G4endl;
361 PDGC=90000000+s_value*1000000+z*1000+
n;
381 if (s_value==-1)
return 17;
382 else if(s_value==-2)
return -1;
389 if (s_value==-1)
return 18;
392 else if(z==2)
return -1;
405 else if(z==1)
return 54;
411 else if(!z)
return 55;
412 else if(z==1)
return 57;
418 else if(!z)
return 59;
432 else if(!z)
return 20;
433 else if(z==1)
return 21;
434 else if(z==2)
return 37;
435 else if(z==3||z==-2)
return -1;
441 else if(!z)
return 22;
442 else if(z==1)
return 25;
443 else if(z==2||z==-2)
return -1;
449 else if(!z)
return 27;
450 else if(z==1||z==-2)
return -1;
456 else if(!z||z==-2)
return -1;
465 if (PDGC==90002999)
return 45;
466 else if(PDGC==89999003)
return 46;
467 else if(PDGC==90003998)
return 47;
468 else if(PDGC==89998004)
return 48;
469 else if(PDGC==90999002)
return 67;
470 else if(PDGC==91001999)
return 68;
474 if (PDGC==90003999)
return 49;
475 else if(PDGC==89999004)
return 50;
476 else if(PDGC==90004998)
return 51;
477 else if(PDGC==89998005)
return 52;
478 else if(PDGC==90999003)
return 76;
487 if (PDGC==10)
return -1;
488 else if(PDGC==11)
return 0;
489 else if(PDGC==12)
return 1;
490 else if(PDGC==13)
return 2;
491 else if(PDGC==14)
return 3;
492 else if(PDGC==15)
return 4;
493 else if(PDGC==16)
return 5;
494 else if(PDGC==22)
return 6;
495 else if(PDGC==23)
return 7;
496 else if(PDGC==24)
return 8;
497 else if(PDGC==25)
return 9;
498 else if(PDGC==37)
return 10;
505 if (PDGC==110)
return 11;
506 else if(PDGC==220)
return 12;
507 else if(PDGC==330)
return 13;
509 G4cout<<
"***G4QPDGCode::MakeQCode: (0) Unknown in Q-System code: "<<PDGCode<<
G4endl;
517 if (p==11)
return Q+=1;
518 else if(p==21)
return Q+=2;
519 else if(p==22)
return Q+=3;
520 else if(p==31)
return Q+=4;
521 else if(p==32)
return Q+=5;
522 else if(p==33)
return Q+=6;
526 G4cout<<
"*Warning*G4QPDGCode::MakeQCode:(1)UnknownQCode for PDG="<<PDGCode<<
G4endl;
536 if (p==211)
return Q+=1;
537 else if(p==221)
return Q+=2;
538 else if(p==312)
return Q+=3;
539 else if(p==311)
return Q+=4;
540 else if(p==321)
return Q+=5;
541 else if(p==322)
return Q+=6;
542 else if(p==331)
return Q+=7;
543 else if(p==332)
return Q+=8;
547 G4cout<<
"*Warning*G4QPDGCode::MakeQCode:(2) UnknownQCode, PDG="<<PDGCode<<
G4endl;
554 if (p==111)
return Q+= 1;
555 else if(p==211)
return Q+= 2;
556 else if(p==221)
return Q+= 3;
557 else if(p==222)
return Q+= 4;
558 else if(p==312)
return Q+= 5;
559 else if(p==311)
return Q+= 6;
560 else if(p==321)
return Q+= 7;
561 else if(p==322)
return Q+= 8;
562 else if(p==331)
return Q+= 9;
563 else if(p==332)
return Q+=10;
564 else if(p==333)
return Q+=11;
568 G4cout<<
"**G4QPDGCode::MakeQCode:(3) Unknown in Q-System code:"<<PDGCode<<
G4endl;
583 G4cout<<
"***G4QPDGCode::MakeQCode: Unknown PDGCode="<<PDGCode<<
", t="<<t<<
G4endl;
592 if (s_value==0&&u==1&&d==2)
return 53;
593 else if(s_value==0&&u==2&&d==1)
return 54;
594 else if(s_value==1&&u==1&&d==1)
return 55;
595 else if(s_value==1&&u==0&&d==2)
return 56;
596 else if(s_value==1&&u==2&&d==0)
return 57;
597 else if(s_value==2&&u==0&&d==1)
return 58;
598 else if(s_value==2&&u==1&&d==0)
return 59;
599 else if(s_value==3&&u==0&&d==0)
return 60;
603 G4cout<<
"**G4QPDGCode::MakeQCode:(5) Unknown in Q-System code:"<<PDGCode<<
G4endl;
610 if (s_value==0&&u==2&&d==4)
return 61;
611 else if(s_value==0&&u==3&&d==3)
return 62;
612 else if(s_value==0&&u==4&&d==2)
return 63;
613 else if(s_value==1&&u==2&&d==3)
return 64;
614 else if(s_value==1&&u==3&&d==2)
return 65;
615 else if(s_value==2&&u==2&&d==2)
return 66;
619 G4cout<<
"**G4QPDGCode::MakeQCode:(6) Unknown in Q-System code:"<<PDGCode<<
G4endl;
626 if (s_value==0&&u==4&&d==5)
return 69;
627 else if(s_value==0&&u==5&&d==4)
return 70;
628 else if(s_value==1&&u==3&&d==5)
return 71;
629 else if(s_value==1&&u==4&&d==4)
return 72;
630 else if(s_value==1&&u==5&&d==3)
return 73;
631 else if(s_value==2&&u==3&&d==4)
return 74;
632 else if(s_value==2&&u==4&&d==3)
return 75;
633 else if(s_value==1&&u==2&&d==6)
return 76;
637 G4cout<<
"**G4QPDGCode::MakeQCode:(7) Unknown in Q-System code:"<<PDGCode<<
G4endl;
653 if (s_value==0&&u==1&&d==2)
return Q+= 9;
654 else if(s_value==0&&u==2&&d==1)
return Q+=10;
655 else if(s_value==1&&u==0&&d==2)
return Q+=11;
656 else if(s_value==1&&u==1&&d==1)
return Q+=12;
657 else if(s_value==1&&u==2&&d==0)
return Q+=13;
658 else if(s_value==2&&u==0&&d==1)
return Q+=14;
659 else if(s_value==2&&u==1&&d==0)
return Q+=15;
663 G4cout<<
"**G4QPDGCode::MakeQCode:(8) Unknown in Q-System code:"<<PDGCode<<
G4endl;
670 if (s_value==0&&u==-1&&d== 1)
return Q+=1;
671 else if(s_value==0&&u== 0&&d== 0)
return Q+=2;
672 else if(s_value==0&&u== 1&&d==-1)
return Q+=3;
673 else if(s_value==1&&u==-1&&d== 0)
return Q+=4;
674 else if(s_value==1&&u== 0&&d==-1)
return Q+=5;
675 else if(s_value==2&&u==-2&&d== 0)
return Q+=6;
676 else if(s_value==2&&u==-1&&d==-1)
return Q+=7;
677 else if(s_value==2&&u== 0&&d==-2)
return Q+=8;
681 G4cout<<
"**G4QPDGCode::MakeQCode:(9) Unknown in Q-System code:"<<PDGCode<<
G4endl;
688 G4cout<<
"*Warning*G4QPDGCode::MakeQCode:() Unknown Q Code for PDG = "<<PDGCode<<
G4endl;
697 G4bool pPrint = thePDGCode == 3222 || ab == 25;
699 G4cout<<
"G4QPDGCode::GetMass: Mass for Q="<<ab<<
",PDG="<<thePDGCode<<
",N="<<nQHM<<
G4endl;
701 if ( (ab < 0 && thePDGCode < 80000000) || !thePDGCode) {
703 if(thePDGCode!=10 && pPrint)
704 G4cout<<
"**G4QPDGCode::GetMass:m=100000.,QC="<<theQCode<<
",PDG="<<thePDGCode<<
G4endl;
708 else if(ab>-1 && ab<nQHM)
713 if(thePDGCode == 3222 || ab == 25)
714 G4cout<<
"G4QPDGCode::GetMa:m="<<mass<<
",Q="<<theQCode<<
",PDG="<<thePDGCode<<
G4endl;
719 if(thePDGCode==90000000)
723 G4cout<<
"G4QPDGCode::GetMass:***m=0, QC="<<theQCode<<
",PDG="<<thePDGCode<<
G4endl;
734 G4cout<<
"G4QPDG::GetM:PDG="<<thePDGCode<<
"=>Z="<<z<<
",N="<<n<<
",S="<<s_value<<
",M="<<m_value<<
G4endl;
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.
760 G4int ab=abs(theQCode);
761 if(ab<nQHM)
return width[ab];
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;
800 static const G4int iNR=76;
801 static const G4int nEl = 105;
802 static const G4int iNF[nEl]={0,0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
803 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
804 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
805 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55,
806 56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70,
807 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
808 86 , 87, 88, 89, 91, 94, 98,103,109,115,122,128,134,140,146};
810 static G4int iNmin[nEl]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
811 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
812 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
813 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55,
814 56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70,
815 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
816 86 , 87, 88, 89, 91, 94, 98,103,109,115,122,128,134,140,146};
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,
819 34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52,
820 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
821 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72,
822 73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76,
823 76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69,
824 68 , 68, 68, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23};
826 static const G4int iNL[nEl]={19,20,21,22,23,24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
827 34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52,
828 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
829 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72,
830 73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76,
831 76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69,
832 68 , 68, 68, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23};
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};
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};
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};
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};
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};
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};
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};
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};
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};
925 static G4int Smin=-1;
926 static G4int Smax= 2;
927 static G4int NZmin= 0;
928 static G4int NNmin= 0;
929 static G4int NZS1max= 0;
930 static G4int NNS1max= 0;
935 G4int zns=nz+s_value;
950 if(n==1)
return mPiC;
951 else return mPiC+(n-1)*mNeut;
956 else if(n==1)
return mSiM;
957 else if(n==2)
return mSmN ;
958 else if(n==3)
return mSmNN;
959 else return mSigM+mNeut*(n-1);
964 else if(n==1)
return mKsiM+mNeut;
965 else if(n==2)
return mKsiM+mNeut+mNeut;
966 else return mKsiM+mNeut*n;
970 if (nz==2)
return mDiKZ+mPiC;
971 else return mDiKZ+mPiC+(nz-2)*mProt;
975 if (n==-1)
return mOmM;
976 else if(!n )
return mOmN;
977 else if(n==-2)
return mDiKZ+mKM;
978 else return mOmeg+mNeut*(n+2);
982 if(n==-2)
return mOmeg+mKM;
983 else if(n==-1)
return mOmeg+mLamb;
984 else return mOmeg+mLamb+(n+1)*mNeut;
986 else if(!n)
return mOmeg+(s_value-2)*mLamb;
993 G4cout<<
"-------->>G4QPDGCode::GetNucMass: Z=-1, S="<<s_value<<
">2 with N="<<n<<
G4endl;
996 return CalculateNuclMass(z,n,s_value);
1003 if(n==2)
return mDiPi;
1004 else return mDiPi+(n-2)*mPiC;
1006 else return mNeut*nz-z*mPiC+anb;
1010 if(s_value>0)
return anb+s_value*mKM+n*mPiC;
1011 else return anb-s_value*mKZ-z*mPiC;
1017 if(n==2)
return mSmPi;
1018 else return mSmPi+(n-2)*mPiC;
1020 else return mSigM+nz*mNeut-(z+1)*mPiC;
1022 else if(s_value==-1)
return mKZa-z*mPiC+(nz-1)*mNeut;
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;
1029 else if(s_value==-2)
return mDiKZ-z*mPiC+(nz-2)*mNeut;
1032 if (nz==-2)
return mOmeg+(n+1)*mPiC;
1033 else if(nz==-1)
return mOmeg+mNeut+n*mPiC;
1034 else if(!nz)
return mOmeg+mDiNt+(n-1)*mPiC;
1035 else return mOmeg+(nz+2)*mProt-(z+1)*mPiC;
1037 else if(s_value<-2)
return anb-s_value*mKZ-z*mPiC+(nz+s_value)*mNeut;
1040 if (nz==-3)
return mOmeg+mKM+(n+1)*mPiC;
1041 else if(nz==-2)
return mOmeg+mSigM+n*mPiC;
1042 else if(nz==-1)
return mOmeg+mSigM+mNeut+(n-1)*mPiC;
1043 else if(!nz)
return mOmeg+mSigM+mDiNt+(n-2)*mPiC;
1044 else return mOmeg+mSigM+(nz+2)*mDiNt-(z+2)*mPiC;
1053 G4cout<<
"---->>G4QPDGCode::GetNucMass: Z="<<z<<
"<-1 with N="<<n<<
", S="<<s_value<<
G4endl;
1056 return CalculateNuclMass(z,n,s_value);
1065 if(z==1)
return mPiC;
1066 else return mPiC+(z-1)*mProt;
1071 else if(z==1)
return mSiP;
1072 else if(z==2)
return mSpP ;
1073 else if(z==3)
return mSpPP;
1074 else return mSigP+mProt*(z-1);
1079 else if(z==1)
return mKsiZ+mProt;
1080 else if(z==2)
return mKsiZ+mProt+mProt;
1081 else return mKsiZ+mProt*z;
1083 else if(s_value==-2)
1085 if (nz==2)
return mDiKM+mPiC;
1086 else return mDiKM+mPiC+(nz-2)*mProt;
1090 if(z==1)
return mOmeg+mDiPr;
1091 else return mOmeg+(z+1)*mProt;
1093 else if(s_value==4)
return mOmeg+mLamb+(z+1)*mProt;
1094 else if(!z)
return mKZa+(s_value-1)*mLamb;
1101 G4cout<<
"-------->>G4QPDGCode::GetNucMass: N=-1, S="<<s_value<<
">2 with Z="<<z<<
G4endl;
1104 return CalculateNuclMass(z,n,s_value);
1111 if(z==2)
return mDiPi;
1112 else return mDiPi+(z-2)*mPiC;
1114 else return mProt*nz-n*mPiC+anb;
1118 if(s_value>0)
return anb+s_value*mKZ+z*mPiC;
1119 else return anb-s_value*mKM-n*mPiC;
1125 if(z==2)
return mSpPi;
1126 else return mSpPi+(z-2)*mPiC;
1128 else return mSigP+nz*mProt-(n+1)*mPiC;
1130 else if(s_value==-1)
return mKMa-n*mPiC+(nz-1)*mProt;
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;
1137 else if(s_value==-2)
return mDiKM-n*mPiC+(nz-2)*mProt;
1140 if (nz==-2)
return mOmeg+(z+1)*mPiC;
1141 else if(nz==-1)
return mOmeg+mProt+z*mPiC;
1142 else if(!nz)
return mOmeg+mDiPr+(z-1)*mPiC;
1143 else return mOmeg+(nz+2)*mProt-(n+1)*mPiC;
1145 else if(s_value<-2)
return anb-s_value*mKM-n*mPiC+(nz+s_value)*mProt;
1148 if (nz==-3)
return mOmeg+mKZ+(z+1)*mPiC;
1149 else if(nz==-2)
return mOmeg+mSigP+z*mPiC;
1150 else if(nz==-1)
return mOmeg+mSigP+mProt+(z-1)*mPiC;
1151 else if(!nz)
return mOmeg+mSigP+mDiPr+(z-2)*mPiC;
1152 else return mOmeg+mSigP+(nz+2)*mProt-(n+2)*mPiC;
1161 G4cout<<
"---->>G4QPDGCode::GetNucMass: N="<<n<<
"<-1 with Z="<<z<<
", S="<<s_value<<
G4endl;
1164 return CalculateNuclMass(z,n,s_value);
1168 if(nz >= 256 || z >= nEl)
return 256000.;
1175 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=0 is initialized. F="<<iNin0[z]<<
G4endl;
1178 if(iNfin>iNR) iNfin=iNR;
1179 for (
G4int in=0; in<iNfin; in++) VZ0[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1188 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=0 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1192 return CalculateNuclMass(z,n,s_value);
1194 else if(dNn<iNL[z])
return VZ0[z][dNn];
1200 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=0 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1205 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=0 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1209 return CalculateNuclMass(z,n,s_value);
1216 G4bool pPrint = !z && !n;
1218 G4cout<<
"G4QPDGC::GetNucM:Nmin="<<Nmin<<
",iNin1="<<iNin1[0]<<
",iNL="<<iNL[0]<<
G4endl;
1224 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=1 is initialized. F="<<iNin1[z]<<
G4endl;
1227 if(iNfin>iNR) iNfin=iNR;
1228 for (
G4int in=0; in<iNfin; in++) VZ1[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1237 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=1 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1241 return CalculateNuclMass(z,n,s_value);
1243 else if(dNn<iNL[z])
return VZ1[z][dNn];
1249 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=1 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1254 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=1 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1258 return CalculateNuclMass(z,n,s_value);
1261 else if(s_value==-1)
1267 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=-1 is initialized. F="<<iNin9[z]<<
G4endl;
1270 if(iNfin>iNR) iNfin=iNR;
1271 for (
G4int in=0; in<iNfin; in++) VZ9[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1280 G4cout<<
"->>G4QPDGCode::GetNucM:Z="<<z<<
" ,S=-1 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1284 return CalculateNuclMass(z,n,s_value);
1286 else if(dNn<iNL[z])
return VZ9[z][dNn];
1292 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=-1 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1297 G4cout<<
"G4QPDGCode::GetNucM:Z="<<z<<
", S=-1 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1301 return CalculateNuclMass(z,n,s_value);
1310 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=2 is initialized. F="<<iNin2[z]<<
G4endl;
1313 if(iNfin>iNR) iNfin=iNR;
1314 for (
G4int in=0; in<iNfin; in++) VZ2[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1323 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=2 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1327 return CalculateNuclMass(z,n,s_value);
1329 else if(dNn<iNL[z])
return VZ2[z][dNn];
1335 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=2 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1340 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=2 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1344 return CalculateNuclMass(z,n,s_value);
1347 else if(s_value==-2)
1353 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=-2 is initialized. F="<<iNin8[z]<<
G4endl;
1356 if(iNfin>iNR) iNfin=iNR;
1357 for (
G4int in=0; in<iNfin; in++) VZ8[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1366 G4cout<<
"->>G4QPDGCode::GetNucM:Z="<<z<<
", S=-2 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1370 return CalculateNuclMass(z,n,s_value);
1372 else if(dNn<iNL[z])
return VZ8[z][dNn];
1378 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=-2 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1383 G4cout<<
"G4QPDGCode::GetNucM:Z="<<z<<
", S=-2 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1387 return CalculateNuclMass(z,n,s_value);
1390 else if(s_value==-3)
1396 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=-3 is initialized. F="<<iNin7[z]<<
G4endl;
1399 if(iNfin>iNR) iNfin=iNR;
1400 for (
G4int in=0; in<iNfin; in++) VZ7[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1409 G4cout<<
"->>G4QPDGCode::GetNucM:Z="<<z<<
", S=-3 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1413 return CalculateNuclMass(z,n,s_value);
1415 else if(dNn<iNL[z])
return VZ7[z][dNn];
1421 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=-3 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1426 G4cout<<
"G4QPDGCode::GetNucM:Z="<<z<<
", S=-3 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1430 return CalculateNuclMass(z,n,s_value);
1439 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=3 is initialized. F="<<iNin3[z]<<
G4endl;
1442 if(iNfin>iNR) iNfin=iNR;
1443 for (
G4int in=0; in<iNfin; in++) VZ3[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1452 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=3 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1456 return CalculateNuclMass(z,n,s_value);
1458 else if(dNn<iNL[z])
return VZ3[z][dNn];
1464 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=3 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1469 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=3 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1473 return CalculateNuclMass(z,n,s_value);
1476 else if(s_value==-4)
1482 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=-4 is initialized. F="<<iNin6[z]<<
G4endl;
1485 if(iNfin>iNR) iNfin=iNR;
1486 for (
G4int in=0; in<iNfin; in++) VZ6[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1495 G4cout<<
"->>G4QPDGCode::GetNucM:Z="<<z<<
", S=-4 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1499 return CalculateNuclMass(z,n,s_value);
1501 else if(dNn<iNL[z])
return VZ6[z][dNn];
1507 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=-4 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1512 G4cout<<
"G4QPDGCode::GetNucM:Z="<<z<<
", S=-4 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1516 return CalculateNuclMass(z,n,s_value);
1525 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=4 is initialized. F="<<iNin4[z]<<
G4endl;
1528 if(iNfin>iNR) iNfin=iNR;
1529 for (
G4int in=0; in<iNfin; in++) VZ4[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1538 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=4 with N="<<n<<
"<"<<iNmin[z]<<
G4endl;
1542 return CalculateNuclMass(z,n,s_value);
1544 else if(dNn<iNL[z])
return VZ4[z][dNn];
1550 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=4 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1555 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=4 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1559 return CalculateNuclMass(z,n,s_value);
1565 if(s_value<Smin || s_value>Smax)
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;
1572 rm=CalculateNuclMass(z,n,s_value);
1575 G4cout<<
"G4QPDGCode::GetMass:GetNuclMass="<<rm<<
",Z="<<z<<
",N="<<n<<
",S="<<s_value<<
G4endl;
1583 static const G4double mP = QHaM(21);
1584 static const G4double mN = QHaM(20);
1585 static const G4double mL = QHaM(22);
1595 static const G4double mSm = QHaM(23);
1596 static const G4double mSp = QHaM(25);
1597 static const G4double dSP = mSp+mP;
1598 static const G4double dSN = mSm+mN;
1599 static const G4double dnS = dSN+mN;
1600 static const G4double dpS = dSP+mP;
1601 static const G4double mXm = QHaM(26);
1602 static const G4double mXz = QHaM(27);
1603 static const G4double mOm = QHaM(44);
1604 static const G4double dXN = mXm+mN;
1605 static const G4double dXP = mXz+mP;
1606 static const G4double dOP = mOm+mP;
1607 static const G4double dON = mOm+mN;
1608 static const G4double mK = QHaM(18);
1609 static const G4double mK0 = QHaM(17);
1610 static const G4double mPi = QHaM(15);
1660 static const G4double um_value=931.49432;
1676 G4cout<<
"***G4QPDGCode::CalcNuclMass: Z="<<z<<
">107, N="<<n<<
", S="<<s_value<<
G4endl;
1684 G4cout<<
"G4QPDGCode::CalcNuclMass called with Z="<<Z<<
",N="<<N<<
", S="<<S<<
G4endl;
1694 else if(!N&&!Z&&S==1)
return mL;
1695 else if(!N&&Z==1&&!S)
return mP;
1696 else if(N==1&&!Z&&!S)
return mN;
1697 else if(!N&&!Z&&S>1)
return mL*S+eps;
1698 else if(!N&&Z>1&&!S)
return mP*Z+eps;
1699 else if(N>1&&!Z&&!S)
return mN*N+eps;
1715 if (!S&&Z<0)
return mPi*N;
1716 else if(!S&&N<0)
return mPi*Z;
1717 else if ( (N == 1 && S == -1) || (N == -1 && S == 1) )
1719 else if ( (S == 1 && Z == -1) || (S == -1 && Z == 1) )
1723 if (-Z>S)
return S*mK-(S+Z)*mPi+eps;
1724 else if(Z>=0)
return S*mK0+Z*mPi+eps;
1725 else return (S+Z)*mK0-Z*mK+eps;
1729 if (Z>-S)
return -S*mK+(S+Z)*mPi+eps;
1730 else if(Z<=0)
return -S*mK0-Z*mPi+eps;
1731 else return -(S+Z)*mK0+Z*mK+eps;
1736 if (Z== 1 && N== 0 && S== 0)
return mP;
1737 else if(Z== 0 && N== 1 && S== 0)
return mN;
1738 else if(Z== 0 && N== 0 && S== 1)
return mL;
1739 else if(Z== 1 && N==-1 && S== 1)
return mSp;
1740 else if(Z==-1 && N== 1 && S== 1)
return mSm;
1741 else if(Z== 0 && N==-1 && S== 2)
return mXz;
1742 else if(Z==-1 && N== 0 && S== 2)
return mXm;
1743 else if(Z==-1 && N==-1 && S== 3)
return mOm;
1744 else if(!S&&Z<0)
return mN-mPi*Z+eps;
1745 else if(!S&&N<0)
return mP-mPi*N+eps;
1748 if (N>1)
return mSm+(N-1)*mPi+eps;
1749 else if(Z>1)
return mSp+(Z-1)*mPi+eps;
1753 if (N>0)
return mXm+N*mPi+eps;
1754 else if(Z>0)
return mXz+Z*mPi+eps;
1758 if (N>-1)
return mOm+(N+1)*mPi+eps;
1759 else if(Z>-1)
return mOm+(Z+1)*mPi+eps;
1763 if (-Z>S-2)
return mOm+(S-3)*mK +(2-Z-S)*mPi+eps;
1764 else if(Z>-1)
return mOm+(S-3)*mK0+(Z+1)+mPi+eps;
1765 else return mOm+(S+Z-2)*mK0-(Z+1)*mK+eps;
1770 if (Z== 2 && N== 0 && S== 0)
return dmP;
1772 else if(Z== 1 && N== 1 && S== 0)
return mD;
1773 else if(Z== 0 && N== 2 && S== 0)
return dmN;
1774 else if(Z== 2 && N==-1 && S== 1)
return dSP;
1775 else if(Z== 1 && N== 0 && S== 1)
return dLP;
1776 else if(Z== 0 && N== 1 && S== 1)
return dLN;
1777 else if(Z==-1 && N== 2 && S== 1)
return dSN;
1778 else if(Z== 1 && N==-1 && S== 2)
return dXP;
1779 else if(Z== 0 && N== 0 && S== 2)
return dmL;
1780 else if(Z==-1 && N== 1 && S== 2)
return dXN;
1781 else if(Z== 0 && N==-1 && S== 3)
return dOP;
1782 else if(Z==-1 && N== 0 && S== 3)
return dON;
1783 else if(!S&&Z<0)
return dmN-mPi*Z+eps;
1784 else if(!S&&N<0)
return dmP-mPi*N+eps;
1787 if (N>2)
return dSP+(N-2)*mPi+eps;
1788 else if(Z>2)
return dSN+(Z-1)*mPi+eps;
1792 if (N>1)
return dXN+(N-1)*mPi+eps;
1793 else if(Z>1)
return dXP+(Z-1)*mPi+eps;
1797 if (N>0)
return dON+N*mPi+eps;
1798 else if(Z>0)
return dOP+Z*mPi+eps;
1802 if (-Z>S-2)
return dON+(S-3)*mK +(2-Z-S)*mPi+eps;
1803 else if(Z>0)
return dOP+(S-3)*mK0+Z+mPi+eps;
1804 else return dOP+(S+Z-3)*mK0-Z*mK+eps;
1818 if (Z==1 && N== 2)
return mT;
1819 else if(Z==2 && N== 1)
return mHe3;
1821 if(S== 1 && Z==-1 && N== 3)
1823 if (Z==-1 && N== 3)
return dnS;
1824 else if(Z== 3 && N==-1)
return dpS;
1829 if(Z==2 && N==2)
return mAl;
1830 else if(Z<0)
return A*mN-Z*mPi+eps;
1831 else if(Z>A)
return A*mP+(Z-A)*mPi+eps;
1847 km_value=Zm*mK-(S+Zm)*mK0;
1908 G4cout<<
"***G4QPDGC::CalcNuclMass:Antimatter? Z="<<Z<<
",N="<<N<<
",S="<<S<<
G4endl;
1961 G4cout<<
"***G4QPDGC::CalcNuclMass:Antimatter? N="<<N<<
",Z="<<Z<<
",S="<<S<<
G4endl;
1979 if (!A)
return k+S*mL+S*eps;
1982 if ( (A+S < 1 && k==0.) || Z < 0 || N < 0 )
1985 G4cout<<
"**G4QPDGCode::CalcNuclMass:A="<<A<<
"<1 || Z="<<Z<<
"<0 || N="<<N<<
"<0"<<
G4endl;
1990 if (!Z)
return k+N*(mN+.1)+S*(mL+.1);
1991 else if(!N)
return k+Z*(mP+1.)+S*(mL+.1);
1998 if(A==256 && Z==128) m_value=256000.;
2019 if(!Am)
return km_value+eps;
2020 mm_value=km_value+Am*um_value;
2022 if ( (Am < 1 && km_value==0.) || Zm < 0 || Nm < 0 )
2025 G4cerr<<
"*G4QPDGCode::CalcNucM:A="<<Am<<
"<1 || Z="<<Zm<<
"<0 || N="<<Nm<<
"<0"<<
G4endl;
2028 if (!Zm)
return km_value+Nm*(mN+.1);
2029 else if(!Nm)
return km_value+Zm*(mP+1.);
2040 if(m_value>mm_value) m_value=mm_value;
2045 else if(A==3) bs=a3;
2046 else if(A>3) bs=b7*exp(-b8/(A+1.));
2050 G4cout<<
"G4QPDGCode::CalcNuclMass: >->-> OUT <-<-< m="<<m_value<<
G4endl;
2060 if(thePDGCode<0) a=1;
2067 G4int ab=abs(thePDGCode);
2070 G4cerr<<
"***G4QPDGCode::GetQuarkContent: PDG=0, return (0,0,0,0,0,0)"<<
G4endl;
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);
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);
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;
2097 else if(ab<80000000)
2104 G4cout<<
"G4QPDGCode::GetQuarkContent: a="<<ab<<
", c="<<c<<
", f="<<f<<
", v="<<v<<
G4endl;
2125 else G4cerr<<
"*G4QPDGC::GetQCont:1 PDG="<<thePDGCode<<
","<<f<<
","<<v<<
","<<t<<
G4endl;
2141 else G4cerr<<
"*G4QPDGC::GetQCont:2 PDG="<<thePDGCode<<
","<<f<<
","<<v<<
","<<t<<
G4endl;
2157 else G4cerr<<
"*G4QPDGC::GetQCont:3 PDG="<<thePDGCode<<
","<<f<<
","<<v<<
","<<t<<
G4endl;
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;
2176 else if(f==1 && v==3)
2181 else if(f==2 && v==3)
2186 else G4cerr<<
"*G4QPDGC::GetQC:5 PDG="<<thePDGCode<<
","<<f<<
","<<v<<
","<<t<<
G4endl;
2192 G4int szn=ab-90000000;
2198 G4int ns_value=(-szn)/1000000+1;
2199 szn+=ns_value*1000000;
2204 G4int nz=(-szn)/1000+1;
2221 G4int z =sz%1000-dz;
2227 s_value =sz/1000-ds;
2228 G4int b=z+n+s_value;
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);
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;
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;
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};
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};
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};
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};
2276 static const G4int m01[15]={ 1, 1, 7, 1, 7, 1, 1, 7, 1, 7, 1, 1, 7, 1, 7};
2277 static const G4int m02[15]={ 3, 3, 7, 3, 3, 7, 7, 7, 3, 3, 3, 3, 7, 7, 7};
2278 static const G4int m10[15]={ 7,-1,-1, 7,-1, 7,-1,-1, 7,-1, 7,-1,-1, 7,-1};
2279 static const G4int m12[15]={ 7, 2, 2, 2, 2, 7, 7, 7, 2, 2, 7, 2, 2, 7, 7};
2280 static const G4int m20[15]={ 7, 7, 7,-3,-3, 7,-3,-3, 7, 7, 7,-3,-3,-3,-3};
2281 static const G4int m21[15]={ 7, 7, 7,-2,-2,-2,-2, 7, 7, 7,-2,-2, 7,-2,-2};
2283 static const G4int fragmStart = 45;
2285 if(theQCode<fragmStart)
return 7;
2286 G4int sub=theQCode-fragmStart;
2287 if ( (sub > 1 && sub < 8) || (sub > 12 && sub <16))
return 7;
2289 if (sub>31) rel =(sub-32)%15;
2290 else if(sub>15) rel = sub-16;
2292 G4cout<<
"G4QPDGCode::RelGetCrossIndex:i="<<i<<
",o="<<o<<
",su="<<sub<<
",re="<<rel<<
G4endl;
2300 if (sub<16)
return b01[rel];
2301 else if(sub<32)
return d01[rel];
2302 else return m01[rel];
2306 if (sub<16)
return b02[rel];
2307 else if(sub<32)
return d02[rel];
2308 else return m02[rel];
2315 if (sub<16)
return b10[rel];
2316 else if(sub<32)
return d10[rel];
2317 else return m10[rel];
2319 else if(o==1)
return 0;
2322 if (sub<16)
return b12[rel];
2323 else if(sub<32)
return d12[rel];
2324 else return m12[rel];
2331 if (sub<16)
return b20[rel];
2332 else if(sub<32)
return d20[rel];
2333 else return m20[rel];
2337 if (sub<16)
return b21[rel];
2338 else if(sub<32)
return d21[rel];
2339 else return m21[rel];
2341 else if(o==2)
return 0;
2352 G4int sQCode=theQCode;
2353 if (shiftQ==7)
return 0;
2354 else if(!shiftQ) sQCode+=shiftQ;
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;
2363 else G4cerr<<
"***G4QPDGCode:::GetNumOfComb: strange entering quark i="<<i<<
G4endl;
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;
2379 if(nucPDG>80000000&&nucPDG<100000000)
2385 if(r==90000000)
return;
2389 if(cn>500) cn-=1000;
2392 if(r==90000000)
return;
2394 G4int cz =r%1000000;
2397 if(cz>500000) cz-=1000000;
2400 if(r==90000000)
return;
2402 G4int cs =r%10000000;
2405 if(cs>5000000) cs-=10000000;
2419 else if(L1==2) ++ul;
2422 else if(L2==2) ++ul;
2425 else if(R1==2) ++ul;
2428 else if(R2==2) ++ul;
2430 if (dl==2 && ul==2)
return make_pair(1114,2212);
2431 else if(dl==1 && ul==2)
return make_pair(3112,2212);
2432 else if(dl==0 && ul==2)
return make_pair(3212,3212);
2433 else if(dl==2 && ul==1)
return make_pair(3222,2112);
2434 else if(dl==1 && ul==1)
return make_pair(3312,2112);
2435 else if(dl==2 && ul==0)
return make_pair(3112,3112);
2437 else G4cout<<
"-Warning-G4QPDGCode::MakeTwoBaryons: Irreduceble? L1="<<L1<<
",L2="<<L2
2438 <<
",R1="<<R1<<
",R2="<<R2<<
G4endl;
2440 return make_pair(2212,2112);
G4int operator-(const G4QPDGCode &lhs, const G4QPDGCode &rhs)
G4int operator+(const G4QPDGCode &lhs, const G4QPDGCode &rhs)
G4int operator%(const G4QPDGCode &lhs, const G4int &rhs)
G4int operator*(const G4QPDGCode &lhs, const G4QPDGCode &rhs)
ostream & operator<<(ostream &lhs, G4QPDGCode &rhs)
G4int operator/(const G4QPDGCode &lhs, const G4QPDGCode &rhs)
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
static G4Deuteron * Deuteron()
static G4Electron * Electron()
static G4EtaPrime * EtaPrime()
static G4KaonMinus * KaonMinus()
static G4KaonZero * KaonZero()
static G4Lambda * Lambda()
static G4MuonMinus * MuonMinus()
static G4NeutrinoE * NeutrinoE()
static G4NeutrinoMu * NeutrinoMu()
static G4NeutrinoTau * NeutrinoTau()
static G4Neutron * Neutron()
static G4double GetNuclearMass(const G4double A, const G4double Z)
static G4OmegaMinus * OmegaMinus()
G4double GetPDGMass() const
static G4PionMinus * PionMinus()
static G4PionZero * PionZero()
static G4Proton * Proton()
G4QContent GetQuarkContent() const
G4QContent GetExQContent(G4int i, G4int o) const
void InitByQCont(G4QContent QCont)
G4int GetNumOfComb(G4int i, G4int o) const
G4QPDGCode(G4int PDGCode=0)
void InitByQCode(G4int QCode)
const G4QPDGCode & operator=(const G4QPDGCode &rhs)
G4double GetNuclMass(G4int Z, G4int N, G4int S)
void ConvertPDGToZNS(G4int PDG, G4int &z, G4int &n, G4int &s)
G4int GetRelCrossIndex(G4int i, G4int o) const
G4int GetTotNumOfComb(G4int i) const
std::pair< G4int, G4int > MakeTwoBaryons(G4int L1, G4int L2, G4int R1, G4int R2)
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
static G4SigmaZero * SigmaZero()
static G4TauMinus * TauMinus()
static G4Triton * Triton()
static G4XiMinus * XiMinus()
static G4XiZero * XiZero()