46 :
code(0),theParticleType(
""),
48 exotic(0),radial(0),multiplet(0),
49 quark1(0),quark2(0),quark3(0),spin(0)
55 theQuarkContent[flavor] =0;
56 theAntiQuarkContent[flavor] =0;
65 theParticleType = particleType;
70 theQuarkContent[flavor] =0;
71 theAntiQuarkContent[flavor] =0;
75 if ((theParticleType ==
"nucleus")||(theParticleType ==
"anti_nucleus")) {
76 return CheckForNuclei();
83 if (theParticleType ==
"quarks") {
84 return CheckForQuarks();
86 }
else if (theParticleType ==
"diquarks") {
87 return CheckForDiQuarks();
89 }
else if (theParticleType ==
"gluons") {
94 }
else if (theParticleType ==
"meson") {
95 return CheckForMesons();
97 }
else if (theParticleType ==
"baryon"){
98 return CheckForBaryons();
107 G4int G4PDGCodeChecker::CheckForBaryons()
111 if ((quark1==0)||(quark2==0)||(quark3==0)){
113 if (verboseLevel>0) {
114 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
115 G4cout <<
" meson has three quark ";
123 if (std::abs(tempPDGcode)%10000 == 3122) {
125 quark2=2; quark3 = 1; spin = 1;
126 }
else if (std::abs(tempPDGcode)%10000 == 3124) {
128 quark2=2; quark3 = 1; spin = 3;
129 }
else if (std::abs(tempPDGcode)%10000 == 3126) {
131 quark2=2; quark3 = 1; spin = 5;
132 }
else if (std::abs(tempPDGcode)%10000 == 3128) {
134 quark2=2; quark3 = 1; spin = 7;
135 }
else if (std::abs(tempPDGcode)%10000 == 4122) {
137 quark2=2; quark3 = 1; spin = 1;
138 }
else if (std::abs(tempPDGcode)%10000 == 5122) {
140 quark2=2; quark3 = 1; spin = 1;
141 }
else if (std::abs(tempPDGcode)%10000 == 4132) {
143 quark2=3; quark3 = 1; spin = 1;
144 }
else if (std::abs(tempPDGcode)%10000 == 4232) {
146 quark2=3; quark3 = 2; spin = 1;
147 }
else if (std::abs(tempPDGcode)%10000 == 5132) {
149 quark2=3; quark3 = 1; spin = 1;
150 }
else if (std::abs(tempPDGcode)%10000 == 5232) {
152 quark2=3; quark3 = 2; spin = 1;
153 }
else if (std::abs(tempPDGcode)%10000 == 2122) {
155 quark2=2; quark3 = 1; spin = 1;
156 }
else if (std::abs(tempPDGcode)%10000 == 1212) {
158 quark1=2; quark2 = 1; spin = 1;
159 }
else if (std::abs(tempPDGcode)%10000 == 2126) {
161 quark2=2; quark3 = 1; spin = 5;
162 }
else if (std::abs(tempPDGcode)%10000 == 1216) {
164 quark1=2; quark2 = 1; spin = 5;
165 }
else if (std::abs(tempPDGcode)%10000 == 2128) {
167 quark2=2; quark3 = 1; spin = 7;
168 }
else if (std::abs(tempPDGcode)%10000 == 1218) {
170 quark1=2; quark2 = 1; spin = 7;
171 }
else if (std::abs(tempPDGcode)%10000 == 2124) {
173 quark2=2; quark3 = 1; spin = 3;
174 }
else if (std::abs(tempPDGcode)%10000 == 1214) {
176 quark1=2; quark2 = 1; spin = 3;
180 if ((quark1<quark2)||(quark2<quark3)||(quark1<quark3)) {
182 if (verboseLevel>0) {
183 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
184 G4cout <<
" illegal code for baryon ";
192 if (verboseLevel>0) {
193 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
194 G4cout <<
" ??? unknown quark ";
203 if (tempPDGcode >0) {
204 theQuarkContent[quark1-1] ++;
205 theQuarkContent[quark2-1] ++;
206 theQuarkContent[quark3-1] ++;
208 theAntiQuarkContent[quark1-1] ++;
209 theAntiQuarkContent[quark2-1] ++;
210 theAntiQuarkContent[quark3-1] ++;
217 G4int G4PDGCodeChecker::CheckForMesons()
222 if (tempPDGcode == 310) spin = 0;
223 if (tempPDGcode == 130) {
230 if ((quark1 !=0)||(quark2==0)||(quark3==0)){
232 if (verboseLevel>0) {
233 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
234 G4cout <<
" meson has only quark and anti-quark pair";
242 if (verboseLevel>0) {
243 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
244 G4cout <<
" illegal code for meson ";
254 if (verboseLevel>0) {
255 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
256 G4cout <<
" ??? unknown quark ";
267 if (tempPDGcode >0) {
268 theQuarkContent[quark3-1] =1;
269 theAntiQuarkContent[quark2-1] =1;
271 theQuarkContent[quark2-1] =1;
272 theAntiQuarkContent[quark3-1] =1;
276 if (tempPDGcode >0) {
277 theQuarkContent[quark2-1] =1;
278 theAntiQuarkContent[quark3-1] =1;
280 theQuarkContent[quark3-1] =1;
281 theAntiQuarkContent[quark2-1] =1;
290 G4int G4PDGCodeChecker::CheckForDiQuarks()
292 if ((quark1 ==0) || (quark2 ==0) || (quark3 !=0)) {
297 }
else if (quark1 < quark2) {
303 if (verboseLevel>0) {
304 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
305 G4cout <<
" ??? unknown quark ";
315 theQuarkContent[quark1-1] +=1;
316 theQuarkContent[quark2-1] +=1;
318 theAntiQuarkContent[quark1-1] +=1;
319 theAntiQuarkContent[quark2-1] +=1;
326 G4int G4PDGCodeChecker::CheckForQuarks()
330 if (verboseLevel>0) {
331 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
332 G4cout <<
" ??? unknown quark ";
341 quark1 = std::abs(
code);
345 theQuarkContent[quark1-1] =1;
347 theAntiQuarkContent[quark1-1] =1;
358 totalCharge += (-1./3.)*
eplus*theQuarkContent[flavor];
359 totalCharge += 1./3.*
eplus*theAntiQuarkContent[flavor];
360 totalCharge += 2./3.*
eplus*theQuarkContent[flavor+1];
361 totalCharge += (-2./3.)*
eplus*theAntiQuarkContent[flavor+1];
364 if (std::fabs(totalCharge-thePDGCharge)>0.1*
eplus) {
366 if (verboseLevel>0) {
367 G4cout <<
" G4PDGCodeChecker::CheckCharge : ";
368 G4cout <<
" illegal electric charge " << thePDGCharge/
eplus;
378 G4int G4PDGCodeChecker::CheckForNuclei()
381 if (pcode < 1000000000) {
388 pcode -= 10000000*
LL;
395 if (A < 2 || Z > A-LL || LL>A ) {
397 if (verboseLevel>0) {
398 G4cout <<
" G4PDGCodeChecker::CheckPDGCode : ";
399 G4cout <<
" ??? Illegal PDG encoding for nucleus ";
406 G4int n_up = 2*Z + (A-Z-
LL) + LL;
407 G4int n_down = Z + 2*(A-Z-
LL) + LL;
412 theQuarkContent[0] = n_up;
413 theQuarkContent[1] = n_down;
414 theQuarkContent[2] = n_s;
417 theAntiQuarkContent[0] = n_up;
418 theAntiQuarkContent[1] = n_down;
419 theAntiQuarkContent[2] = n_s;
425 void G4PDGCodeChecker::GetDigits(
G4int PDGcode)
427 G4int temp = std::abs(PDGcode);
429 higherSpin = temp/10000000;
430 temp -=
G4int(higherSpin*10000000);
432 exotic = temp/1000000;
433 temp -=
G4int(exotic*1000000);
435 radial = temp/100000;
436 temp -=
G4int(radial*100000);
438 multiplet = temp/10000;
439 temp -=
G4int(multiplet*10000);
442 temp -=
G4int(quark1*1000);
445 temp -=
G4int(quark2*100);
448 temp -=
G4int(quark3*10);
451 if ((spin ==0) && ( higherSpin !=0 )) {
G4bool CheckCharge(G4double charge) const
G4int CheckPDGCode(G4int code, G4String type)
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
static constexpr double eplus
static const G4int LL[nN]