45 theQuarkContent[flavor] = 0;
46 theAntiQuarkContent[flavor] = 0;
60 theParticleType = particleType;
65 theQuarkContent[flavor] = 0;
66 theAntiQuarkContent[flavor] = 0;
70 if ((theParticleType ==
"nucleus") || (theParticleType ==
"anti_nucleus"))
72 return CheckForNuclei();
79 if (theParticleType ==
"quarks")
81 return CheckForQuarks();
83 else if (theParticleType ==
"diquarks")
85 return CheckForDiQuarks();
87 else if (theParticleType ==
"gluons")
91 else if (theParticleType ==
"meson")
93 return CheckForMesons();
96 else if (theParticleType ==
"baryon")
98 return CheckForBaryons();
105G4int G4PDGCodeChecker::CheckForBaryons()
109 if ((quark1==0)||(quark2==0)||(quark3==0))
114 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
115 G4cout <<
" meson has three quark ";
123 if (std::abs(tempPDGcode)%10000 == 3122)
126 quark2=2; quark3 = 1; spin = 1;
127 }
else if (std::abs(tempPDGcode)%10000 == 3124) {
129 quark2=2; quark3 = 1; spin = 3;
130 }
else if (std::abs(tempPDGcode)%10000 == 3126) {
132 quark2=2; quark3 = 1; spin = 5;
133 }
else if (std::abs(tempPDGcode)%10000 == 3128) {
135 quark2=2; quark3 = 1; spin = 7;
136 }
else if (std::abs(tempPDGcode)%10000 == 4122) {
138 quark2=2; quark3 = 1; spin = 1;
139 }
else if (std::abs(tempPDGcode)%10000 == 5122) {
141 quark2=2; quark3 = 1; spin = 1;
142 }
else if (std::abs(tempPDGcode)%10000 == 4132) {
144 quark2=3; quark3 = 1; spin = 1;
145 }
else if (std::abs(tempPDGcode)%10000 == 4232) {
147 quark2=3; quark3 = 2; spin = 1;
148 }
else if (std::abs(tempPDGcode)%10000 == 5132) {
150 quark2=3; quark3 = 1; spin = 1;
151 }
else if (std::abs(tempPDGcode)%10000 == 5232) {
153 quark2=3; quark3 = 2; spin = 1;
154 }
else if (std::abs(tempPDGcode)%10000 == 2122) {
156 quark2=2; quark3 = 1; spin = 1;
157 }
else if (std::abs(tempPDGcode)%10000 == 1212) {
159 quark1=2; quark2 = 1; spin = 1;
160 }
else if (std::abs(tempPDGcode)%10000 == 2126) {
162 quark2=2; quark3 = 1; spin = 5;
163 }
else if (std::abs(tempPDGcode)%10000 == 1216) {
165 quark1=2; quark2 = 1; spin = 5;
166 }
else if (std::abs(tempPDGcode)%10000 == 2128) {
168 quark2=2; quark3 = 1; spin = 7;
169 }
else if (std::abs(tempPDGcode)%10000 == 1218) {
171 quark1=2; quark2 = 1; spin = 7;
172 }
else if (std::abs(tempPDGcode)%10000 == 2124) {
174 quark2=2; quark3 = 1; spin = 3;
175 }
else if (std::abs(tempPDGcode)%10000 == 1214) {
177 quark1=2; quark2 = 1; spin = 3;
181 if ((quark1<quark2)||(quark2<quark3)||(quark1<quark3))
186 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
187 G4cout <<
" illegal code for baryon ";
198 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
199 G4cout <<
" ??? unknown quark ";
209 theQuarkContent[quark1-1] ++;
210 theQuarkContent[quark2-1] ++;
211 theQuarkContent[quark3-1] ++;
215 theAntiQuarkContent[quark1-1] ++;
216 theAntiQuarkContent[quark2-1] ++;
217 theAntiQuarkContent[quark3-1] ++;
224G4int G4PDGCodeChecker::CheckForMesons()
229 if (tempPDGcode == 310) spin = 0;
230 if (tempPDGcode == 130)
237 if ((quark1 !=0)||(quark2==0)||(quark3==0))
242 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
243 G4cout <<
" meson has only quark and anti-quark pair";
254 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
255 G4cout <<
" illegal code for meson ";
268 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
269 G4cout <<
" ??? unknown quark ";
282 theQuarkContent[quark3-1] =1;
283 theAntiQuarkContent[quark2-1] =1;
287 theQuarkContent[quark2-1] =1;
288 theAntiQuarkContent[quark3-1] =1;
296 theQuarkContent[quark2-1] =1;
297 theAntiQuarkContent[quark3-1] =1;
301 theQuarkContent[quark3-1] =1;
302 theAntiQuarkContent[quark2-1] =1;
309G4int G4PDGCodeChecker::CheckForDiQuarks()
311 if ((quark1 ==0) || (quark2 ==0) || (quark3 !=0))
318 else if (quark1 < quark2)
329 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
330 G4cout <<
" ??? unknown quark ";
340 theQuarkContent[quark1-1] +=1;
341 theQuarkContent[quark2-1] +=1;
345 theAntiQuarkContent[quark1-1] +=1;
346 theAntiQuarkContent[quark2-1] +=1;
353G4int G4PDGCodeChecker::CheckForQuarks()
355 quark1 = std::abs(
code);
362 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
363 G4cout <<
" ??? unknown quark ";
374 theQuarkContent[quark1-1] =1;
378 theAntiQuarkContent[quark1-1] =1;
390 totalCharge += (-1./3.)*eplus*theQuarkContent[flavor];
391 totalCharge += 1./3.*eplus*theAntiQuarkContent[flavor];
392 totalCharge += 2./3.*eplus*theQuarkContent[flavor+1];
393 totalCharge += (-2./3.)*eplus*theAntiQuarkContent[flavor+1];
396 if (std::fabs(totalCharge-thePDGCharge)>0.1*eplus)
401 G4cout <<
" G4PDGCodeChecker::CheckCharge : ";
402 G4cout <<
" illegal electric charge " << thePDGCharge/eplus;
412G4int G4PDGCodeChecker::CheckForNuclei()
415 if (pcode < 1000000000)
422 G4int LL = pcode/10000000;
423 pcode -= 10000000*LL;
430 if (A < 2 || Z >
A-LL || LL>
A )
435 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
436 G4cout <<
" ??? Illegal PDG encoding for nucleus ";
450 theQuarkContent[0] = n_up;
451 theQuarkContent[1] = n_down;
452 theQuarkContent[2] = n_s;
457 theAntiQuarkContent[0] = n_up;
458 theAntiQuarkContent[1] = n_down;
459 theAntiQuarkContent[2] = n_s;
465void G4PDGCodeChecker::GetDigits(
G4int PDGcode)
467 G4int temp = std::abs(PDGcode);
469 higherSpin = temp/10000000;
470 temp -=
G4int(higherSpin*10000000);
472 exotic = temp/1000000;
473 temp -=
G4int(exotic*1000000);
475 radial = temp/100000;
476 temp -=
G4int(radial*100000);
478 multiplet = temp/10000;
479 temp -=
G4int(multiplet*10000);
482 temp -=
G4int(quark1*1000);
485 temp -=
G4int(quark2*100);
488 temp -=
G4int(quark3*10);
491 if ((spin ==0) && ( higherSpin !=0 ))
G4GLOB_DLL std::ostream G4cout
G4int CheckPDGCode(G4int code, const G4String &type)
G4bool CheckCharge(G4double charge) const