48{
49
54 G4int tban=abs(3*ban);
55 G4int tot=QCont.GetTot();
57 if ( (!tod && (tot < 4 || (ban && tot < tban) ) ) || (tod && tot < tban+2) )
58 QCont.IncQAQ(1,0.);
59
62 if (tot%2)rQC.
DecQAQ(-tban-2);
63 else if(ban)rQC.
DecQAQ(-tban);
66#ifdef debug
67 cout<<
"G4QChipolino is called with QC="<<QCont<<
",rQC="<<rQC<<
",tot="<<tot<<
G4endl;
68#endif
69 minM=1000000.;
70 theQPDG1 = Pi0;
71 theQPDG2 = Pi0;
72 theQCont1 = Pi0QC;
73 if (!tot)
74 {
75 G4cerr<<
"***G4QChipolino: shouldn't be here 1 QC="<<rQC<<
G4endl;
76 }
77 else if (tot==2 || tot==3)
78 {
79 G4cerr<<
"***G4QChipolino: shouldn't be here 2 QC="<<rQC<<
G4endl;
80 theQCont1= rQC;
82 theQCont = rQC+Pi0QC;
83 }
84 else if (tot==4)
85 {
87#ifdef debug
88 G4cout<<
"G4QChipolino: tot=4,rQC="<<rQC<<
",bQC="<<bQC<<
G4endl;
89#endif
90 for(int j=0; j<2; j++)
91 {
96 if(cQPDG.GetPDGCode()==221) M1=mPi0;
98#ifdef debug
99 cout<<
"G4QChipolino: aQC="<<aQC<<
", cQC="<<cQC<<
", oQC="<<oQC<<
G4endl;
100#endif
103 if(oQPDG.GetPDGCode()==221) M2=mPi0;
105#ifdef debug
106 cout<<"G4QChipolino: c="<<cQPDG<<",cM="<<M1<<",o="<<oQPDG<<",oM="<<M2
107 <<
",cM+0M="<<m_value<<
", curMinM="<<minM<<
G4endl;
108#endif
109 if(m_value<minM)
110 {
111 minM=m_value;
112 theQPDG1 = cQPDG;
113 theQCont1 = cQC;
114 theQPDG2 = oQPDG;
115 }
116 }
117 }
118 else if (tot==5)
119 {
123#ifdef pdebug
124 cout<<"G4QChipolino: Baryon case nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC
126#endif
128 if (fl) bQC=rQC.
IndQ();
129 else bQC=rQC.
IndAQ();
130 for (int i=0; i<4; i++)
131 {
133 if (fl) cQC=bQC+rQC.
IndAQ(i);
134 else cQC=bQC+rQC.
IndQ(i);
137 if(cQPDG.GetPDGCode()==221) M1=mPi0;
141 if(oQPDG.GetPDGCode()==221) M2=mPi0;
143 if(m_value<minM)
144 {
145 minM=m_value;
146 theQPDG1 = cQPDG;
147 theQCont1 = cQC;
148 theQPDG2 = oQPDG;
149 }
150 }
151#ifdef pdebug
152 cout<<"G4QChipolino: Baryon case minM="<<minM<<", M="<<theQCont1<<theQPDG1
153 <<
", B="<<theQPDG2<<
G4endl;
154#endif
155 }
156 else if (tot==6)
157 {
158 if(ban)
159 {
163#ifdef debug
164 cout<<
"G4QChipolino: Di-Bar. case nQ="<<nQ<<
",nA="<<nA<<
",QC="<<rQC<<
",fl="<<fl<<
G4endl;
165#endif
166 for (int i=0; i<4; i++)
167 {
169 if (fl) aQC=rQC.
IndAQ(i);
170 else aQC=rQC.
IndQ(i);
171 for (int j=i+1; j<5; j++)
172 {
174 if (fl) bQC=aQC+rQC.
IndAQ(j);
175 else bQC=aQC+rQC.
IndQ(j);
176 for (int k=j+1; k<6; k++)
177 {
179 if (fl) cQC=bQC+rQC.
IndAQ(k);
180 else cQC=bQC+rQC.
IndQ(k);
183 if(cQPDG.GetPDGCode()==221) M1=mPi0;
189 if(m_value<minM)
190 {
191 minM=m_value;
192 theQPDG1 = cQPDG;
193 theQCont1 = cQC;
194 theQPDG2 = oQPDG;
195 }
196 }
197 }
198 }
199 }
200 else
201 {
205 }
206 }
209 {
219#ifdef debug
220 G4cout<<
"G4QChipolino: NucFragment case nQ="<<nQ<<
",nAQ="<<nA<<
", QC="<<rQC<<
",fl="<<fl
222#endif
223 if( (fl && kS>1) || (!fl && mS>1))
224 {
225#ifdef debug
226 G4cerr<<
"***G4QChipolino: ***Overfowed by strange quarks*** rQC="<<rQC<<
G4endl;
227
228#endif
229 }
230 else if(fl)
231 {
232
233
234 if(!mS)
235 {
237 G4int nN=(mU+mD-nI*3)/6;
238 if(!kS)
239 {
240 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))
241 {
242 if(nI>0)
243 {
244 theQPDG1 =
G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN));
246 }
247 else
248 {
249 theQPDG1 =
G4QPDGCode(-(90000000+1000*(nN+nI)+nN-1));
251 }
252 }
253 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))
254 {
255 if(nI>0)
256 {
257 theQPDG1=
G4QPDGCode(-(90000000+1000*(nN+nI-2)+nN+1));
259 }
260 else
261 {
262 theQPDG1=
G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN-2));
264 }
265 }
266 else
267 {
268 G4cerr<<
"***G4QChipolino:**A**IsotopicAsymmetry (without S),rQC="<<rQC<<
G4endl;
269
270 }
271 }
272 else if(kS<2)
273 {
274 nN =(mU+mD-4-nI*3)/6;
275 if(nI>0)
276 {
277 nN+=1;
278 theQPDG1 =
G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN));
280 }
281 else
282 {
283 theQPDG1 =
G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN));
285 }
286 }
287 else
288 {
289 G4cerr<<
"***G4QChipolino: ***Too many kaons are needed*** rQC="<<rQC<<
G4endl;
290
291 }
292 }
293 else
294 {
295 if(mS<=mU&&mS<=mD)
296 {
298 G4int nN=(mU+mD-mS-mS-nI*3)/6;
299 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))
300 {
301 if(nI>0)
302 {
303 theQPDG1 =
G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-1)+nN));
305 }
306 else
307 {
308 theQPDG1 =
G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI)+nN-1));
310 }
311 }
312 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))
313 {
314 if(nI>0)
315 {
316 theQPDG1=
G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-2)+nN+1));
318 }
319 else
320 {
321 theQPDG1=
G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI+1)+nN-2));
323 }
324 }
325 else
326 {
327 G4cerr<<
"***G4QChipolino:**A**IsotopicAssimetry (with S)*** rQC="<<rQC<<
G4endl;
328
329 }
330 }
331 else
332 {
338 if(lD+lU+lS!=3||lD<0||lU<0||lS<0)
339 {
340 G4cerr<<
"***G4QChipolino:*AntiFragment* rQC="<<rQC<<
",s="<<lS<<
",u="<<lU<<
",d"
342
343 }
344 if ( !lD && lU==2) theQPDG2=
G4QPDGCode(-3222);
345 else if( !lU && lD==2) theQPDG2=
G4QPDGCode(-3112);
346 else if( !lD && lU==1) theQPDG2=
G4QPDGCode(-3322);
347 else if( !lU && lD==1) theQPDG2=
G4QPDGCode(-3312);
350 }
352 theQCont = rQC;
353 }
354 }
355 else
356 {
357 if(!kS)
358 {
360 G4int nN=(kU+kD-nI*3)/6;
361 if(!mS)
362 {
363 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))
364 {
365 if(nI>0)
366 {
367 theQPDG1 =
G4QPDGCode(90000000+1000*(nN+nI-1)+nN);
369 }
370 else
371 {
372 theQPDG1 =
G4QPDGCode(90000000+1000*(nN+nI)+nN-1);
374 }
375 }
376 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))
377 {
378 if(nI>0)
379 {
380 theQPDG1=
G4QPDGCode(90000000+1000*(nN+nI-2)+nN+1);
382 }
383 else
384 {
385 theQPDG1=
G4QPDGCode(90000000+1000*(nN+nI+1)+nN-2);
387 }
388 }
389 else
390 {
391 G4cerr<<
"***G4QChipolino:***Isotopic assimetry (without S), rQC="<<rQC<<
G4endl;
392
393 }
394 }
395 else if(mS<2)
396 {
397 nN =(kU+kD-4-nI*3)/6;
398 if(nI>0)
399 {
400 nN+=1;
401 theQPDG1 =
G4QPDGCode(90000000+1000*(nN+nI-1)+nN);
403 }
404 else
405 {
406 theQPDG1 =
G4QPDGCode(90000000+1000*(nN+nI+1)+nN);
408 }
409 }
410 else
411 {
412 G4cerr<<
"***G4QChipolino: ***Too many kaons are needed*** rQC="<<rQC<<
G4endl;
413
414 }
415 }
416 else
417 {
418 if(kS<=kU&&kS<=kD)
419 {
421 G4int nN=(kU+kD-kS-kS-nI*3)/6;
422 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))
423 {
424 if(nI>0)
425 {
426 theQPDG1 =
G4QPDGCode(90000000+1000*(kS*1000+nN+nI-1)+nN);
428 }
429 else
430 {
431 theQPDG1 =
G4QPDGCode(90000000+1000*(kS*1000+nN+nI)+nN-1);
433 }
434 }
435 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))
436 {
437 if(nI>0)
438 {
439 theQPDG1=
G4QPDGCode(90000000+1000*(kS*1000+nN+nI-2)+nN+1);
441 }
442 else
443 {
444 theQPDG1=
G4QPDGCode(90000000+1000*(kS*1000+nN+nI+1)+nN-2);
446 }
447 }
448 else
449 {
450 G4cerr<<
"***G4QChipolino: ***Isotopic assimetry (with S)*** rQC="<<rQC<<
G4endl;
451
452 }
453 }
454 else
455 {
461 if(lD+lU+lS!=3||lD<0||lU<0||lS<0)
462 {
463 G4cerr<<
"***G4QChipolino:*Fragment*rQC="<<rQC<<
",s="<<lS<<
",u="<<lU<<
",d"
465
466 }
468 else if( !lU && lD==2) theQPDG2=
G4QPDGCode(3112);
469 else if( !lD && lU==1) theQPDG2=
G4QPDGCode(3322);
470 else if( !lU && lD==1) theQPDG2=
G4QPDGCode(3312);
473 }
475 theQCont = rQC;
476 }
477 }
478 }
479 else
480 {
481 G4cerr<<
"***G4QChipolino: ***Exotics*** rQC="<<rQC<<
G4endl;
482
483 }
484}
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
G4int DecQAQ(const G4int &nQAQ=1)
G4int GetBaryonNumber() const
G4QContent IndQ(G4int ind=0)
G4QContent IndAQ(G4int ind=0)
G4QContent GetQuarkContent() const
void InitByQCont(G4QContent QCont)