source: trunk/documents/UserDoc/DocBookUsersGuides/PhysicsReferenceManual/latex/hadronic/theory_driven/ChiralInvariantPhaseSpace/CHIPSdetail.tex @ 1211

Last change on this file since 1211 was 1211, checked in by garnier, 15 years ago

CVS update

File size: 247.6 KB
Line 
1\section{Chiral Invariant Phase Space Decay.}
2% \textheight 8.75in
3% \textwidth 6.5in
4% \parskip 1.45ex
5
6\newtheorem{theorem}{Theorem}
7\newtheorem{acknowledgement}[theorem]{Acknowledgement}
8\newtheorem{algorithm}[theorem]{Algorithm}
9\newtheorem{axiom}[theorem]{Axiom}
10\newtheorem{claim}[theorem]{Claim}
11\newtheorem{conclusion}[theorem]{Conclusion}
12\newtheorem{condition}[theorem]{Condition}
13\newtheorem{conjecture}[theorem]{Conjecture}
14\newtheorem{corollary}[theorem]{Corollary}
15\newtheorem{criterion}[theorem]{Criterion}
16\newtheorem{definition}[theorem]{Definition}
17\newtheorem{example}[theorem]{Example}
18\newtheorem{exercise}[theorem]{Exercise}
19\newtheorem{lemma}[theorem]{Lemma}
20\newtheorem{notation}[theorem]{Notation}
21\newtheorem{problem}[theorem]{Problem}
22\newtheorem{proposition}[theorem]{Proposition}
23\newtheorem{remark}[theorem]{Remark}
24\newtheorem{solution}[theorem]{Solution}
25\newtheorem{summary}[theorem]{Summary}
26
27\begin{document}
28\title{Manual for the CHIPS event generator in GEANT4}
29%\author{M.V.Kossov}
30%\address{Mikhail.Kossov@itep.ru, Mikhail.Kossov@cern.ch, kossov@jlab.org,\\
31%kossov@post.kek.jp}
32\date{\today}
33\maketitle
34
35\begin{abstract}
36In this manual the basic principles and the procedure of usage of the
37CHIPS event generator in the GEANT4 framework is described in detail.
38The emphasis is made on the practical issues which can make this event
39generator an easy tool for differentapplications in GEANT4.
40For the stand alone application of the CHIPS model (not for the
41simulation of the processes in matter, but for the physics
42analysis purposes) one can use the manual \cite{STAND_ALONE}. The
43physics of the model is discussed in this Manual in a concise form
44and to find answers to some physics questions one should read the
45publications in physics jurnals, which are reffered to in the manual.
46All complicated issues are collected in appendices to make easier the
47straightforward use of the model. Examples and interfaces give the
48 easiest way to use the event generator.
49\end{abstract}
50
51\section{Introduction.}
52
53\noindent \qquad  The CHIPS event generator is based on the Chiral
54Invariant Phase Space model \cite{CHIPS1},\cite{CHIPS2},\cite{CHIPS3},
55which is typically a quark-level SU(3) model (c, b, and t quarks are not
56implemented in this version of the event generator), but in spite of
57its quark nature it can be successfully used even at very low energies. It
58should be pointed out that originally the CHIPS event generator was made
59only for the final hadronic fragmentation, so it demands a special development
60in the part of the initial interaction of projectiles (projectiles can be
61hadrons or photons) with targets (targets can be hadrons or nuclei). So the
62first applications of CHIPS described the interactions at rest (where the
63interaction cross section is not important)\cite{CHIPS1},\cite{CHIPS2} or
64low energy photo-nuclear reactions (where the interaction cross section can
65be easily calculated)\cite{CHIPS3}. In this manual the parametrization
66of the cross sections of the photonuclear nd electronuclear reactions
67is explained and the hadron nuclear crossections are parametrized in
68other GEANT4 classes, so formally the CHIPS event jenerator can be
69used in all kinds of hadronic interaction (having in mind that the
70photon can be considered as a superposition of vector mesons: VDM
71model). The interface which was made for the CHIPS event generator
72from the String
73Model of Geant4 \cite{GEANT4} (the results were briefly discussed by
74Hans-Peter Wellisch on MC2000 \cite{MC2000}) makes it possible to use
75the CHIPS code for nuclear fragmentation at extremely high energies.
76Applications at intermediate energies (1-10 GeV) needs additional
77tuning of the interaction mechanizm.
78
79The basic scheme of the event generator is the fragmentation of a quasmon in
80vacuum or in nuclear matter. The quasmon is a fundamental notion in the
81CHIPS model. It can be considered as a generalization of the hadron notion in
82fundamental particles physics. Hadron has quantum numbers and fixed or
83distributed mass. The quantum numbers define quark content of the hadron. On
84the contrary quasmon is defined by quark content and mass. For each
85hadronic state with the fixed mass and corresponding quark content one
86can consider this hadronic state as a superposition of hadrons with the same
87quark content. The fundamental parameter of the model, critical
88temperature ${\bf T}_{c},$ defines a number of quark-partons in a
89quasmon. This can help to understand why in CHIPS the
90quark content is the basic notion and the particle is a secondary notion, while
91in other models the basic notion is a particle and the quark content is a
92secondary notion. So the result of a hadronic or a nuclear interaction
93is the creation of a quasmon which is actually an intermediate
94excited hadronic matter. In vacuum it can dissipate energy radiating
95particles according to the quark fusion mechanism\cite{CHIPS1}
96(Appendix C) and in nuclear matter in addition to vacuum mechanisms
97the quark exchange with surrounding nucleons or nuclear clusters
98mechanizm can be realized\cite{CHIPS2} (Appendix D). So the first
99published versions of the CHIPS event generator had the {\bf
100G4Quasmon} class as the head of the model. All initial interactions were
101hidden in the {\bf G4Quasmon} constructor.  It should be mentioned,
102that all classes of the CHIPS model have the {\bf G4Q} prefix while
103most of GEANT4 classes have just a {\bf G4} prefix. Hopefully the
104{\bf G4Q} prefix will not be used by other GEANT4 projects.
105
106        More complicated applications of the model such as an anti-proton
107capture at rest and Geant4 String Model interface to CHIPS led to the
108multi quasmon version of the model. So since the last publication the
109structure of classes of the CHIPS event generator was improved. E.g.
110in case of the anti-proton annihilation on the nucleus at rest the first
111interaction happens on nuclear periphery. After this initial
112interaction, a part of secondary mesons (defined by the special
113parameter of the model) independently penetrate the nucleus and each
114of the mesons can create a separate quasmon in nuclear matter of the
115same nucleus. In this case the {\bf G4Quasmon} class can not be the head
116class of the model any more. That is why the new head class
117{\bf G4QEnvironment} was made, which can adopt a vector of projectile
118hadrons ({\bf G4QHadronVector}) and can create a vector of quasmons
119({\bf G4QuasmonVector}). After that all quasmons start the energy
120dissipation process in parallel in the same nucleus. The
121{\bf G4QEnvironment} instance can be used both for vacuum and for
122nuclear matter. If the {\bf G4QEnvironment} is created for vacuum
123there can be only one {\bf G4Quamon} instance inside, so for hadronic
124interactions the model is not changed.
125
126\section{Structure of C++ classes in CHIPS.}
127
128\noindent \qquad The general scheme of the model defines a hierarchy of C++
129classes:
130
131\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
132\ \ \fbox{G4QEnvironment}
133
134\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
135\ \ \ \ \ \ \ \ \ \ \ \ \ $\left| {}\right| $
136
137\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
138\ \fbox{G4QuasmonVector}
139
140\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
141\ \ \ \ \ \ \ \ \ \ \ \ $\ \left| {}\right| $
142
143\ \ \ \ \ \ \ \ \ \ \ \ \ =============\fbox{G4Quasmon}===========
144
145\ \ \ \ \ \ \ \ \ \ \ \ \ $\left| {}\right| $ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
146\ \ \ \ \ \ \ \ \ \ \ \ \ $\left| {}\right| $ \ \ \ \ \ \ \ \ \ $\left|
147{}\right| $ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\left|
148{}\right| $
149
150\fbox{G4QNucleus} \ \ \fbox{G4QHadronVector} \ \fbox{G4QCHIPSWorld} \ \fbox{%
151G4QChipolino}
152
153\fbox{G4QCandidateVector} \ \ \ \ \ \ \ \ \ \ \ \ \ $\left| {}\right| $\ \ \
154\ \fbox{G4QParticleVector}\ \ \ \ \ \ \ \ \ \ $\ \ \ \ \ \ \left| {}\right| $
155
156\ \ \ $\ \ \ \ \ \ \ \ \left| {}\right| $\ \ \ \ \ \ \fbox{G4QCandidate} \ \
157$\left| {}\right| $\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\ \left|
158{}\right| $\ \ \ \ \ \ \ \ \ \ \ $\ \ \ \ \ \ \ \ \ \ \left| {}\right| $
159
160\ \ \ \ $\ \ \ \ \ \ \ \left| {}\right| $\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
161\ \ \ \ \ \ \ \ \ \ \ \fbox{G4QHadron} \ \ \ \ \ \ \ \ \ \ $\left| {}\right|
162$\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\left| {}\right| $
163
164\ \ \ \ $\ \ \ \ \ \ \ \left| {}\right| $\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
165\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \fbox{G4QParticle%
166} \ \ \ \ \ \ \ \ \ \ \ \ \ $\left| {}\right| $
167
168\ \ \ \ $\ \ \ \ \ \ \ \left| {}\right| $\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
169\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \fbox{G4QDecayChannelVector%
170} \ $\left| {}\right| $
171
172\ \ \ \ $\ \ \ \ \ \ \ \left| {}\right| $\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
173\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \fbox{%
174G4QDecayChannel} \ \ \ \ $\left| {}\right| $
175
176\ \ \ \ \ \ \fbox{G4QParentClusterVector} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
177\ \ \fbox{G4QPDGCodeVector} \ \ $\left| {}\right| $
178
179\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \fbox{%
180G4QParentCluster} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \fbox{G4QPDGCode}
181
182\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
183\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \fbox{G4QContent}
184
185It is necessary to make a few comments about this structure. This time let
186us start from the bottom. As it was already pointed out in the
187Introduction the basic class in CHIPS is {\bf G4QContent} (quark
188content). This class is the basic class for the quasmon definition. The
189quasmon makes the generalization of the notion of the hadron. The
190hadron is
191formalized by a C++ class {\bf G4QPDGCode }(particle with a code from a
192Particle Data Group table). Another hadronic case of quasmon is
193{\bf G4QParentCluster}. The parent clusters are created in nuclear
194medium and used in the quark exchange mechanism of the energy dissipation
195process. The vector of the {\bf G4QPDGCode} objects
196({\bf G4QPDGCodeVector}) is used in the {\bf G4DecayChannel} class, which is
197made for a set of particles in which primary particle can decay.
198But an unstable particle can have several channels of decay, so
199the {\bf G4QParticle} class uses the {\bf G4QDecayChannelVector}. The world
200of particles ({\bf G4QCHIPSWorld}) in the model is just a
201{\bf G4QParticleVector}. Only one instance of the {\bf G4QCHIPSWorld} is created
202in the C++ heap and each {\bf G4Quasmon} class has a static pointer to this
203instance of the {\bf G4QCHIPSWorld}. So this is a kind of a static data base
204which contains particle properties necessary for the {\bf G4QHadron}
205definition. So the creator of the {\bf G4QHadron} just gets a pointer to the
206corresponding particle in the static {\bf G4QCHIPSWorld} data base. There is
207another intermediate generalization of the hadron object, the
208{\bf G4QNucleus} class, which inherits properties of the {\bf G4QHadron} class.
209It has a lot of additional nuclear properties but to inherit hadronic
210features any nucleus should have a PDG code.
211
212        In the CHIPS generator the nuclear code has 8 digits, starting
213with 9. The second digit (L in the scheame below) defines a number of
214$\Lambda $\ particles in the nucleus, the following three digits (PPP)
215define a number of protons, and the last three digits (NNN) define the
216number of neutrons in the nucleus. So the PDG code of the nucleus (or
217nuclear cluster) has a form {\it 9LPPPNNN}. In the CHIPS event generator an
218additional Q code is used, which helps to numerate particles included in the
219{\bf G4QCHIPSWorld} data base (Q=0 means that this particle is not in the
220{\bf G4QCHIPSWorld} data base). All these particles are listed in the tables
221below. A particle and the corresponding antiparticle has the same Q code but
222their PDG codes have opposite signs. The upper index of the name in the
223table usually means a charge except for $\eta _{0}^{/}$(958), $f_{2}^{/}$(1525),
224$\Lambda_{3/2}^{\ast}$(1520), and \ $\Lambda _{7/2}^{\ast }$(2100).
225The lower index of the name
226according to the PDG rule means spin (2S+1). Spin of the particle can be
227calculated as an integer half of the last digit of the PDG code. This is not
228true for the simple 8 digits codes for the nuclear clusters, which do
229not contain the information about the spin at all, but it is true even for
230the unusually coded $f_{0}^{0}$ hadrons (first of which is a
231$\sigma $\ meson, which is an S-wave state of the $\pi ^{0}\pi ^{0}$\ system,
232the second is $f_{0}^{0}$(980) and the third is $f_{0}^{0}$(1500))\thinspace.
233
234\begin{tabular}{llllllllllllllllll}
235{\bf  Q} & {\it  PDG} & H & {\bf Q} & {\it PDG} & H &
236{\bf  Q} & {\it  PDG} & H & {\bf Q} & {\it PDG} & H &
237{\bf  Q} & {\it  PDG} & H & {\bf Q} & {\it PDG} & H \\ 
238{\bf  0} & {\it   22} & $\gamma $ &
239{\bf 12} & {\it 3122} & $\Lambda_{1/2}^{0}$ &
240{\bf 24} & {\it 1114} & $\Delta _{3/2}^{-}$ &
241{\bf 36} & {\it  215} & $a_{2}^{+}$ &
242{\bf 48} & {\it 3326} & $\Xi _{5/2}^{0}$ &
243{\bf 60} & {\it 3118} & $\Sigma _{7/2}^{-}$ \\ 
244{\bf  1} & {\it  110} & $f_{0}^{0}$ &
245{\bf 13} & {\it 3112} & $\Sigma _{1/2}^{-}$ &
246{\bf 25} & {\it 2114} & $\Delta _{3/2}^{0}$ &
247{\bf 37} & {\it  225} & $f_{2}^{0}$ &
248{\bf 49} & {\it  117} & $\rho _{3}^{0}$ &
249{\bf 61} & {\it 3218} & $\Sigma _{7/2}^{0}$ \\ 
250{\bf  2} & {\it  220} & $f_{0}^{0}$ &
251{\bf 14} & {\it 3212} & $\Sigma _{1/2}^{0}$ &
252{\bf 26} & {\it 2214} & $\Delta _{3/2}^{+}$ &
253{\bf 38} & {\it  315} & $K_{2}^{0}$ &
254{\bf 50} & {\it  217} & $\rho _{3}^{+}$ &
255{\bf 62} & {\it 3228} & $\Sigma _{7/2}^{+}$ \\ 
256{\bf  3} & {\it  330} & $f_{0}^{0}$ &
257{\bf 15} & {\it 3222} & $\Sigma _{1/2}^{+}$ &
258{\bf 27} & {\it 2224} & $\Delta _{3/2}^{++}$ &
259{\bf 39} & {\it  325} & $K_{2}^{+}$ &
260{\bf 51} & {\it  227} & $\omega _{3}^{0}$ &
261{\bf 63} & {\it 3318} & $\Xi _{7/2}^{-}$ \\ 
262{\bf  4} & {\it  111} & $\pi _{0}^{0}$ &
263{\bf 16} & {\it 3312} & $\Xi _{1/2}^{-}$ &
264{\bf 28} & {\it 3124} & $\Lambda _{3/2}^{0}$ &
265{\bf 40} & {\it  335} & $f_{2}^{/}$ &
266{\bf 52} & {\it  317} & $K_{3}^{\ast 0}$ &
267{\bf 64} & {\it 3328} & $\Xi _{7/2}^{0}$ \\ 
268{\bf  5} & {\it  211} & $\pi _{0}^{+}$ &
269{\bf 17} & {\it 3322} & $\Xi_{1/2}^{0}$ &
270{\bf 29} & {\it 3114} & $\Sigma _{3/2}^{-}$ &
271{\bf 41} & {\it 2116} & $N_{5/2}^{0}$ &
272{\bf 53} & {\it  327} & $K_{3}^{\ast +}$ &
273{\bf 65} & {\it 3338} & $\Omega _{7/2}^{-}$ \\ 
274{\bf  6} & {\it  221} & $\eta _{0}^{0}$ &
275{\bf 18} & {\it  113} & $\rho _{1}^{0} $ &
276{\bf 30} & {\it 3214} & $\Sigma _{3/2}^{0}$ &
277{\bf 42} & {\it 2216} & $N_{5/2}^{+}$ &
278{\bf 54} & {\it  337} & $\varphi _{3}^{0}$ &
279{\bf 66} & {\it  119} & $a_{4}^{0}$ \\ 
280{\bf  7} & {\it  311} & $K_{0}^{0}$ &
281{\bf 19} & {\it  213} & $\rho _{1}^{+}$ & 
282{\bf 31} & {\it 3224} & $\Sigma _{3/2}^{+}$ &
283{\bf 43} & {\it 3126} & $\Lambda _{5/2}^{\ast }$ &
284{\bf 55} & {\it 1118} & $\Delta _{7/2}^{-}$ &
285{\bf 67} & {\it  219} & $a_{4}^{+}$ \\ 
286{\bf  8} & {\it  321} & $K_{0}^{+}$ &
287{\bf 20} & {\it  223} & $\omega _{1}^{0} $ &
288{\bf 32} & {\it 3314} & $\Xi _{3/2}^{-}$ &
289{\bf 44} & {\it 3116} & $\Sigma _{5/2}^{-}$ &
290{\bf 56} & {\it 2118} & $\Delta _{7/2}^{0}$ &
291{\bf 68} & {\it  229} & $f_{4}^{0}$ \\ 
292{\bf  9} & {\it  331} & $\eta _{0}^{/}$ &
293{\bf 21} & {\it  313} & $K_{1}^{\ast 0}$ &
294{\bf 33} & {\it 3324} & $\Xi _{3/2}^{0}$ &
295{\bf 45} & {\it 3216} & $\Sigma _{5/2}^{0}$ &
296{\bf 57} & {\it 2218} & $\Delta _{7/2}^{+}$ &
297{\bf 69} & {\it  319} & $K_{4}^{0}$ \\ 
298{\bf 10} & {\it 2112} & $n_{1/2}^{0}$ &
299{\bf 22} & {\it  323} & $K_{1}^{\ast +}$ &
300{\bf 34} & {\it 3334} & $\Omega _{3/2}^{-}$ &
301{\bf 46} & {\it 3226} & $\Sigma _{5/2}^{+}$ &
302{\bf 58} & {\it 2228} & $\Delta _{7/2}^{++}$ &
303{\bf 70} & {\it  329} & $K_{4}^{+}$ \\ 
304{\bf 11} & {\it 2212} & $p_{1/2}^{+}$ &
305{\bf 23} & {\it  333} & $\varphi _{1}^{0}$ &
306{\bf 35} & {\it  115} & $a_{2}^{0}$ &
307{\bf 47} & {\it 3316} & $\Xi _{5/2}^{-}$ &
308{\bf 59} & {\it 3128} & $\Lambda _{7/2}^{\ast }$ &
309{\bf 71} & {\it  339} & $f_{4}^{/}$
310\end{tabular}
311
312\bigskip
313
314Only isotope symmetric nuclear clusters are considered in the CHIPS world. As
315there are separate tables for hadrons and for nuclear fragments, there is an
316overlap in naming. In particular for the neutron one can find {\it 2112}
317(Q=10) and {\it 90000001} (Q=72), for proton {\it 2212 (Q=11)} and {\it %
31890001000} (Q=73), for lambda {\it 3122 (Q=12)} and {\it 91000000} (Q=74).
319Internally in the program one can find strange codes such as {\it 89999999}
320for anti-neutron or even {\it 90999999} for K0. The PDG coding of the
321generator supports such codes, but in the output such codes should not
322appear. The nuclear fragment coding includes 8 light isofragments (fragments
323contaning isobars: {$p\Delta ++$}, {$n\Delta -$}, {$\Delta ++ \Delta ++$},
324 {$\Delta - \Delta -$},) {$pp\Delta ++$}, {$nn\Delta -$},
325 {$p\Delta ++ \Delta ++$}, {$p\Delta - \Delta -$}, which have Q-codes
326from 71 to 79). The PDG codes of the isonuclei contain negative
327numbers of protons or neutrons, so they can look strange. E.g. the PDG
328code for the {$p\Delta ++ \Delta ++$} fragment is 90004999. The last
329999 mean that the number of neuterons is -1 and 1 is subtracted from
330the number of protons, so the number of protons is 5. The same rule can
331help to determine the number of protons (-1) and neutrons (5) from the
332PDG code 89999005 in case of the {$p\Delta - \Delta -$}
333state. Hopefully the CHIPS user never meet such codes, as the codes
334with negative number of baryons in the PDG code are internal and
335usually decay before coming in the output. E.g. the {$p\Delta ++$}
336state decays in two protons and positive pion.
337
338        The structure of the following table for the normal nuclei and
339hypernuclei can be easily extrapolated, so the PDG coding of the
340generator covers by far more nuclear fragments than are listed in the table.
341
342\bigskip
343
344\begin{tabular}{llllllllllll}
345{\bf   Q} & {\it      PDG} & H & {\bf Q} & {\it PDG} & H &
346{\bf   Q} & {\it      PDG} & H & {\bf Q} & {\it PDG} & H \\ 
347{\bf  80} & {\it 90000001} & n &
348{\bf 109} & {\it 92001002} & $\Lambda \Lambda t$ &
349{\bf 138} & {\it 91005004} & $\Lambda $B$^{8}$ &
350{\bf 167} & {\it 91006006} & $\Lambda $C$^{12}$ \\ 
351{\bf  81} & {\it 90001000} & p &
352{\bf 110} & {\it 92002001} & $\Lambda \Lambda $He$^{3}$ &
353{\bf 139} & {\it 92003004} & $\Lambda \Lambda $Li$^{7}$ &
354{\bf 168} & {\it 91007005} & $\Lambda $N$^{12}$ \\ 
355{\bf  82} & {\it 91000000} & $\Lambda $ &
356{\bf 111} & {\it 90002004} & He$^{6} $ &
357{\bf 140} & {\it 92004003} & $\Lambda \Lambda $Be$^{7}$ &
358{\bf 169} & {\it 92005006} & $\Lambda \Lambda $B$^{11}$ \\ 
359{\bf  83} & {\it 90000002} & nn &
360{\bf 112} & {\it 90003003} & Li$^{6}$ & 
361{\bf 141} & {\it 90004006} & Be$^{10}$ &
362{\bf 170} & {\it 92006005} & $\Lambda \Lambda $C$^{11}$ \\ 
363{\bf  84} & {\it 90001001} & d/np &
364{\bf 113} & {\it 90004002} & Be$^{6}$ & 
365{\bf 142} & {\it 90005005} & B$^{10}$ &
366{\bf 171} & {\it 90006008} & C$^{14}$\\ 
367{\bf  85} & {\it 90002000} & pp &
368{\bf 114} & {\it 91002003} & $\Lambda $He$^{5}$ &
369{\bf 143} & {\it 90006005} & C$^{10}$ &
370{\bf 172} & {\it 90007007} & N$^{14}$ \\ 
371{\bf  86} & {\it 91000001} & $\Lambda $n &
372{\bf 115} & {\it 91003002} & $\Lambda $Li$^{5}$ &
373{\bf 144} & {\it 91004005} & $\Lambda $Be$^{9}$ &
374{\bf 173} & {\it 90008006} & O$^{14}$ \\ 
375{\bf  87} & {\it 91001000} & $\Lambda $p &
376{\bf 116} & {\it 92001003} & $\Lambda \Lambda $H$^{4}$ &
377{\bf 145} & {\it 91005004} & $\Lambda $B$^{9}$ & 
378{\bf 174} & {\it 91006007} & $\Lambda $C$^{13}$ \\ 
379{\bf  88} & {\it 92000000} & $\Lambda \Lambda $ &
380{\bf 117} & {\it 92002002} & $\Lambda \Lambda $He$^{4}$ &
381{\bf 146} & {\it 92003005} & $\Lambda \Lambda $Li$^{8}$ &
382{\bf 175} & {\it 91007006} & $\Lambda $N$^{13}$ \\ 
383{\bf  89} & {\it 90001002} & t &
384{\bf 118} & {\it 92003001} & $\Lambda \Lambda $Li$^{4}$ &
385{\bf 147} & {\it 92004004} & $\Lambda \Lambda $Be$^{8}$ &
386{\bf 176} & {\it 92005007} & $\Lambda \Lambda $B$^{12}$ \\ 
387{\bf  90} & {\it 90002001} & He$^{3}$ &
388{\bf 119} & {\it 90003004} & Li$^{7}$ &
389{\bf 148} & {\it 92005003} & $\Lambda \Lambda $B$^{8}$ &
390{\bf 177} & {\it 92006006} & $\Lambda \Lambda $C$^{12}$ \\ 
391{\bf  91} & {\it 91000002} & $\Lambda $nn &
392{\bf 120} & {\it 90004003} & Be$^{7}$ &
393{\bf 149} & {\it 90005006} & B$^{11}$ &
394{\bf 178} & {\it 92007005} & $\Lambda \Lambda $N$^{12}$ \\ 
395{\bf  92} & {\it 91001001} & $\Lambda $d &
396{\bf 121} & {\it 91002004} & $\Lambda $He$^{6}$ &
397{\bf 150} & {\it 90006005} & C$^{11}$ &
398{\bf 179} & {\it 90007008} & N$^{15}$ \\ 
399{\bf  93} & {\it 91002000} & $\Lambda $pp &
400{\bf 122} & {\it 91003003} & $\Lambda $Li$^{6}$ &
401{\bf 151} & {\it 91004006} & $\Lambda $Be$^{10}$ &
402{\bf 180} & {\it 90008007} & O$^{15}$ \\ 
403{\bf  94} & {\it 92000001} & $\Lambda \Lambda $n &
404{\bf 123} & {\it 91004002} & $\Lambda $Be$^{6}$ &
405{\bf 152} & {\it 91005005} & $\Lambda $B$^{10}$ & 
406{\bf 181} & {\it 91006008} & $\Lambda $C$^{14}$ \\ 
407{\bf  95} & {\it 92001000} & $\Lambda \Lambda $p &
408{\bf 124} & {\it 92002003} & $\Lambda \Lambda $He$^{5}$ &
409{\bf 153} & {\it 91006004} & $\Lambda $C$^{10} $ &
410{\bf 182} & {\it 91007007} & $\Lambda $N$^{14}$ \\ 
411{\bf  96} & {\it 90003001} & H$^{4}$ &
412{\bf 125} & {\it 92003002} & $\Lambda \Lambda $Li$^{5}$ &
413{\bf 154} & {\it 92004005} & $\Lambda \Lambda $Be$^{9}$ &
414{\bf 183} & {\it 91008006} & $\Lambda $O$^{14}$ \\ 
415{\bf  97} & {\it 90002002} & He$^{4}$ &
416{\bf 126} & {\it 90003005} & Li$^{8}$ &
417{\bf 155} & {\it 92005004} & $\Lambda \Lambda $B$^{9}$ &
418{\bf 184} & {\it 92006007} & $\Lambda \Lambda $C$^{13}$ \\ 
419{\bf  98} & {\it 90001003} & Li$^{4}$ &
420{\bf 127} & {\it 90004004} & Be$^{8}$ &
421{\bf 156} & {\it 90005007} & B$^{12}$ &
422{\bf 185} & {\it 92007006} & $\Lambda \Lambda $N$^{13}$ \\ 
423{\bf  99} & {\it 91001002} & $\Lambda t$ &
424{\bf 128} & {\it 90005003} & B$^{8} $ &
425{\bf 157} & {\it 90006006} & C$^{12}$ &
426{\bf 186} & {\it 90007009} & N$^{16}$ \\ 
427{\bf 100} & {\it 91002001} & $\Lambda $He$^{3}$ &
428{\bf 129} & {\it 91003004} & $\Lambda $Li$^{7}$ &
429{\bf 158} & {\it 90007005} & N$^{12}$ &
430{\bf 187} & {\it 90008008} & O$^{16}$ \\ 
431{\bf 101} & {\it 92000002} & $\Lambda \Lambda $nn &
432{\bf 130} & {\it 91004003} & $\Lambda $Be$^{7}$ &
433{\bf 159} & {\it 91005006} & $\Lambda $B$^{11}$ & 
434{\bf 188} & {\it 90009007} & F$^{16}$ \\ 
435{\bf 102} & {\it 92001001} & $\Lambda \Lambda $d &
436{\bf 131} & {\it 92002004} & $\Lambda \Lambda $He$^{6}$ &
437{\bf 160} & {\it 91006005} & $\Lambda $C$^{11} $ &
438{\bf 189} & {\it 91007008} & $\Lambda $N$^{15}$ \\ 
439{\bf 103} & {\it 92002000} & $\Lambda \Lambda $pp &
440{\bf 132} & {\it 92003003} & $\Lambda \Lambda $Li$^{6}$ &
441{\bf 161} & {\it 92004006} & $\Lambda \Lambda $Be$^{10}$ &
442{\bf 190} & {\it 91008007} & $\Lambda $O$^{15}$ \\ 
443{\bf 104} & {\it 90002003} & He$^{5}$ &
444{\bf 133} & {\it 92004002} & $\Lambda \Lambda $Be$^{6}$ &
445{\bf 162} & {\it 92005005} & $\Lambda \Lambda $B$^{10}$ &
446{\bf 191} & {\it 92006008} & $\Lambda \Lambda $C$^{14}$ \\ 
447{\bf 105} & {\it 90003002} & Li$^{5}$ &
448{\bf 134} & {\it 90004005} & Be$^{9}$ &
449{\bf 163} & {\it 92006004} & $\Lambda \Lambda $C$^{10}$ &
450{\bf 192} & {\it 92007007} & $\Lambda \Lambda $N$^{14}$ \\ 
451{\bf 106} & {\it 91003001} & $\Lambda $H$^{4}$ &
452{\bf 135} & {\it 90005004} & B$^{9}$ &
453{\bf 164} & {\it 90006007} & C$^{13}$ &
454{\bf 193} & {\it 92008006} & $\Lambda \Lambda $O$^{14}$ \\ 
455{\bf 107} & {\it 91002002} & $\Lambda $He$^{4}$ &
456{\bf 136} & {\it 91003005} & $\Lambda $Li$^{8}$ &
457{\bf 165} & {\it 90007006} & N$^{13}$ &
458{\bf 194} & {\it 90008009} & O$^{17}$ \\ 
459{\bf 108} & {\it 91001003} & $\Lambda $Li$^{4}$ &
460{\bf 137} & {\it 91004004} & $\Lambda $Be$^{8}$ &
461{\bf 166} & {\it 91005007} & $\Lambda $B$^{12}$ & 
462{\bf 195} & {\it 90009008} & F$^{17}$
463\end{tabular}
464
465In future this infinite table will be restricted as the lane of stability
466shifts from the line of the mirror nuclei. E.g. F$^{18}$ nucleus is already $\beta
467^{+}$ radioactive. On the other hand, the experience of simulation of nuclear
468fragmentation shows that the probability to radiate a fragment heavier
469than O$^{16}$ is negligibly small. So in future the Q codes starting
470with 194 will be used for the fission fragments (the lightest parts of
471the fission fragments). With these heavy fragments it is
472planned to simulate a fission process which can be very important for
473low energy photo-nuclear reactions. It can be the same quark exchange
474mechanism, but the nuclear clusterization procedure should be
475generalized for the heavy fission fragments.
476
477\qquad Now let us come back to the structure of C++ classes in the CHIPS
478model. Both hadrons and nuclear fragments can be candidates
479({\bf G4QCandidate} inherits properties of the {\bf G4QHadron}
480class) to the secondaries in the reaction and the CHIPS model
481makes a competition between them. So it is necessary to have a
482{\bf G4QCandidateVector} class. In the case of hadronization in vacuum
483the competition between the candidates is clear as only the
484probabilities to fuse quark-antiquark or quark-diquark should be
485calculated as it is explained in \cite{CHIPS1} (Appendix C). In
486the case of the quark exchange hadronization the situation is more
487complicated as the same fragment, say He$^{4}$, can be radiated as a result
488of quark exchange with different H$^{4}$, He$^{4}$, and Li$^{4}$ clusters or
489even with $\Lambda $t or $\Lambda $He$^{3}$ clusters, which are considered
490as parent clusters in the model\cite{CHIPS2} (Appendix D). In fact,
491the {\bf G4QParentCluster} is not a nuclear fragment; it contains only
492its PDG code as an integer number and a quark content of the exchange
493quark pair which is necessary to create the secondary fragment from
494the parent cluster. So it does not inherit the properties of the
495{\bf G4QNucleus} or {\bf G4QHadron} and uses only {\bf G4QContent} class.
496Another hadronic object which is used in the CHIPS event generator is a
497chipolino. The {\bf G4QChipolino} is an object which can be
498represented only by two hadrons e.g.
499$\pi ^{+}\pi ^{+}$ or $\pi ^{+}$K$^{+}$. The chipolinos as well as $nn$ and
500$pp$ nuclear fragments are completely internal in the model and should
501not appear in the output {\bf G4QHadronVector}. The PDG code of all
502chipolinos is 10, so the {\bf G4QChipolino} class can inherit the
503{\bf G4QPDGCode} properties while it is not included in the {\bf
504G4QCHIPSWorld} data base as it does not have a fixed mass value and
505has only one possible channel of decay (decay into the two
506hadrons only).
507
508        This is the total hierarchy of C++ classes of the CHIPS event generator.
509It was intended to be linear and but for the {\bf G4QCHIPSWorld},
510{\bf G4QChipolino,} and {\bf G4QParentCluster} it is. There is
511intention to keep this simple structure in future. The disadvantage
512of this kind of strategy is the necessity to work with large classes.
513The biggest class of the model is still {\bf G4Quasmon}
514(about 4400 lines), then a big one is {\bf G4QNucleus} class (about 2900
515lines, it containes the hadron-level EVA model of nuclear evaporation)
516and then a new part, {\bf G4QEnvironment} class, which is almost as
517big as the  {\bf G4Quasmon} class (about 4100 lines) and it probably
518will grow up in future as it deals with the first interaction issue.
519
520\section{CHIPStest example and usage of the CHIPS model.}
521
522\noindent \qquad This section gives step by step comments for the
523{\bf CHIPStest} program to make understanding of the basic member
524functions of the CHIPS event generator easier. It can be useful for
525the novice user of C++. So the text of the main {\bf CHIPStest.cc}
526file is just reproduced in bold together with some comments. It is
527necessary to point out that this program which can be distributed
528together with the GEANT4 or the CHIPS event generator is not a part
529of the CHIPS event generator. This is just a tool for the standard
530test for the event generator, but it can be successfuly used for
531the physics analysis.
532
533{\bf //\#define debug}
534
535{\bf //\#define pdebug}
536
537// If these flags are uncommented it opens the debugging prints. This is an
538example of a debugging method, which is widely used in the CHIPS event
539generator.
540
541{\bf \#include
542%TCIMACRO{\TEXTsymbol{<}}%
543%BeginExpansion
544\mbox{$<$}%
545%EndExpansion
546iostream.h%
547%TCIMACRO{\TEXTsymbol{>}}%
548%BeginExpansion
549\mbox{$>$}%
550%EndExpansion
551}
552
553{\bf \#include
554%TCIMACRO{\TEXTsymbol{<}}%
555%BeginExpansion
556\mbox{$<$}%
557%EndExpansion
558fstream.h%
559%TCIMACRO{\TEXTsymbol{>}}%
560%BeginExpansion
561\mbox{$>$}%
562%EndExpansion
563}
564
565{\bf \#include
566%TCIMACRO{\TEXTsymbol{<}}%
567%BeginExpansion
568\mbox{$<$}%
569%EndExpansion
570iomanip.h%
571%TCIMACRO{\TEXTsymbol{>}}%
572%BeginExpansion
573\mbox{$>$}%
574%EndExpansion
575}
576
577{\bf \#include ''G4ios.hh''}
578
579// These are just useful standard headers for I/O. The {\bf G4ios.hh }stands
580for unification in working on different platforms.
581
582{\bf \#include ''G4QEnvironment.hh''}
583
584// This is the main and, in fact, the only header of the CHIPS model
585
586{\bf int main()}
587
588{\bf \{}
589
590// Here the main program CHIPStest starts
591
592{\bf \ \ G4cout%
593%TCIMACRO{\TEXTsymbol{<}}%
594%BeginExpansion
595\mbox{$<$}%
596%EndExpansion
597%TCIMACRO{\TEXTsymbol{<}}%
598%BeginExpansion
599\mbox{$<$}%
600%EndExpansion
601''Prepare chips.hbook file for HBOOK histograms''%
602%TCIMACRO{\TEXTsymbol{<}}%
603%BeginExpansion
604\mbox{$<$}%
605%EndExpansion
606%TCIMACRO{\TEXTsymbol{<}}%
607%BeginExpansion
608\mbox{$<$}%
609%EndExpansion
610G4endl;}
611
612// Pay your attention to the fact that if you use the GEANT4 rules
613you must use {\bf G4cout }instead of {\bf cout}, {\bf G4cerr} instead of
614cerr, and {\bf G4endl} instead of {\bf endl} of C++.
615
616{\bf \ \ G4cout.setf(ios::scientific, ios::floatfield);}
617
618// This fixes formats of output for the {\bf G4cout} stream.
619
620{\bf \ \ ifstream inFile(''chipstest.in'', ios::in);}
621
622// This is the definition of the input file where you can change the
623parameters of the model without recompiling of the code (see example of
624values below).
625
626{\bf \ \ G4double temperature;}
627
628// The main parameter of the CHIPS model known as a critical
629temperature T$_{c}$. It is a good idea to use {\bf G4double} instead
630of standard C++ {\bf double} and {\bf G4int} instead of just
631{\bf int}, as the {\bf G4} variables are independent of the word
632length on the particular platform.
633
634{\bf \ \ G4double ssin2g;}
635
636// This is a s/u sea-factor which defines the s-quark suppression in respect
637to u and d quarks.
638
639{\bf \ \ G4double etaetap;}
640
641// This parameter is important only for $\eta $ production, which consists
642of not only quarks but sometimes of gluons too.
643
644{\bf \ \ G4double momb;}
645
646// This is a value of the momentum of the incident particle. All momentum
647and energy values in CHIPS are in MeV.
648
649{\bf \ \ G4double enb;}
650
651// Energy of virtual incident particle. If enb=0 (real particle), energy is
652automatically calculated using momb value.
653
654{\bf \ \ G4double cP;}
655
656// A clasterization parameter. If dA is a number of nucleons in the dense
657region of the nucleus, then $\frac{cP}{dA}$ is a clusterization probability,
658which is called $\omega $ in \cite{CHIPS2} (Appendix D).
659
660{\bf \ \ G4double fN;}
661
662// A number of quasi-free nucleons on the nuclear periphery is defined by
663the {\bf fN}$\cdot ${\bf A} value. The {\bf fN} parameter is named
664$\varepsilon _{1}$ in \cite{CHIPS2} (Appendix D). It increases a
665probability to find quasi-free nucleons calculated for only the dense
666nuclear matter (the nuclear perifery is not so dence).
667
668{\bf \ \ G4double fD;}
669
670// A number of peripheral dinucleon clusters is defined by the
671{\bf dN}$\cdot ${\bf A} value. The {\bf dN} parameter is named
672$\varepsilon _{2}$ in \cite{CHIPS2} (Appendix D). It increases a
673probability to find dinucleons calculated for the dense nuclear
674matter. The number of quasy free nucleons in the dense region is
675calculated as dA=A$\cdot $(1-fN-fD).
676
677{\bf \ \ G4double rM;}
678
679// This parameter can reduce (%
680%TCIMACRO{\TEXTsymbol{<}}%
681%BeginExpansion
682\mbox{$<$}%
683%EndExpansion
6841) or increase (%
685%TCIMACRO{\TEXTsymbol{>}}%
686%BeginExpansion
687\mbox{$>$}%
688%EndExpansion
6891) the quark fusion mechanism in respect to the quark exchange mechanism in
690nuclear matter. The user can vary it from 0 to $\infty .$
691
692{\bf \ \ G4double sA;}
693
694// This is a part of 4$\pi $ sector in which the secondary pions can be
695captured by the nucleus. As the limit is in terms of cos(), this parameter
696varies from -1 to 1 and in the present version of the CHIPS event
697generator it has some meaning only for the antiproton annihilation on
698nuclei (see Appendix B for details).
699
700{\bf \ \ G4int nop;}
701
702// A number of particles considered as candidates of hadronization and
703initialized in {\bf G4QCHIPSWorld.}
704
705{\bf \ \ G4int pPDG;}
706
707// The PDG code of the projectile. Only one projectile is used in this test
708program.
709
710{\bf \ \ G4inttPDG;}
711
712// The PDG code of the target. Target is always at rest and in the ground
713state, so its mass is automatically calculated.
714
715{\bf \ \ G4int nEvt;}
716
717// A number of events to be simulated. These are just declarations for the
718input parameters in the {\bf CHIPStest} program.
719
720\ \ {\small \ }{\bf inFile%
721%TCIMACRO{\TEXTsymbol{>}}%
722%BeginExpansion
723\mbox{$>$}%
724%EndExpansion
725%TCIMACRO{\TEXTsymbol{>}}%
726%BeginExpansion
727\mbox{$>$}%
728%EndExpansion
729temperature%
730%TCIMACRO{\TEXTsymbol{>}}%
731%BeginExpansion
732\mbox{$>$}%
733%EndExpansion
734%TCIMACRO{\TEXTsymbol{>}}%
735%BeginExpansion
736\mbox{$>$}%
737%EndExpansion
738ssin2g%
739%TCIMACRO{\TEXTsymbol{>}}%
740%BeginExpansion
741\mbox{$>$}%
742%EndExpansion
743%TCIMACRO{\TEXTsymbol{>}}%
744%BeginExpansion
745\mbox{$>$}%
746%EndExpansion
747etaetap%
748%TCIMACRO{\TEXTsymbol{>}}%
749%BeginExpansion
750\mbox{$>$}%
751%EndExpansion
752%TCIMACRO{\TEXTsymbol{>}}%
753%BeginExpansion
754\mbox{$>$}%
755%EndExpansion
756nop%
757%TCIMACRO{\TEXTsymbol{>}}%
758%BeginExpansion
759\mbox{$>$}%
760%EndExpansion
761%TCIMACRO{\TEXTsymbol{>}}%
762%BeginExpansion
763\mbox{$>$}%
764%EndExpansion
765momb%
766%TCIMACRO{\TEXTsymbol{>}}%
767%BeginExpansion
768\mbox{$>$}%
769%EndExpansion
770%TCIMACRO{\TEXTsymbol{>}}%
771%BeginExpansion
772\mbox{$>$}%
773%EndExpansion
774enb%
775%TCIMACRO{\TEXTsymbol{>}}%
776%BeginExpansion
777\mbox{$>$}%
778%EndExpansion
779%TCIMACRO{\TEXTsymbol{>}}%
780%BeginExpansion
781\mbox{$>$}%
782%EndExpansion
783pPDG}
784
785{\bf \ \ \ \ \ \ \ \ \ \ \
786%TCIMACRO{\TEXTsymbol{>}}%
787%BeginExpansion
788\mbox{$>$}%
789%EndExpansion
790%TCIMACRO{\TEXTsymbol{>}}%
791%BeginExpansion
792\mbox{$>$}%
793%EndExpansion
794tPDG%
795%TCIMACRO{\TEXTsymbol{>}}%
796%BeginExpansion
797\mbox{$>$}%
798%EndExpansion
799%TCIMACRO{\TEXTsymbol{>}}%
800%BeginExpansion
801\mbox{$>$}%
802%EndExpansion
803nEvt%
804%TCIMACRO{\TEXTsymbol{>}}%
805%BeginExpansion
806\mbox{$>$}%
807%EndExpansion
808%TCIMACRO{\TEXTsymbol{>}}%
809%BeginExpansion
810\mbox{$>$}%
811%EndExpansion
812fN%
813%TCIMACRO{\TEXTsymbol{>}}%
814%BeginExpansion
815\mbox{$>$}%
816%EndExpansion
817%TCIMACRO{\TEXTsymbol{>}}%
818%BeginExpansion
819\mbox{$>$}%
820%EndExpansion
821fD%
822%TCIMACRO{\TEXTsymbol{>}}%
823%BeginExpansion
824\mbox{$>$}%
825%EndExpansion
826%TCIMACRO{\TEXTsymbol{>}}%
827%BeginExpansion
828\mbox{$>$}%
829%EndExpansion
830cP%
831%TCIMACRO{\TEXTsymbol{>}}%
832%BeginExpansion
833\mbox{$>$}%
834%EndExpansion
835%TCIMACRO{\TEXTsymbol{>}}%
836%BeginExpansion
837\mbox{$>$}%
838%EndExpansion
839rM%
840%TCIMACRO{\TEXTsymbol{>}}%
841%BeginExpansion
842\mbox{$>$}%
843%EndExpansion
844%TCIMACRO{\TEXTsymbol{>}}%
845%BeginExpansion
846\mbox{$>$}%
847%EndExpansion
848sA;}
849
850// This is how the user can read parameters from the {bf chipstest.in} file to
851the {\bf CHIPStest} program. The standard input file {\bf chipstest.in}
852contains only one line:
853
854{\it 180.00 0.10 0.30 164 25. 0. 22 90020020 2000 0.40 0.04 4.00 1.00 0.40 }.
855
856Usually it is necessary only to change the PDG
857codes of the projectile and of the target and the momentum of the incident
858particle (unless the particle is virtual and instead of 0 for the energy the
859real value of the energy is given). The clusterization parameters
860are more or less the same for all nuclei. For a number of
861reactions the model has not been tuned yet, so it is necessary to have in
862mind, that the meson production can be controlled by the {\bf rM} parameter
863and the production of the strange particles can be controlled by the
864{\bf ssin2g} parameter. The contribution of the secondary interactions
865(now only for the annihilation of the antibaryon on nuclei at rest)
866is controlled by the {\bf sA} parameter. The $\eta $\ production is
867controlled by the {\bf etaetap} parameter. If very heavy secondary
868nuclear fragments are under investigation the limit for the possible
869clusters {\bf nop} can be increased.
870
871{\bf \ \ G4QCHIPSWorld aWorld(nop);}
872
873// Here the {\bf G4QCHIPSWord} is created in a heap with {\bf nop}
874particles. The CHIPS event generator on fly will try to create new instances
875of the {\bf G4CHIPSWorld}, but as the World is already once created, the
876program gives only a pointer to the already created World. Using this
877pointer the program knows how many particles are defined in the World and
878tries to use them as possible candidates for hadronization. The smaller this
879number the faster the program, but the more restricted range of types of
880the secondary nuclear fragments can be generated.
881
882{\bf \ \ G4QNucleus::SetParameters(fN,fD,cP,rM);}
883
884// This member function defines the static parameters for the nuclear
885clusterization and relative weight for the vacuum quark fusion hadronization
886in the particular nucleus. It is possible that the weight of vacuum
887hadronization {\bf rM} can be reduced in the heavy nuclei, but up to now it
888was not necessary, so it is normally 1. Just to see what can happen if only
889the quark exchange hadronization mechanism is working, one can set this
890parameter to 0.
891
892{\bf \ \ G4Quasmom::SetParameters(temperature,ssin2g,etaetap);}
893
894// This member function defines the static parameters of quasmons. The temperature
895should not be changed as it is defined by
896the energy dependance of the pion multiplicity in the $p\bar{p}$ and
897$e^{+}e^{-}$ reactions \cite{CHIPS1} (Appendix D) and by the mass
898spectrum of hadrons\cite{massSpectr}. The second parameter is proportional
899to the yield of strange particles and it can be tuned by the user. The third
900parameter can be varied only in the case of $\eta $ production.
901
902{\bf \ \ G4QEnvironment::SetParameters(sA);}
903
904// Here more parameters of the first interaction can be added later. The sA
905parameter can be varied only for anti-proton annihilation on the nuclei.
906
907{\bf \ \ ofstream outFile(''chipstest.out'', ios::out);}
908
909{\bf \ \ outFile.setf(ios::scientific, ios::floatfield);}
910
911// Definition of the output file and formate definition for output numbers.
912It can be important only for the length of the output ASCII file.
913
914{\bf \ \ G4double mp=G4QPDGCode(pPDG).GetMass();}
915
916// This is a good example of how one can get the mass of the particle using its
917PDG code: the intermediate instance of the {\bf G4QPDGCode} class is created
918for the PDG code of the projectile particle and the {\bf GetMass()} member
919function gives a mass value for this particle.
920
921{\bf \ \ G4double ep=sqrt(mp*mp+momb*momb);}
922
923// It is a good idea to initialize a variable of C++ immediately at the
924creation point. So the value of the projectile energy is calculated even
925before it is known if this particle virtual or real.
926
927\ {\bf \ if(enb%
928%TCIMACRO{\TEXTsymbol{>}}%
929%BeginExpansion
930\mbox{$>$}%
931%EndExpansion
9320.) ep=enb;}
933
934// If particle is virtual, then the energy is selected from the input file.
935
936{\bf \ \ G4double mt=G4QPDGCode(tQPDG).GetMass();}
937
938// The same method of mass extraction is used for the target, so it is
939equally good for photons, hadrons or nuclei.
940
941{\bf \ \ G4QContent pQC=Q4QPDGCode(pPDG).GetQuarkContent();}
942
943{\bf \ \ G4int cp=pQC.GetCharge();}
944
945{\bf \ \ G4int ct=Q4QPDGCode(tPDG).GetQuarkContent().GetCharge();}
946
947// Here {\bf Q4QPDGCode(tPDG).GetQuarkContent()} is an intermediate instance
948of {\bf G4QContent} class.
949
950{\bf \#ifdef debug}
951
952{\bf \ \ G4cout%
953%TCIMACRO{\TEXTsymbol{<}}%
954%BeginExpansion
955\mbox{$<$}%
956%EndExpansion
957%TCIMACRO{\TEXTsymbol{<}}%
958%BeginExpansion
959\mbox{$<$}%
960%EndExpansion
961''Main: projQC=''%
962%TCIMACRO{\TEXTsymbol{<}}%
963%BeginExpansion
964\mbox{$<$}%
965%EndExpansion
966%TCIMACRO{\TEXTsymbol{<}}%
967%BeginExpansion
968\mbox{$<$}%
969%EndExpansion
970pQC%
971%TCIMACRO{\TEXTsymbol{<}}%
972%BeginExpansion
973\mbox{$<$}%
974%EndExpansion
975%TCIMACRO{\TEXTsymbol{<}}%
976%BeginExpansion
977\mbox{$<$}%
978%EndExpansion
979'', projCharge=''%
980%TCIMACRO{\TEXTsymbol{<}}%
981%BeginExpansion
982\mbox{$<$}%
983%EndExpansion
984%TCIMACRO{\TEXTsymbol{<}}%
985%BeginExpansion
986\mbox{$<$}%
987%EndExpansion
988pc}
989
990\ \ \ \ \ \ \ \ \ \ \ \ \ {\bf 
991%TCIMACRO{\TEXTsymbol{<}}%
992%BeginExpansion
993\mbox{$<$}%
994%EndExpansion
995%TCIMACRO{\TEXTsymbol{<}}%
996%BeginExpansion
997\mbox{$<$}%
998%EndExpansion
999'', targetCharge=''%
1000%TCIMACRO{\TEXTsymbol{<}}%
1001%BeginExpansion
1002\mbox{$<$}%
1003%EndExpansion
1004%TCIMACRO{\TEXTsymbol{<}}%
1005%BeginExpansion
1006\mbox{$<$}%
1007%EndExpansion
1008ct%
1009%TCIMACRO{\TEXTsymbol{<}}%
1010%BeginExpansion
1011\mbox{$<$}%
1012%EndExpansion
1013%TCIMACRO{\TEXTsymbol{<}}%
1014%BeginExpansion
1015\mbox{$<$}%
1016%EndExpansion
1017G4endl;}
1018
1019{\bf \#endif}
1020
1021// This printing can be opened if the {\bf debug} flag definition above is
1022uncommented.
1023
1024\ {\bf \ G4int totC=cp+ct;}
1025
1026// Total charge of the reaction to be checked in every event.
1027
1028\ {\bf \ G4LorentzVector proj4Mom(0.,0.,momb,ep);}
1029
1030// The {\bf G4LorentzVector} is a very useful class (originally {\bf %
1031LorentzVector}) of CLHEP Library adopted by GEANT4. It is widely used in the
1032CHIPS event generator.
1033
1034\ \ {\bf G4double fEvt=nEvt;}
1035
1036// This is the simplest way to convert integer to double. To convert
1037{\bf double} into {\bf integer} one can use {\bf iv=static\_cast%
1038%TCIMACRO{\TEXTsymbol{<}}%
1039%BeginExpansion
1040\mbox{$<$}%
1041%EndExpansion
1042int%
1043%TCIMACRO{\TEXTsymbol{>}}%
1044%BeginExpansion
1045\mbox{$>$}%
1046%EndExpansion
1047(fv)} to avoid compiler warnings.
1048
1049\ {\bf \ G4double sumE=0.;}
1050
1051// Counter of $\eta $
1052
1053{\bf \ \ G4double sumK=0.;}
1054
1055// Counter of kaons
1056
1057{\bf \ \ G4double sumG=0.;}
1058
1059// Counter for events with $\gamma $
1060
1061{\bf \ \ G4doublesumT=0.;}
1062
1063// Sum of $\gamma $\ energies over events with $\gamma $
1064
1065\ {\bf \ G4double sumN=0.; }
1066
1067// Counter for events with $\pi ^{-}$
1068
1069{\bf \ \ G4double sum0=0.; }
1070
1071//Counter for events with $\pi ^{0}$
1072
1073\ {\bf \ G4double sumP=0.; }
1074
1075// Counter for events with $\pi ^{+}$
1076
1077\ {\bf \ G4double sum1N=0.; }
1078
1079// Counters for event with only neutrons
1080
1081\ {\bf \ G4double sumNN=0.; }
1082
1083//Counter for events with neutrons
1084
1085\ {\bf \ G4double sumPP=0.; }
1086
1087// Counter for events with protons
1088
1089{\bf \ \ G4double sumAL=0.; }
1090
1091// Counter for events with $\alpha $. This is just resetting of counters.
1092
1093{\bf \ \ for (G4int ir=0; ir%
1094%TCIMACRO{\TEXTsymbol{<}}%
1095%BeginExpansion
1096\mbox{$<$}%
1097%EndExpansion
1098nEvt; ir++)}
1099
1100{\bf \ \{}
1101
1102// This is just a loop over nEvt events.
1103
1104\ {\bf \ \ \ \ G4int iRandCount = nEvt\%100;}
1105
1106// Normally a number of events is of the order of hundreds, thousands or
1107millions, so the low digits are used to make a sample of events in case of
1108multiple call of the {\bf CHIPStest} program. E.g. if one calls
1109{\bf CHIPStest} 3 times with the numbers of events 2001, 2002, and 2003, all
1110three samples will be completely different and the statistics can be added,
1111if one call {\bf CHIPStest} three times with the numbers of events 2000,
11122000, and 2000, then all three samples must be identical, otherwise it
1113becomes impossible to find dip errors.
1114
1115\ \ {\bf \ \ \ while(iRandCount%
1116%TCIMACRO{\TEXTsymbol{>}}%
1117%BeginExpansion
1118\mbox{$>$}%
1119%EndExpansion
11200)}
1121
1122{\bf \ \ \ \ \ \{}
1123
1124{\small \ \ \ }{\bf \ \ \ \ \ \ G4double vRandCount = G4UniformRand();}
1125
1126// The {\bf G4UniformRand()} is another useful routine adopted by GEANT4
1127from CLHEP Library.
1128
1129{\bf \ \ \ \ \ \ \ \ \ iRandCount - -;}
1130
1131{\bf \ \ \ \ \ \}}
1132
1133// This is a {\bf while} loop to shift random numbers.
1134
1135\ \ {\bf \ \ \ if(!(ir\%1000) \&\& ir)}
1136
1137{\bf \ \ \ \ \ \ G4cout%
1138%TCIMACRO{\TEXTsymbol{<}}%
1139%BeginExpansion
1140\mbox{$<$}%
1141%EndExpansion
1142%TCIMACRO{\TEXTsymbol{<}}%
1143%BeginExpansion
1144\mbox{$<$}%
1145%EndExpansion
1146''CHIPStest: ''%
1147%TCIMACRO{\TEXTsymbol{<}}%
1148%BeginExpansion
1149\mbox{$<$}%
1150%EndExpansion
1151%TCIMACRO{\TEXTsymbol{<}}%
1152%BeginExpansion
1153\mbox{$<$}%
1154%EndExpansion
1155ir%
1156%TCIMACRO{\TEXTsymbol{<}}%
1157%BeginExpansion
1158\mbox{$<$}%
1159%EndExpansion
1160%TCIMACRO{\TEXTsymbol{<}}%
1161%BeginExpansion
1162\mbox{$<$}%
1163%EndExpansion
1164'' events are simulated''%
1165%TCIMACRO{\TEXTsymbol{<}}%
1166%BeginExpansion
1167\mbox{$<$}%
1168%EndExpansion
1169%TCIMACRO{\TEXTsymbol{<}}%
1170%BeginExpansion
1171\mbox{$<$}%
1172%EndExpansion
1173G4endl;}
1174
1175// This is how every 1000 events the {\bf CHIPStest} informs the user that
1176the program is still alive.
1177
1178{\bf \ \ \ \ \ G4LorentzVector totSum=G4LorentzVector(0.,0.,momb,ep+mt);}
1179
1180// This is how the total 4-momentum of the reaction can be made for the
1181future check in every event (It can be prepared beyond the loop and be
1182copied similarly to the total charge in the next line).
1183
1184{\bf \ \ \ \ \ G4int totCharge=totC;}
1185
1186// A copy of the total charge.
1187
1188{\bf \ \ \ \ \ G4QHadronVector projHV;}
1189
1190// Now instead of only one projectile CHIPS adopts a set of projectiles. Of
1191cause the vector can consist of only one particle as in this particular
1192case. This vector is created in C++ stack, not in C++ heap, so it is
1193automatically deleted in the end of the loop (but not pointers and not
1194instances to which pointers indicate!).
1195
1196{\bf \ \ \ \ \ G4QHadron* iH= new G4QHadron(pProg,proj4Mom);}
1197
1198// In this line the {\bf G4QHadron} instance is created in the C++ heap and
1199{\bf iH} is just a pointer to this instance of the class, so every time when
1200the user creates something in C++ heap he becomes responsible for the
1201destruction of the created instance of the class, otherwise the undeleted
1202garbage is collected in the C++ heap and this results in the memory leak.
1203There is no garbage collection service in C++!
1204
1205{\bf \ \ \ \ \ G4QEnvironment* pan = new G4QEnvironment(projHV, tPDG);}
1206
1207// This is the main line of the test program. The instance of the
1208interaction class {\bf G4QEnvironment} is created here in C++ heap and
1209should be destructed as soon as possible.
1210
1211{\bf \ \ \ \ \ G4std::for\_each(projHV.begin(), projHV.end(), DeleteQHadron());}
1212{\bf \ \ \ \ \ projHV.clear();}
1213
1214// CLEAR here stands for excluding of the pointers and DESTROY stands for
1215deleting of the instances of classes to which pointers indicate, so
1216the {\bf iH} pointer can be used to delete the corresponding instance
1217of the {\bf G4QHadron} class. It is important to understand that by deleting unnecessary
1218instances of classes the user can avoid problems with the memory leak;
1219
1220{\bf \ \ \ \ \ G4QHadronVector* output = pan-%
1221%TCIMACRO{\TEXTsymbol{>}}%
1222%BeginExpansion
1223\mbox{$>$}%
1224%EndExpansion
1225Fragment();}
1226
1227// This is the point in the test program, where some convention in C++
1228should be settled. At first glance nothing new is created in this line and
1229the user is not responsible for the garbage collection. But which class
1230created the instance of this output {\bf G4QHadronVector}? - Obviously the
1231{\bf pan} which is an instance of the {\bf G4QEnvironment} class. Then it is
1232responsible for the garbage collection and clearing, destroying and deleting
1233of instances in the destructor of {\bf G4QEnvironment}. In this case if
1234the user tries to delete the instance of the {\bf G4QEnvironment} class
1235as soon as possible, the {\bf output} vector will be lost. So the
1236{\bf pan} delete can be postponed unless all the information is taken out from
1237the {\bf output}. That is how it was done in the original CHIPS code.
1238But the GEANT4 Collaboration prefers to share the responsibility. It is
1239recommended to keep the small {\bf output} instance for a long time and
1240delete the large {\bf pan} instance as soon as possible. In this case
1241CHIPS creates the output  {\bf G4QHadronVector} in the heap and does
1242not take any responsibility for its deleting! If an unexperienced user
1243does not clear, destroy and delete the {\bf output}, then this should
1244be a problem of him... So be careful and follow this example in
1245detail in your own new classes or in new {\bf main}'s, otherwise after
1246a number of events you will be stopped by the ''memory overflow''
1247diagnostics. So any time, when you create a pointer remember
1248that you are responsible to delete the instance to which this pointer
1249indicates.
1250
1251{\bf \ \ \ \ \ delete pan;}
1252
1253// Here it is. The {\bf pan} is already disappeared, but the {\bf output}
1254still exists as a smile of Cheshire Cat.
1255
1256{\bf \ \ \ \ \ G4int tNH = output-%
1257%TCIMACRO{\TEXTsymbol{>}}%
1258%BeginExpansion
1259\mbox{$>$}%
1260%EndExpansion
1261size();}
1262
1263// This gives to the user a number of {\bf G4QHadron} instances in the
1264{\bf output} vector.
1265
1266{\bf \#ifdef pdebug}
1267
1268{\bf \ \ \ \ \ \ G4cout%
1269%TCIMACRO{\TEXTsymbol{<}}%
1270%BeginExpansion
1271\mbox{$<$}%
1272%EndExpansion
1273%TCIMACRO{\TEXTsymbol{<}}%
1274%BeginExpansion
1275\mbox{$<$}%
1276%EndExpansion
1277''DONE: ir=''%
1278%TCIMACRO{\TEXTsymbol{<}}%
1279%BeginExpansion
1280\mbox{$<$}%
1281%EndExpansion
1282%TCIMACRO{\TEXTsymbol{<}}%
1283%BeginExpansion
1284\mbox{$<$}%
1285%EndExpansion
1286ir%
1287%TCIMACRO{\TEXTsymbol{<}}%
1288%BeginExpansion
1289\mbox{$<$}%
1290%EndExpansion
1291%TCIMACRO{\TEXTsymbol{<}}%
1292%BeginExpansion
1293\mbox{$<$}%
1294%EndExpansion
1295'': A\#of Hadrons=''%
1296%TCIMACRO{\TEXTsymbol{<}}%
1297%BeginExpansion
1298\mbox{$<$}%
1299%EndExpansion
1300%TCIMACRO{\TEXTsymbol{<}}%
1301%BeginExpansion
1302\mbox{$<$}%
1303%EndExpansion
1304tNH%
1305%TCIMACRO{\TEXTsymbol{<}}%
1306%BeginExpansion
1307\mbox{$<$}%
1308%EndExpansion
1309%TCIMACRO{\TEXTsymbol{<}}%
1310%BeginExpansion
1311\mbox{$<$}%
1312%EndExpansion
1313G4endl;}
1314
1315{\bf \#endif}
1316
1317// An example of debug printing for another flag {\bf pdebug}.
1318
1319{\bf \ \ \ \ \ G4double EGamma =0.;}
1320
1321// Just a sum of $\gamma $ energies for the particular event.
1322
1323{\bf \ \ \ \ \ G4int npt=0;}
1324
1325{\bf \ \ \ \ \ G4int nGamma=0;}
1326
1327{\bf \ \ \ \ \ G4int nP0=0;}
1328
1329{\bf \ \ \ \ \ G4int nPP=0;}
1330
1331{\bf \ \ \ \ \ G4int nPN=0;}
1332
1333{\bf \ \ \ \ \ G4int nKaons=0;}
1334
1335{\bf \ \ \ \ \ G4int nEta=0;}
1336
1337{\bf \ \ \ \ \ G4int nAlphas=0;}
1338
1339{\bf \ \ \ \ \ G4int nPhotons=0;}
1340
1341{\bf \ \ \ \ \ G4int nProtons=0;}
1342
1343{\bf \ \ \ \ \ G4int nNeutrons=0;}
1344
1345{\bf \ \ \ \ \ G4int nSpNeut=0;}
1346
1347{\bf \ \ \ \ \ G4int nSpAlph=0;}
1348
1349{\bf \ \ \ \ \ G4int nOmega=0;}
1350
1351{\bf \ \ \ \ \ G4int nDec=0;}
1352
1353// These are just counters for the particular event, which are
1354explained below.
1355
1356\ \ \ \ {\bf \ G4bool alarm=false;}
1357
1358// This flag is used for emergency exception in case of some serious error
1359found in the {\bf output} vector.
1360
1361{\bf \ \ \ \ \ for (G4int ind=0; ind%
1362%TCIMACRO{\TEXTsymbol{<}}%
1363%BeginExpansion
1364\mbox{$<$}%
1365%EndExpansion
1366tNH; ind++)}
1367
1368{\bf \ \ \ \ \ \ \{}
1369
1370// The loop over the output hadrons starts here.
1371
1372{\bf \ \ \ \ \ \ \ \ G4QHadron* curH=output-%
1373%TCIMACRO{\TEXTsymbol{>}}%
1374%BeginExpansion
1375\mbox{$>$}%
1376%EndExpansion
1377operator[](ind);}
1378
1379// Now as the user has a pointer to the {\bf output }in the C++ heap, not to
1380the {\bf output} instance in the C++ stack, it is necessary to use {\bf %
1381output-%
1382%TCIMACRO{\TEXTsymbol{>}}%
1383%BeginExpansion
1384\mbox{$>$}%
1385%EndExpansion
1386operator[](ind)} instead of {\bf output[ind]} (which is much more
1387readable; be careful: derefferencing does not work!) the way it was in
1388original CHIPS code, when instead of {\bf G4QHadronVector* output} the
1389{\bf G4QHadronVector output} was returned to the user and the user was not
1390responsible for deleting the vector itself as the vector was deleted in
1391stack automatically. The possible problem could associated with the pointers.
1392When the vector is deleted the pointers in the vector still remain
1393and to escape the memory leak one needs to CLEAR the vector first and then
1394delete it. So making a copy of the pointer to the instance you get
1395a useful tool to delete one by one the {\bf G4QHadron }instances of
1396the {\bf output} vector using {\bf delete curH }command.
1397
1398\ {\bf \ \ \ \ \ \ \ G4double m=curH-%
1399%TCIMACRO{\TEXTsymbol{>}}%
1400%BeginExpansion
1401\mbox{$>$}%
1402%EndExpansion
1403GetMass();}
1404
1405// So you see the {\bf GetMass()} member function is pretty common for
1406different CHIPS classes in other words this is an overloaded member
1407function. The same thing can be said about {\bf Get4Momentum()} or
1408{\bf GetQC()} ({\bf GetQuarkContent()} in historically first classes,
1409which will be corrected in future), {\bf GetPDGCode()},
1410{\bf GetQPDG()} (the difference is that {\bf GetPDGCode()} returns
1411just a {\bf G4int} value and {\bf GetQPDG()} returns
1412the instance of the {\bf G4QPDGCode} class, which can answer a lot of
1413questions and make a lot of actions). So {\bf m} is just a mass value for
1414the hadron in the {\bf output} vector.
1415
1416{\bf \ \ \ \ \ \ \ \ G4LorentzVector lorV=curH-%
1417%TCIMACRO{\TEXTsymbol{>}}%
1418%BeginExpansion
1419\mbox{$>$}%
1420%EndExpansion
1421Get4Momentum();}
1422
1423// This is a 4-momentum of the hadron. Be careful, the accuracy of a
1424computer is restricted, so the mass which is calculated from energy and
1425momentum ({\bf lorV.m()}) coming from complicated kinematical calculations,
1426can be slightly (usually not more than a few KeV) different from the basic
1427mass. But even worse can happen. If there is a mistake in the program one
1428can get a hadron under or above mass shell. It should be checked:
1429
1430{\bf \ \ \ \ \ \ \ \ \ if(abs(m-lorV.m())%
1431%TCIMACRO{\TEXTsymbol{>}}%
1432%BeginExpansion
1433\mbox{$>$}%
1434%EndExpansion
1435.003)}
1436
1437{\bf \ \ \ \ \ \ \ \ \ \{}
1438
1439{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4cerr%
1440%TCIMACRO{\TEXTsymbol{<}}%
1441%BeginExpansion
1442\mbox{$<$}%
1443%EndExpansion
1444%TCIMACRO{\TEXTsymbol{<}}%
1445%BeginExpansion
1446\mbox{$<$}%
1447%EndExpansion
1448''CHIPStest: m=''%
1449%TCIMACRO{\TEXTsymbol{<}}%
1450%BeginExpansion
1451\mbox{$<$}%
1452%EndExpansion
1453%TCIMACRO{\TEXTsymbol{<}}%
1454%BeginExpansion
1455\mbox{$<$}%
1456%EndExpansion
1457lorV.m()%
1458%TCIMACRO{\TEXTsymbol{<}}%
1459%BeginExpansion
1460\mbox{$<$}%
1461%EndExpansion
1462%TCIMACRO{\TEXTsymbol{<}}%
1463%BeginExpansion
1464\mbox{$<$}%
1465%EndExpansion
1466'' \# ''%
1467%TCIMACRO{\TEXTsymbol{<}}%
1468%BeginExpansion
1469\mbox{$<$}%
1470%EndExpansion
1471%TCIMACRO{\TEXTsymbol{<}}%
1472%BeginExpansion
1473\mbox{$<$}%
1474%EndExpansion
1475m}
1476
1477{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
1478%TCIMACRO{\TEXTsymbol{<}}%
1479%BeginExpansion
1480\mbox{$<$}%
1481%EndExpansion
1482%TCIMACRO{\TEXTsymbol{<}}%
1483%BeginExpansion
1484\mbox{$<$}%
1485%EndExpansion
1486'', d=''%
1487%TCIMACRO{\TEXTsymbol{<}}%
1488%BeginExpansion
1489\mbox{$<$}%
1490%EndExpansion
1491%TCIMACRO{\TEXTsymbol{<}}%
1492%BeginExpansion
1493\mbox{$<$}%
1494%EndExpansion
1495lorV.m()-m%
1496%TCIMACRO{\TEXTsymbol{<}}%
1497%BeginExpansion
1498\mbox{$<$}%
1499%EndExpansion
1500%TCIMACRO{\TEXTsymbol{<}}%
1501%BeginExpansion
1502\mbox{$<$}%
1503%EndExpansion
1504G4endl;}
1505
1506{\bf \ \ \ \ \ \ \ \ \ \ \ alarm=true;}
1507
1508{\bf \ \ \ \ \ \ \ \ \ \ \ \ //G4Exception(''CHIPStest: Wrong mass'');}
1509
1510{\bf \ \ \ \ \ \ \ \ \ \}}
1511
1512// Here another output flow {\bf G4cerr} is used. According to the GEANT4
1513convention this flow comes to the screen even when the {\bf G4cout} flow is
1514directed to the file. This property can be useful. The {\bf G4Exception}
1515normally just stops the program, but it can be treated by a head routine to
1516avoid unnecessary stops in a big program. In this particular version of the
1517{\bf CHIPStest} this line is commented and the {\bf alarm} flag is
1518used instead.
1519
1520{\bf \ \ \ \ \ \ \ \ G4int d=curH-%
1521%TCIMACRO{\TEXTsymbol{>}}%
1522%BeginExpansion
1523\mbox{$>$}%
1524%EndExpansion
1525GetNFragments();}
1526
1527// This was a very important value as it helps to navigate the {\bf output }
1528vector. For the real output hadron it should be zero. It means that this
1529particle did not decay. If it did (as e.g. $\rho $ meson), then it is still
1530in the {\bf output} vector, but it is marked by a {\bf d} number different
1531from zero. One can ignore the hadrons with non zero NFragments values or use
1532this value to reconstruct the original scheme of fragmentation. But in
1533the present version this feature is not used. All intermediate hadrons
1534are suppressed now and should not appear in the output. Nevertheless
1535it is safer to check this value as in future versions this
1536possibility can be opened or there can appear a flag, which opens or
1537closes this option.
1538
1539{\bf \ \ \ \ \ \ \ \ G4ThreeVector p = lorV.vect();}
1540
1541// This is another CLHEP class adopted by GEANT4. It is just a 3-vector part
1542of the 4-vector (a 3-momentum vector or a space vector)
1543
1544{\bf \ \ \ \ \ \ \ \ G4doublee=lorV.e();}
1545
1546// This is an example how energy can be extracted from the 4-vector.
1547
1548{\bf \ \ \ \ \ \ \ \ G4int c=curH-%
1549%TCIMACRO{\TEXTsymbol{>}}%
1550%BeginExpansion
1551\mbox{$>$}%
1552%EndExpansion
1553GetPDGCode();}
1554
1555// Extracts an {\it integer} PDG code of the hadron (remember that it can be
1556a photon, if PDG=22).
1557
1558{\bf \ \ \ \ \ \ \ \ \ if(!d\&\&(c==90000002%
1559%TCIMACRO{\TEXTsymbol{\vert}}%
1560%BeginExpansion
1561\mbox{$\vert$}%
1562%EndExpansion
1563%TCIMACRO{\TEXTsymbol{\vert}}%
1564%BeginExpansion
1565\mbox{$\vert$}%
1566%EndExpansion
1567c==90002000%
1568%TCIMACRO{\TEXTsymbol{\vert}}%
1569%BeginExpansion
1570\mbox{$\vert$}%
1571%EndExpansion
1572%TCIMACRO{\TEXTsymbol{\vert}}%
1573%BeginExpansion
1574\mbox{$\vert$}%
1575%EndExpansion
1576c==92000000))}
1577
1578{\bf \ \ \ \ \ \ \ \ \ \{}
1579
1580{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4cerr%
1581%TCIMACRO{\TEXTsymbol{<}}%
1582%BeginExpansion
1583\mbox{$<$}%
1584%EndExpansion
1585%TCIMACRO{\TEXTsymbol{<}}%
1586%BeginExpansion
1587\mbox{$<$}%
1588%EndExpansion
1589''CHIPStest: ***Dibaryon*** PDG=''%
1590%TCIMACRO{\TEXTsymbol{<}}%
1591%BeginExpansion
1592\mbox{$<$}%
1593%EndExpansion
1594%TCIMACRO{\TEXTsymbol{<}}%
1595%BeginExpansion
1596\mbox{$<$}%
1597%EndExpansion
1598c%
1599%TCIMACRO{\TEXTsymbol{<}}%
1600%BeginExpansion
1601\mbox{$<$}%
1602%EndExpansion
1603%TCIMACRO{\TEXTsymbol{<}}%
1604%BeginExpansion
1605\mbox{$<$}%
1606%EndExpansion
1607G4endl;}
1608
1609{\bf \ \ \ \ \ \ \ \ \ \ \ \ alarm=true;}
1610
1611{\bf \ \ \ \ \ \ \ \ \ \}}
1612
1613// If the hadron did not decay and it is a dibaryon consisting of identical
1614baryons, then this is an error in the program.
1615
1616{\bf \ \ \ \ \ \ \ \ if(!d) npt++;}
1617
1618// It just filters decayed hadrons and counts final hadrons.
1619
1620{\bf \ \ \ \ \ \ \ \ if(d) nDec+=d;}
1621
1622// This counts how many hadrons are products of decay (not clear in case of
1623cascade decays!)
1624
1625{\bf \ \ \ \ \ \ \ \ if(c==223) nOmega++;}
1626
1627{\bf \ \ \ \ \ \ \ \ if(c==22) nPhotons++;}
1628
1629{\bf \ \ \ \ \ \ \ \ if(c==311%
1630%TCIMACRO{\TEXTsymbol{\vert}}%
1631%BeginExpansion
1632\mbox{$\vert$}%
1633%EndExpansion
1634%TCIMACRO{\TEXTsymbol{\vert}}%
1635%BeginExpansion
1636\mbox{$\vert$}%
1637%EndExpansion
1638c==321%
1639%TCIMACRO{\TEXTsymbol{\vert}}%
1640%BeginExpansion
1641\mbox{$\vert$}%
1642%EndExpansion
1643%TCIMACRO{\TEXTsymbol{\vert}}%
1644%BeginExpansion
1645\mbox{$\vert$}%
1646%EndExpansion
1647c==-311%
1648%TCIMACRO{\TEXTsymbol{\vert}}%
1649%BeginExpansion
1650\mbox{$\vert$}%
1651%EndExpansion
1652%TCIMACRO{\TEXTsymbol{\vert}}%
1653%BeginExpansion
1654\mbox{$\vert$}%
1655%EndExpansion
1656c==-321) nKaons++;}
1657
1658{\bf \ \ \ \ \ \ \ \ if(c==221) nEta++;}
1659
1660{\bf \ \ \ \ \ \ \ \ if(c==90002002) nAlphas++;}
1661
1662{\bf \ \ \ \ \ \ \ \ if(c==2212%
1663%TCIMACRO{\TEXTsymbol{\vert}}%
1664%BeginExpansion
1665\mbox{$\vert$}%
1666%EndExpansion
1667%TCIMACRO{\TEXTsymbol{\vert}}%
1668%BeginExpansion
1669\mbox{$\vert$}%
1670%EndExpansion
1671c--90001000) nProtons++;}
1672
1673{\bf \ \ \ \ \ \ \ \ if(c==2112%
1674%TCIMACRO{\TEXTsymbol{\vert}}%
1675%BeginExpansion
1676\mbox{$\vert$}%
1677%EndExpansion
1678%TCIMACRO{\TEXTsymbol{\vert}}%
1679%BeginExpansion
1680\mbox{$\vert$}%
1681%EndExpansion
1682c==90000001) nNeutrons++;}
1683
1684{\bf \ \ \ \ \ \ \ \ if((c==2112%
1685%TCIMACRO{\TEXTsymbol{\vert}}%
1686%BeginExpansion
1687\mbox{$\vert$}%
1688%EndExpansion
1689%TCIMACRO{\TEXTsymbol{\vert}}%
1690%BeginExpansion
1691\mbox{$\vert$}%
1692%EndExpansion
1693c==90000001)\&\&abs(e-1005.)%
1694%TCIMACRO{\TEXTsymbol{<}}%
1695%BeginExpansion
1696\mbox{$<$}%
1697%EndExpansion
16983.) nSpNeut++;}
1699
1700{\bf \ \ \ \ \ \ \ \ if(!d \&\& c==90002002 \&\& e-m%
1701%TCIMACRO{\TEXTsymbol{<}}%
1702%BeginExpansion
1703\mbox{$<$}%
1704%EndExpansion
17057.) nSpAlph++;}
1706
1707{\bf \ \ \ \ \ \ \ \ if(c==111) nP0++;}
1708
1709{\bf \ \ \ \ \ \ \ \ if(c==-211) nPN++;}
1710
1711{\bf \ \ \ \ \ \ \ \ if(c==211) nPP++;}
1712
1713{\bf \ \ \ \ \ \ \ \ if(c==22) nGamma++;}
1714
1715{\bf \ \ \ \ \ \ \ \ if(c==22) EGamma+=e;}
1716
1717// These are just self explaining counters.
1718
1719{\bf \ \ \ \ \ \ \ \ if(!d) totCharge-=curH-%
1720%TCIMACRO{\TEXTsymbol{>}}%
1721%BeginExpansion
1722\mbox{$>$}%
1723%EndExpansion
1724GetCharge();}
1725
1726// The total charge is reduced. It should be zero at the end if the
1727charge is conserved in the event.
1728
1729{\bf \ \ \ \ \ \ \ \ if(!d) totSum-=lorV;}
1730
1731// The total 4-momentum is reduced. It should be zero at the end.
1732
1733{\bf \ \ \ \ \ \}}
1734
1735// Loop over output hadrons ends here.
1736
1737{\bf \ \ \ \ \ \ G4double ss=abs(totSum.t())+abs(totSum.x())}
1738
1739{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
1740+abs(totSum.y())+abs(totSum.z());}
1741
1742// That is what should be zero when the residual 4-momentum is zero.
1743
1744{\bf \ \ \ \ \ \ //if(totCharge%
1745%TCIMACRO{\TEXTsymbol{\vert}}%
1746%BeginExpansion
1747\mbox{$\vert$}%
1748%EndExpansion
1749%TCIMACRO{\TEXTsymbol{\vert}}%
1750%BeginExpansion
1751\mbox{$\vert$}%
1752%EndExpansion
1753ss%
1754%TCIMACRO{\TEXTsymbol{>}}%
1755%BeginExpansion
1756\mbox{$>$}%
1757%EndExpansion
17580.005)}
1759
1760{\bf \ \ \ \ \ \ if(totCharge%
1761%TCIMACRO{\TEXTsymbol{\vert}}%
1762%BeginExpansion
1763\mbox{$\vert$}%
1764%EndExpansion
1765%TCIMACRO{\TEXTsymbol{\vert}}%
1766%BeginExpansion
1767\mbox{$\vert$}%
1768%EndExpansion
1769ss%
1770%TCIMACRO{\TEXTsymbol{>}}%
1771%BeginExpansion
1772\mbox{$>$}%
1773%EndExpansion
17740.005%
1775%TCIMACRO{\TEXTsymbol{\vert}}%
1776%BeginExpansion
1777\mbox{$\vert$}%
1778%EndExpansion
1779%TCIMACRO{\TEXTsymbol{\vert}}%
1780%BeginExpansion
1781\mbox{$\vert$}%
1782%EndExpansion
1783alarm)}
1784
1785{\bf \ \ \ \ \ \ //if(totCharge%
1786%TCIMACRO{\TEXTsymbol{\vert}}%
1787%BeginExpansion
1788\mbox{$\vert$}%
1789%EndExpansion
1790%TCIMACRO{\TEXTsymbol{\vert}}%
1791%BeginExpansion
1792\mbox{$\vert$}%
1793%EndExpansion
1794ss%
1795%TCIMACRO{\TEXTsymbol{>}}%
1796%BeginExpansion
1797\mbox{$>$}%
1798%EndExpansion
17990.005%
1800%TCIMACRO{\TEXTsymbol{\vert}}%
1801%BeginExpansion
1802\mbox{$\vert$}%
1803%EndExpansion
1804%TCIMACRO{\TEXTsymbol{\vert}}%
1805%BeginExpansion
1806\mbox{$\vert$}%
1807%EndExpansion
1808alarm%
1809%TCIMACRO{\TEXTsymbol{\vert}}%
1810%BeginExpansion
1811\mbox{$\vert$}%
1812%EndExpansion
1813%TCIMACRO{\TEXTsymbol{\vert}}%
1814%BeginExpansion
1815\mbox{$\vert$}%
1816%EndExpansion
1817nGamma)}
1818
1819// There was a big fight to suppress $\gamma $ output as usually it means
1820that the program does not find further hadronic fragmentation channels... In
1821some versions, where $\gamma $'s are suppressed this diagnostic print can be
1822uncommented, so be careful and comment it if the G4Exception stops here.
1823The same is true for the other diagnostic prints (including the check
1824of the dibaryon pairs). If you find the error, comment the check, inform
1825authors, attaching the main {\bf CHIPStest.cc} code and the
1826{\bf chipstest.in} files, and continue working.
1827
1828{\bf \ \ \ \ \ \ //if(totCharge%
1829%TCIMACRO{\TEXTsymbol{\vert}}%
1830%BeginExpansion
1831\mbox{$\vert$}%
1832%EndExpansion
1833%TCIMACRO{\TEXTsymbol{\vert}}%
1834%BeginExpansion
1835\mbox{$\vert$}%
1836%EndExpansion
1837ss%
1838%TCIMACRO{\TEXTsymbol{>}}%
1839%BeginExpansion
1840\mbox{$>$}%
1841%EndExpansion
18420.005%
1843%TCIMACRO{\TEXTsymbol{\vert}}%
1844%BeginExpansion
1845\mbox{$\vert$}%
1846%EndExpansion
1847%TCIMACRO{\TEXTsymbol{\vert}}%
1848%BeginExpansion
1849\mbox{$\vert$}%
1850%EndExpansion
1851alarm%
1852%TCIMACRO{\TEXTsymbol{\vert}}%
1853%BeginExpansion
1854\mbox{$\vert$}%
1855%EndExpansion
1856%TCIMACRO{\TEXTsymbol{\vert}}%
1857%BeginExpansion
1858\mbox{$\vert$}%
1859%EndExpansion
1860nSpNeut)}
1861
1862{\bf \ \ \ \ \ \ //if(totCharge%
1863%TCIMACRO{\TEXTsymbol{\vert}}%
1864%BeginExpansion
1865\mbox{$\vert$}%
1866%EndExpansion
1867%TCIMACRO{\TEXTsymbol{\vert}}%
1868%BeginExpansion
1869\mbox{$\vert$}%
1870%EndExpansion
1871ss%
1872%TCIMACRO{\TEXTsymbol{>}}%
1873%BeginExpansion
1874\mbox{$>$}%
1875%EndExpansion
18760.005%
1877%TCIMACRO{\TEXTsymbol{\vert}}%
1878%BeginExpansion
1879\mbox{$\vert$}%
1880%EndExpansion
1881%TCIMACRO{\TEXTsymbol{\vert}}%
1882%BeginExpansion
1883\mbox{$\vert$}%
1884%EndExpansion
1885alarm%
1886%TCIMACRO{\TEXTsymbol{\vert}}%
1887%BeginExpansion
1888\mbox{$\vert$}%
1889%EndExpansion
1890%TCIMACRO{\TEXTsymbol{\vert}}%
1891%BeginExpansion
1892\mbox{$\vert$}%
1893%EndExpansion
1894nSpAlph)}
1895
1896{\bf \ \ \ \ \ \ \{}
1897
1898{\bf \ \ \ \ \ \ \ \ \ G4cerr%
1899%TCIMACRO{\TEXTsymbol{<}}%
1900%BeginExpansion
1901\mbox{$<$}%
1902%EndExpansion
1903%TCIMACRO{\TEXTsymbol{<}}%
1904%BeginExpansion
1905\mbox{$<$}%
1906%EndExpansion
1907''***CHIPStest:n=''%
1908%TCIMACRO{\TEXTsymbol{<}}%
1909%BeginExpansion
1910\mbox{$<$}%
1911%EndExpansion
1912%TCIMACRO{\TEXTsymbol{<}}%
1913%BeginExpansion
1914\mbox{$<$}%
1915%EndExpansion
1916ir%
1917%TCIMACRO{\TEXTsymbol{<}}%
1918%BeginExpansion
1919\mbox{$<$}%
1920%EndExpansion
1921%TCIMACRO{\TEXTsymbol{<}}%
1922%BeginExpansion
1923\mbox{$<$}%
1924%EndExpansion
1925'': \#ofH=''%
1926%TCIMACRO{\TEXTsymbol{<}}%
1927%BeginExpansion
1928\mbox{$<$}%
1929%EndExpansion
1930%TCIMACRO{\TEXTsymbol{<}}%
1931%BeginExpansion
1932\mbox{$<$}%
1933%EndExpansion
1934tNH}
1935
1936{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
1937%TCIMACRO{\TEXTsymbol{<}}%
1938%BeginExpansion
1939\mbox{$<$}%
1940%EndExpansion
1941%TCIMACRO{\TEXTsymbol{<}}%
1942%BeginExpansion
1943\mbox{$<$}%
1944%EndExpansion
1945'',s4M=''%
1946%TCIMACRO{\TEXTsymbol{<}}%
1947%BeginExpansion
1948\mbox{$<$}%
1949%EndExpansion
1950%TCIMACRO{\TEXTsymbol{<}}%
1951%BeginExpansion
1952\mbox{$<$}%
1953%EndExpansion
1954totSum%
1955%TCIMACRO{\TEXTsymbol{<}}%
1956%BeginExpansion
1957\mbox{$<$}%
1958%EndExpansion
1959%TCIMACRO{\TEXTsymbol{<}}%
1960%BeginExpansion
1961\mbox{$<$}%
1962%EndExpansion
1963'',sC=''%
1964%TCIMACRO{\TEXTsymbol{<}}%
1965%BeginExpansion
1966\mbox{$<$}%
1967%EndExpansion
1968%TCIMACRO{\TEXTsymbol{<}}%
1969%BeginExpansion
1970\mbox{$<$}%
1971%EndExpansion
1972totCharge%
1973%TCIMACRO{\TEXTsymbol{<}}%
1974%BeginExpansion
1975\mbox{$<$}%
1976%EndExpansion
1977%TCIMACRO{\TEXTsymbol{<}}%
1978%BeginExpansion
1979\mbox{$<$}%
1980%EndExpansion
1981G4endl;}
1982
1983// In case an error is found, the diagnostics print starts here
1984
1985{\bf \ \ \ \ \ \ \ \ \ for (int indx=0; indx%
1986%TCIMACRO{\TEXTsymbol{<}}%
1987%BeginExpansion
1988\mbox{$<$}%
1989%EndExpansion
1990tNH; indx++)}
1991
1992{\bf \ \ \ \ \ \ \ \ \ \{}
1993
1994// A short loop over hadrons starts here. The {\bf int} is used here
1995instead of {\bf G4int} just to demonstrate that sometimes it is not a bad
1996idea to use a short notation in simple cases. Here {\bf indx} is always a
1997small number, so nobody cares about the word length. Another point is that
1998we use {\bf indx} instead of {\bf ind }as the{\bf \ ind }is still flying in
1999the air since the previous loop over hadrons. Another choice would be to
2000write {\bf for(ind=0; ind%
2001%TCIMACRO{\TEXTsymbol{<}}%
2002%BeginExpansion
2003\mbox{$<$}%
2004%EndExpansion
2005tNH;ind++)} not declaring the {\bf ind} second time.
2006
2007\ {\bf \ \ \ \ \ \ \ \ \ \ \ G4QHadron* curH=output-%
2008%TCIMACRO{\TEXTsymbol{>}}%
2009%BeginExpansion
2010\mbox{$>$}%
2011%EndExpansion
2012operator[](indx);}
2013
2014// It is in the other {\it name space}, so we can use the same name for the
2015pointer and following variables.
2016
2017{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4double m=curH-%
2018%TCIMACRO{\TEXTsymbol{>}}%
2019%BeginExpansion
2020\mbox{$>$}%
2021%EndExpansion
2022GetMass();}
2023
2024{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4LorentzVector lorV=curH-%
2025%TCIMACRO{\TEXTsymbol{>}}%
2026%BeginExpansion
2027\mbox{$>$}%
2028%EndExpansion
2029Get4Momentum();}
2030
2031{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4int d=curH-%
2032%TCIMACRO{\TEXTsymbol{>}}%
2033%BeginExpansion
2034\mbox{$>$}%
2035%EndExpansion
2036GetNFragments();}
2037
2038{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4ThreeVector p = lorV.vect();}
2039
2040{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4double e=lorV.e();}
2041
2042{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4int c=curH-%
2043%TCIMACRO{\TEXTsymbol{>}}%
2044%BeginExpansion
2045\mbox{$>$}%
2046%EndExpansion
2047GetPDGCode();}
2048
2049// Many other useful parameters can be calculated, e.g. {\bf ap=lorV.rho()}
2050is an absolute value of the 3-momentum and the {\bf cost=lorV.pz()/ap} is
2051cos($\theta $). A lot of other functions associated with the G4LorentzVector
2052class can be found in the manual for the CLHEP library mentioned above.
2053
2054{\bf \ \ \ \ \ \ \ \ \ \ \ \ G4cerr%
2055%TCIMACRO{\TEXTsymbol{<}}%
2056%BeginExpansion
2057\mbox{$<$}%
2058%EndExpansion
2059%TCIMACRO{\TEXTsymbol{<}}%
2060%BeginExpansion
2061\mbox{$<$}%
2062%EndExpansion
2063''\#''%
2064%TCIMACRO{\TEXTsymbol{<}}%
2065%BeginExpansion
2066\mbox{$<$}%
2067%EndExpansion
2068%TCIMACRO{\TEXTsymbol{<}}%
2069%BeginExpansion
2070\mbox{$<$}%
2071%EndExpansion
2072indx%
2073%TCIMACRO{\TEXTsymbol{<}}%
2074%BeginExpansion
2075\mbox{$<$}%
2076%EndExpansion
2077%TCIMACRO{\TEXTsymbol{<}}%
2078%BeginExpansion
2079\mbox{$<$}%
2080%EndExpansion
2081''(''%
2082%TCIMACRO{\TEXTsymbol{<}}%
2083%BeginExpansion
2084\mbox{$<$}%
2085%EndExpansion
2086%TCIMACRO{\TEXTsymbol{<}}%
2087%BeginExpansion
2088\mbox{$<$}%
2089%EndExpansion
2090d%
2091%TCIMACRO{\TEXTsymbol{<}}%
2092%BeginExpansion
2093\mbox{$<$}%
2094%EndExpansion
2095%TCIMACRO{\TEXTsymbol{<}}%
2096%BeginExpansion
2097\mbox{$<$}%
2098%EndExpansion
2099''), PDG=''%
2100%TCIMACRO{\TEXTsymbol{<}}%
2101%BeginExpansion
2102\mbox{$<$}%
2103%EndExpansion
2104%TCIMACRO{\TEXTsymbol{<}}%
2105%BeginExpansion
2106\mbox{$<$}%
2107%EndExpansion
2108c%
2109%TCIMACRO{\TEXTsymbol{<}}%
2110%BeginExpansion
2111\mbox{$<$}%
2112%EndExpansion
2113%TCIMACRO{\TEXTsymbol{<}}%
2114%BeginExpansion
2115\mbox{$<$}%
2116%EndExpansion
2117'', m/LV=''}
2118
2119{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
2120%TCIMACRO{\TEXTsymbol{<}}%
2121%BeginExpansion
2122\mbox{$<$}%
2123%EndExpansion
2124%TCIMACRO{\TEXTsymbol{<}}%
2125%BeginExpansion
2126\mbox{$<$}%
2127%EndExpansion
2128m%
2129%TCIMACRO{\TEXTsymbol{<}}%
2130%BeginExpansion
2131\mbox{$<$}%
2132%EndExpansion
2133%TCIMACRO{\TEXTsymbol{<}}%
2134%BeginExpansion
2135\mbox{$<$}%
2136%EndExpansion
2137lorV%
2138%TCIMACRO{\TEXTsymbol{<}}%
2139%BeginExpansion
2140\mbox{$<$}%
2141%EndExpansion
2142%TCIMACRO{\TEXTsymbol{<}}%
2143%BeginExpansion
2144\mbox{$<$}%
2145%EndExpansion
2146'',T=''%
2147%TCIMACRO{\TEXTsymbol{<}}%
2148%BeginExpansion
2149\mbox{$<$}%
2150%EndExpansion
2151%TCIMACRO{\TEXTsymbol{<}}%
2152%BeginExpansion
2153\mbox{$<$}%
2154%EndExpansion
2155lorV.e()-m%
2156%TCIMACRO{\TEXTsymbol{<}}%
2157%BeginExpansion
2158\mbox{$<$}%
2159%EndExpansion
2160%TCIMACRO{\TEXTsymbol{<}}%
2161%BeginExpansion
2162\mbox{$<$}%
2163%EndExpansion
2164G4endl;}
2165
2166{\bf \ \ \ \ \ \ \ \ \ \}}
2167
2168// End of the diagnostics print. Pay attention to the way of
2169printing of the {\bf lorV}. There is some special method of printing in
2170this class. CHIPS classes normally have such overloaded methods of printing
2171either. So you can try to print instances of CHIPS classes (try with simple
2172classes, as the complicated classes do not have such methods, and it must be
2173improved in future).
2174
2175{\bf \ \ \ \ \ \ \ \ G4Exception(''***CHIPStest:ALARM/ch/en/mom is not
2176conserved'');}
2177
2178{\bf \ \ \ \ \ \ \}}
2179
2180// This is the postponed exception which follows the complete diagnostics
2181print.
2182
2183{\bf \ \ \ \ \ \ sum0+=nP0;}
2184
2185{\bf \ \ \ \ \ \ sumP+=nPP;}
2186
2187{\bf \ \ \ \ \ \ sumN+=nPN;}
2188
2189{\bf \ \ \ \ \ \ G4int nPions=nP0+nPP+nPN;}
2190
2191{\bf \ \ \ \ \ \ sumG+=nGamma;}
2192
2193{\bf \ \ \ \ \ \ sumT+=EGamma;}
2194
2195{\bf \ \ \ \ \ \ if(nAlphas)sumAL++;}
2196
2197{\bf \ \ \ \ \ \ if(nProtons)sumPP++;}
2198
2199{\bf \ \ \ \ \ \ if(nNeutrons)sumNN++;}
2200
2201{\bf \ \ \ \ \ \ if(nNeutrons\&\&!nProtons\&\&!nAlphas) sum1N++;}
2202
2203{\bf \ \ \ \ \ \ if(nKaons) sumK++;}
2204
2205{\bf \ \ \ \ \ \ if(nEta)sumE++;}
2206
2207{\bf \ \ \ \ \ \ if(nPhotons)nPions=11;}
2208
2209{\bf \ \ \ \ \ \ if(nKaons==2\&\&npt==2) nPions-1;}
2210
2211{\bf \ \ \ \ \ \ else if(nKaons) nPions=10;}
2212
2213{\bf \ \ \ \ \ \ G4std::for\_each(output-%
2214%TCIMACRO{\TEXTsymbol{>}}%
2215%BeginExpansion
2216\mbox{$>$}%
2217%EndExpansion
2218begin(), output-%
2219%TCIMACRO{\TEXTsymbol{>}}%
2220%BeginExpansion
2221\mbox{$>$}%
2222%EndExpansion
2223end(), DeleteQHadron());}
2224
2225{\bf \ \ \ \ \ \ output-> clear();}
2226
2227// Here the user cleans up the pointers and delete the {\bf G4QHadron}
2228instances in the {\bf output} vector (the garbage collection
2229responsibility). This is how it can be done for the STL vectors of pointers.
2230Any CHIPS {\bf G4QClassVector} has the {\bf DeleteQClass()} member
2231function, which deletes the instance to which the pointer of the STL
2232vector indicates.
2233
2234
2235{\bf \ \ \ \}}
2236
2237{\bf \ \ \ cerr%
2238%TCIMACRO{\TEXTsymbol{<}}%
2239%BeginExpansion
2240\mbox{$<$}%
2241%EndExpansion
2242%TCIMACRO{\TEXTsymbol{<}}%
2243%BeginExpansion
2244\mbox{$<$}%
2245%EndExpansion
2246''Relative yields: pi-=''%
2247%TCIMACRO{\TEXTsymbol{<}}%
2248%BeginExpansion
2249\mbox{$<$}%
2250%EndExpansion
2251%TCIMACRO{\TEXTsymbol{<}}%
2252%BeginExpansion
2253\mbox{$<$}%
2254%EndExpansion
2255sumN/fEvt%
2256%TCIMACRO{\TEXTsymbol{<}}%
2257%BeginExpansion
2258\mbox{$<$}%
2259%EndExpansion
2260%TCIMACRO{\TEXTsymbol{<}}%
2261%BeginExpansion
2262\mbox{$<$}%
2263%EndExpansion
2264'',pi+=''%
2265%TCIMACRO{\TEXTsymbol{<}}%
2266%BeginExpansion
2267\mbox{$<$}%
2268%EndExpansion
2269%TCIMACRO{\TEXTsymbol{<}}%
2270%BeginExpansion
2271\mbox{$<$}%
2272%EndExpansion
2273sumP/fEvt}
2274
2275{\bf \ \ \ \ \ \ \ \ \ \
2276%TCIMACRO{\TEXTsymbol{<}}%
2277%BeginExpansion
2278\mbox{$<$}%
2279%EndExpansion
2280%TCIMACRO{\TEXTsymbol{<}}%
2281%BeginExpansion
2282\mbox{$<$}%
2283%EndExpansion
2284'',pi0=''%
2285%TCIMACRO{\TEXTsymbol{<}}%
2286%BeginExpansion
2287\mbox{$<$}%
2288%EndExpansion
2289%TCIMACRO{\TEXTsymbol{<}}%
2290%BeginExpansion
2291\mbox{$<$}%
2292%EndExpansion
2293sum0/fEvt%
2294%TCIMACRO{\TEXTsymbol{<}}%
2295%BeginExpansion
2296\mbox{$<$}%
2297%EndExpansion
2298%TCIMACRO{\TEXTsymbol{<}}%
2299%BeginExpansion
2300\mbox{$<$}%
2301%EndExpansion
2302'',K=''%
2303%TCIMACRO{\TEXTsymbol{<}}%
2304%BeginExpansion
2305\mbox{$<$}%
2306%EndExpansion
2307%TCIMACRO{\TEXTsymbol{<}}%
2308%BeginExpansion
2309\mbox{$<$}%
2310%EndExpansion
2311sumK/fEvt}
2312
2313{\bf \ \ \ \ \ \ \ \ \ \
2314%TCIMACRO{\TEXTsymbol{<}}%
2315%BeginExpansion
2316\mbox{$<$}%
2317%EndExpansion
2318%TCIMACRO{\TEXTsymbol{<}}%
2319%BeginExpansion
2320\mbox{$<$}%
2321%EndExpansion
2322'',eta=''%
2323%TCIMACRO{\TEXTsymbol{<}}%
2324%BeginExpansion
2325\mbox{$<$}%
2326%EndExpansion
2327%TCIMACRO{\TEXTsymbol{<}}%
2328%BeginExpansion
2329\mbox{$<$}%
2330%EndExpansion
2331sumE/fEvt%
2332%TCIMACRO{\TEXTsymbol{<}}%
2333%BeginExpansion
2334\mbox{$<$}%
2335%EndExpansion
2336%TCIMACRO{\TEXTsymbol{<}}%
2337%BeginExpansion
2338\mbox{$<$}%
2339%EndExpansion
2340'',gamma=''%
2341%TCIMACRO{\TEXTsymbol{<}}%
2342%BeginExpansion
2343\mbox{$<$}%
2344%EndExpansion
2345%TCIMACRO{\TEXTsymbol{<}}%
2346%BeginExpansion
2347\mbox{$<$}%
2348%EndExpansion
2349sumG/fEvt}
2350
2351{\bf \ \ \ \ \ \ \ \ \ \
2352%TCIMACRO{\TEXTsymbol{<}}%
2353%BeginExpansion
2354\mbox{$<$}%
2355%EndExpansion
2356%TCIMACRO{\TEXTsymbol{<}}%
2357%BeginExpansion
2358\mbox{$<$}%
2359%EndExpansion
2360''(%
2361%TCIMACRO{\TEXTsymbol{<}}%
2362%BeginExpansion
2363\mbox{$<$}%
2364%EndExpansion
2365E%
2366%TCIMACRO{\TEXTsymbol{>}}%
2367%BeginExpansion
2368\mbox{$>$}%
2369%EndExpansion
2370=''%
2371%TCIMACRO{\TEXTsymbol{<}}%
2372%BeginExpansion
2373\mbox{$<$}%
2374%EndExpansion
2375%TCIMACRO{\TEXTsymbol{<}}%
2376%BeginExpansion
2377\mbox{$<$}%
2378%EndExpansion
2379sumT/sumG%
2380%TCIMACRO{\TEXTsymbol{<}}%
2381%BeginExpansion
2382\mbox{$<$}%
2383%EndExpansion
2384%TCIMACRO{\TEXTsymbol{<}}%
2385%BeginExpansion
2386\mbox{$<$}%
2387%EndExpansion
2388''),n=''%
2389%TCIMACRO{\TEXTsymbol{<}}%
2390%BeginExpansion
2391\mbox{$<$}%
2392%EndExpansion
2393%TCIMACRO{\TEXTsymbol{<}}%
2394%BeginExpansion
2395\mbox{$<$}%
2396%EndExpansion
2397sumNN/fEvt}
2398
2399{\bf \ \ \ \ \ \ \ \ \ \
2400%TCIMACRO{\TEXTsymbol{<}}%
2401%BeginExpansion
2402\mbox{$<$}%
2403%EndExpansion
2404%TCIMACRO{\TEXTsymbol{<}}%
2405%BeginExpansion
2406\mbox{$<$}%
2407%EndExpansion
2408'',p=''%
2409%TCIMACRO{\TEXTsymbol{<}}%
2410%BeginExpansion
2411\mbox{$<$}%
2412%EndExpansion
2413%TCIMACRO{\TEXTsymbol{<}}%
2414%BeginExpansion
2415\mbox{$<$}%
2416%EndExpansion
2417sumPP/fEvt%
2418%TCIMACRO{\TEXTsymbol{<}}%
2419%BeginExpansion
2420\mbox{$<$}%
2421%EndExpansion
2422%TCIMACRO{\TEXTsymbol{<}}%
2423%BeginExpansion
2424\mbox{$<$}%
2425%EndExpansion
2426'',alpha=''%
2427%TCIMACRO{\TEXTsymbol{<}}%
2428%BeginExpansion
2429\mbox{$<$}%
2430%EndExpansion
2431%TCIMACRO{\TEXTsymbol{<}}%
2432%BeginExpansion
2433\mbox{$<$}%
2434%EndExpansion
2435sumAL/fEvt}
2436
2437{\bf \ \ \ \ \ \ \ \ \ \
2438%TCIMACRO{\TEXTsymbol{<}}%
2439%BeginExpansion
2440\mbox{$<$}%
2441%EndExpansion
2442%TCIMACRO{\TEXTsymbol{<}}%
2443%BeginExpansion
2444\mbox{$<$}%
2445%EndExpansion
2446'',onlyN=''%
2447%TCIMACRO{\TEXTsymbol{<}}%
2448%BeginExpansion
2449\mbox{$<$}%
2450%EndExpansion
2451%TCIMACRO{\TEXTsymbol{<}}%
2452%BeginExpansion
2453\mbox{$<$}%
2454%EndExpansion
2455sum1N/fEvt%
2456%TCIMACRO{\TEXTsymbol{<}}%
2457%BeginExpansion
2458\mbox{$<$}%
2459%EndExpansion
2460%TCIMACRO{\TEXTsymbol{<}}%
2461%BeginExpansion
2462\mbox{$<$}%
2463%EndExpansion
2464endl;}
2465
2466// The loop over the events ends here. The {\bf cerr} is used just to be
2467sure that the final printing comes to the screen not to the file. The {\bf %
2468G4cerr} is not used here as it uses a scientific notation for parameter
2469printing, which make the output line too long.
2470
2471{\bf \ \ return EXIT\_SUCCESS;}
2472
2473\}
2474
2475// This is a traditional finish of the main in GEANT4 (it closes what should
2476be closed).
2477
2478\section{Approximation of photonuclear cross sections.}
2479
2480\noindent \qquad The approximation of photonuclear cross sections
2481covers all energies from the threshold of the hadron production to
2482the formally infinit energy. The total energy region is subdivided in
2483three main regions:
2484the GDR region, the $\Delta$ region, and the Reggeon-Pomeron
2485region, and two intermediate regions: the ``quasi-deuteron'' region,
2486which is between the GDR region and the $\Delta$ region, and the
2487``Ropper'' region, which is between the $\Delta$ region and the
2488Reggeon-Pomeron region.
2489
2490        In the GEANT4 photonuclear data base there are about 50 nuclei,
2491for which the photonuclear absorbtion cross sections have been
2492measured. Taking into accout that for heavy nuclei at low energies the
2493cross sections of the photoproduction of neuterons is close to the
2494photonuclear absorbtion cross section the data base can be easily
2495enlarged, but at the current release it was reduced to 14
2496nuclei: $^1$H, $^2$H, $^4$He, $^6$Li, $^7$Li, $^9$Be, $^{12}$C, $^{16}$O,
2497$^{27}$Al, $^{40}$Ca, Cu, Sn, Pb, U.
2498
2499        In all regions the $e=log(E)$ scale (where E is an energy of the
2500incedent photon) was used, to make the future
2501simulation of the electronuclear reactions easier. So the power law, which is
2502characteristic to the GDR region and for the Reggeon-Pomeron region,
2503looks like an exponent. For the $\Delta$ isobar the unusual
2504logarithmic Breit-Wigner form was used.
2505        In the GDR region it was found that the GDR can be subdivided in
2506two contributions. According to the CHIPS approach, which includes the
2507nonrelativistic phase space of nucleons to explain evaporation, the
2508GDR maximum should be described by the power law, so for the most
2509nuclei only two powers $p_1$=4 and $p_2$=8 were used (for $A
2510%TCIMACRO{\TEXTsymbol{<}}%
2511%BeginExpansion
2512\mbox{$<$}%
2513%EndExpansion
251412$ it is 3 and 6, for $A
2515%TCIMACRO{\TEXTsymbol{<}}%
2516%BeginExpansion
2517\mbox{$<$}%
2518%EndExpansion
25198$ it is 2 and 4, for $A
2520%TCIMACRO{\TEXTsymbol{<}}%
2521%BeginExpansion
2522\mbox{$<$}%
2523%EndExpansion
25244$ it is 1 and 2). This power law was cut by
2525the nuclear-barrier-reflection function, which looks like a threshold.
2526The threshold function, which is universal for all regions, has a form
2527\begin{equation}
2528th(e,b,s)=\frac{1}{1+exp(\frac{b-e}{s})}.
2529\label{threshold}
2530\end{equation}
2531Either of the GDR contributions has the following form:
2532$GDR(e,p,b,c,s)=th(e,b,s)\cdot exp(c-p\cdot e)$.
2533The b, c, and s parameters are A-dependent. The values of $p_1$ and
2534$p_2$ are already mentioned above. The values $b_1$, $b_2$, $c_1$,
2535$c_2$, $s_1$, and $s_2$ were found for the listed 14 nuclei and
2536interpolated for other nuclei.
2537
2538        The $\Delta$ isobar region was parametrized in a form:
2539\begin{equation}
2540\Delta (e,d,f,g,r,q)=\frac{d\cdot th(e,f,g)}{1+r\cdot (e-q)^2}.
2541\label{Isobar}
2542\end{equation}
2543Here the parameter q can be interpreted as a position of the $\Delta$
2544isobar and the r parameter can be interpreted as the reversed
2545width. The A-dependence of these parameters (where $a=log(A)$) are
2546
2547\begin{itemize}
2548\item  $d=0.41\cdot A$ (for $^1$H it is 0.55, for $^2$H it is 0.88),
2549which means that the $\Delta$ yield is proportional
2550to A;
2551
2552\item  $f=5.13-.00075\cdot A$; $g=.09$ ($g=.04$ for $A
2553%TCIMACRO{\TEXTsymbol{<}}%
2554%BeginExpansion
2555\mbox{$<$}%
2556%EndExpansion
25577$), where the value of
2558$exp(f)$ shows how the pion threshold depends on A. It is clear that
2559the threshold becomes 140 MeV only for uranium; for the rest of the nuclei
2560it is higher. It can be explained by the $\Delta+N\rightarrow N+N$ reaction,
2561which can take place in nuclear medium below the pion threshold.
2562
2563\item  $q=5.84-\frac{.09}{1+.003\cdot A^2}$, which means that the
2564``mass'' of the $\Delta$ isobar moves to lower energies; the reason
2565can be the same as for the pion threshold.
2566
2567\item $r=11.9-a\cdot 1.24$ (for $^1$H it is 18.), that is, the reversed width becoming
2568smaller with A, which means that the width increases; the reason can
2569be the same.
2570\end{itemize}
2571
2572
2573The transition ``Ropper'' (r postfix) and the ``quasi-deuteron''
2574(d postfix) contributions were approximated, using the same form
2575of parametrization (similar to the $\Delta$ contribution, but
2576without the pion threshold factor):
2577\begin{equation}
2578Tr(e,v,w,u)=\frac {v}{1+w\cdot (e-u)^2}.
2579\label{Transition}
2580\end{equation}
2581
2582It should be noted, that for $^1$H and $^2$H instead of the
2583``quasi-deuteron'' contribution, which is almost zero for these
2584nuclei the third barionic resonance was used, so the parameters for
2585these two nuclei are quite different, but trivial and do not have
2586any A-dependence.
2587 
2588The values of parameters are ($a=log(A)$):
2589\begin{itemize}
2590\item  $v_{d}=\frac {exp(-1.7+a\cdot 0.84)}{1+exp(7\cdot (2.38-a))}$,
2591which shows that the A-dependence of the
2592``quasi-deuteron'' region is stronger than $A^{0.84}$. The
2593denominator is necessary to emphasize that this contribution disappears
2594for light nuclei
2595(in fact it takes place somewhere between $^6$Li and $^7$Li). For $^1$H
2596it is .078 and for $^2$H it is .08, so the high delta
2597contribution does not look really growing; its relative contribution
2598disappears with A.
2599
2600\item  $u_{d}=3.7$; $w_d=0.4$, the experimental information is not
2601enough to vary these parameters for the position and for the width
2602of the ``quasi-deuteron'' contribution. For $^1$H and for
2603 $^2$H they are 6.93 and 90, which possibly indicates on the $Delta$(1600)
2604and $\Delta$(1620) contributions.
2605
2606
2607\item  $v_{r}=exp(-2.+a\cdot 0.84)$, the A-dependence for both transition regions
2608appeared to be the same ($A^{0.84}$). For $^1$H it is 0.22 and
2609for $^2$H it is 0.34.
2610
2611\item $u_{r}=6.46+a\cdot 0.061$ (for $^1$H and for $^2$H it is 6.57),
2612so the ``mass'' of the ``Ropper'' starts with the 1440 MeV value and
2613moves to the greater value with A.
2614
2615\item $w_{r}=0.1+a\cdot 1.65$ (for $^1$H it is 20. and for $^2$H it is 15.).
2616\end{itemize}
2617
2618
2619In fact, what is called the transition ``Ropper'' contribution, can
2620not be identified with real resonance, as this is really the formal
2621transition contribution. It becomes clear from the Regge-Pomeron
2622contribution. It was parametrized in the following form:
2623\begin{equation}
2624RP(e,h)=h\cdot th(7.,0.2)\cdot (0.0116\cdot exp(e\cdot 0.16)+0.4\cdot exp(-e\cdot 0.2)),
2625\label{Regge}
2626\end{equation}
2627where $h=A\cdot exp(-a\cdot (0.885+0.0048\cdot a))$.
2628
2629The result of the approximation is shown in Fig.~\ref{photonuc} for the 6 of the
263014 nuclei.
2631\begin{figure}
2632  \resizebox{1.00\textwidth}{!}
2633{
2634   \includegraphics{photonuclear.eps}
2635}
2636\caption{Photoabsorbtion cross sections for 6 basic nuclei.}
2637\label{photonuc}
2638\end{figure}
2639
2640
2641\section{Approximation of the electronuclear cross sections.}
2642
2643\noindent \qquad The approximation of the electronuclear cross
2644sections is based on the method of equivalent photons. Qualitatively an
2645electron can be considered as a flux of equivalent photons, which
2646interacts with nuclei according to the photonuclear cross section. The letter
2647condition restrict the $Q^2$ of the equivalent photons. The basic idea
2648of the method was stated by E. Fermi and developed by C. F. von
2649Weizsacker and E. J. Williams in 1934. In this chapter we use the
2650formula from \cite{chpd.eqPhotons}, which is
2651\begin{equation}
2652dn(y)=-\frac {2\alpha}{\pi}\cdot log(y) dlog(y),
2653\label{eqPh}
2654\end{equation}
2655where $y=\frac {\nu}{E}$, E is the energy of the electron and $\nu$ is
2656the energy of the equivalent photon. For the similation purposes
2657this function should be multiplied by the photonuclear cross section
2658and integrated:
2659\begin{equation}
2660\sigma_{eA}=log(E)\cdot \int \sigma_{\gamma A}(\nu )dlog(\nu ) -
2661\int log(\nu )\cdot \sigma_{\gamma A}(\nu )dlog(\nu ),
2662\label{electroNuc}
2663\end{equation}
2664the integration for each particular $E$ is done from the threshold
2665energy , where the $\sigma_{\gamma A}(\nu)$
2666becomes not zero, till the electron energy $E$, where the equivalent
2667photon spectrum drops to zero.
2668So these integrals should be parametrized as a function of the upper
2669limit. We call the first integral $I_1(E)$ and the second
2670$I_2(E)$. These two functions were prepared for all 14 nuclei, which
2671were discussed in the previous chapter, and for the intermediate
2672nuclei they are interpolated.
2673        After the cross section is calculated the values of
2674$log(E)\cdot I_1(E)-I_2(E)$ is known and can be used for the
2675randomization of the equivalent photon energy $\nu$. If $r$ is the
2676random number than the equation
2677\begin{equation}
2678log(\nu)\cdot I_1(\nu)-I_2(\nu)=r\cdot (log(E)\cdot I_1(E)-I_2(E))
2679\label{EqPhEq}
2680\end{equation}
2681should be solved
2682
2683Up to 2 GeV the $I_i$ functions were tabulated, but beyond 2 GeV they
2684are functional. Unfortunately it was not possible to use the same
2685Reggeon-Pomeron function, which was defined in the previous chapter
2686(Eq.\ref{Regge}), as the contribution of the resonances is still high
2687at 2 GeV, to make the photonuclear crossection smooth at 2 GeV the
2688Reggeon part of Eq.\ref{Regge} was changed and the Pomeron part was
2689left the same:
2690\begin{equation}
2691RP(e,h)=h\cdot (0.0116\cdot exp(e\cdot 0.16)+1.*exp(-e\cdot 0.26)),
2692\label{newRegge}
2693\end{equation}
2694This function starts from 2 GeV, so it does not need the threshold
2695part. The multiplication by unit is not a mistake as
2696it is 0.75 for $^1$H, 0.78 for $^1$H, and .9 for other nuclei
2697lighter than oxigen. So the $I_i$ in the functional part can be
2698analitically integrated and then the Eq. \ref{EqPhEq} can be solved by
2699the Newton's method. Fortunately the equation is quite linear.
2700
2701That is how the primary electron is split in the model in the secondary electron
2702and the equivalent photon under the condition of the following
2703photonuclear interaction of the equivalent photon.
2704
2705It must be mentioned that there are different definitions for the
2706equivalent photons. At high energies it sometimes expands to the
2707virtual photons with high $Q^2$. An advantage is that
2708the hard processes appear in the model, but the disadvantage of this
2709approach is that in this case the $\sigma_{\gamma^*A}$ is not
2710known. The only guess is that
2711$\sigma_{\gamma^*A}=\sigma_{\gamma A}(W^2)$,
2712 where $W^2 = M^2+2\cdot \nu \cdot M - Q^2$ instead of the
2713$s=M^2+2\cdot E_\gamma \cdot M$ in the photonuclear reaction. But it
2714is known that even shadowing effect is different for the real and
2715virtual photonuclear reactions \cite{Shadowing}.
2716
2717Nevertheless, having in mind the possible future development and
2718to compare the different approaches, we consider the formula for the
2719hard processes, whic according to \cite{Guilo} is
2720\begin{equation}
2721dn(y)=\frac{\alpha}{2\pi}\left[
2722(2-2y+y^2)log)\left( \frac{Q^2_{max}}{Q^2_{min}} \right) -
27232(1-y)\left( 1-\frac{Q^2_{max}}{Q^2_{min}} \right)
2724\right]\cdot log(y)
2725\label{EqPhHigh}
2726\end{equation}
2727was considered.
2728At high energies the second term can be neglected in comparison to the
2729first term. The $Q^2_{min}=\frac{m^2y^2}{1-y}$, where $m$ is a mass of
2730the electron, and the $Q^2_{max}$. In the case of almost real equivalent
2731photons it should be of the order of $m^2$, and then in the small $y$ region
2732one gets just Eq.\ref{eqPh}. The more accurate formula in the low $y$
2733region is
2734\begin{equation}
2735dn(y)=\frac{2\alpha}{\pi}(1-y)\left[ log(y)+C \right] \cdot log(y),
2736\label{EqPhNew}
2737\end{equation}
2738where C is a constant defined by the $Q^2_{max}$ and the second
2739term. When $y$ becomes close to unit the additional $(1-y)$ term
2740reduces the probability for the hard photons and the C-term increases
2741it, so there is a kind of a compensation. On the basis of this
2742estimate we kept the equivalent photon distribution in the simple form
2743of the Eq. \ref{eqPh}, which is good enough for the simulation in
2744matter. Only extensive measurements of the electronuclear hadron
2745production cross section can force us to improve the simple approach because
2746
2747\begin{itemize}
2748\item  The Eq.\ref{eqPh} covariant, that is independent on the energy
2749of the electron. The equivalent photon method gives a kind
2750of a ``photonic structure function'' of the electron, so the $y$
2751variable is similar to the $x$ variable in the structure functions of
2752hadrons. In case of the Eq.\ref{eqPh} the intergal of the number of
2753equivalent photons fom $y$ to 1 diverges as $log^2(y)$, which is elegant
2754and simple. If $C$ in the Eq.\ref{EqPhNew} is energy independent and is
2755just a constant or a function of only $y$, it can be covariant either,
2756but nobody proposed such formula.
2757
2758\item  Even if the part of photons with high $Q^2$ is added and the
2759equivalent photon flux increases at large $y$, even then, according
2760to \cite{Electronuc}, the cross section of the virtual photons melts
2761resonances and become smaller in respect to the $Q^2=0$ cross
2762sections, so this additional part becomes less important.
2763
2764\item  The Eq.\ref{EqPhNew} is created, tested and used only for the
2765high energies and it is not clear how good it is at low energies,
2766which are important for the electromagnetic shower simulation in matter.
2767\end{itemize}
2768
2769
2770
2771\section{GEANT4 interface joining the String model and the CHIPS.}
2772
2773\noindent \qquad The basic assumption of this joining is the energy
2774loss of the high energy hadron in nuclear matter (about 1 GeV/fm)
2775
2776\section{Conclusion.}
2777
2778\noindent \qquad This Manual for the release of CHIPS in GEANT4 is
2779made not only for the blind im matter simulation of the hadronic
2780processes, but for those users, who would like to improve the
2781interaction part of the CHIPS event generator for their own
2782specific reactions. For these users some advice concerning the
2783data presentation can be useful.
2784
2785This is a good idea to use a normalized invariant function $\rho (k)$%
2786\[
2787\rho =\frac{2E\cdot d^{3}\sigma }{\sigma _{tot}\cdot d^{3}p}\propto \frac{%
2788d\sigma }{\sigma _{tot}\cdot pdE},
2789\]
2790where $\sigma _{tot}$\ is a total cross section of the reaction. So the
2791simple rule is to divide the distribution over the hadron energy (E) by the
2792momentum and by the reaction cross section. The argument $k$ can be
2793calculated for any outgoing hadron or fragment as
2794\[
2795k=\frac{E+p-B\cdot m_{N}}{2},
2796\]
2797which has a meaning of the energy of the primary quark-parton. As the
2798spectrum of the quark partons is universal for all the secondary hadrons or
2799fragments, the distributions over this parameter have similar shape for all
2800the secondaries. They should differ only approaching the kinematic limits or
2801in the evaporation region. This feature is useful for any analysis of
2802experimental data independently of the CHIPS model.
2803
2804The released version of the CHIPS event generator is not perfect yet, so in case
2805of an error it is necessary to distinguish between the error of the test
2806program ({\bf CHIPStest.cc}) and the error in the body of the generator.
2807Usually the error printing contains the address of the routine, but sometimes
2808the name is abbreviated so that instead of the {\bf G4QEnvironment }one can
2809find {\bf G4QE}, instead of the {\bf G4Quasmon} the {\bf G4Q} is used, or
2810instead of the {\bf G4QNucleus} only the {\bf G4QN} appears. The errors in
2811the {\bf CHIPStest.cc} can be easily analyzed. Even if sometimes energy or
2812charge is not conserved, just exclude this check and keep going. On the
2813other hand, if the error is in the body it is difficult to fix. The normal
2814procedure is to uncomment the flags of the debugging prints in the
2815corresponding part of the source code and try to find out the reason. Anyway
2816inform authors about the error. Do not forget to attach the
2817{\bf CHIPStest.cc} and the {\bf chipstest.in} files.
2818
2819The concluding remarks should be made about the parameters of the model. The main
2820parameter (the critical temperature T$_{c}$) should not be varied. A big set
2821of data confirms {\bf 180 MeV} while from the mass spectrum of hadrons
2822it can be found more precisely as 182 MeV. The clusterization
2823parameter is {\bf 4.} which is just about 4$\pi /3.$
2824If the quark exchange starts at the mean distance between baryons in the
2825dense part of the nucleus, then the radius of the clusterization sphere is
2826twice bigger than ''the radius of the space, occupied by the baryon''.
2827It gives 8 for the parameter, but the space, occupied by the baryon can not
2828be spheric; only cubic subdivision of space is possible so the factor $\pi
2829/6 $ appears. But this is a rough estimate, so {\bf 4} or even {\bf 5} can be
2830tried. The surface parameter fD is slightly varying with A growing
2831from 0 to 0.04. For the present CHIPS version the recomended
2832parameters for low energies are
2833
2834\begin{tabular}{llllllllll}
2835{\bf A} & {\bf T} & {\bf s/u} & {\bf eta} & {\bf noP} & {\bf fN} & {\bf fD}
2836& {\bf Cp} & {\bf rM} & {\bf sA} \\ 
2837{\bf Li} & 180. & 0.1 & 0.3 & 223 & .4 & .00 & 4. & 1.0 & 0.4 \\ 
2838{\bf Be} & 180. & 0.1 & 0.3 & 223 & .4 & .00 & 4. & 1.0 & 0.4 \\ 
2839{\bf  C} & 180. & 0.1 & 0.3 & 223 & .4 & .00 & 4. & 1.0 & 0.4 \\ 
2840{\bf  O} & 180. & 0.1 & 0.3 & 223 & .4 & .02 & 4. & 1.0 & 0.4 \\ 
2841{\bf  F} & 180. & 0.1 & 0.3 & 223 & .4 & .03 & 4. & 1.0 & 0.4 \\ 
2842{\bf Al} & 180. & 0.1 & 0.3 & 223 & .4 & .04 & 4. & 1.0 & 0.4 \\ 
2843{\bf Ca} & 180. & 0.1 & 0.3 & 223 & .4 & .04 & 4. & 1.0 & 0.4 \\ 
2844{\bf Cu} & 180. & 0.1 & 0.3 & 223 & .4 & .04 & 4. & 1.0 & 0.4 \\ 
2845{\bf Ta} & 180. & 0.1 & 0.3 & 223 & .4 & .04 & 4. & 1.0 & 0.4 \\ 
2846{\bf  U} & 180. & 0.1 & 0.3 & 223 & .4 & .04 & 4. & 1.0 & 0.4
2847\end{tabular}
2848
2849The parameter of the vacuum hadronization weight can be bigger for the light
2850nuclei and smaller for the heavy nuclei, but 1. is a good guess. The s/u
2851parameter is not yet tuned, as it demands the strange particles production
2852data. A guess is that if a lot of $u\bar{u}$ and $d\bar{d}$ pairs come in
2853the reaction as in the $p\bar{p}$ interaction the parameter can be 0.1, in
2854other cases it is closer to 0.3 as in other event generators. But the best
2855idea is just do not touch any parameters for the first experience with the
2856CHIPS event generator. Just change the incident momentum, the PDG code of
2857the projectile, and the CHIPS stile PDG code of the target.
2858
2859\section{Appendix A. Public member functions of CHIPS.}
2860
2861\noindent \qquad A lot of private encapsulated member functions are used in
2862classes of CHIPS. It is not necessary to know about these member functions
2863even for users which would like to develop some parts of the CHIPS event
2864generator or to add additional classes. The only public member functions of
2865the CHIPS event generator are listed and briefly commented. The total length
2866of the {\it .cc} files of the model is about 12400 lines and it includes
2867about 270 constructors, public functions and operators. Each line of this
2868code is a hidden, encapsulated parameter, so it is not strange, that it fits
2869so extended sample of data (sorry, this is a joke).
2870
2871\subsection{G4QEnvironment (about 4100 lines)}
2872
2873// === {\it Constructors} ===
2874
2875{\bf G4QEnvironment(const G4QHadronVector\& projHadrons,}
2876
2877\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf const G4int
2878targPDG);}
2879
2880// This is a constructor used and explained in the {\bf CHIPStest} program.
2881
2882{\bf G4QEnvironment (const G4QEnvironment\& right);}
2883
2884// This is a copy-constructor (for the original in the C++ stack).
2885
2886{\bf \thinspace G4QEnvironment (G4QEnvironment* right);}
2887
2888// This is a copy-constructor (for the original in the C++ heap).
2889
2890// === {\it Overloaded operators} ===
2891
2892{\bf const \thinspace G4QEnvironment\& operator=(const G4QEnvironment\&
2893right);}
2894
2895// This is a copy operator similar to the copy-constructors above.
2896
2897{\bf int operator==(const G4QEnvironment \&right) const;}
2898
2899// This operator returns true if the body values of two {\bf G4QEnvironment}
2900objects are the same.
2901
2902{\bf int operator!=(const G4QEnvironment \&right) const;}
2903
2904// This operator returns true if the body values of two {\bf G4QEnvironment}
2905objects are the same.
2906
2907\thinspace \thinspace
2908
2909// === {\it Static functions} ===
2910
2911{\bf static void SetParameters(G4double solAn, G4bool efFlag=false, G4double}
2912
2913{\bf \ \ \ \ \ \ \ \ \ \ piThresh=141.4, G4double mpisq=20000.,G4double
2914dinum=1880.);}
2915
2916// Definition of the internal parameters which were partially used and
2917explained in the {\bf CHIPStest} program. The solAn parameter defines the
2918limits of the solid angle in which the secondary hadrons are absorbed by the
2919nucleus after the primary peripheral interaction (annihilatio) with on
2920nucleon \ relatively far from the surface of the nucleus. The limits are in
2921terms of cos($\theta $), so this parameter can be varied from -1 to 1. The
2922{\bf piThresh, mpisq, dinum} parameters defines up to which CM energy ({\bf E%
2923}$_{thresh}$) the model must use the photon-captured-by-quark mechanism (%
2924{\bf E}$_{thresh}$={\bf piThresh+(mpisq+projM2)*dinum, }where{\bf \ projM2 }%
2925is a squared mass of the projectile $\gamma $; it is 0 in case of real
2926photon and -Q$^{2}$ \ in case of virtual photon). The default values of
2927these parameters are shown.
2928
2929// === {\it Selectors} ===
2930
2931{\bf G4QNucleus GetEnvironment() const;}
2932
2933// Select the {\bf G4QNucleus }environment of this {\bf G4QEnvironment}
2934instance (if it is vacuum, then PDG code of the {\bf G4QNucleus} is
293590000000).
2936
2937{\bf G4QuasmonVector* GetQuasmons();}
2938
2939// Select a vector of quasmons for this {\bf G4QEnvironment} instance.
2940
2941\thinspace
2942
2943// === {\it Modifiers} ===
2944
2945{\bf G4QHadronVector* Fragment();}
2946
2947// The main action member function, which was used and explained in the {\bf %
2948CHIPStest} program.
2949
2950// === {\it General functions} ===
2951
2952{\bf G4ThreeVector RndmDir();}
2953
2954// This is a general purpose function, which can be interesting for the
2955users independent of the G4QEnvironment class itself. It returns the random
2956direction in the 3D space. Hopefully such function already exists in the
2957standard libraries, so in future it will be substituted by the standard one
2958and probably excluded from the G4QEnvironment class. This is true for the
2959{\it general functions} of all classes of the CHIPS event generator and is
2960said only once, here. Hopefully tere is a gfeneral function for this in GEANT4.
2961
2962\subsection{G4Quasmon (about 4400 lines)}
2963
2964// === {\it Constructors} ===
2965
2966{\bf G4Quasmon(G4QContent qQContent=G4QContent(0,0,0,0,0,0),}
2967
2968{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ G4LorentzVector
2969q4M=G4LorentzVector(0.,0.,0.,0.),}
2970
2971{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ G4LorentzVector
2972ph4M=G4LorentzVector(0.,0.,0.,0.));}
2973
2974// The main constructor, including default-constructor, which is just
2975vacuum. The very minimum for the {\bf G4Quasmon} object \ is quark content,
2976the total CM energy can be zero, as all quarks in the model (including
2977s-quark and diquarks) are massless quark-partons. If the total CM energy is
2978not zero, then energy dissipation can be possible. The third parameter gives
2979the 4-momentum of the photon, which can be used in the internal quark
2980exchange hadronization act.
2981
2982{\bf \thinspace G4Quasmon(const G4Quasmon\& right);}
2983
2984// This is a copy-constructor (for the original in the C++ stack).
2985
2986{\bf \thinspace G4Quasmon(G4Quasmon* right);}
2987
2988// This is a copy-constructor (for the original in the C++ heap).
2989
2990// === {\it Overloaded operators} ===
2991
2992{\bf const \thinspace G4Quasmon\& operator=(const G4Quasmon\& right);}
2993
2994// This is a copy operator similar to the copy-constructors above.
2995
2996{\bf int operator==(const G4Quasmon \&right) const;}
2997
2998// This operator returns true if the body values of two {\bf G4Quasmon}
2999objects are the same.
3000
3001{\bf int operator!=(const G4Quasmon \&right) const;}
3002
3003// This operator returns true if the body values of two {\bf G4Quasmon}
3004objects are the same.
3005
3006\thinspace \thinspace
3007
3008// === {\it Static functions} ===
3009
3010{\bf static void SetParameters(G4double temperature, G4bool ssin2g,}
3011
3012\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
3013\ \ \ {\bf G4double etaetap);}
3014
3015// Definition of the internal parameters which were used and explained in
3016the {\bf CHIPStes} program.
3017
3018{\bf static void SetTemper(G4double temperature);}
3019
3020{\bf static void SetSOverU(G4bool ssin2g);}
3021
3022{\bf static void SetEtaSup(G4double etaetap);}
3023
3024// The parameters can be set separately.
3025
3026// === {\it Selectors} ===
3027
3028{\bf G4Qdouble GetTemper() const;}
3029
3030{\bf G4Qdouble GetSOverU() const;}
3031
3032{\bf G4Qdouble GetEtaSup() const;}
3033
3034// Extraction of the current parameters of the {\bf G4Quasmon} instance.
3035This change of parameters is used in the model e.g. in the case of
3036antiproton annihilation on nucleus at rest. In this case the first interaction has
3037parameters of the proton-antiproton annihilation, which were separately tuned and
3038the second interaction has the parameters, defined by CHIPStest for the antiproton
3039annihilation on nuclei.
3040
3041{\bf G4LorentzVector Get4Momentum() const;}
3042
3043// Returns the 4-momentum of this {\bf G4Quasmon} instance.
3044
3045{\bf G4QContent GetQC() const;}
3046
3047// Returns the quark content of this {\bf G4Quasmon} instance.
3048
3049{\bf G4QPDGCode GetQPDG() const;}
3050
3051// Returns the {\bf G4QPDGCode} instance for this {\bf G4Quasmon} instance.
3052
3053{\bf G4int GetStatus() const;}
3054
3055// Returns the status of this {\bf G4Quasmon} instance.
3056
3057\begin{itemize}
3058\item  status=-1 means PANIC, the quasmon can not make fragments in this
3059environment;
3060
3061\item  status=0 means that the quasmon is empty, it is done, it is
3062equivalent to vacuum now, it is already history;
3063
3064\item  status=1 means that the quasmon successfully fragmented;
3065
3066\item  status=2 means that nothing was done with the quasmon by chance;
3067
3068\item  status=3 means that the quasmon tried to fragment but did not succeed
3069by some good reason (such as Coulomb barrier...);
3070
3071\item  status=4 means that this quasmon was just created and never fragmented.
3072\end{itemize}
3073
3074\thinspace
3075
3076// === {\it Modifiers} ===
3077
3078{\bf G4QHadronVector* Fragment(G4QNucleus\& nucEnviron, G4int nQ);}
3079
3080// The main action member function of the {\bf G4Quasmon} class. It adopts
3081the nuclear environment from the {\bf G4QEnvironment} class (and can return it
3082in the modified by the hadronization form) uses a total number of alive
3083quasmons in the environment ({\bf status}$\neq ${\bf 0}). This value is
3084important, as the algorithm of the quasmon fragmentation is much
3085easier, if the quasmon does not have any competitors around and can
3086get the responsibility for the termination of the hadronization process.
3087
3088{\bf void ClearOutput();}
3089
3090// The G4Quasmon object as a predecessor of the G4QEnvironment object has
3091the {\bf G4QHadronVector output }very similar to the {\bf G4QHadronVector
3092output} of the {\bf G4QEnvironment} class, which was discussed in the
3093example. But as the fragmentations of all quasmons in the environment are
3094made in parallel, it is possible for one quasmon to fragment a few times. So
3095the output should be CLEANED, but it should not be destroyed as its
3096instances of G4QHadrons can be used in the {\bf G4QHadronVector output} of
3097the {\bf G4QHadronVector output}\ instance.
3098
3099{\bf void InitQuasmon(G4QContent qQContent, G4LorentzVector q4M);}
3100
3101// If Quasmon came into real trouble and declared PANIC, it is not necessary
3102to kill it and then recreate it, it will do to reinitialize the quasmon.
3103
3104{\bf void IncreaseBy(const G4Quasmon* pQuasm);}
3105
3106// Sometimes it is necessary to merge quasmons. In future this member
3107function should be transformed to the overloaded {\bf operator+=}.
3108
3109{\bf void KillQuasmon();}
3110
3111// Kill does not mean destruct. The dead quasmon is just a vacuum quasmon (%
3112{\bf status=0}), which is kept in history.
3113
3114\subsection{G4QNucleus : public G4QHadron (about 2900 lines)}
3115
3116// === {\it Constructors} ===
3117
3118{\bf G4QNucleus();}
3119
3120// A default constructor, which defines the nucleus as vacuum.
3121
3122{\bf G4QNucleus(G4int nucPDG);}
3123
3124// A constructor, which defines the nucleus at rest, using its PDG code.
3125
3126{\bf G4QNucleus(G4int nucPDG, G4LorentzVector p);}
3127
3128// Similar to the previous one, but here the nucleus can move.
3129
3130{\bf G4QNucleus(G4int z, G4int n, G4int s);}
3131
3132// A constructor, which defines the nucleus at rest, using a number of
3133protons {\bf p}, a number of neutrons {\bf n}, and a number of ${\bf \Lambda 
3134}$\ in it.
3135
3136{\bf G4QNucleus(G4int z, G4int n, G4int s, G4LorentzVector p);}
3137
3138// Similar to the previous one, but here the nucleus can move.
3139
3140{\bf \thinspace G4QNucleus(const G4QNucleus\& right);}
3141
3142// This is a copy-constructor (for the original in the C++ stack).
3143
3144{\bf \thinspace G4QNucleus(G4QNucleus* right);}
3145
3146// This is a copy-constructor (for the original in the C++ heap).
3147
3148// === {\it Overloaded operators} ===
3149
3150{\bf const \thinspace G4QNucleus\& operator=(const G4QNucleus\& right);}
3151
3152// This is a copy operator similar to the copy-constructors above.
3153
3154{\bf int operator==(const G4QNucleus \&right) const;}
3155
3156// This operator returns true if the body values of two {\bf G4QNucleus}
3157objects are the same.
3158
3159{\bf int operator!=(const G4QNucleus \&right) const;}
3160
3161// This operator returns true if the body values of two {\bf G4QNucleus}
3162objects are the same.
3163
3164{\bf G4QNucleus operator+=(const G4QNucleus\& rhs);}
3165
3166{\bf G4QNucleus operator-=(const G4QNucleus\& rhs);}
3167
3168// Helps to add or subtract nuclear cluster from this nucleus.
3169
3170{\bf G4QNucleus operator*=(const G4int\& rhs);}
3171
3172// Multiply nucleus by some value. This overloaded function is made just for
3173generalization.
3174
3175{\bf ostream\& operator%
3176%TCIMACRO{\TEXTsymbol{<}}%
3177%BeginExpansion
3178\mbox{$<$}%
3179%EndExpansion
3180%TCIMACRO{\TEXTsymbol{<}}%
3181%BeginExpansion
3182\mbox{$<$}%
3183%EndExpansion
3184(ostream\& lhs, G4QNucleus\&rhs);}
3185
3186{\bf ostream\& operator%
3187%TCIMACRO{\TEXTsymbol{<}}%
3188%BeginExpansion
3189\mbox{$<$}%
3190%EndExpansion
3191%TCIMACRO{\TEXTsymbol{<}}%
3192%BeginExpansion
3193\mbox{$<$}%
3194%EndExpansion
3195(ostream\& lhs, const G4QNucleus\&rhs);}
3196
3197//These overload functions help to print the nucleus as an instance.
3198
3199\thinspace \thinspace
3200
3201// === {\it Static functions} ===
3202
3203{\bf static void SetParameters(G4double fN, G4bool fD, G4double cP,}
3204
3205\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
3206\ \ {\bf G4double mR=1.);}
3207
3208// Definition of the internal parameters which were used and explained in
3209the {\bf CHIPStes} program.
3210
3211\thinspace
3212
3213// === {\it Selectors} ===
3214
3215{\bf G4int GetPDG() const;}
3216
3217// Get the PDG code of the nucleus. In future it can be extracted and the
3218inherited {\bf G4QHadron::GetPDGCode()} function can be used.
3219
3220{\bf G4int GetZ() const;}
3221
3222{\bf G4int GetN() const;}
3223
3224{\bf G4int GetS() const;}
3225
3226// Return numbers of protons, neutrons, and $\Lambda $\ correspondingly.
3227
3228{\bf G4int GetA() const;}
3229
3230// Returns atomic weight (a baryon number) of the nucleus (A=Z+N+S).
3231
3232{\bf G4int GetDZ() const;}
3233
3234{\bf G4int GetDN() const;}
3235
3236{\bf G4int GetDS() const;}
3237
3238{\bf G4int GetDA() const;}
3239
3240// Return numbers of protons, neutrons, $\Lambda $\ and atomic weight of the
3241dense region of the nucleus correspondingly.
3242
3243{\bf G4int GetMaxClust() const;}
3244
3245// Returns the maximum baryon number for clusters existing in this
3246particular instance of {\bf G4QNucleus} class.
3247
3248{\bf G4double GetProbability(G4int bn=0) const;}
3249
3250// Returns a probability to find the cluster with given baryon number. There
3251is internal array of \ 256 values in the body of this class, where the
3252calculated probabilities of clusterization are stored. In case of default
3253{\bf bn=0}, returns a bias factor for the vacuum (quark fusion) mechanism of
3254hadronization (which is normally 1.).
3255
3256{\bf G4double GetMZNS() const;}
3257
3258// If the G4QNucleus was not initialized by PDG code, but by z, n, and s,
3259then sometimes the inherited method {\bf G4QHadron::GetMass()} can fail. In
3260this case this method, which calculate the ground state mass, using the z,
3261n, and s, can be useful. And it is a bit faster.
3262
3263{\bf G4double GetGSMass() const;}
3264
3265// This is another historical method of extraction of nuclear (not hadronic)
3266mass. This is almost a synonym of the previous one. The last two member
3267functions can disappear in future, and only the inherited
3268{\bf G4QHadron::GetMass()}\ function can be the only method.
3269
3270{\bf G4QContent GetQCZNS() const;}
3271
3272// In the case of hadron-nucleus instance this function is much faster then the
3273general member inhertited from the {\bf G4QHadron::GetQC()} class.
3274
3275\thinspace
3276
3277// === {\it Modifiers} ===
3278
3279{\bf G4bool EvaporateBaryon(G4QHadron* h1, G4QHadron* h2);}
3280
3281// This is a member function for any nucleus even for stable nuclei. The
3282evaporation modeling described in \cite{CHIPS2} is all in this member
3283function. It is not considered as an essential part of the CHIPS morel, as
3284it is a hadron level model, not quark level model. It is much simpler. But
3285there is a lot of common features, as in the case of evaporation one
3286still can use well integrable nonrelativistic model of heavy nucleons. So if
3287the CHIPS model deals with massless quark-partons, which means, that this is
3288an ultra relativistic model, then EVA (this is a provisional name, which is
3289used for the evaporation model) deals with baryons (and nuclear clusters),
3290the mass of which is much bigger than the typical kinetic energy of one
3291participant. That is why it can be called as not relativistic model. So if
3292CHIPS inherits properties of LIPS (Lorenz Invariant Phase Space), then EVA
3293inherits properties of GIPS (Galilean Invariant Phase Space). The EVA can be
3294used absolutely independently of CHIPS by users who would like to evaporate
3295nuclei and use the CHIPS generator only as a library of classes. So it is
3296necessary to create an instance of the {\bf G4QNucleus} class (say {\bf N}),
3297then create two instances of G4QHadron class (h1 and h2), and make a call
3298for the function: {\bf if(!N.EvaporateBarion(h1,h2)) \{cout%
3299%TCIMACRO{\TEXTsymbol{<}}%
3300%BeginExpansion
3301\mbox{$<$}%
3302%EndExpansion
3303%TCIMACRO{\TEXTsymbol{<}}%
3304%BeginExpansion
3305\mbox{$<$}%
3306%EndExpansion
3307''Did not succeeded''%
3308%TCIMACRO{\TEXTsymbol{<}}%
3309%BeginExpansion
3310\mbox{$<$}%
3311%EndExpansion
3312%TCIMACRO{\TEXTsymbol{<}}%
3313%BeginExpansion
3314\mbox{$<$}%
3315%EndExpansion
3316endl;\}}. So this function returns boolean{\it \ true}, if evaporation
3317succeeded. If it did then one hadron contains the evaporated Baryon (nuclear
3318fragment) and the other contains the residual nucleus (which in case of
3319light nuclei can be a hadron or a small nuclear fragment either). At present
3320the EVA member function can evaporate not only baryons, but alpha particles
3321too. It was necessary at low excitation energies. May be in future other
3322fragments can appear in the output. To find more details about the call of
3323the function and the treatment of the secondary hadrons one should look in the
3324current {\bf G4QEnvironment.cc} file.
3325
3326{\bf G4bool SplitBaryon();}
3327
3328// To avoid the situation, when the nucleus is above the ground state, but
3329below a threshold of radiation of any nuclear fragment, this function is
3330written. It checks if it is possible to radiate a baryon or an $\alpha $. If
3331it is, then it returns boolean. So this function is a selector, not
3332modifier. It appeared after the EVA member function just to support the
3333logic of explanation.
3334
3335{\bf void InitByPDG(G4init newPDG);}
3336
3337{\bf void InitByQC(G4QContent newQC);}
3338
3339// These two member functions help to reinitialize already existing nucleus
3340rather than destruct it and then recreate (In future can be one overloaded
3341function {\bf Reinitialize}).
3342
3343{\bf void IncProbability(G4int bn);}
3344
3345// Increment a probability for the cluster with baryon number {\bf bn} (a
3346mean number of such clusters in the nucleus) by 1.
3347
3348{\bf void Increase(G4int PDG,}
3349
3350\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf G4LorentzVector
3351LV=G4LorentzVector(0.,0.,0.,0.));}
3352
3353{\bf void Increase(G4QContent QC,}
3354
3355\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf G4LorentzVector
3356LV=G4LorentzVector(0.,0.,0.,0.));}
3357
3358// An overloaded function which increases this nucleus by a hadron.
3359
3360{\bf void Reduce(G4int PDG);}
3361
3362// Opposite to previous action. The residual nucleus is in the ground state.
3363In future it will be overloaded for G4QContent.
3364
3365{\bf void CalculateMass();}
3366
3367// It is always difficult to say what is the mass of the nucleus. If it is
3368excited, then its mass is different from the ground state mass. That is why
3369there are so many complications with the mass of nucleus. If the Nucleus is
3370defined only by PDG code (or quark content), then the CalculateMass() member
3371function can create a Lorentz vector of the nucleus at rest with the ground
3372state mass. It may be a good idea to include this action automatically
3373as a default, but it would make the creation of fake nuclei to be a long
3374process, while it is necessary to use it only as a pointer to some trivial
3375member function. So at present this function is separated and users should
3376use it manually.
3377
3378{\bf void SetMaxClust(G4int clBN);}
3379
3380// If this is a heavy nucleus, then the clusters up to A=dA can be calculate
3381(which may be good for the fission process!), but now the baryon number
3382of clusters is restricted by a baryon number of highest fragment in the {\bf %
3383G4QCHIPSWorld}. So the process of calculation of cluster probabilities can
3384need some special restriction. This is what this member function is doing.
3385
3386{\bf G4int UpdateClusters(G4bool din);}
3387
3388// Calculate probabilities for clusters in this nucleus. Returns the largest
3389baryon number of cluster. The {\bf din} flag is normally {\it false}, but in
3390case of search for a cluster, which is necessary e.g. for pion capture, this
3391flag, if it is {\it true}, suppresses the cases, when the state of nucleus
3392is randomized in such a way that there is no clusters in the nucleus and
3393interaction can not happen.
3394
3395{\bf void PrepareCandidates(G4QCandidateVector\& theQCandidates);}
3396
3397// Using the {\bf G4QCandidateVector} this member function calculates
3398pre-probabilities for nuclear clusters, which usually means the probability
3399to find the particular nuclear cluster in this nuclear matter.
3400
3401// === {\it General functions} ===
3402
3403{\bf G4int RandomizeBinom(G4double p, G4int N);}
3404
3405// Returns {\bf n} randomized according to the binomial law with probability
3406{\bf p} for total number of {\bf N} particles.
3407
3408{\bf G4double CoulombBarr(const G4double\& cZ, const G4double\& cA,}
3409
3410\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
3411{\bf G4double dZ=0., G4double dA=0.);}
3412
3413// Calculates binding of the cluster with the charge {\bf cZ} and the baryon
3414number {\bf cA}. The conditional {\bf dZ} and {\bf dA} parameters have the
3415same meaning as in the following member function.
3416
3417{\bf G4double CoulombBarr(const G4double\& cZ, const G4double\& cA,}
3418
3419\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
3420{\bf G4double dZ=0., G4double dA=0.);}
3421
3422// Calculates a height of the coulomb barrier for this nucleus and a cluster
3423with the charge {\bf cZ} and the baryon number {\bf cA}. If before this (%
3424{\bf cZ},{\bf cA}) cluster the other cluster with {\bf dZ} (charge) and {\bf %
3425dA} (baryon number) was conditionally radiated from this nucleus then the
3426{\bf dZ }and {\bf dA} values should be given as the input parameters. In
3427this case the coulomb barrier can be smaller.
3428
3429{\bf G4double CoulBarPenProb(const G4double\& CB, const G4double\& E,}
3430
3431\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
3432\ \ \ \ \ {\bf const G4int\& cZ, const G4int\& cA);}
3433
3434// Calculate a probability for the over-barrier penetration for the
3435particular height of the Coulomb Barrier {\bf CB}, kinetic energy of the
3436cluster {\bf E}, and baryon number of the cluster {\bf B}. The penetration
3437probability is calculated according to \cite{PenCB}. It should be noted,
3438that the probability is reduced even for neutrons, which does not have any
3439Coulomb Barrier.
3440
3441\subsection{G4QHadron (about 500 lines)}
3442
3443// === {\it Constructors} ===
3444
3445{\bf G4QHadron();}
3446
3447// A default constructor.
3448
3449{\bf G4QHadron(G4LorentzVector p);}
3450
3451// Only kinematical constructor, which can be used if only the DecayIn...
3452member functions are necessary.
3453
3454{\bf G4QHadron(G4int PDGcode,}
3455
3456\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf G4LorentzVector
3457p=G4LorentzVector(0.,0.,0.,0.));}
3458
3459// These overloaded constructor creates a hadron with parameters from the
3460{\bf G4QCHIPSWorld} data base. Pay attention that in the similar {\bf %
3461G4QNucleus} constructor the input arguments are reversed to alert the user.
3462
3463{\bf G4QHadron(G4QContent QC,}
3464
3465\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf G4LorentzVector
3466p=G4LorentzVector(0.,0.,0.,0.));}
3467
3468{\bf G4QHadron(G4QPDGCode QPDG,}
3469
3470\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf G4LorentzVector
3471p=G4LorentzVector(0.,0.,0.,0.));}
3472
3473// These are similar overloaded constructors.
3474
3475{\bf G4QHadron(G4int PDGCode, G4double m, G4QContent QC);}
3476
3477{\bf G4QHadron(G4QPDGCode QPDG, G4double m, G4QContent QC);}
3478
3479// These overloaded constructors can be used to create a hadron for a
3480general {\it quasmon} or a {\it chipolino (at rest)}.
3481
3482{\bf G4QHadron(G4int PDGCode, G4LorentzVector p, G4QContent QC);}
3483
3484{\bf G4QHadron(G4QPDGCode QPDG, G4LorentzVector p, G4QContent QC);}
3485
3486// The same for the moving hadron-quasmon (hadron-chipolino).
3487
3488{\bf G4QHadron(G4QParticle* pPart, G4double maxM);}
3489
3490// This constructor is used for a construction of a resonance with
3491distributed mass (the {\bf pPart} is a pointer to the resonance in the {\bf %
3492G4QCHIPSWorld} data base). The mass value is randomized at the construction
3493time and limited from above by the {\bf maxM }value.
3494
3495{\bf G4QHadron(const G4QHadron\& right);}
3496
3497// This is a copy-constructor (for the original in the C++ stack).
3498
3499{\bf \thinspace G4QHadron(G4QHadron* right);}
3500
3501// This is a copy-constructor (for the original in the C++ heap).
3502
3503// === {\it Overloaded operators} ===
3504
3505{\bf const \thinspace G4QHadron\& operator=(const G4QHadron\& right);}
3506
3507// This is a copy operator similar to the copy-constructors above.
3508
3509{\bf int operator==(const G4QHadron \&right) const;}
3510
3511// This operator returns true if the body values of two {\bf G4QHadron}
3512objects are the same.
3513
3514{\bf int operator!=(const G4QHadron \&right) const;}
3515
3516// This operator returns true if the body values of two {\bf G4QHadron}
3517objects are the same.
3518
3519\thinspace
3520
3521// === {\it Selectors} ===
3522
3523{\bf G4int GetPDGCode() const;}
3524
3525// Get the PDG code of the hadron.
3526
3527{\bf G4int GetQCode() const;}
3528
3529// Get the Q code (particle ID in the {\bf G4QCHIPSWorld} data base) of the
3530hadron. If it is negative, then this particle is not in the CHIPS data base.
3531
3532{\bf G4QPDGCode GetQPDG() const;}
3533
3534// Get G4QPDGCodee class for this hadron. After that all member functions of
3535this class (see below) can be used.
3536
3537{\bf G4LorentzVector Get4Momentum() const;}
3538
3539// Returns the 4-momentum of the hadron.
3540
3541{\bf G4QContent GetQC() const;}
3542
3543// Returns the quark content of the hadron.
3544
3545{\bf \thinspace G4double GetMass() const;}
3546
3547// Returns the mass of the hadron.
3548
3549{\bf \thinspace G4double GetMass2() const;}
3550
3551// Returns the squared mass of the hadron (in comparison to the
3552G4LorentzVector.m2(), which is faster than G4LorentzVector.m(), this
3553function is slower than the previous one)..
3554
3555{\bf \thinspace G4double GetWidth() const;}
3556
3557// Returns the width of the hadron if the hadron is an unstable resonance,
3558oterwise returns 0.
3559
3560{\bf G4int GetNFragments() const;}
3561
3562// Return a number of secondary particles if the hadron decayed in the {\bf %
3563G4QHadronVector}.
3564
3565{\bf G4int GetCharge() const;}
3566
3567// Returns the charge of the hadron.
3568
3569{\bf G4int GetBaryonNumber() const;}
3570
3571// Returns the baryon number of the hadron.
3572
3573// === {\it Modifiers} ===
3574
3575{\bf void SetQC(const G4QContent\& newQC);}
3576
3577// Set new quark content for the hadron. This is a kind of reinitialization
3578of the hadron. The references (\&) to the input parameters are widely used
3579in the CHIPS event generator to make its understanding easier for users with
3580FORTRAN background.
3581
3582{\bf void Set4Momentum(const G4Lorentzvector\& aMom);}
3583
3584{\bf void SetQPDG(const G4QPDGCode\& QPDG);}
3585
3586{\bf void SetNFragments(const G4int\& nf);}
3587
3588// These modifiers are just opposite to the corresponding selectors above.
3589
3590{\bf void NegPDGCode();}
3591
3592// Makes an anti-particle out of the particle.
3593
3594{\bf void MakeAntiHadron();}
3595
3596// This member function makes the same job as previous, but it is smarter:
3597it does not make negative quark content and negative PDG code, if this is
3598true neutral hadron (anti-hadron coincide with hadron). So these two member
3599functions are different.
3600
3601// === {\it General functions} ===
3602
3603{\bf G4double RandomizeMass(G4QParticle* pPart, G4double maxM);}
3604
3605// Randomizes the mass value for resonances, {\bf pPart} is a pointer to the
3606particle in the {\bf G4QCHIPSWorld} and the {\bf maxM }is the upper limit
3607for the randomized mass value.
3608
3609{\bf G4bool DecayIn2(G4LorentzVector\& f4Mom, G4LorentzVector\& s4Mom);}
3610
3611// Purely kinematical member function of decay of the particle with
36124-momentum of this hadron in two particles, masses of which are defined by
3613masses of the input {\bf G4LorentzVector}s {\bf f4Mom} and {\bf s4Mom}. The
3614result comes back in the same 4-vectors (that is why they are not {\bf %
3615const, }which is used only for input parameters to be sure that this
3616parameter is not changed by reference in the member function).
3617
3618{\bf G4bool CorMDecayIn2(G4double corM, G4LorentzVector\& f4Mom);}
3619
3620// This member function makes a special kind of correction for the result of
3621decay in two particles. It changes the mass of this hadron, leaving the
3622direction of other particle the same in the Center of Mass System (CMS) as
3623it is defined by the {\bf f4Mom} 4-vector. The {\bf f4Mom} 4-vector is
3624updated (corrected) the residual 4-vector is assigned to this hadron (now
3625having the new mass value {\bf corM}).
3626
3627{\bf G4bool CorEDecayIn2(G4double corE, G4LorentzVector\& f4Mom);}
3628
3629// This member function makes another special kind of correction for the
3630result of decay in two particles. It adds some Laboratory System (LS) energy
3631{\bf corE} to this hadron and subtract it from the particle with the {\bf %
3632f4Mom} 4-vector. The direction in CMS, defined by the {\bf f4Mom} 4-vector
3633is kept.
3634
3635{\bf G4bool RelDecayIn2(G4LorentzVector\& f4Mom, G4LorentzVector\&}
3636
3637{\bf s4Mom, G4LorentzVector\& dir, G4double maxCost, G4double minCost=-1.);}
3638
3639// This member function is quite similar to the general {\bf DecayIn2}\
3640member function, but it can randomize the cos(theta) value of decay in CMS
3641in the interval ({\bf minCost},{\bf maxCost}) in respect to the direction,
3642which is defined by the {\bf dir} 4-vector.
3643
3644{\bf G4bool DecayIn3(G4LorentzVector\& f4Mom, G4LorentzVector\& s4Mom,}
3645
3646\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf G4LorentzVector\&
3647s4Mom);}
3648
3649//Decays this hadron in three particles. All member functions above return
3650{\it true} if the decay succeeded and {\it false} if it does not.
3651
3652\subsection{G4QChipolino (about 500 lines)}
3653
3654// === {\it Constructors} ===
3655
3656{\bf G4QChipolino();}
3657
3658// A default constructor.
3659
3660{\bf G4QChipolino(G4QContent QC);}
3661
3662{\bf G4QChipolino(const G4QChipolino\& right);}
3663
3664// This is a copy-constructor (for the original in the C++ stack).
3665
3666{\bf \thinspace G4QChipolino(G4QChipolino* right);}
3667
3668// This is a copy-constructor (for the original in the C++ heap).
3669
3670// === {\it Overloaded operators} ===
3671
3672{\bf const \thinspace G4QChipolino\& operator=(const G4QChipolino\& right);}
3673
3674// This is a copy operator similar to the copy-constructors above.
3675
3676{\bf int operator==(const G4QChipolino \&right) const;}
3677
3678// This operator returns true if the body values of two {\bf G4QChipolino}
3679objects are the same.
3680
3681{\bf int operator!=(const G4QChipolino \&right) const;}
3682
3683// This operator returns true if the body values of two {\bf G4QChipolino}
3684objects are the same.
3685
3686{\bf ostream\& operator%
3687%TCIMACRO{\TEXTsymbol{<}}%
3688%BeginExpansion
3689\mbox{$<$}%
3690%EndExpansion
3691%TCIMACRO{\TEXTsymbol{<}}%
3692%BeginExpansion
3693\mbox{$<$}%
3694%EndExpansion
3695(ostream\& lhs, G4QChipolino\& rhs);}
3696
3697// This is a member function, which prints the content of the chipolino.
3698
3699\thinspace
3700
3701// === {\it Selectors} ===
3702
3703{\bf G4double GetMass() const;}
3704
3705{\bf G4double GetMass2() const;}
3706
3707// Returns the mass and the squared mass of the chipolino (extracts from
37084-vector, the last is faster).
3709
3710{\bf G4QPDGCode GetQPDG1();}
3711
3712{\bf G4QPDGCode GetQPDG2();}
3713
3714// These member functions return {\bf G4QPDGCode}s of hadrons, the
3715chipolino consists of.
3716
3717{\bf G4QContent GetQContent() const;}
3718
3719//Returns the quark content of the chipolino.
3720
3721{\bf G4QContent GetQContent1() const;}
3722
3723{\bf G4QContent GetQContent2() const;}
3724
3725// These member functions return quark contents of hadrons, the
3726chipolino consists of.
3727
3728\thinspace
3729
3730// === {\it Modifiers} ===
3731
3732{\bf void SetHadronQPDG(const G4QPDGCode\& QPDG);}
3733
3734// Sets the {\bf G4QPDGCode}\ for the chipolino. This is a kind of
3735reinitialization.
3736
3737{\bf void SetHadronPDGCode(const G4int\& PDGCode);}
3738
3739{\bf void SetHadronQCont(const G4QContent\& QC);}
3740
3741// These two member functions reinitialize the chipolino, using integer PDG
3742code or quark content.
3743
3744\subsection{G4QCandidate : public G4QHadron (about 100 lines)}
3745
3746// === {\it Constructors} ===
3747
3748{\bf G4QCandidate();}
3749
3750{\bf G4QCandidate(G4int PDGcode);}
3751
3752// In fact this is the only possible constructor for this simple class.
3753
3754{\bf G4QCandidate(const G4QCandidate\& right);}
3755
3756{\bf G4QCandidate(G4QCandidate* right);}
3757
3758// These are copy-constructors.
3759
3760// === {\it Overloaded operators} ===
3761
3762{\bf const \thinspace G4QCandidate\& operator=(const G4QCandidate\& right);}
3763
3764// This is a copy operator similar to the copy-constructors above.
3765
3766{\bf int operator==(const G4QCandidate \&right) const;}
3767
3768// This operator returns true if the body values of two {\bf G4QCandidate}
3769objects are the same.
3770
3771{\bf int operator!=(const G4QCandidate \&right) const;}
3772
3773// This operator returns true if the body values of two {\bf G4QCandidate}
3774objects are the same.
3775
3776\thinspace
3777
3778// === {\it Selectors} ===
3779
3780{\bf G4ParentCluster* TakeParClust(G4int nPC);}
3781
3782// Returns pointer to the parent cluster {\bf \# nPC}.
3783
3784{\bf G4int GetPClustEntries() const;}
3785
3786// Returns a number of parent clusters for this candidate.
3787
3788{\bf G4bool GetPossibility() const;}
3789
3790// {\it True} if this candidate can be radiated in this particular act of
3791hadronization.
3792
3793{\bf G4bool GetParPossibility() const;}
3794
3795// Returns {\it true} if this candidate can play a role of the parent
3796cluster.
3797
3798{\bf G4double GetKMin() const;}
3799
3800// The minimum {\it k} (momentum of primary quark-parton) value for
3801production of this kind of candidate-hadron.
3802
3803{\bf G4double GetEBMass() const;}
3804
3805// The bound mass of the candidate in the nuclear environment, which does
3806not include the quasmons.
3807
3808{\bf G4double GetNBMass() const;}
3809
3810// The bound mass of the candidate in total nucleus (in fact this is true if
3811there is only one quasmon; if there are a number of quasmons, then only
3812quantum numbers of the current quasmon are added to the environment, other
3813quasmons are not taken into account).
3814
3815{\bf G4double GetDenseProbability() const;}
3816
3817// The probability to find this cluster-candidate in the dense region of the
3818nucleus.
3819
3820{\bf G4double GetPreProbability() const;}
3821
3822// The probability to find this candidate in total nucleus.
3823
3824{\bf G4double GetRelProbability() const;}
3825
3826// A kind of final calculated probability for the candidate, after taking
3827into account all kinematical and quark counting factors.
3828
3829{\bf G4double GetIntegProbability() const;}
3830
3831// Integrated probability up to this candidate (for the randomization
3832purposes).
3833
3834{\bf G4double GetSecondRelProb() const;}
3835
3836{\bf G4double GetSecondIntProb() const;}
3837
3838// Spare emergency probabilities, based on just kinematic bounds, which can
3839be used if normal way of the competition has failed. Now they are not used.
3840They are historic and can disappear in this class in future.
3841
3842// === {\it Modifiers} ===
3843
3844{\bf void ClearParClustVect();}
3845
3846// This is a very important member function, which cleans up pointers of the
3847parent cluster vector and destroys the {\bf G4QParentCluster} instances, so
3848that this vector of the candidate can be reused in another act of
3849hadronization.
3850
3851{\bf void FillPClustVect(G4QParentCluster* pCl);}
3852
3853// This member function fills appropriate parent clusters for this candidate
3854one by one.
3855
3856{\bf void SetPossibility( G4bool choice);}
3857
3858{\bf void SetParPossibility(G4bool choice);}
3859
3860{\bf void SetKMin(G4double kmin);}
3861
3862{\bf void SetDenseProbability(G4double prep);}
3863
3864{\bf void SetPreProbability(G4double prep);}
3865
3866{\bf void SetRelProbability(G4double relP);}
3867
3868{\bf void SetIntegProbability(G4double intP);}
3869
3870{\bf void SetIntegProbability(G4double intP);}
3871
3872{\bf void SetSecondRelProb(G4double relP);}
3873
3874{\bf void SetSecondIntProb(G4double intP);}
3875
3876{\bf void SetEBMass(G4double newMass);}
3877
3878{\bf void SetNBMass(G4double newMass);}
3879
3880// The meaning of these modifiers is clarified for the corresponding
3881selectors above.
3882
3883\subsection{G4QParentCluster (about 100 lines)}
3884
3885/ === {\it Constructors} ===
3886
3887{\bf G4QParentCluster(G4int PDGCode=0);}
3888
3889// This constructor acts both as a default constructor and as a formal
3890constructor.
3891
3892{\bf G4QParentCluster(G4int PDGcode, G4double prob);}
3893
3894// In fact this is the only complete constructor for this simple class, as
3895the parent cluster without any defined probability should not exist.
3896
3897{\bf G4QParentCluster(const G4QParentCluster\& right);}
3898
3899{\bf G4QParentCluster(G4QParentCluster* right);}
3900
3901// These are copy-constructors.
3902
3903// === {\it Overloaded operators} ===
3904
3905{\bf const \thinspace G4QParentCluster\& operator=(const G4QParentCluster\&
3906right);}
3907
3908// This is a copy operator similar to the copy-constructors above.
3909
3910{\bf int operator==(const G4QParentCluster \&right) const;}
3911
3912// This operator returns true if the body values of two {\bf G4QParentCluster%
3913} objects are the same.
3914
3915{\bf int operator!=(const G4QParentCluster \&right) const;}
3916
3917// This operator returns true if the body values of two {\bf G4QParentCluster%
3918} objects are the same.
3919
3920{\bf ostream\& operator%
3921%TCIMACRO{\TEXTsymbol{<}}%
3922%BeginExpansion
3923\mbox{$<$}%
3924%EndExpansion
3925%TCIMACRO{\TEXTsymbol{<}}%
3926%BeginExpansion
3927\mbox{$<$}%
3928%EndExpansion
3929(ostream\& lhs, G4QParentCluster\& rhs);}
3930
3931{\bf ostream\& operator%
3932%TCIMACRO{\TEXTsymbol{<}}%
3933%BeginExpansion
3934\mbox{$<$}%
3935%EndExpansion
3936%TCIMACRO{\TEXTsymbol{<}}%
3937%BeginExpansion
3938\mbox{$<$}%
3939%EndExpansion
3940(ostream\& lhs, const G4QParentCluster\& rhs);}
3941
3942// These are member functions which print the content of the parent
3943cluster.\thinspace
3944
3945// === {\it Selectors} ===
3946
3947{\bf G4QContent GetTransQC() const;}
3948
3949// Get quark content of the quark exchange, which is necessary to shift this
3950parent cluster to the master-candidate (similar to a meson in Feynman
3951diagrams).
3952
3953{\bf G4int GetPDGCode() const;}
3954
3955// Returns the PDG code of the parent cluster.
3956
3957{\bf G4int GetNQPar2() const;}
3958
3959// Returns the {\bf n-2} value, where{\bf \ n} is a number of degrees of
3960freedom in the parent cluster. It is necessary for randomization of the
3961secondary quark-parton and should be the same after selection of the
3962candidate as it was in time of the probability calculation.
3963
3964{\bf G4double GetProbability() const;}
3965
3966// Returns the probability for this parent cluster to be transformed to the
3967outgoing candidate. Sum of all probabilities for parent clusters,
3968appropriate for the candidate is a probability for the candidate.
3969
3970{\bf G4double GetLow() const;}
3971
3972{\bf G4double GetHigh() const;}
3973
3974// These member functions return limits for randomization of the momentum of
3975the secondary quark parton for this particular candidate.
3976
3977{\bf G4double GetEBMass() const;}
3978
3979{\bf G4double GetEBind() const;}
3980
3981{\bf G4double GetNBMass() const;}
3982
3983{\bf G4double GetNBind() const;}
3984
3985// Return bound masses and binding energies of the parent cluster in respect
3986to the environment and to the total nucleus as it was explained for the {\bf %
3987G4QCandidate }class.
3988
3989// === {\it Modifiers} ===
3990
3991{\bf void SetTransQC(G4QContent newTrans);}
3992
3993{\bf void SetPDGCode(G4int newPDGCode);}
3994
3995{\bf void SetNQPart2(G4int nm2);}
3996
3997{\bf void SetProbability(G4double probab);}
3998
3999{\bf void SetLow(G4double loLim);}
4000
4001{\bf void SetHigh(G4double hiLim);}
4002
4003{\bf void SetEBMass(G4double bMass);}
4004
4005{\bf void SetEBind(G4double bEn);}
4006
4007{\bf void SetNBMass(G4double bMass);}
4008
4009{\bf void SetNBind(G4double bEn);}
4010
4011// The meaning of these modifiers is clarified for the corresponding
4012selectors above.
4013
4014\subsection{G4QCHIPSWorld (about 100 lines)}
4015
4016// === {\it Constructors} ===
4017
4018{\bf G4QCHIPSWorld(G4int nOfParts=0);}
4019
4020// This constructor plays roles of both a default constructor and a formal
4021constructor.
4022
4023{\bf G4QCHIPSWorld(const G4QCHIPSWorld\& right);}
4024
4025{\bf G4QCHIPSWorld(G4QCHIPSWorld* right);}
4026
4027// These are a copy-constructors.
4028
4029// === {\it Overloaded operators} ===
4030
4031{\bf const \thinspace G4QCHIPSWorld\& operator=(const G4QCHIPSWorld\& right);%
4032}
4033
4034// This is a copy operator similar to the copy-constructors above.
4035
4036// === {\it Selectors} ===
4037
4038{\bf G4QParticle* GetQParticle( G4int PDG) const;}
4039
4040{\bf G4QParticle* GetQParticle(G4QPDGCode QPDG) const;}
4041
4042{\bf G4QParticle* GetQParticle(G4QPDGCode* QPDG) const;}
4043
4044// Overloaded selectors for a particle with some specific PDG code, instance
4045of \ G4QPDGCode class. Return a pointer to the corresponding particle in the
4046{\bf G4QCHIPSWorld }data base{\bf .}
4047
4048\subsection{G4QParticle (about 700 lines)}
4049
4050// === {\it Constructors} ===
4051
4052{\bf G4QParticle();}
4053
4054{\bf G4QParticle(G4int PDGcode);}
4055
4056// In fact this is the only complete constructor for this simple class.
4057
4058{\bf G4QParticle(const G4QParticle\& right);}
4059
4060{\bf G4QParticle(G4QParticle* right);}
4061
4062// These are copy-constructors.
4063
4064// === {\it Overloaded operators} ===
4065
4066{\bf const \thinspace G4QParticle\& operator=(const G4QParticle\& right);}
4067
4068// This is a copy operator similar to the copy-constructors above.
4069
4070{\bf int operator==(const G4QParticle \&right) const;}
4071
4072// This operator returns true if the body values of two {\bf G4QParticle}
4073objects are the same.
4074
4075{\bf int operator!=(const G4QParticle \&right) const;}
4076
4077// This operator returns true if the body values of two {\bf G4QParticle}
4078objects are the same.
4079
4080{\bf ostream\& operator%
4081%TCIMACRO{\TEXTsymbol{<}}%
4082%BeginExpansion
4083\mbox{$<$}%
4084%EndExpansion
4085%TCIMACRO{\TEXTsymbol{<}}%
4086%BeginExpansion
4087\mbox{$<$}%
4088%EndExpansion
4089(ostream\& lhs, G4QParticle\& rhs);}
4090
4091// These are member functions which print the content of the
4092particle.\thinspace
4093
4094// === {\it Selectors} ===
4095
4096{\bf G4QContent GetQContent() const;}
4097
4098//Returns quark content of the particle. In future all {\bf Get/SetQContent}
4099member functions can be reduced to the {\bf Get/SetQC} form for unification
4100of overloading. There is still a possibility to mix GetQContent with
4101GetQCode, but QC became a common notation for the quark content and the Q
4102code is more internal and should not be necessary for the user.
4103
4104{\bf G4QDecayChanVector GetDecayVector() const;}
4105
4106// Returns a vector of the {\bf G4QDecayChan} instances, in which sets of
4107particles, in which this particle can decay are collected together with the
4108corresponding branching.
4109
4110{\bf G4QPDGCode GetQPDG() const;}
4111
4112// Return the {\bf G4QPDGCode} descriptor for this particle.
4113
4114{\bf G4double GetMass() const;}
4115
4116{\bf G4double GetWidth() const;}
4117
4118//Return the mass and the width ($\Gamma $) of the mass distribution for the
4119particle.
4120
4121{\bf G4int GetPDGCode() const;}
4122
4123// Returns the PDG code of the particle.
4124
4125{\bf G4int GetQCode() const;}
4126
4127// Returns the specific ID in the {\bf G4QCHIPSWorld} data base.
4128
4129{\bf G4int GetSpin() const;}
4130
4131// Returns the 2s+1 value.
4132
4133{\bf G4int GetCharge() const;}
4134
4135{\bf G4int GetStrange() const;}
4136
4137{\bf G4int GetBaryNum() const;}
4138
4139// Return the charge, the strangeness, and the baryon number for the
4140particle.
4141
4142{\bf G4double MinMassOfFragm();}
4143
4144// Returns the minimum mass sum for different decay channels of this
4145particle.
4146
4147// === {\it Modifiers} ===
4148
4149{\bf G4QDecayChanVector InitDecayVector(D4int QCode);}
4150
4151// Initialize or reinitialize the particle, using the Q code of the particle
4152in the {\bf G4QCHIPSWorld} data base, returns the vector of decay channels
4153for decay. This function is mostly used for the fake particle with the
4154default constructor, to find out the decay channels for the particle. In
4155future it can be duplicated for the PDG code and overloaded for the {\bf %
4156G4QPDGCode} descriptor.
4157
4158{\bf void InitPDGParticle(G4int thePDGCode);}
4159
4160{\bf void InitQParticle(G4int theQCode);}
4161
4162// These reinitializers can not be overloaded as both have integer input
4163parameter.
4164
4165\subsection{G4QDecayChannel (about 100 lines)}
4166
4167// === {\it Constructors} ===
4168
4169{\bf G4QDecayChannel();}
4170
4171{\bf G4QDecayChannel(G4QPDGCodeVector secHadr,}
4172
4173\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf G4double
4174probLimit=1.);}
4175
4176// This is a general constructor for this simple class, filling a vector of
4177particle together with the branching value {\bf probLimit.}
4178
4179{\bf G4QDecayChannel(G4double pLev, G4int PDG1, G4int PDG2,}
4180
4181\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf G4int
4182PDG3=0);}
4183
4184// This is how the decay channel can be created directly with the PDG codes
4185of the secondary particles. The CHIPS event generator does not support decay
4186in more than three particles, so decays with higher multiplicities should be
4187interpreted as decays with the intermediate resonance (which they are in
4188reality). It is difficult to find the case of decay in the PDG table, when
4189this is impossible (at least for the SU(3) part).
4190
4191{\bf G4QDecayChannel(const G4QDecayChannel\& right);}
4192
4193{\bf G4QDecayChannel(G4QDecayChannel* right);}
4194
4195// These are copy-constructors.
4196
4197// === {\it Overloaded operators} ===
4198
4199{\bf const \thinspace G4QDecayChannel\& operator=(const G4QDecayChannel\&
4200right);}
4201
4202// This is a copy operator similar to the copy-constructors above.
4203
4204{\bf int operator==(const G4QDecayChannel \&right) const;}
4205
4206// This operator returns true if the body values of two {\bf G4QDecayChannel}
4207objects are the same.
4208
4209{\bf int operator!=(const G4QDecayChannel \&right) const;}
4210
4211// This operator returns true if the body values of two {\bf G4QDecayChannel}
4212objects are the same.
4213
4214{\bf ostream\& operator%
4215%TCIMACRO{\TEXTsymbol{<}}%
4216%BeginExpansion
4217\mbox{$<$}%
4218%EndExpansion
4219%TCIMACRO{\TEXTsymbol{<}}%
4220%BeginExpansion
4221\mbox{$<$}%
4222%EndExpansion
4223(ostream\& lhs, G4QDecayChannel\& rhs);}
4224
4225// These are member functions which print the content of the decay
4226channel.\thinspace
4227
4228// === {\it Selectors} ===
4229
4230{\bf G4double GetDecayChanLimit() const;}
4231
4232// Returns the branching value.
4233
4234{\bf G4double GetMinMass() const;}
4235
4236// Return the minimum sum of the masses of the secondary particles. It is
4237correct even in case of intermediate resonances, as the minimum resonance
4238mass is the minimum mass of its fragments.
4239
4240{\bf G4QPDGCodeVector GetVecOfSecHadrons() const;}
4241
4242// Return the vector of {\bf G4QPDGCode}\ descriptors for the secondary
4243particles.
4244
4245// === {\it Modifiers} ===
4246
4247{\bf void SetDecayChanLimit(G4double newDecChanLim);}
4248
4249// One should be careful, as probabilities of decay are kept in the
4250integrated form, ready for randomization.
4251
4252{\bf void SetMinMass(G4double newMin Mass);}
4253
4254{\bf void SetVecOfSecHadrons(G4QPDGCodeVector hadV);}
4255
4256// The meaning of these modifiers is clarified for the corresponding
4257selectors above.
4258
4259\subsection{G4QPDGCode (about 1100 lines)}
4260
4261// === {\it Constructors} ===
4262
4263{\bf G4QPDGCode(G4int PDGCode=0);}
4264
4265// This is a general constructor by PDG code.
4266
4267{\bf G4QPDGCode(G4QContent QCont);}
4268
4269// This is a general constructor by quark content.
4270
4271{\bf G4QPDGCode(const G4QPDGCode\& right);}
4272
4273{\bf G4QPDGCode(G4QPDGCode* right);}
4274
4275// These are copy-constructors.
4276
4277// === {\it Overloaded operators} ===
4278
4279{\bf const \thinspace G4QPDGCode\& operator=(const G4QPDGCode\& right);}
4280
4281// This is a copy operator similar to the copy-constructors above.
4282
4283{\bf int operator==(const G4QPDGCode\& rhs) const;}
4284
4285{\bf int operator==(const G4int\& rhs) const;}
4286
4287// These operators return true (\#0) if the body values of two {\bf %
4288G4QPDGCode} objects are the same. Right hand side can be identified by the
4289PDG code.
4290
4291{\bf int operator!=(const G4QPDGCode\& rhs) const;}
4292
4293{\bf int operator!=(const G4int\& rhs) const;}
4294
4295// These operators return true (\#0) if the body values of two {\bf %
4296G4QPDGCode} objects are the same. Right hand side can be identified by the
4297PDG code.
4298
4299{\bf G4int operator+=(const G4QPDGCode\& rhs);}
4300
4301{\bf G4int operator-=(const G4QPDGCode\& rhs);}
4302
4303{\bf G4int operator+=(const G4int\& rhs);}
4304
4305{\bf G4int operator-=(const G4int\& rhs);}
4306
4307// Increments and decrements of the PDG code.
4308
4309{\bf G4int operator*=(const G4int\& rhs);}
4310
4311{\bf G4int operator/=(const G4int\& rhs);}
4312
4313// In this case the right hand side is just an integer value.
4314
4315{\bf G4int operator+(const G4QPDGCode\& lhs, const G4QPDGCodes\& rhs);}
4316
4317{\bf G4int operator+(const G4QPDGCode\& lhs, const G4int\& rhs);}
4318
4319{\bf G4int operator+(const G4int\& lhs, const G4QPDGCodes\& rhs);}
4320
4321{\bf G4int operator-(const G4QPDGCode\& lhs, const G4QPDGCodes\& rhs);}
4322
4323{\bf G4int operator-(const G4QPDGCode\& lhs, const G4int\& rhs);}
4324
4325{\bf G4int operator-(const G4int\& lhs, const G4QPDGCodes\& rhs);}
4326
4327{\bf G4int operator*(const G4QPDGCode\& lhs, const G4QPDGCodes\& rhs);}
4328
4329{\bf G4int operator*(const G4QPDGCode\& lhs, const G4int\& rhs);}
4330
4331{\bf G4int operator*(const G4int\& lhs, const G4QPDGCodes\& rhs);}
4332
4333{\bf G4int operator/(const G4QPDGCode\& lhs, const G4QPDGCodes\& rhs);}
4334
4335{\bf G4int operator/(const G4QPDGCode\& lhs, const G4int\& rhs);}
4336
4337{\bf G4int operator/(const G4int\& lhs, const G4QPDGCodes\& rhs);}
4338
4339{\bf G4int operator\%(const G4QPDGCode\& lhs, const G4int\& rhs);}
4340
4341// The overloaded operators, defined beyond the {\it name space} of the
4342class header.
4343
4344{\bf ostream\& operator%
4345%TCIMACRO{\TEXTsymbol{<}}%
4346%BeginExpansion
4347\mbox{$<$}%
4348%EndExpansion
4349%TCIMACRO{\TEXTsymbol{<}}%
4350%BeginExpansion
4351\mbox{$<$}%
4352%EndExpansion
4353(ostream\& lhs, G4QPDGCode\& rhs);}
4354
4355{\bf ostream\& operator%
4356%TCIMACRO{\TEXTsymbol{<}}%
4357%BeginExpansion
4358\mbox{$<$}%
4359%EndExpansion
4360%TCIMACRO{\TEXTsymbol{<}}%
4361%BeginExpansion
4362\mbox{$<$}%
4363%EndExpansion
4364(ostream\& lhs, const G4QPDGCode\& rhs);}
4365
4366// These are member functions which print the content of the decay
4367channel.\thinspace
4368
4369// === {\it Selectors} ===
4370
4371{\bf G4double GetMass();}
4372
4373{\bf G4double GetMass2();}
4374
4375{\bf G4double GetWidth();}
4376
4377{\bf G4double GetNuclMass(G4int Z, G4intN, G4int S);}
4378
4379{\bf G4double GetNuclMass(G4int PDGCode);}
4380
4381// All kinds of selectors for the mass and width of the particle with this
4382descriptor. Last two overloaded functions are more general functions than
4383selectors.
4384
4385{\bf G4QContent GetQuarkContent() const;}
4386
4387// This is an antique name of the early development stage, in future can be
4388changed to the overloaded {\bf GetQC()}.
4389
4390{\bf G4QContent GetExQContent(G4int i, G4int o) const;}
4391
4392// It returns the quark content of the fake meson of the Feynman diagram to
4393the quark exchange act. SU(3) quarks{\bf \ i} (incoming quark-parton) and
4394{\bf o} (out coming quark-parton) are numerated as follows: d (0), u (1),
4395s(2).
4396
4397{\bf G4int GetBaryNum() const;}
4398
4399{\bf G4int GetSpin() const;}
4400
4401{\bf G4int GetCharge() const;}
4402
4403{\bf G4int GetPDGCode() const;}
4404
4405{\bf G4int GetQCode() const;}
4406
4407// Return the baryon number, 2s+1, the charge, the PDG code, and Q code
4408correspondingly.
4409
4410{\bf G4int GetGetRelCrossIndex(G4int i, G4int o) const;}
4411
4412// It gives a shift of index (Q code) for the quark exchange, defined by{\bf %
4413\ i} and {\bf o} (see above), with which one can find the parent cluster in
4414the {\bf G4QCHIPSWorld} data base.
4415
4416{\bf G4int GetNumOfComb(G4int i, G4int o) const;}
4417
4418// Returns a number of combinations for the quark exchange.
4419
4420{\bf G4int GetTotNumOfComb(G4int i) const;}
4421
4422// This is a total number of possible combinations for the quark exchange in
4423case of incoming of the quark-parton of the kind {\bf i} (see above).
4424
4425{\bf G4bool TestRealNeutral();}
4426
4427// Returns true, if the particle with this PDG code coincide with its
4428antiparticle.
4429
4430// === {\it Modifiers} ===
4431
4432{\bf void SetPDGCode(G4int newPDGCode);}
4433
4434{\bf void InitByQCont(G4QContent QCont);}
4435
4436{\bf void InitByQCode(G4init QCode);}
4437
4438// These three reinitializers can be over partially overloaded
4439(unfortunately not for Q code and PDG code).
4440
4441{\bf void NegPDGCode();}
4442
4443// Makes an antiparticle out of this particle.
4444
4445\subsection{G4QContent (about 400 lines)}
4446
4447// === {\it Constructors} ===
4448
4449{\bf G4QContent(G4int d=0, G4int u=0, G4int s=0,}
4450
4451\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf \ G4int ad=0, G4int au=0, G4int
4452as=0,);}
4453
4454// This is a default constructor and the only general constructor for the
4455quark content. Please, pay attention to the sequence of quarks. Each integer
4456number means a number of quarks of this kind.
4457
4458{\bf G4QContent(const G4QContent\& right);}
4459
4460{\bf G4QContent(G4QContent* right);}
4461
4462// These are copy-constructors.
4463
4464// === {\it Overloaded operators} ===
4465
4466{\bf const \thinspace G4QContent\& operator=(const G4QContent\& right);}
4467
4468// This is a copy operator similar to the copy-constructors above.
4469
4470{\bf int operator==(const G4QContent\& rhs) const;}
4471
4472// This operator returns true (\#0) if the body values of two {\bf G4QContent%
4473} objects are the same.
4474
4475{\bf int operator!=(const G4QContent\& rhs) const;}
4476
4477// This operator returns true (\#0) if the body values of two {\bf G4QContent%
4478} objects are the same.
4479
4480{\bf G4int operator+=(const G4QContent\& rhs);}
4481
4482{\bf G4int operator-=(const G4QContent\& rhs);}
4483
4484{\bf G4int operator+=(const G4int\& rhs);}
4485
4486{\bf G4int operator-=(const G4int\& rhs);}
4487
4488// Increments and decrements of the quark content.
4489
4490{\bf G4int operator*=(G4int\& rhs);}
4491
4492{\bf G4int operator*=(const G4int\& rhs);}
4493
4494// In this case the right hand side is just an integer value.
4495
4496{\bf G4int operator+(const G4QContent\& lhs, const G4QContent\& rhs);}
4497
4498{\bf G4int operator-(const G4QContent\& lhs, const G4QContent\& rhs);}
4499
4500// The overloaded operators, defined beyond the {\it name space} of the
4501class header.
4502
4503{\bf ostream\& operator%
4504%TCIMACRO{\TEXTsymbol{<}}%
4505%BeginExpansion
4506\mbox{$<$}%
4507%EndExpansion
4508%TCIMACRO{\TEXTsymbol{<}}%
4509%BeginExpansion
4510\mbox{$<$}%
4511%EndExpansion
4512(ostream\& lhs, G4QContent\& rhs);}
4513
4514{\bf ostream\& operator%
4515%TCIMACRO{\TEXTsymbol{<}}%
4516%BeginExpansion
4517\mbox{$<$}%
4518%EndExpansion
4519%TCIMACRO{\TEXTsymbol{<}}%
4520%BeginExpansion
4521\mbox{$<$}%
4522%EndExpansion
4523(ostream\& lhs, const G4QContent\& rhs);}
4524
4525// These are member functions which print the content of the decay
4526channel.\thinspace
4527
4528// === {\it Selectors} ===
4529
4530{\bf G4int GetCharge() const;}
4531
4532{\bf G4int GetBaryonNumber() const;}
4533
4534{\bf G4int GetStrangness() const;}
4535
4536// Return the charge, the baryon number, and the strangeness for this quark
4537content (strangeness of $\Lambda $\ is 1, strangeness of K$^{+}$ is -1).
4538
4539{\bf G4int GetSPDGCode() const;}
4540
4541// Return PDG code of particle with minimum mass for this quark content.
4542
4543{\bf G4int GetZNSPDGCode() const;}
4544
4545{\bf G4int NOfCombinations(const G4QContent\& rhs) const;}
4546
4547// Return a number of combinations of the quark content {\bf rhs} in this
4548quark content. In future it will be transformed to overloaded {\bf operator/=%
4549}.
4550
4551{\bf G4int GetQ() const;}
4552
4553{\bf G4int GetAQ() const;}
4554
4555{\bf G4int GetTot() const;}
4556
4557// Return a number of quarks, a number of antiquarks, and the total number
4558of quarks correspondingly.
4559
4560{\bf G4int GetP() const;}
4561
4562{\bf G4int GetN() const;}
4563
4564{\bf G4int GetL() const;}
4565
4566{\bf G4int GetAP() const;}
4567
4568{\bf G4int GetAN() const;}
4569
4570{\bf G4int GetAL() const;}
4571
4572// Return a number of protons, neutrons, $\Lambda $, antiprotons,
4573antineutrons anti-$\Lambda $ in this quark content correspondingly.
4574
4575{\bf G4int GetD() const;}
4576
4577{\bf G4int GetU() const;}
4578
4579{\bf G4int GetS() const;}
4580
4581{\bf G4int GetAD() const;}
4582
4583{\bf G4int GetAU() const;}
4584
4585{\bf G4int GetAS() const;}
4586
4587// Return a number of each kind of quarks in this quark content.
4588
4589{\bf G4int GetNetD() const;}
4590
4591{\bf G4int GetNetU() const;}
4592
4593{\bf G4int GetNetS() const;}
4594
4595{\bf G4int GetNetAD() const;}
4596
4597{\bf G4int GetNetAU() const;}
4598
4599{\bf G4int GetNetAS() const;}
4600
4601// Return a net number of quarks, that is subtract antiquarks of the same
4602flavor from quarks and vise versa.
4603
4604{\bf G4int GetDD() const;}
4605
4606{\bf G4int GetUU() const;}
4607
4608{\bf G4int GetSS() const;}
4609
4610{\bf G4int GetUD() const;}
4611
4612{\bf G4int GetDS() const;}
4613
4614{\bf G4int GetUS() const;}
4615
4616{\bf G4int GetADAD() const;}
4617
4618{\bf G4int GetAUAU() const;}
4619
4620{\bf G4int GetASAS() const;}
4621
4622{\bf G4int GetAUAD() const;}
4623
4624{\bf G4int GetADAS() const;}
4625
4626{\bf G4int GetAUAS() const;}
4627
4628// Return a number of corresponding diquarks in the quark content.
4629
4630{\bf G4bool CheckNegative() const;}
4631
4632// Return true if at least one number of 6 is negative. It means that there
4633is an error in the program.
4634
4635{\bf G4QContent IndQ (G4int ind=0);}
4636
4637{\bf G4QContent IndAQ (G4int ind=0);}
4638
4639// These functions are a kind of an iterator as they return a quark content
4640for one quark with the index ind. E.g. if {\bf QC=(3,5,2,4,1,1)}, then {\bf %
4641IndQ(1)=(1,0,0,0,0,0)}, {\bf IndQ(5)=(0,1,0,0,0,0)}, {\bf IndQ(10)} return
4642the error message and call {\bf G4Exception}, {\bf IndAQ(5)=(0,0,0,0,0,1)}.
4643The {\bf GetQ()} and {\bf GetAQ()} (see above) should be used before to
4644avoid errors.
4645
4646{\bf \thinspace G4QContent SplitChipo(G4double mQ);}
4647
4648// Split some hadron from this quasmon state with mass {\bf mQ}. Very useful
4649for chipolino-quasmon as helps to understand in which hadrons it can be
4650split.
4651
4652// === {\it Modifiers} ===
4653
4654{\bf void Anti();}
4655
4656// Change quarks to antiquarks and vise versa.
4657
4658{\bf void SubtractHadron(G4QContent hQC);}
4659
4660// Returns {\it true} if it is possible to subtract hQC quark content\ from
4661this quark content.
4662
4663{\bf void SubtractPi0();}
4664
4665// Returns {\it true} if it is possible to subtract $\pi ^{0}$\ from this
4666quark content.
4667
4668{\bf void SubtractPion();}
4669
4670// Returns {\it true} if it is possible to subtract any pion\ from this
4671quark content.
4672
4673{\bf void SubtractKaon();}
4674
4675// Returns {\it true} if it is possible to subtract any kaon\ from this
4676quark content.
4677
4678{\bf void SetD(G4int n=0);}
4679
4680{\bf void SetU(G4int n=0);}
4681
4682{\bf void SetS(G4int n=0);}
4683
4684{\bf void SetAD(G4int n=0);}
4685
4686{\bf void SetAU(G4int n=0);}
4687
4688{\bf void SetAS(G4int n=0);}
4689
4690// Set the particular kind of quarks.
4691
4692{\bf void IncD(G4int n=1);}
4693
4694{\bf void IncU(G4int n=1);}
4695
4696{\bf void IncS(G4int n=1);}
4697
4698{\bf void IncAD(G4int n=1);}
4699
4700{\bf void IncAU(G4int n=1);}
4701
4702{\bf void IncAS(G4int n=1);}
4703
4704// Increment the particular kind of quarks.
4705
4706{\bf void IncQAQ(const G4int\& nQAQ=1, const G4double\& sProb=1.);}
4707
4708// Increment the quark content by {\bf nQAQ} quark-antiquark pairs. The {\bf %
4709sProb} parameter is s/u value, which is normally taken from the input
4710parameters.
4711
4712{\bf void Dec(G4int n=1);}
4713
4714{\bf void Dec(G4int n=1);}
4715
4716{\bf void Dec(G4int n=1);}
4717
4718{\bf void Dec(G4int n=1);}
4719
4720{\bf void Dec(G4int n=1);}
4721
4722{\bf void Dec(G4int n=1);}
4723
4724// Decrement the particular kind of quarks.
4725
4726{\bf void DecQAQ(const G4int\& nQAQ=1);}
4727
4728// Decrement the quark content by {\bf nQAQ} quark-antiquark pairs.
4729
4730\section{Appendix B. Development of the interaction part of the generator.}
4731
4732\noindent \qquad In this appendix the interaction part of the
4733{\bf G4QEnvironment} class is considered. If necessary it can be developed by the
4734user, as it does not cover all possible cases of interactions with quasmon
4735creation.
4736
4737Let us start with the private member function
4738{\bf PrepareInteractionProbabilities}:
4739
4740{\bf void G4QEnvironment::PrepareInteractionProbabilities(const G4QContent\&}
4741
4742\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
4743{\bf projQC, G4double AP)}
4744
4745{\bf \{}
4746
4747// Probability of interaction with the cluster can depend on quark content
4748of the projectile {\bf projQC }and may be of the momentum of the projectile
4749{\bf AP} to have a special case for the interaction at rest (not used up to
4750now!).
4751
4752\ \ {\bf G4double sum=0.;}
4753
4754// Increasing sum of probabilities.
4755
4756\ \ {\bf G4double probab=0.;}
4757
4758// Prototype of the calculated probability (fake initialization by 0.).
4759
4760\ \ {\bf G4double denseB=0.;}
4761
4762// Counter of quasi-free baryons from the dense region.
4763
4764\ \ {\bf G4double allB=0.}
4765
4766// Counter of all quasi-free baryons
4767
4768{\bf \ \ \ G4int pPDG=projQC.GetSPDGCode();}
4769
4770// Get the PDG of the projectile with minimum mass for the quark content (it
4771works for the photons as they have zero quark content).
4772
4773\ \ {\bf for (G4int index=0; index%
4774%TCIMACRO{\TEXTsymbol{<}}%
4775%BeginExpansion
4776\mbox{$<$}%
4777%EndExpansion
4778theCandidates.size(); index++)}
4779
4780\ \ {\bf \{}
4781
4782// The loop over all candidates starts.
4783
4784{\bf \ \ \ \ \ \ G4QCandidate* curCand=theQCandidates[index];}
4785
4786// Get a pointer to the current candidate.
4787
4788{\bf \ \ \ \ \ \ G4int cPDG=curCand-%
4789%TCIMACRO{\TEXTsymbol{>}}%
4790%BeginExpansion
4791\mbox{$>$}%
4792%EndExpansion
4793GetPDGCode();}
4794
4795// Get a PDG code of the candidate (at this point only clusters can be
4796candidates for the interaction).
4797
4798{\bf \ \ \ \ \ \ if(cPDG%
4799%TCIMACRO{\TEXTsymbol{>}}%
4800%BeginExpansion
4801\mbox{$>$}%
4802%EndExpansion
480380000000\&\&cPDG!=90000000)}
4804
4805{\bf \ \ \ \ \ \ \{}
4806
4807// Anyway this is the standard filter for clusters. Hopefully this is not
4808necessary. It is historic and should be corrected in future. But on the
4809other hand, in some reactions the virtual mesons in baryons can be
4810considered as a partial target (t-channel diagrams in the Feynman notation),
4811so it can transform rather than disappear.
4812
4813{\bf \ \ \ \ \ \ \ \ \ G4Nucleus cN(cPDG);}
4814
4815// This is how a symbolic nucleus at rest can be created using the PDG code
4816of the cluster.
4817
4818{\bf \ \ \ \ \ \ \ \ \ G4int zc=cN.GetZ();}
4819
4820{\bf \ \ \ \ \ \ \ \ \ G4int nc=cN.GetN();}
4821
4822{\bf \ \ \ \ \ \ \ \ \ G4int sc=cN.GetS();}
4823
4824{\bf \ \ \ \ \ \ \ \ \ G4int ac=cN.GetA();}
4825
4826// This is how the numbers of protons, neutrons, $\Lambda $, and all baryons
4827can be found for the cluster.
4828
4829\ \ \ \ \ \ \ \ {\bf G4double nOfCl=curCand-%
4830%TCIMACRO{\TEXTsymbol{>}}%
4831%BeginExpansion
4832\mbox{$>$}%
4833%EndExpansion
4834GetPreProbability();}
4835
4836\ \ \ \ \ \ \ \ {\bf G4double dOfCl=curCand-%
4837%TCIMACRO{\TEXTsymbol{>}}%
4838%BeginExpansion
4839\mbox{$>$}%
4840%EndExpansion
4841GetDenseProbability();}
4842
4843// These are correspondingly the probability to find the cluster in the
4844nucleus and find the cluster in the dense region of the nucleus.
4845
4846{\bf \ \ \ \ \ \ \ \ \ if(ac==1)}
4847
4848{\bf \ \ \ \ \ \ \ \ \ \{}
4849
4850{\bf \ \ \ \ \ \ \ \ \ \ \ \ allB+=nOfCl;}
4851
4852{\bf \ \ \ \ \ \ \ \ \ \ \ \ denseB+=dOfCl;}
4853
4854{\bf \ \ \ \ \ \ \ \ \ \}}
4855
4856// For the quasi-free baryons the corresponding sums are collected.
4857
4858{\bf \ \ \ \ \ \ \ \ \ G4QContent pQC=curCand-%
4859%TCIMACRO{\TEXTsymbol{>}}%
4860%BeginExpansion
4861\mbox{$>$}%
4862%EndExpansion
4863GetQC();}
4864
4865// The quark content of the candidate (parent cluster).
4866
4867{\bf \ \ \ \ \ \ \ \ \ G4int pC=progQC.GetCharge();}
4868
4869// The charge of the projectile.
4870
4871{\bf \ \ \ \ \ \ \ \ \ G4QContent qQC=pQC+projQC;}
4872
4873// The quark content of the possible compound quasmon.
4874
4875{\bf \ \ \ \ \ \ \ \ \ G4QPDGCode qQPDG(qQC);}
4876
4877// The {\bf G4QPDGCode} descriptor for the possible compound quasmon.
4878
4879{\bf \ \ \ \ \ \ \ \ \ G4int qC=qQPDG.GetQCode()}
4880
4881// This is the Q code for the possible compound quasmon.
4882
4883\thinspace {\bf \ } \ \ \ \ \ \ \ {\bf G4int rPDG=qQC.GetSPDGCode();}
4884
4885// Get the PDG of the hadron with minimum mass for the quark content of the
4886possible compound quasmon.
4887
4888{\bf \ \ \ \ \ \ \ \ \ G4double pI=abs(zc-nc);}
4889
4890// This is an absolute isotopic shift for the nuclear cluster.
4891
4892{\bf \ \ \ \ \ \ \ \ \ G4double baryn=qQC.GetBaryonNumber();}
4893
4894{\bf \ \ \ \ \ \ \ \ \ G4double charge=qQC.GetCharge();}
4895
4896{\bf \ \ \ \ \ \ \ \ \ G4double qI=abs(baryn-charge-charge);}
4897
4898// The baryon number, the charge and the absolute isotopic shift for the
4899possible compound quasmon.
4900
4901{\bf \ \ \ \ \ \ \ \ \ G4double fact=1./pow(2.,pI);}
4902
4903// This is a very important point. Only the clusters with the absolute
4904isotopic shifts less than 3 are used in the generator (see the table above).
4905It was suggested, that the probability for cluster to be created drops down
4906with the absolute isotopic shift from the line of mirror nuclei ($\alpha $%
4907-nuclei). The suggested suppression is calculated in this line. So according
4908to the chosen restriction for the set of clusters the suppression factor for
4909the clusters with the absolute isotopic shift more then 2 is equal 0.
4910
4911{\bf \ \ \ \ \ \ \ \ \ if(pPDG==-211\&\&AP%
4912%TCIMACRO{\TEXTsymbol{<}}%
4913%BeginExpansion
4914\mbox{$<$}%
4915%EndExpansion
491610.
4917%TCIMACRO{\TEXTsymbol{\vert}}%
4918%BeginExpansion
4919\mbox{$\vert$}%
4920%EndExpansion
4921%TCIMACRO{\TEXTsymbol{\vert} }%
4922%BeginExpansion
4923\mbox{$\vert$}%
4924%EndExpansion
4925pPDG==22\&\&AP%
4926%TCIMACRO{\TEXTsymbol{<}}%
4927%BeginExpansion
4928\mbox{$<$}%
4929%EndExpansion
4930140.)}
4931
4932\ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf \ probab=dOfCl*ac*fact;}
4933
4934\ \ \ \ \ \ \ {\bf \ else \ probab=nOfCl*ac*fact;}
4935
4936// So in this version of the generator the probability for the reactions
4937below the pion production threshold is proportional to the number of
4938clusters in the dense region of nucleus, to the number of nucleons and to
4939the isotopic suppression factor. For other reactions it is proportional to
4940the number of clusters in all nucleus. The user can change this line and try
4941any other method of calculation of the probability, e.g. use the {\bf nOfCl }%
4942instead of the {\bf dOfCl.} In future many possible choices should be
4943selected, using input parameters.
4944
4945{\bf \ \ \ \ \ \}}
4946
4947{\bf \ \ \ \ \ \ else probab=0.;}
4948
4949// The probability is 0 for the candidates, which are not the nuclear
4950clusters. This can be changed in future.
4951
4952{\bf \ \ \ \ \ \ sum+=probab;}
4953
4954{\bf \ \ \ \ \ \ curCand-%
4955%TCIMACRO{\TEXTsymbol{>}}%
4956%BeginExpansion
4957\mbox{$>$}%
4958%EndExpansion
4959SetIntegProbability(sum);}
4960
4961// The integrated sum of probabilities is incremented for future
4962randomization of probabilities
4963
4964{\bf \ \ \ \}}
4965
4966// End of the loop over nuclear clusters.
4967
4968{\bf \ \ \ if(allB%
4969%TCIMACRO{\TEXTsymbol{>}}%
4970%BeginExpansion
4971\mbox{$>$}%
4972%EndExpansion
49730.) f2all=(allB-denseB)/allB;}
4974
4975{\bf \ \ \ else \ \ \ \ \ \ \ \ \ f2all=0.;}
4976
4977{\bf \}}
4978
4979// End of the member function
4980
4981This private member function is used in the other private member function of
4982the {\bf G4QEnvironment} class with the name {\bf CreateQuasmon}. It
4983reflects a kind of dynamics of the interaction:
4984
4985{\em {\bf void G4QEnvironment::CreateQuasmon(const G4QContent\& projQC,}}
4986
4987\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
4988\ {\em {\bf const G4Lorentz Vector\& proj4M) (a fragment).}}
4989
4990\{
4991
4992\ \ {\bf static const G4double mNeut=G4QPDGCode(2112).GetMass();}
4993
4994\ \ {\bf static const G4double mProt=G4QPDGCode(2212).GetMass();}
4995
4996\ \ {\bf static const G4double mLam=G4QPDGCode(3122).GetMass();}
4997
4998\ \ {\bf static const G4double mPi=G4QPDGCode(2112).GetMass();}
4999
5000\ \ {\bf static const G4double mPi2=mPi*mPi;}
5001
5002\ \ {\bf static const G4QContent neutQC(2,1,0,0,0,0);}
5003
5004\ \ {\bf static const G4QContent protQC(2,1,0,0,0,0);}
5005
5006\ \ {\bf static const G4QContent lambQC(2,1,0,0,0,0);}
5007
5008\ \ {\bf static const G4QNucleus vacuum(90000000);}
5009
5010// These are convenient constants which are permanently used in this
5011function (analogue of the parameter {\bf PARAMETER} in FORTRAN)
5012
5013\ \ {\bf G4QContent valQ(0,0,0,0,0,0);}
5014
5015\ \ {\bf G4LorentzVector q4Mom(0.,0.,0.,0.,);}
5016
5017// Prototypes of the quark content and 4-momentum for the future quasmon.
5018
5019\ \ {\bf nBarClust=1;}
5020
5021\ \ {\bf G4double projE=proj4M.e();}
5022
5023{\bf \ \ \ if(projE%
5024%TCIMACRO{\TEXTsymbol{<}}%
5025%BeginExpansion
5026\mbox{$<$}%
5027%EndExpansion
50280.)}
5029
5030{\bf \ \ \ \{}
5031
5032{\bf \ \ \ \ \ \ G4cerr%
5033%TCIMACRO{\TEXTsymbol{<}}%
5034%BeginExpansion
5035\mbox{$<$}%
5036%EndExpansion
5037%TCIMACRO{\TEXTsymbol{<}}%
5038%BeginExpansion
5039\mbox{$<$}%
5040%EndExpansion
5041''G4QEnv::CQ: pE=''%
5042%TCIMACRO{\TEXTsymbol{<}}%
5043%BeginExpansion
5044\mbox{$<$}%
5045%EndExpansion
5046%TCIMACRO{\TEXTsymbol{<}}%
5047%BeginExpansion
5048\mbox{$<$}%
5049%EndExpansion
5050projE%
5051%TCIMACRO{\TEXTsymbol{<}}%
5052%BeginExpansion
5053\mbox{$<$}%
5054%EndExpansion
5055%TCIMACRO{\TEXTsymbol{<}}%
5056%BeginExpansion
5057\mbox{$<$}%
5058%EndExpansion
5059''%
5060%TCIMACRO{\TEXTsymbol{<}}%
5061%BeginExpansion
5062\mbox{$<$}%
5063%EndExpansion
50640, QC=''%
5065%TCIMACRO{\TEXTsymbol{<}}%
5066%BeginExpansion
5067\mbox{$<$}%
5068%EndExpansion
5069%TCIMACRO{\TEXTsymbol{<}}%
5070%BeginExpansion
5071\mbox{$<$}%
5072%EndExpansion
5073projQC%
5074%TCIMACRO{\TEXTsymbol{<}}%
5075%BeginExpansion
5076\mbox{$<$}%
5077%EndExpansion
5078%TCIMACRO{\TEXTsymbol{<}}%
5079%BeginExpansion
5080\mbox{$<$}%
5081%EndExpansion
5082G4endl;}
5083
5084{\bf \ \ \ \ \ \ G4Exception(''***G4QEnvironment::CreateQuasmon: Energy of
5085projectile?);}
5086
5087{\bf \ \ \ \}}
5088
5089// Total energy of the projectile can not be negative (in this version of
5090the program, in general one can use the negative energy for the virtual
5091projectile).
5092
5093{\bf \ \ \ G4double projM2=proj4M.m2();}
5094
5095{\bf \ \ \ G4int targPDG=theEnvironment.GetPDG();}
5096
5097{\bf \ \ \ if(targPDG%
5098%TCIMACRO{\TEXTsymbol{>}}%
5099%BeginExpansion
5100\mbox{$>$}%
5101%EndExpansion
510280000000\&targPDG!=90000000)}
5103
5104{\bf \ \ \ \{}
5105
5106// The target has the nuclear coding and can be treated as a nucleus
5107
5108\ \ \ \ \ {\bf G4bool pbpt=projE%
5109%TCIMACRO{\TEXTsymbol{<}}%
5110%BeginExpansion
5111\mbox{$<$}%
5112%EndExpansion
5113PiPrThresh+(M2ShiftVir+projM2)/DiNuclMass;}
5114
5115// This is the condition of the photonuclear interaction below the pion
5116production threshold. The parameters {\bf PiPrThresh}, {\bf M2ShiftVir}, and
5117{\bf DiNuclMass}\ can be defined by the user (see the parameter definition
5118routine for the G4QEnvironment) or the default values can be used.
5119
5120\ \ \ \ \ {\bf G4bool din=false;}
5121
5122\ \ \ \ \ {\bf if(abs(projM2-mPi2)%
5123%TCIMACRO{\TEXTsymbol{<}}%
5124%BeginExpansion
5125\mbox{$<$}%
5126%EndExpansion
5127.00001\&\&projE-mPi%
5128%TCIMACRO{\TEXTsymbol{<}}%
5129%BeginExpansion
5130\mbox{$<$}%
5131%EndExpansion
51320.1\&\&projPDG==-211}
5133
5134\ \ \ \ \ \ \ \ {\bf 
5135%TCIMACRO{\TEXTsymbol{\vert}}%
5136%BeginExpansion
5137\mbox{$\vert$}%
5138%EndExpansion
5139%TCIMACRO{\TEXTsymbol{\vert} }%
5140%BeginExpansion
5141\mbox{$\vert$}%
5142%EndExpansion
5143\ pbpt\&\&projPDG==22) din=true;}
5144
5145// The {\bf din} flag shows, that quasi-free nucleons can not be used for
5146the interaction (as in the case of the capture of the real pion at rest or
5147photonuclear reactions below the pion production threshold) and only
5148clusters with the baryon number more than 1 must be used for the interaction.
5149
5150\ \ \ \ \ {\bf G4int envZ=theEnvironment.GetZ();}
5151
5152\ \ \ \ \ {\bf G4int envN=theEnvironment.GetN();}
5153
5154\ \ \ \ \ {\bf G4int envS=theEnvironment.GetS();}
5155
5156\ \ \ \ \ {\bf G4int tgMass=theEnvironment.GetMass();}
5157
5158\ \ \ \ \ {\bf theEnvironment.SetMaxClust(nBarClust);}
5159
5160// The environment is an instance of the {\bf G4QNucleus} class and a number
5161of clusters which can be used for the interaction can be restricted by the
5162predefined {\bf nBarClust }value.
5163
5164\ \ \ \ \ {\bf nBarClust=theEnvironment.UpdateClusters(din);}
5165
5166// The clusters are calculated up to the previously defined {\bf nBarClust}
5167value, but the dense region of the nucleus can be too small and this high
5168level of clusterization can not be reached, then the new, lower restriction
5169is returned. The {\bf din} flag is used to suppress such cases of
5170clusterization, when only quasi-free nucleons exist ({\bf nBarClust==1}).
5171
5172\ \ \ \ \ {\bf theEnvironment.PrepareCandidates(theQCandidates);}
5173
5174// This function filters the transferred vector of candidates to the
5175hadronization process and fix the preprobability values, which are
5176probabilities to find the cluster in this nuclear environment or just 1 (or
5177other suppression factor given in the parameters) for hadrons, which can be
5178created according to the quark fusion mechanism in vacuum.
5179
5180\ \ \ \ \ {\bf G4bool eFlag=false;}
5181
5182// There are two possibilities to work with the vector of the projectile
5183hadrons. First is old fashioned, belonging to the time when multi-quasmon
5184version was not developed. This is the energy flow (energy flux) approach,
5185when all the projectiles are considered as a jet and interact with the
5186nuclear cluster as one quasmon (it is not one hadron any more as it is a
5187bunch of hadrons, which can be characterized only by the quark content). So
5188this mechanism is used if the {\bf eFlag} is {\it true}. But the default
5189value in the present version is {\it false}, which means that each of the
5190hadrons interact independently and create a separate quasmon.
5191
5192\ \ \ \ \ {\bf G4int efCounter=0;}
5193
5194\ \ \ \ \ {\bf G4QContent EnFlQC(0,0,0,0,0,0);}
5195
5196\ \ \ \ \ {\bf G4LorentzVector ef4Mom(0.,0.,0.,0.);}
5197
5198// These are the counter of projectiles, the prototype of total quark
5199content for the energy flux jet and the prototype for its 4-momentum. They
5200are used internally for the annihilation at rest case and can be a good
5201example (along with the {\bf CHIPStest }program) for the {\it external
5202interfaces} to the CHIPS event generator. While such interfaces are created
5203and then meet some errors, one should look in this fragment to be sure that
5204nothing is changed in the generator performance.
5205
5206\ \ \ \ \ {\bf G4int projPDG=projQC.GetSPDGCode();}
5207
5208// Just checks if this quark content can be interpreted as a hadron.
5209
5210\ \ \ \ \ {\bf G4double proj3m=proj4M.rho();}
5211
5212// Get the absolute value of the 3-momentum of the projectile for future
5213cuts.
5214
5215\ \ \ \ \ {\bf G4int baryn=projQC.GetBaryonNumber();}
5216
5217// Get the baryon number of the projectile jet to disentangle the antibaryon
5218at rest for the pre-annihilation on the nuclear surface.
5219
5220\ \ \ \ \ {\bf if(baryn==-1 \&\& proj3M%
5221%TCIMACRO{\TEXTsymbol{<}}%
5222%BeginExpansion
5223\mbox{$<$}%
5224%EndExpansion
522510.)}
5226
5227\ \ \ \ \ {\bf \{}
5228
5229// This is the case of the pre-annihilation on the nuclear surface.
5230
5231\ \ \ \ \ \ \ \ {\bf G4double zpn=envZ+envN;}
5232
5233{\bf \ \ \ \ \ \ \ \ G4double rnd=(zpn+envS)*G4UniforRand();}
5234
5235{\bf \ \ \ \ \ \ \ \ G4int targBPDG=0;}
5236
5237{\bf \ \ \ \ \ \ \ \ G4int targNPDG=90000000;}
5238
5239{\bf \ \ \ \ \ \ \ \ G4int targQC(0,0,0,0,0,0);}
5240
5241{\bf \ \ \ \ \ \ \ \ if(rnd%
5242%TCIMACRO{\TEXTsymbol{<}}%
5243%BeginExpansion
5244\mbox{$<$}%
5245%EndExpansion
5246envN)}
5247
5248{\bf \ \ \ \ \ \ \ \ \{}
5249
5250{\bf \ \ \ \ \ \ \ \ \ \ \ targBPDG=2112;}
5251
5252{\bf \ \ \ \ \ \ \ \ \ \ \ targNPDG=90000001;}
5253
5254{\bf \ \ \ \ \ \ \ \ \ \ \ targQC= neutQC;}
5255
5256{\bf \ \ \ \ \ \ \ \ \ \}}
5257
5258{\bf \ \ \ \ \ \ \ \ \ else if(rnd%
5259%TCIMACRO{\TEXTsymbol{<}}%
5260%BeginExpansion
5261\mbox{$<$}%
5262%EndExpansion
5263zpn)}
5264
5265{\bf \ \ \ \ \ \ \ \ \{}
5266
5267{\bf \ \ \ \ \ \ \ \ \ \ \ targBPDG=2212;}
5268
5269{\bf \ \ \ \ \ \ \ \ \ \ \ targNPDG=90001000;}
5270
5271{\bf \ \ \ \ \ \ \ \ \ \ \ targQC= protQC;}
5272
5273{\bf \ \ \ \ \ \ \ \ \}}
5274
5275{\bf \ \ \ \ \ \ \ \ else}
5276
5277{\bf \ \ \ \ \ \ \ \ \{}
5278
5279{\bf \ \ \ \ \ \ \ \ \ \ \ targBPDG=3122;}
5280
5281{\bf \ \ \ \ \ \ \ \ \ \ \ targNPDG=91000000;}
5282
5283{\bf \ \ \ \ \ \ \ \ \ \ \ targQC= lambQC;}
5284
5285{\bf \ \ \ \ \ \ \ \ \}}
5286
5287// This is the standard procedure (can be another member function!) to
5288select a baryon from the nucleus. The neutQC, protQC, and lambQC quark
5289contents are defined in the {\it static const} parameters of the function
5290(analogue of the DATA operator in FORTRAN, but in respect to this operator in
5291C++ these instances are preserved by the {\it const} prefix, which makes
5292this parameter the {\it read only} one).
5293
5294\ \ \ \ \ \ \ {\bf theEnvironment.Reduce(targNPDG);}
5295
5296// After the baryon was chosen for the interaction (annihilation) it should
5297be extracted from the environment.
5298
5299\ \ \ \ \ \ \ {\bf G4double resMass=theEnviront.GetGSMass();}
5300
5301// This is the new mass for the environment. The environment is always at
5302rest and in the ground state in the model. Up to now it was enough for the
5303dynamic simulation. So even if it was excited, this excitation will be
5304transferred to the baryon to get rid of it. But the CHIPS event generator
5305did not meet the excited nuclear targets up to now.
5306
5307\ \ \ \ \ \ \ {\bf G4double barMass=tgMass-resMass;}
5308
5309// This is the bounded mass{\bf \ }of the baryon in nuclear matter, which is
5310ready for the annihilation act.
5311
5312\ \ \ \ \ \ \ \ {\bf tgMass=resMass;}
5313
5314// The target mass must be updated.
5315
5316{\bf \ \ \ \ \ \ \ \ q4Mom=G4LorentzVector(0,0,0,barMass)+proj4M;}
5317
5318{\bf \ \ \ \ \ \ \ \ valQ=targQC+projQC;}
5319
5320{\bf \ \ \ \ \ \ \ \ G4Quasmon* pan=new G4Quasmon(valQ,q4Mom);}
5321
5322// Here the quasmon for the annihilation system is created and the function
5323takes the responsibility to delete it.
5324
5325{\bf \ \ \ \ \ \ \ \ G4QNucleus vE=vacuum;}
5326
5327{\bf \ \ \ \ \ \ \ \ G4QHadronVector* output=pan-%
5328%TCIMACRO{\TEXTsymbol{>}}%
5329%BeginExpansion
5330\mbox{$>$}%
5331%EndExpansion
5332Fragment(vE,1);}
5333
5334// The act of fragmentation (annihilation) is made here. The fragmentation
5335function is informed that it happens in vacuum (the vacuum variable is
5336defined in the {\it static const} part of the function) and this is the only
5337({\bf 1}) quasmon in the environment (which is trivial for the vacuum
5338hadronization). The {\bf output} is another object which should be deleted
5339by the function.
5340
5341{\bf \ \ \ \ \ \ \ \ delete pan;}
5342
5343// So the delete-responsibility is transferred to the {\bf output} now.
5344
5345\ \ \ \ \ \ \ {\bf G4QHadronvector input;}
5346
5347// This is not necessary to take responsibility to delete this vector
5348itself, but as far as any vector is created (even in the C++ stack, not in
5349the C++ heap) it is necessary to clean up the pointers and may be (this is
5350recommended to avoid the memory leak) the instances, to which this pointers
5351indicate.
5352
5353{\bf \ \ \ \ \ \ \ \ G4int trgPDG=theEnvironment.GetPDG();}
5354
5355{\bf \ \ \ \ \ \ \ \ G4LorentzVector targ4M(0.,0.,0.,resMass);}
5356
5357// The new target for the residual environment{\bf .}
5358
5359\ \ \ \ \ \ \ {\bf G4int tNH=output-%
5360%TCIMACRO{\TEXTsymbol{>}}%
5361%BeginExpansion
5362\mbox{$>$}%
5363%EndExpansion
5364size();}
5365
5366// This is just a number of the secondary hadrons (mesons), which should be
5367considered in the selection loop (see below).
5368
5369{\bf \ \ \ \ \ \ \ \ G4Threevector dir = RndmDir();}
5370
5371// In case of the annihilation at rest the direction, in which the solid
5372angle is tested for the selection of the projectile particles in the second
5373act of interaction, is random. At high energies it can depend on the
5374direction of the primary projectile. But in this case the incident parameter
5375and the nuclear geometry should be taken into account. So the dir is a
5376randomly directed unit 3-vector.
5377
5378{\bf \ \ \ \ \ \ \ \ for(G4int ind=0; ind%
5379%TCIMACRO{\TEXTsymbol{<}}%
5380%BeginExpansion
5381\mbox{$<$}%
5382%EndExpansion
5383tNH; ind++)}
5384
5385{\bf \ \ \ \ \ \ \ \ \{}
5386
5387// Loop over hadrons of the {\bf output }vector starts here.
5388
5389{\bf \ \ \ \ \ \ \ \ \ \ \ G4QHadron* curHadr=output-%
5390%TCIMACRO{\TEXTsymbol{>}}%
5391%BeginExpansion
5392\mbox{$>$}%
5393%EndExpansion
5394operator[](ind);}
5395
5396{\bf \ \ \ \ \ \ \ \ \ \ \ G4int shDFL=curHadr-%
5397%TCIMACRO{\TEXTsymbol{>}}%
5398%BeginExpansion
5399\mbox{$>$}%
5400%EndExpansion
5401GetNFragments();}
5402
5403{\bf \ \ \ \ \ \ \ \ \ \ \ G4LorentzVector sh4m=curHadr-%
5404%TCIMACRO{\TEXTsymbol{>}}%
5405%BeginExpansion
5406\mbox{$>$}%
5407%EndExpansion
5408Get4Momentum();}
5409
5410{\bf \ \ \ \ \ \ \ \ \ \ \ G4ThreeVector shDIR=sh4m.vect().unit();}
5411
5412// This is how the conveyer of the member functions can be used to get the
5413unit vector in the direction of the 3-momentum of the secondary hadron.
5414
5415{\bf \ \ \ \ \ \ \ \ \ \ \ if (!shDFL)}
5416
5417{\bf \ \ \ \ \ \ \ \ \ \ \ \{}
5418
5419// This is the standard filter for the particles, which already decayed.
5420Only final particles are the candidates for the secondary interaction.
5421
5422{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ if(dir.dot(shDIR)%
5423%TCIMACRO{\TEXTsymbol{>}}%
5424%BeginExpansion
5425\mbox{$>$}%
5426%EndExpansion
5427SolidAngle)}
5428
5429{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
5430
5431// The particles inside the cos(), corresponding to the {\bf SolidAngle}
5432parameter are selected. The {\bf SolidAngle} parameter varies from -1 to 1.
5433
5434{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if(efFlag)}
5435
5436{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
5437
5438{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ G4QContent shQC=curHadr-%
5439%TCIMACRO{\TEXTsymbol{>}}%
5440%BeginExpansion
5441\mbox{$>$}%
5442%EndExpansion
5443GetQC();}
5444
5445{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ef4Mom+=sh4m;}
5446
5447{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ EnFlQC+=shQC;}
5448
5449{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ effCounter++;}
5450
5451// One projectile quasmon, made of the set of selected hadrons is collected
5452here.
5453
5454{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
5455
5456{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ else}
5457
5458{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
5459
5460{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ G4QHadron* mqHadron=new
5461G4QHadron(curHadr);}
5462
5463// The new hadron is created in the C++ heap as the copy of the hadron in the
5464annihilation {\bf output} and the following line is the {\bf delete}
5465equivalent.
5466
5467{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ input.push\_back(mqHadron);}
5468
5469// This is very useful function of the vector template, which is used by the
5470GEANT4 Collaboration. This function just fills the {\bf input} vector for
5471the secondary interaction with the nucleus.
5472
5473{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
5474
5475{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
5476
5477// The selection process based on the solid angle stops here
5478
5479{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ else}
5480
5481{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
5482
5483{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ G4QHadron* curHadron=new
5484G4QHadron(curHadr);}
5485
5486// The new hadron is created in the C++ heap as the copy of the hadron in the
5487annihilation {\bf output} and the following line is the {\bf delete}
5488equivalent.
5489
5490{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ theQHadrons.push\_back(curHadron);}
5491
5492// Here the particles, produced in the peripheral annihilation act, are sent
5493to the {\bf output }vector of the {\bf G4QEnvironment:Fragment()} function.
5494
5495\ \ \ \ \ \ \ \ \ \ \ \ \ \}
5496
5497// The direct filling stops here
5498
5499{\bf \ \ \ \ \ \ \ \ \ \ \ \}}
5500
5501// The filtering of decayed particles stops here.
5502
5503{\bf \ \ \ \ \ \ \ \ \}}
5504
5505// This is the end of the loop over the hadrons of the {\bf output} vector
5506of the peripheral annihilation act. \ \
5507
5508{\bf \ \ \ \ \ \ \ G4std::for\_each(output-%
5509%TCIMACRO{\TEXTsymbol{>}}%
5510%BeginExpansion
5511\mbox{$>$}%
5512%EndExpansion
5513begin(), output-%
5514%TCIMACRO{\TEXTsymbol{>}}%
5515%BeginExpansion
5516\mbox{$>$}%
5517%EndExpansion
5518end(), DeleteQHadron());}
5519
5520// This is a very important function for vectors as it clears the pointers
5521and deletes the instances of the vector.
5522
5523\ \ \ \ \ \ \ {\bf delete output;}
5524
5525{\bf \ \ \ \ \ \ \ \ if(!efFlag)}
5526
5527{\bf \ \ \ \ \ \ \ \ \{}
5528
5529// This is the multi-quasmon case
5530
5531{\bf \ \ \ \ \ \ \ \ \ \ \ if(!(input.size())) return;}
5532
5533// If no one of secondaries penetrates the nucleus, then just go out without
5534interaction and without any quasmon creation.
5535
5536{\bf \ \ \ \ \ \ \ \ \ \ \ G4Quasmon fakeQ;}
5537
5538// This is just a fake quasmon, which is created, to find out which
5539parameters are defined by the user for this reaction. These are static
5540parameters, so any new created instance of the {\bf G4Qusmon} class has the
5541parameters defined by the user. This is necessary as the parameters must be
5542recovered after the parameters for the annihilation process are temporary
5543substituted instead of the parameters defined by the user.
5544
5545{\bf \ \ \ \ \ \ \ \ \ \ \ G4QTemper=fake.GetTemper();}
5546
5547{\bf \ \ \ \ \ \ \ \ \ \ \ G4double QSOverU=fakeQ.GetSOverU();}
5548
5549{\bf \ \ \ \ \ \ \ \ \ \ \ G4double QEtaSup=fakeGetEtaSup();}
5550
5551{\bf \ \ \ \ \ \ \ \ \ \ \ G4Quasmon::SetParameters(180.,.1,.3);}
5552
5553// These hardwired parameters are defined according to the paper \cite
5554{CHIPS1}.
5555
5556{\bf \ \ \ \ \ \ \ \ \ \ \ G4QEnvironment* muq=}
5557
5558\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\bf new
5559G4QEnvironment(input,theEnvironment.GetPDG());}
5560
5561// This is the temporary interaction inside this interaction.
5562
5563{\bf \ \ \ \ \ G4std::for\_each(input.begin(), input.end(), DeleteQHadron());}
5564{\bf \ \ \ \ \ projHV.clear();}
5565
5566// This is an important point. The input vector was created in the C++
5567stack, not in the C++ heap, so we do not need to delete it, it is deleted
5568automatically in this {\it name space}, but we need to {\it clear} the
5569pointers and {\it destroy} instances of this vector.
5570
5571{\bf \ \ \ \ \ \ \ \ \ \ \ theEnvironment=muq-%
5572%TCIMACRO{\TEXTsymbol{>}}%
5573%BeginExpansion
5574\mbox{$>$}%
5575%EndExpansion
5576GetEnvironment();}
5577
5578// Now we should use the result of this temporary internal interaction. The
5579first result is the residual nuclear environment after the interaction
5580(creation of quasmons in nuclear matter).
5581
5582\ \ \ \ {\bf \ \ \ \ \ \ G4QuasmonVector* outQ=muq-%
5583%TCIMACRO{\TEXTsymbol{>}}%
5584%BeginExpansion
5585\mbox{$>$}%
5586%EndExpansion
5587GetQuasmons();}
5588
5589// The {\bf outQ} vector must be deleted as the copy of the internal quasmons
5590is made by the {\bf GetQuasmon()} function according to the GEANT4
5591convention.
5592
5593\ {\bf \ \ \ \ \ \ \ \ \ delete muq;}
5594
5595// So this is a kind of the rule: we delete the instance of the class, when
5596we get the output of this class. No parameters, which were defined by
5597the user can be recovered.
5598
5599{\bf \ \ \ \ \ \ \ \ \ \ \ G4Quasmon::SetParameters(QTemper,QSOverU,QEtaSup);%
5600}
5601
5602{\bf \ \ \ \ \ \ \ \ \ \ \ G4int nMq=outQ-%
5603%TCIMACRO{\TEXTsymbol{>}}%
5604%BeginExpansion
5605\mbox{$>$}%
5606%EndExpansion
5607size();}
5608
5609{\bf \ \ \ \ \ \ \ \ \ \ \ if(nMQ) for(G4int mh=0; mh%
5610%TCIMACRO{\TEXTsymbol{<}}%
5611%BeginExpansion
5612\mbox{$<$}%
5613%EndExpansion
5614nMQ; mh++)}
5615
5616{\bf \ \ \ \ \ \ \ \ \ \ \ \{}
5617
5618{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ G4Quasmon* curQ=new G4Quasmon(0utQ-%
5619%TCIMACRO{\TEXTsymbol{>}}%
5620%BeginExpansion
5621\mbox{$>$}%
5622%EndExpansion
5623operator[](mh));}
5624
5625// The new copy is created for the temporary quasmon and the delete
5626equivalent for this copy is the next line.
5627
5628{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ theQuasmons.push\_back(curQ);}
5629
5630{\bf \ \ \ \ \ \ \ \ \ \ \ \}}
5631
5632{\bf \ \ \ \ \ \ G4std::for\_each(outQ-%
5633%TCIMACRO{\TEXTsymbol{>}}%
5634%BeginExpansion
5635\mbox{$>$}%
5636%EndExpansion
5637begin(), outQ-%
5638%TCIMACRO{\TEXTsymbol{>}}%
5639%BeginExpansion
5640\mbox{$>$}%
5641%EndExpansion
5642end(), DeleteQuasmon());}
5643
5644
5645// The quasmons were copied from the temporary interaction environment to
5646this one, so they must be destroyed in the temporary one.
5647
5648{\bf \ \ \ \ \ \ \ \ \ \ \ delete outQ;}
5649
5650{\bf \ \ \ \ \ \ \ \ \}}
5651
5652{\bf \ \ \ \ \ \ \ \ else if(!efCounter) return;}
5653
5654// If this the energy flow (flux) case and no particles were collected for
5655it, then just return without any further interaction and without any quasmon
5656creation.
5657
5658\ \ \ \ \ {\bf \}}
5659
5660// The case of the preannihilation on the nuclear surface stops here.
5661
5662{\bf \thinspace\ \ \ \ \ \ else EnFlQC=projQC;}
5663
5664// If this is not the antibaryon then the quark content of the projectile is
5665used in the same way as the quark content of the projectile quasmon.
5666
5667\ \ \ \ \ {\bf G4double EnFlP=ef4Mom.rho();}
5668
5669// This is an absolute value of the 3-momentum of the projectile
5670
5671\ \ \ \ \ {\bf PrepareInteractionProbabilities(EnFlQC,EnFlP);}
5672
5673// This function prepares the probabilities for the clusters. For the sake
5674of restriction on the isotopic shift and the baryon number of the cluster
5675the quark content and the 3-momentum of the projectile is transferred to
5676this function. After that the cluster is selected according to the
5677calculated probabilities and the projectile makes a compound quasmon with
5678the selected cluster. This is how the quasmons are created in the nuclear
5679matter.
5680
5681\ \ \ \ \ {\bf G4int nCandid = theQCandidates.size();}
5682
5683// A number of the cluster-candidates.
5684
5685\ \ \ \ \ {\bf G4double maxP=TheQCandidates[nCandid-1]-%
5686%TCIMACRO{\TEXTsymbol{>}}%
5687%BeginExpansion
5688\mbox{$>$}%
5689%EndExpansion
5690GetIntegProbability();}
5691
5692// Total sum of all probabilities
5693
5694\ \ \ \ \ {\bf G4double totP=maxP*G4UniformRand();}
5695
5696\ \ \ \ \ {\bf if(!totP)}
5697
5698\ \ \ \ \ {\bf \{}
5699
5700{\bf \ \ \ \ \ \ \ \ G4cerr%
5701%TCIMACRO{\TEXTsymbol{<}}%
5702%BeginExpansion
5703\mbox{$<$}%
5704%EndExpansion
5705%TCIMACRO{\TEXTsymbol{<}}%
5706%BeginExpansion
5707\mbox{$<$}%
5708%EndExpansion
5709''***G4QEnv::CreateQ: nC=''%
5710%TCIMACRO{\TEXTsymbol{<}}%
5711%BeginExpansion
5712\mbox{$<$}%
5713%EndExpansion
5714%TCIMACRO{\TEXTsymbol{<}}%
5715%BeginExpansion
5716\mbox{$<$}%
5717%EndExpansion
5718nCandid}
5719
5720{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
5721%TCIMACRO{\TEXTsymbol{<}}%
5722%BeginExpansion
5723\mbox{$<$}%
5724%EndExpansion
5725%TCIMACRO{\TEXTsymbol{<}}%
5726%BeginExpansion
5727\mbox{$<$}%
5728%EndExpansion
5729'', maxP=''%
5730%TCIMACRO{\TEXTsymbol{<}}%
5731%BeginExpansion
5732\mbox{$<$}%
5733%EndExpansion
5734%TCIMACRO{\TEXTsymbol{<}}%
5735%BeginExpansion
5736\mbox{$<$}%
5737%EndExpansion
5738maxP%
5739%TCIMACRO{\TEXTsymbol{<}}%
5740%BeginExpansion
5741\mbox{$<$}%
5742%EndExpansion
5743%TCIMACRO{\TEXTsymbol{<}}%
5744%BeginExpansion
5745\mbox{$<$}%
5746%EndExpansion
5747'', QE=''%
5748%TCIMACRO{\TEXTsymbol{<}}%
5749%BeginExpansion
5750\mbox{$<$}%
5751%EndExpansion
5752%TCIMACRO{\TEXTsymbol{<}}%
5753%BeginExpansion
5754\mbox{$<$}%
5755%EndExpansion
5756theEnvironment%
5757%TCIMACRO{\TEXTsymbol{<}}%
5758%BeginExpansion
5759\mbox{$<$}%
5760%EndExpansion
5761%TCIMACRO{\TEXTsymbol{<}}%
5762%BeginExpansion
5763\mbox{$<$}%
5764%EndExpansion
5765G4endl;}
5766
5767{\bf \ \ \ \ \ \ \ \ G4Exception(''G4QEnvironment::CreateQuasmon:}
5768
5769{\bf \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Can not select a
5770cluster for the interaction'');}
5771
5772\ \ \ \ \ {\bf \}}
5773
5774\ \ \ \ \ {\bf G4int i=0;}
5775
5776\ \ \ \ \ {\bf while(theCandidates[i]-%
5777%TCIMACRO{\TEXTsymbol{>}}%
5778%BeginExpansion
5779\mbox{$>$}%
5780%EndExpansion
5781GetIntegProbability()%
5782%TCIMACRO{\TEXTsymbol{<}}%
5783%BeginExpansion
5784\mbox{$<$}%
5785%EndExpansion
5786totP) i++;}
5787
5788// This is the standard randomization procedure for the integrated
5789probabilities
5790
5791\ \ \ \ \ {\bf G4QCandidate* curCand = theQCandidates[i];}
5792
5793// This is a pointer to the chosen cluster
5794
5795\ \ \ \ \ {\bf G4QContent curQC=curCand-%
5796%TCIMACRO{\TEXTsymbol{>}}%
5797%BeginExpansion
5798\mbox{$>$}%
5799%EndExpansion
5800GetQC();}
5801
5802\ \ \ \ \ {\bf G4QNucleus targClust(curQC.GetP(), curQC.GetN(),
5803curQC.GetL());}
5804
5805// This is a historic method of the nucleus definition one can just use {\bf %
5806G4QNucleus(curQC)}.
5807
5808\ \ \ \ \ {\bf theEnvironment.Reduce(targClust.GetPDG());}
5809
5810// The environment
5811
5812\ \ \ \ \ {\bf G4double envMass=theEnvironment.GetGSMass();}
5813
5814\ \ \ \ \ {\bf if(projPDG==22\&\&pbpt)}
5815
5816\ \ \ \ \ {\bf \{}
5817
5818{\bf \ \ \ \ \ \ \ \ q4Mom=G4LorentzVector(0.,0.,0.,tgMass-envMass);}
5819
5820{\bf \ \ \ \ \ \ \ \ valQ=targClust.GetQCZNS();}
5821
5822{\bf \ \ \ \ \ \ \ \ G4Quaxmon* curQuasmon=new G4Quasmon(valQ, q4Mom,
5823proj4M);}
5824
5825{\bf \ \ \ \ \ \ \ \ theQuasmons.push\_back(curQuasmon);}
5826
5827\ \ \ \ \ {\bf \}}
5828
5829\ \ \ \ \ {\bf else}
5830
5831\ \ \ \ \ {\bf \{}
5832
5833{\bf \ \ \ \ \ \ \ \ q4Mom=proj4M+G4LorentzVector(0.,0.,0.,tgMass-envMass);}
5834
5835{\bf \ \ \ \ \ \ \ \ valQ=EnFlQC+targClust.GetQCZNS();}
5836
5837{\bf \ \ \ \ \ \ \ \ G4Quasmon* curQuasmon=new G4Quasmon(valQ, q4Mom);}
5838
5839{\bf \ \ \ \ \ \ \ \ theQuasmons.push\_back(curQuasmon);}
5840
5841{\bf \ \ \ \ \ \ \}}
5842
5843{\bf \ \ \ \}}
5844
5845{\bf \ \ \ else}
5846
5847{\bf \ \ \ \{}
5848
5849// This is an important point: the target must have a nuclear coding in this
5850version. In future any hadron as a target can be included.
5851
5852{\bf \ \ \ \ \ \ G4cerr%
5853%TCIMACRO{\TEXTsymbol{<}}%
5854%BeginExpansion
5855\mbox{$<$}%
5856%EndExpansion
5857%TCIMACRO{\TEXTsymbol{<}}%
5858%BeginExpansion
5859\mbox{$<$}%
5860%EndExpansion
5861''***G4QEnv::CQ: Strange targPDG=''%
5862%TCIMACRO{\TEXTsymbol{<}}%
5863%BeginExpansion
5864\mbox{$<$}%
5865%EndExpansion
5866%TCIMACRO{\TEXTsymbol{<}}%
5867%BeginExpansion
5868\mbox{$<$}%
5869%EndExpansion
5870targPDG%
5871%TCIMACRO{\TEXTsymbol{<}}%
5872%BeginExpansion
5873\mbox{$<$}%
5874%EndExpansion
5875%TCIMACRO{\TEXTsymbol{<}}%
5876%BeginExpansion
5877\mbox{$<$}%
5878%EndExpansion
5879G4endl;}
5880
5881{\bf \ \ \ \ \ \ G4Exception(''***G4QEnvironment::CreateQuasmon: Impossible
5882target'');}
5883
5884{\bf \ \ \ \}}
5885
5886{\bf \}}
5887
5888// End of the CreateQuasmon member function
5889
5890\section{Appendix C. Nucleon-Antinucleon Annihilation at Rest}
5891
5892In the CHIPS model any excited hadronic system is considered to be a
5893quasmon, a bubble containing massless quarks (quark-parton plasma).
5894Quark-partons of the quasmon are homogeneously distributed over the 
5895invariant phase space. The quasmon can be considered as a bubble of
5896the 3-dimensional Feynman-Wilson \cite{Feynman-Wilson}\  parton gas. A
5897quark fusion mechanism is applied to the successive fragmentation of a
5898quasmon into hadrons. The model can be considered as a generalization
5899of the chiral bag model of hadrons \cite{Chiral_Bag}\  in which
5900any hadron consists of a few quark-partons. Any interaction between
5901hadrons is modeled as purely kinematical effect of quark exchange
5902reaction, and any quasmon decay is modeled as a quark fusion
5903of two quark-partons in the quasmon.
5904This approach does not pretend to be a dynamical model. It can be
5905considered also as a generalization of the well-known hadronic phase
5906space distribution \cite{GENBOD}\  approach, because it generates not only
5907angular and momentum distributions for a given set of hadrons but the
5908multiplicity distribution for different kinds of hadrons too. In
5909comparison with other parton models \cite{Parton_Models}\  the CHIPS
5910model is 3-dimensional.
5911
5912The invariant phase space distribution as a paradigm of thermalized
5913chaos is applied to quarks, and simple kinematical mechanisms are used
5914to model the hadronization of quarks into hadrons. Any quark-parton in
5915a quasmon has a possibility to pick up another quark-parton from the
5916same hadronic system (quark fusion mechanism) or exchange with a
5917quark-parton of the neighboring quasmon (quark exchange
5918mechanism). The kinematical condition for these mechanisms is that the
5919secondary hadrons must be produced on their mass shell. In case of
5920massless quarks the hadronization process can be easily integrated and
5921modeled. That is why -- for the sake of acceleration of the algorithm
5922-- we consider u, d, and s quarks to be massless in spite of their
5923known nonzero mass values. Indirectly the quark mass is taken
5924into account in the masses of outgoing hadrons. The selection of the
5925type of the outgoing hadron is performed using combinatorial and
5926kinematical factors which would allow given hadron to be emitted,
5927taking into account conservation laws.  In the present version of CHIPS
5928all mesons with 3-digit PDG Monte Carlo codes \cite{CHdetail.PDG} up to
5929spin $4$\ and all baryons with 4-digit PDG codes up to spin
5930$\frac{7}{2}$\ are implemented.
5931
5932The only non-kinematical concept of the model is the hypothesis of
5933critical temperature of the quasmon, which has its almost 35-year-old
5934history, starting with \cite{Hagedorn}.
5935It is based on the experimental
5936observation of regularities in the inclusive spectra of hadrons
5937produced in different reactions at high energies. The concept of
5938critical temperature is used in the method of calculating the number
5939of quark-partons in a quasmon. In an infinite thermalized system the
5940mean energy of partons is $2T$\ per particle, where $T$\ is the
5941temperature of the system. For the finite system of $N$\ partons with
5942total center-of-mass energy $M$\ the invariant phase space integral
5943($\Phi _{N}$) is proportional to $M^{2N-4}$, where according to the
5944dimensional counting rule $2N$\ comes from
5945$\prod\limits_{i=1}^{N}\frac{d^{3}p_{i}}{E_{i}}$, and $4$\ comes from
5946the energy and momentum conservation $\delta ^{4}($\b{P}$-\sum
5947$\b{p}$_{i})$\ function. On the other hand, at a temperature $T$\ the
5948statistical density of states is proportional to
5949$e^{-\frac{M}{T}}$. So the probability to find a system of $N$\
5950quark-partons in a state with mass $M$\ is $dW \propto
5951M^{2N-4}e^{-\frac{M}{T}}dM$.  For this kind of a probability
5952distribution the mean value of $M^{2}$\ can be calculated as
5953\begin{equation}
5954<M^{2}>=4N(N-1)\cdot T^{2}\label{temperature}
5955\end{equation}
5956
5957When $N$\ goes to infinity one can obtain for massless particles the
5958well-known $<M>\equiv \sqrt{<M^{2}>}=2NT$\ result. If a nucleon is
5959excited, for example by absorbing energy from an incident real or
5960virtual photon, the number of partons in the newly formed quasmon is
5961determined by equation (\ref{temperature}). As the number of
5962quark-partons in the quasmon is set this way, the spectrum of
5963quark-partons can be calculated using the same $\Phi _{N}\propto
5964M^{2N-4}$\ relation applied to the residual $N-1$\ quarks. As a
5965result, the quark-parton spectrum can be calculated as:
5966\begin{equation}
5967\frac{dW}{kdk}\propto (M_{N-1})^{2N-6},
5968\end{equation}
5969where $M_{N-1}$\ is an effective mass of the residual $N-1$\
5970quark-partons.
5971It can be calculated as a function of the total mass $M$:
5972\begin{equation}
5973M_{N-1}^{2}=M^{2}-2kM,  \label{m_n-1}
5974\end{equation}
5975where $k$\ is the energy of the primary quark-parton in the
5976center-of-mass system (CMS) of $N$\ partons. The resulting
5977equation for the quark-parton spectrum is:
5978\begin{equation}
5979\frac{dW}{kdk}\propto (1-\frac{2k}{M})^{N-3}\label{spectrum_1}
5980\end{equation}
5981
5982In this paper we consider only the quark fusion mechanism of
5983hadronization, as the quark exchange mechanism can take place only in
5984nuclear matter when a quasmon has neighboring nucleons. To dissociate
5985a quasmon into a residual quasmon and an outgoing hadron one needs to
5986calculate the probability for two quark-partons to have the effective
5987mass of the outgoing hadron. To do that it is necessary to calculate
5988the spectrum of the second quark-parton.  The secondary spectrum can
5989be calculated in the same way as the primary spectrum
5990(\ref{spectrum_1}) where $N$\ should be substituted by $N-1$. Using
5991(\ref{m_n-1}) the spectrum can be written in the form
5992\begin{equation}
5993\frac{dW}{q dq }\propto \left( 1-\frac{2q }{M\sqrt{1-
5994\frac{2k}{M}}}\right) ^{N-4}\label{spectrum_2}
5995\end{equation}
5996where $q$\ is the energy of the second quark-parton in the CMS
5997of $N-1$\ quark-partons.
5998
5999An additional equation comes from the mass shell condition for the
6000outgoing hadron:
6001\begin{equation}
6002\mu^2 = 2 \frac{k}{\sqrt{1-\frac{2k}{M}}} 
6003 \cdot q \cdot (1-\cos \theta ),  \label{hadron}
6004\end{equation}
6005where $\mu$\ is a mass of the outgoing hadron, and $\theta$\ is the angle
6006between the momentum directions of the two quark-partons in the CMS
6007of $N-1$\ quarks. Now the
6008kinematical quark fusion probability can be calculated for any primary
6009quark-parton with energy $k$\ as an integral:
6010\begin{eqnarray}
6011P(k,M,\mu )=&&\int \left( 1-\frac{2q }{M\sqrt{1-\frac{2k}{M}}}\right)
6012^{N-4} \nonumber\\
6013 && \times\  \delta \left( \mu ^{2}-\frac{2kq (1-\cos \theta )}{\sqrt{1-
6014\frac{2k}{M}}}\right) q dq d\cos \theta .\ \ \ \
6015\end{eqnarray}
6016Using the $\delta$-function\footnote{\protect{
6017If $g(x_0)$=0, $\int f(x)\delta\left[g(x)\right]dx = 
6018\int \frac{f(x)\delta\left[g(x)\right]}{g^\prime(x)} dg(x) = 
6019\frac{f(x_0)}{g^\prime(x_0)}$
6020}}
6021to perform the integration over $q$\ one gets:
6022\begin{eqnarray}
6023P(k,M,\mu )=&&\int \left( 1-\frac{\mu ^{2}}{Mk(1-\cos \theta )}\right)
6024^{N-4} \nonumber\\
6025 && \times\ \left( \frac{\mu ^{2}\sqrt{1-\frac{2k}{M}}}{2k(1-\cos \theta )}
6026\right)^{2}d\left(\frac{1-\cos \theta }{\mu ^{2}}\right) ,\ \
6027\end{eqnarray}
6028or
6029\begin{eqnarray}
6030P(k,M,\mu )=&&\frac{M-2k}{4k}\int \left(1-\frac{\mu ^{2}}{Mk(1 -
6031\cos\theta)}\right) ^{N-4} \nonumber\\
6032 && \times\ d\left(1-\frac{\mu ^{2}}{Mk(1-\cos \theta )}\right).
6033\end{eqnarray}
6034The maximum value of
6035$z=1-\frac{2q }{M_{N-1}}=1-\frac{\mu ^{2}}{Mk(1-\cos \theta )}$\ is
6036\begin{equation}
6037z_{\max }=1-\frac{\mu ^{2}}{2Mk},
6038\end{equation}
6039when $\cos \theta =-1$, and the minimum value of $z$ is $0$\ when $\cos\theta
6040= 1- \frac{\mu ^{2}}{M\cdot k}$. So the range of $\theta$\ is:
6041$-1<\cos \theta < 1-\frac{\mu ^{2}}{M\cdot k}$. The integrated
6042kinematical quark fusion probability (in the range from 0 to $z$) is
6043\begin{equation}
6044\frac{M-2k}{4k\cdot (N-3)}\cdot z^{N-3}  \label{z_probab}
6045\end{equation}
6046and the total kinematical probability of hadronization of the
6047quark-parton with energy $k$\ to a hadron with mass $\mu$\ is
6048\begin{equation}
6049\frac{M-2k}{4k \cdot (N-3)} \cdot z_{\max}^{N-3}.
6050                                   \label{tot_kin_probab}
6051\end{equation}
6052Equations (\ref{z_probab}) and (\ref{tot_kin_probab}) can be used for
6053randomization of $z$:
6054\begin{equation}
6055z=\sqrt[N-3]{R}\cdot z_{\max }\label{z_random}
6056\end{equation}
6057where R is a random number uniformly distributed in the interval (0,1).
6058
6059The equation (\ref{tot_kin_probab}) can be used to create a
6060competition between different hadrons in the hadronization process. In
6061calculating relative probabilities for different hadrons one can use
6062only a $z_{\max }^{N-3}$\ term in (\ref{tot_kin_probab}) as the rest is
6063a constant for all candidates for the outgoing hadron,
6064but in addition
6065it is necessary to take into account the quark content of a candidate $h$
6066and its spin $s_h$. As a result the relative probability can be
6067calculated as
6068\begin{equation}
6069P_h(k,M,\mu )=(2s_h+1)\cdot z_{\max }^{N-3}\cdot C_{Q}^{h}
6070                                         \label{rel_prob}
6071\end{equation}
6072where $C_{Q}^{h}$\ is the number of combinations of the quark content
6073of the particular candidate from the quark content of the
6074quasmon. We used the following quark wave functions for $\eta$\
6075and $\eta ^{\prime }$\ mesons: $\eta
6076=\frac{\bar{u}u+\bar{d}d}{2}-\frac{\bar{s}s}{\sqrt{2}}$, $\eta
6077^{\prime }=\frac{\bar{u}u+\bar{d}d}{2}+\frac{\bar{s}s}{\sqrt{2}}$. No
6078mixing was assumed for the $\omega $\ and $\phi $\ meson states:
6079$\omega =\frac{ \bar{u}u+\bar{d}d}{\sqrt{2}}$, $\varphi
6080=\bar{s}s$. Using these relative probabilities one can randomly
6081generate the type of the outgoing hadron.
6082
6083There is one more model restriction to the hadronization process. We
6084assume that the quark content of the residual quasmon must have
6085the quark content of either one or two real hadrons. When
6086quantum numbers of a quasmon, determined by its quark content, cannot
6087be represented by quantum numbers of a real hadron, the quasmon is
6088considered to be a virtual hadron molecule such as $\pi ^{+}\pi ^{+}$\
6089or $K^{+}\pi ^{+}$, in which case it is defined in the CHIPS model
6090as the Chipolino pseudo-particle.
6091
6092To fuse quark-partons and create the decay of the quasmon into the
6093selected hadron and a residual quasmon, one needs to randomly generate
6094the residual quasmon mass $m$, which in fact is the mass of the
6095residual $N-2$ quarks. Using an equation similar to (\ref{m_n-1}) one
6096finds that
6097\begin{equation}
6098m^{2}=z\cdot (M^{2}-2kM).  \label{m(z)}
6099\end{equation}
6100Now using equation (\ref{z_random}), the mass value of the residual
6101quasmon can be randomized as
6102\begin{equation}
6103m^{2}=(M-2k)\cdot (M-\frac{\mu ^{2}}{2k})\cdot \sqrt[N-3]{R}.
6104\label{res_quasmon}
6105\end{equation}
6106Thus, the final state hadron at this step is generated as a product of
6107the two-particle decay of the initial quasmon into the hadron and the
6108residual quasmon with the generated mass value.
6109
6110This iterative hadronization process continues while the residual
6111quasmon mass remains greater than $m_{\min }$, where the definition of
6112$m_{\min }$\ depends on the type of quasmon (hadron-type, or
6113Chipolino-type). For the hadron-type residual quasmon
6114\begin{equation}
6115 m_{\min }=m_{\min }^{QC}+m_{\pi ^{0}}\label{m_min}
6116\end{equation}
6117where $m_{\min }^{QC}$\ is the minimum hadron mass for the residual
6118quark content (QC). For the Chipolino-type residual quasmon consisting
6119of hadrons $h_1$\ and $h_2$\
6120\begin{equation}
6121 m_{\min }=m_{h_1}+m_{h_2}. \label{m_min_chipolino}
6122\end{equation}
6123These conditions assure that the quasmon in the iterative process
6124has always enough energy to decay into at least two final state
6125hadrons, conserving four-momentum and charge.
6126
6127If the remaining CMS energy of the residual quasmon falls below
6128$m_{\min}$, then the hadronization process finishes by a final
6129two-particle decay.  If the parent quasmon is a Chipolino consisting
6130of hadrons $h_1$\ and $h_2$, then a binary decay of the parent quasmon
6131into $m_{h_1}$\ and $m_{h_2}$\ takes place.  If the parent quasmon is
6132not a Chipolino then the decay into $m_{\min}^{QC}$\ and $m_h$\ takes
6133place. The decay into $m_{\min}^{QC}$\ and $m_\pi^0$\ is
6134always possible in this case because of condition (\ref{m_min}).
6135
6136If the residual quasmon is not Chipolino-type, and $m>m_{\min}$, the
6137hadronization loop can still be finished by the resonance production
6138mechanism, modeled following the concept of parton - hadron duality
6139\cite{Duality}.  If the residual quasmon mass
6140value $m$\ is in the vicinity of some resonance with the same quark
6141content (e.g. $\rho$\ or $K^{\ast }$), there is a probability for the
6142residual quasmon to convert to this resonance.\footnote{For the
6143comparison of the quark contents, the quark content of the quasmon is
6144reduced by canceling of the quark-antiquark pairs of the same flavor.}
6145In the present version of the CHIPS event generator the probability to
6146convert to the resonance is calculated as
6147\begin{equation}
6148P_{\rm{res}}=\frac{m_{\min }^{2}}{m^{2}}\label{res_probab}
6149\end{equation}
6150With this probability the resonance with the squared mass value
6151$m_{r}^{2}$\ closest to $m^{2}$\ is selected, and the binary decay of
6152the quasmon into $m_{h}$\ and $m_{r}$\ takes place.
6153
6154In the future when experimental data will be more detailed one can
6155take into account angular momentum conservation, and also C-, P- and
6156G-parity conservation. In the present version of the CHIPS event
6157generator, $\eta $\ and $\eta ^{\prime }$\ are suppressed by a factor
6158$0.3$. The factor was tuned for the experiments on antiproton
6159annihilation at rest in liquid hydrogen and can be different for other
6160hadronic reactions. One can vary it when describing other reactions.
6161
6162In addition to this parameter we had two more parameters. One of them
6163is the suppression of heavy quark production (the so-called $s/u$\
6164parameter) \cite{JETSET}. For the proton-antiproton annihilation at rest
6165the strange quark-antiquark sea was found to be suppressed by the
6166factor $s/u = 0.1$.  It
6167is less than $s/u = 0.3$, which is used as a default in the JETSET
6168\cite{JETSET} event generator. It can be because quarks and
6169anti-quarks of colliding hadrons are forming an initial non-strange
6170sea, and the strange sea is suppressed by the OZI rule
6171\cite{OZI}. This is a complicated question which is still being
6172discussed by theorists \cite{OZI_violation} and demands further
6173experimental measurements. The $s/u$\ parameter can be different for
6174other reactions. In particular, for the e$^{+}$e$^{-}$\ reactions it can
6175be closer to 0.3.
6176
6177The temperature parameter $T$\ has been fixed at $T=180$\ MeV. In
6178earlier versions of the model we have found that using such a value we
6179could successfully reproduce spectra of outgoing hadrons in different
6180types of medium-energy reactions.
6181
6182\begin{figure}
6183  \resizebox{1.00\textwidth}{!}
6184{
6185   \includegraphics{mommul.eps}
6186}
6187\caption{Left figure (a): momentum distribution of charged pions
6188produced in proton-antiproton annihilation at rest. Points with
6189errors: experiment \protect\cite{pispectrum}, histogram: CHIPS MC. The
6190experimental spectrum is normalized to the measured average charged pion
6191multiplicity 3.0. Right figure (b): pion multiplicity
6192distribution. Points are taken from compilations of experimental data
6193\protect\cite{pap_exdata}, histogram: CHIPS MC. The number of events
6194with kaons in the final state is shown in the bin corresponding to the pion
6195multiplicity 9, where no real 9-pion events are generated or observed
6196experimentally. The percentage of annihilation events with kaons in
6197the model is close to the cited experimental value of 6\% \cite{pap_exdata}.
6198}
6199\label{mommul}
6200\end{figure}
6201\begin{figure}
6202  \resizebox{1.00\textwidth}{!}
6203{
6204   \includegraphics{channels.eps}
6205}
6206\caption{Branching probabilities for different channels in
6207proton-antiproton annihilation at rest. Points with errors: experiment
6208\protect\cite {pap_exdata}, histogram: CHIPS MC. }
6209\label{channels}
6210\end{figure}
6211
6212We used these parameters to fit not only the spectrum of pions
6213(Fig.~\ref{mommul},a) and the multiplicity distribution for pions
6214(Fig.~\ref{mommul},b) but also branching ratios of various measured
6215\cite{pap_exdata,pispectrum}\  exclusive channels (Figs.
6216~\ref{channels},~\ref{threechan},~\ref{twochan}).  In
6217Fig.~\ref{twochan} one can see many decay channels with higher meson
6218resonances. The relative contribution of the events with meson
6219resonances produced in the final state is 30 - 40 percent, roughly in
6220agreement with experiment. The agreement between the model and
6221experiment for particular decay modes is within a factor of 2-3 except for
6222the branching ratios to higher resonances, for which it is not
6223completely clear what is the definition of a resonance in a concrete
6224experiment.  In particular, for the $a_{2}\omega $\ channel the mass sum
6225of final hadrons is 2100 MeV with a full width of about 110 MeV while
6226the total initial energy of the p\={p} annihilation reaction is only
62271876.5 MeV. This decay channel can be formally simulated by an event
6228generator using the tail of the Breit-Wigner distribution for the
6229$a_{2}$\ resonance, but it is difficult to imagine how the $a_{2}$\
6230resonance can be identified $2\Gamma $\ away from its mean mass value
6231experimentally.
6232
6233To model fragmentation into baryons the POPCORN idea \cite{POPCORN},
6234which assumes the existence of diquark-partons, was used. This
6235assumption of massless diquarks is somewhat inconsistent at low
6236energies, as is the assumption of massless s-quarks, but it is simple
6237and it helps to generate baryons the same way as mesons.
6238
6239Baryons are heavy, and the baryon production in p\={p} annihilation
6240reactions at medium energies is very sensitive to the value of
6241temperature. If the temperature is low, the baryon yield is small, and
6242the mean multiplicity of pions increases very noticeably with CMS energy
6243(Fig.~\ref{apcmul}).  For higher temperature values the baryon yield
6244reduces the pion multiplicity at higher energies.  The existing
6245experimental data \cite{Energy_Dep}\ (Fig.~\ref{apcmul}) can be
6246considered as a kind of ``thermometer'' for the model. This
6247``thermometer'' confirms the critical temperature value of about 200
6248MeV.
6249
6250\begin{figure}
6251  \resizebox{1.00\textwidth}{!}
6252{
6253   \includegraphics{threechn.eps}
6254}
6255\caption{Branching probabilities for different channels with
6256three-particle final states in proton-antiproton annihilation at
6257rest. Points with errors: experiment \protect\cite{pap_exdata},
6258histogram: CHIPS MC. }
6259\label{threechan}
6260\end{figure}
6261\begin{figure}
6262  \resizebox{1.00\textwidth}{!}
6263{
6264   \includegraphics{twochn.eps}
6265}
6266\caption{Branching probabilities for different channels with
6267two-particle final states in proton-antiproton annihilation at
6268rest. Points with errors: experiment \protect\cite{pap_exdata},
6269histogram: CHIPS MC. }
6270\label{twochan}
6271\end{figure}
6272\begin{figure}
6273  \resizebox{1.00\textwidth}{!}
6274{
6275   \includegraphics{apcmul.eps}
6276}
6277\caption{Average meson multiplicities in proton-antiproton and in
6278electron-positron annihilation, as a function of the CMS energy of the
6279interacting hadronic system. Points with errors: experiment
6280\protect\cite {Energy_Dep}, lines: CHIPS MC calculation at different
6281values of the critical temperature parameter $T$. }
6282\label{apcmul}
6283\end{figure}
6284
6285
6286The CHIPS model presented is an attempt to use the set of simple rules
6287governing microscopic quark-level behavior to model macroscopic
6288hadronic systems with a large number of degrees of freedom. Apart from
6289the natural rules of conservation of quantum numbers and relativistic
6290kinematics, the hypothesis of {\em{quark fusion}} and the hypothesis
6291of a {\em{critical temperature}} are implemented.
6292
6293The {\em{quark fusion}} hypothesis determines the rules of production
6294of the final state hadrons, with energy spectra reflecting the
6295momentum distribution of quarks in the system.
6296
6297Qualitatively, the hypothesis of a {\em{critical temperature}} assumes
6298that the quark-gluon hadronic system (quasmon)
6299cannot be heated above a certain temperature. Adding
6300more energy to the hadronic system increases the number of constituent
6301quark-partons, keeping the temperature constant. The critical
6302temperature $T=180-200$ MeV is the principal parameter of the model.
6303
6304
6305In this paper we have shown that such an approach, in combination with
6306reasonable model assumptions on the mechanism of final state quasmon
6307conversion into hadron resonances,
6308may be used successfully to model hadron multiplicities
6309and spectra in multifragmentation processes of nucleon-antinucleon
6310annihilation.
6311
6312The essential part of the model is that it can be only implemented in
6313full in the form of a computer code -- Monte Carlo event generator.It
6314can be used as a tool for the Monte Carlo simulation of a wide
6315spectrum of hadronic reactions.
6316The CHIPS event generator can be used not only for the
6317``phase-space background'' calculations in place of the standard
6318GENBOD routine \cite{GENBOD}\ but even for taking into account the
6319reflection of resonances in connected final hadron combinations. Thus
6320it can be useful for the physics analysis too, while the main range of
6321its application is the simulation of the evolution of hadronic and
6322electromagnetic showers in matter at medium energies.
6323
6324\section{Appendix D. Nuclear pion capture at rest and photonuclear
6325   reactions below the $\Delta$(3,3) resonance}
6326
6327
6328The CHIPS computer code is a quark-level three-dimensional event generator
6329for the fragmentation of hadronic systems into hadrons. An important
6330feature of the model is a homogeneous distribution of asymptotically
6331free quark-partons over the invariant phase space, applied to the
6332fragmentation of different types of excited hadronic systems
6333including nucleon excitations, hadronic systems produced in
6334$e^{+}e^{-}$ interactions, high energy nuclear excitations,
6335etc.. Exclusive event generation which models multiple hadron
6336production conserving energy, momentum, and charge generally results
6337in a good description of particle multiplicities and spectra in
6338multihadron fragmentation processes. All this makes it possible to use
6339the CHIPS event generator in exclusive modeling of hadron cascades in
6340materials.
6341
6342When compared with the first ``in vacuum'' version of the model,
6343described in  Appendix C, modeling of hadronic fragmentation
6344in nuclear matter is more complicated, because of the much greater number
6345of possible secondary fragments, but the hadronization process itself
6346is simpler in a certain way.  In vacuum, the quark-fusion mechanism
6347requires a quark-parton partner from the external (as in
6348JETSET \cite{JETSET}) or internal (Quasmon itself in Appendix C)
6349quark-antiquark sea. In nuclear matter, there is
6350a second possibility: quark exchange with the neighboring hadronic
6351system, a nucleon or nuclear multinucleon cluster. Thus in nuclear
6352matter the spectra of secondary hadrons and nuclear fragments may be
6353considered as a reflection of the quark-parton energy spectrum in a Quasmon. In
6354the case of inclusive spectra that are steeply decreasing with energy, and
6355correspondingly steeply decreasing spectra of the quark-partons in a
6356Quasmon, only those secondary hadrons which get the maximum energy
6357from the primary quark-parton with energy $k$ are contributing to the inclusive
6358spectra. This extreme situation requires the exchanged quark-parton
6359with energy $q$, coming back to the Quasmon from the cluster, to move in
6360the opposite direction with respect to the primary quark-parton. As a
6361result the hadronization quark exchange process becomes
6362one-dimensional along the direction of $k$.  If a neighboring nucleon
6363or nuclear cluster with bound mass $\tilde{\mu}$ absorbs the primary
6364quark-parton and radiates the exchanged quark-parton in the opposite
6365direction, then the energy of the outgoing fragment is $E=\tilde{\mu}+k-q$,
6366and the momentum is $p=k+q$. Both energy and momentum of the outgoing
6367nuclear fragment are known (as well as the mass $\tilde{\mu}$\ of the nuclear
6368fragment in nuclear matter), so the momentum of the primary quark-parton
6369can be reconstructed using the approximate relation
6370\begin{equation}
6371k=\frac{p+E-B\cdot m_{N}}{2}\label{k}
6372\end{equation}
6373where $B$\ is the baryon number of the outgoing fragment
6374($\tilde{\mu}\approx B\cdot m_{N}$, and $m_{N}$\ is the nucleon
6375mass).
6376In \cite{K_parameter}\ it was shown that the invariant
6377inclusive spectra of pions, protons, deuterons, and tritons in
6378proton-nucleus reactions at 400~GeV \cite{FNAL}\ have not only the same
6379exponential slope but almost coincide when they are plotted as a
6380function of $k=\frac{p+E_{\rm{kin}}}{2}$.  Using data at 10~GeV
6381\cite{FAS}, it was shown that the parameter $k$\ defined by
6382equation~(\ref{k}) is appropriate also for the description of secondary
6383antiprotons produced in high energy nuclear reactions. This means that
6384the extreme assumption of one-dimensional hadronization is a good
6385approximation, not only for the quark exchange mechanism but for the
6386quark fusion mechanism as well. In the one-dimensional case, assuming
6387that $q$\ is the momentum of the second quark fusing with the primary
6388quark-parton with energy $k$, the total energy of the outgoing hadron
6389is $E=q+k$\ and the momentum is $p=k-q$.  In the one-dimensional case the
6390secondary quark-parton must move in the opposite direction with
6391respect to the primary quark-parton; otherwise the mass of the outgoing
6392hadron would be zero.  So we get for mesons $k=\frac{p+E}{2}$, in
6393accordance with equation~(\ref{k}). In the case of antiproton radiation, the
6394baryon number of the Quasmon is increased by one, and the primary
6395antiquark-parton will spend its energy to build up the mass of the
6396antiproton by picking up an anti-diquark. Thus, the energy conservation law
6397for antiproton radiation looks like $E+m_{N}=q+k$\ and hence
6398$k=\frac{p+E+m_{N}}{2}$, which is again in accordance with
6399equation~(\ref{k}).
6400
6401This one-dimensional quark exchange mechanism was proposed in 1984
6402\cite{K_parameter}.  Even in its approximate form it was useful in the
6403analysis of inclusive spectra of hadrons and nuclear fragments in
6404hadron-nuclear reactions at high energies. Later the same approach was
6405used in the analysis of nuclear fragmentation in electro-nuclear
6406reactions \cite{TPC}. Also in 1984 the quark-exchange
6407mechanism developed in the framework of the non-relativistic quark model
6408was found to be important for the explanation of the short distance
6409features of $NN$\ interactions \cite{NN QEX}. Later it was
6410successfully applied to the $K^{-}p$\ interactions \cite{Kp QUEX}. The
6411idea of the quark exchange mechanism between nucleons was useful even
6412for the explanation of the EMC effect \cite{EMC}. For the non-relativistic
6413quark model, the quark exchange technique was developed as an
6414alternative to the Feynman diagram technique at short distances
6415\cite{QUEX}.
6416
6417The CHIPS event generator models quark exchange processes, taking into
6418account kinematical and combinatorial factors for asymptotically free
6419quark-partons. The naive picture of the quark-exchange mechanism is
6420tunneling of quark-partons from the asymptotically free region of one
6421hadron to the asymptotically free region of another hadron. To
6422conserve color, another quark-parton from the neighboring hadron must
6423replace the first quark-parton in the Quasmon. It makes the tunneling
6424mutual, and the process has to be quark exchange.
6425
6426The experimental data available on multihadron production
6427at high energies show regularities in the secondary
6428particle spectra that can be related to the simple kinematical,
6429combinatorial, and phase space rules of such quark exchange and fusion
6430mechanisms. The CHIPS model combines these mechanisms
6431consistently in the form of a computational algorithm and an event
6432generator.
6433
6434\begin{figure}[tbp]
6435\resizebox{1.00\textwidth}{!}
6436{
6437   \includegraphics{diagram.eps}
6438}
6439\caption{Diagram of quark exchange mechanism. }
6440\label{diagram}
6441\end{figure}
6442
6443Figure~\ref{diagram} shows the quark exchange diagram which
6444helps to keep track of the kinematics of the quark-exchange process.
6445It was shown in Appendix C, that a Quasmon (Q in
6446Fig.~\ref{diagram}) is kinematically determined by a few
6447asymptotically free quark-partons homogeneously distributed over
6448the invariant phase space. The Quasmon mass $M$\ is related to the number
6449of quark-partons $N$ through
6450\begin{equation}
6451<M^{2}>=4N(N-1)\cdot T^{2}\label{temperatureII}
6452\end{equation}
6453where $T$ is the temperature of the system.
6454
6455The spectrum of quark partons can be calculated as
6456\begin{equation}
6457\frac{dW}{k^{\ast }dk^{\ast}}\propto 
6458 \left(1-\frac{2k^{\ast}}{M} \right)^{N-3}\label{spectrum_1II}
6459\end{equation}
6460where $k^{\ast}$\ is the energy of the primary quark-parton in the
6461center-of-mass system (CMS) of the Quasmon. After the primary quark-parton is
6462randomized and the neighboring cluster (parent cluster -- PC in
6463Fig.~\ref{diagram}) with the bound mass $\tilde{\mu}$\ is selected, the
6464quark exchange process starts. To follow the process kinematically one
6465should imagine a colored compound system consisting of the bound
6466parent cluster and the primary quark with energy $k$\ in the
6467laboratory system (LS)
6468\begin{equation}
6469k=k^{\ast }\cdot \frac{E_{N}+p_{N}\cdot \cos (\theta _{k})}{M_{N}},
6470\end{equation}
6471where $M_{N}$, $E_{N}$\ and $p_{N}$\ are mass, energy, and momentum of
6472the Quasmon in the LS. The mass of the compound system
6473(CF in Fig.~\ref{diagram}) is
6474$\mu _{c}=\sqrt{(\tilde{\mu}+k)^{2}}$, where $\tilde{\mu}$\ and $k$\
6475are corresponding four-vectors. This colored compound system decays into a
6476free outgoing nuclear fragment with mass $\mu$\ (F in
6477Fig.~\ref{diagram}) and the recoiling quark with energy $q$\ (in CMS of
6478$\tilde{\mu}$, which coincides with LC in the present version of the
6479model, as no internal motion of clusters is considered). At this point
6480one should recall that a colored residual Quasmon with mass
6481$M_{N-1}$\ (CRQ in Fig.~\ref{diagram}) is left after radiation of
6482$k$. The last action is to fuse the CRQ and the recoil quark $q$. The
6483resulting residual quasmon (RQ in Fig.~\ref{diagram}) should have its
6484minimum mass higher than $M_{\min}$, which is determined by the
6485minimum mass of a hadron (or Chipolino, double-hadron as defined in
6486Appendix C) with the same quark content. All
6487quark-antiquark pairs with the same flavor should be canceled in the
6488minimum mass calculations. In CMS of $\mu_{c}$\ this restriction can
6489be written as
6490\begin{equation}
64912q\cdot (E-p\cdot \cos \theta_{qCQ})+M_{N-1}^{2}>M_{\min }^{2},
6492\label{min_mass}
6493\end{equation}
6494where $E$ is the energy and $p$\ is the momentum of the colored residual
6495Quasmon with mass $M_{N-1}$\ in CMS of $\mu _{c}$. Then the
6496restriction for $\cos\theta_{qCQ}$\ is
6497\begin{equation}
6498\cos \theta _{qCQ}<\frac{2qE-M_{\min }^{2}+M_{N-1}^{2}}{2qp}.
6499\label{cost_restriction}
6500\end{equation}
6501It implies that
6502\begin{equation}
6503q>\frac{M_{N-1}^{2}-M_{\min }^{2}}{2\cdot (E+p)}\label{resid_rest}
6504\end{equation}
6505
6506A second restriction comes from the nuclear Coulomb barrier for charged
6507particles. We calculate the Coulomb barrier in a simple form:
6508\begin{equation}
6509E_{CB}=\frac{Z_{F}\cdot
6510Z_{R}}{A_{F}^{\frac{1}{3}}+A_{R}^{\frac{1}{3}}}\ (\rm{MeV}),
6511\label{CoulBar}
6512\end{equation}
6513where $Z_{F}$\ and $A_{F}$\ are charge and atomic weight of the
6514fragment, and $Z_{R}$\ and $A_{R}$\ are charge and atomic weight of the
6515residual nucleus. The obvious restriction is
6516\begin{equation}
6517   q<k+\tilde{\mu}-\mu -E_{CB}\label{cb_rest}
6518\end{equation}
6519
6520The restrictions (\ref{resid_rest})\ and (\ref{cb_rest})\ are
6521complementary to the restrictions from the quark exchange mechanism
6522which should be calculated. The spectrum of recoiling quarks is similar
6523to the $k^{\ast}$\ spectrum in Quasmon (\ref{spectrum_1II}):
6524\begin{equation}
6525  \frac{dW}{q\ dq\ d\cos \theta }\propto 
6526  \left(1-\frac{2q}{\tilde{\mu}}\right)^{n-3}, \label{spectrum_2II}
6527\end{equation}
6528where $n$\ is the number of quark-partons in the nuclear cluster.  We
6529consider it to be equal to $3 A_{C}$, where $A_{C}$\ is the atomic
6530weight of the parent cluster. Tunneling of quarks from one nucleon to
6531another makes the phase space common for all quark-partons of the
6532cluster.
6533
6534An additional equation follows from the mass shell condition for the
6535outgoing fragment,
6536\begin{equation}
6537\mu ^{2}=\tilde{\mu}^{2}+2\tilde{\mu}\cdot k-2\tilde{\mu}\cdot q-2k\cdot
6538q\cdot (1-\cos \theta _{kq}),  \label{hadronII}
6539\end{equation}
6540where $\theta _{kq}$ is the angle between quark-partons in LS. From this
6541equation $q$ can be calculated as
6542\begin{equation}
6543q=\frac{\tilde{\mu}\cdot (k-\Delta )}{\tilde{\mu}+k\cdot 
6544(1-\cos \mathit{\theta }_{\mathit{kq}})}\label{q-cos}
6545\end{equation}
6546where $\Delta $ is the covariant binding energy of the cluster
6547$\Delta =\frac{\mu ^{2}-\tilde{\mu}^{2}}{2\tilde{\mu}}$.
6548The quark exchange probability integral can be written in the form:
6549\begin{eqnarray}
6550&&P(k,\tilde{\mu},\mu )=  \nonumber \\
6551&&\int \delta \left[ \mu ^{2}-\tilde{\mu}^{2}-2\tilde{\mu}\cdot k+2\tilde{\mu
6552}\cdot q+2k\cdot {q}\cdot (1-\cos \theta _{kq})\right]   \nonumber \\
6553&&\ \ \ \ \ \ \ \ \times \ \left( 1-\frac{2{q}}{\tilde{\mu}}\right) ^{n-3}{q}
6554d{q\cdot }d\cos \theta _{kq}.
6555\end{eqnarray}
6556Using the $\delta$-function to make the integration over ${q}$\ one
6557gets:
6558\begin{eqnarray}
6559P(k,\tilde{\mu},\mu ) &=&\int \left( 1-\frac{2(k-\Delta )}{\tilde{\mu}
6560+k(1-\cos \theta _{\mathit{kq}})}\right) ^{n-3}  \nonumber \\
6561&&\times \ \frac{\tilde{\mu}(k-\Delta )}{2[\tilde{\mu}+k(1-\cos \mathit{
6562\theta }_{\mathit{kq}})]^{2}}d\mathit{\cos \theta }_{\mathit{kq}}
6563\end{eqnarray}
6564or
6565\begin{eqnarray}
6566P(k,\tilde{\mu},\mu ) &=&\int \left( 1-\frac{2(k-\Delta )}{\tilde{\mu}
6567+k(1-\cos \theta _{\mathit{kq}})}\right) ^{n-3}  \nonumber \\
6568&&\times \ \left( \frac{\tilde{\mu}(k-\Delta )}{\tilde{\mu}+k(1-\cos 
6569\mathit{\theta }_{\mathit{kq}})}\right) ^{2}  \nonumber \\
6570&&\times \ d \left( \frac{\tilde{\mu}+k(1-\cos 
6571\mathit{\theta }_{\mathit{kq}})}{\tilde{\mu}(k-\Delta )}\right).
6572\end{eqnarray}
6573The result of the integration is
6574\begin{eqnarray}
6575&&P(k,\tilde{\mu},\mu )=\frac{\tilde{\mu}}{4k(n-2)}  \nonumber \\
6576&&\times \ \left[ \left( 1-\frac{2(k-\Delta )}{\tilde{\mu}+2k}\right)
6577_{\rm{high}}^{n-2}-\left( 1-\frac{2(k-\Delta )}{\tilde{\mu}}\right)
6578_{\rm{low}}^{n-2}%
6579\right] .  \label{QUEX_Int}
6580\end{eqnarray}
6581For randomization it is convenient to make $z$ a random parameter
6582\begin{equation}
6583z=1-\frac{2(k-\Delta )}{\tilde{\mu}+k(1-\cos 
6584\theta_{\mathit{kq}})}=1-\frac{2{q}}{\tilde{\mu}}\label{z(q)}
6585\end{equation}
6586From (\ref{QUEX_Int}) one can find the high and the low limits of the
6587randomization. The first limit is a limit for $k$: $k>\Delta$. It is
6588similar to the restriction for Quasmon fragmentation in vacuum:
6589$k^{\ast}>\frac{\mu^{2}}{2M}$. The second limit is
6590$k=\frac{\mu^{2}}{2\tilde{\mu}}$, when the low limit of randomization
6591becomes equal to zero. If $k<\frac{\mu^{2}}{2\tilde{\mu}}$, then
6592$-1<\cos\theta_{kq}<1$\ and
6593$z_{\rm{low}}=1-\frac{2(k-\Delta)}{\tilde{\mu}}$. If
6594$k>\frac{\mu^{2}}{2\tilde{\mu}}$, then the range of $\cos\theta
6595_{kq}$\ is $-1<\cos\theta_{kq}<\frac{\mu^{2}}{k\tilde{\mu}}-1$\ and
6596$z_{\rm{low}}=0$.  This value of $z_{\rm{low}}$\ should be corrected
6597using the Coulomb barrier restriction (\ref{cb_rest}), and the value of
6598$z_{\rm{high}}$ should be corrected using the minimum residual Quasmon
6599restriction (\ref{resid_rest}). In the case of a Quasmon with momentum much
6600less than $k$ it is possible to impose tighter restrictions than
6601(\ref{resid_rest}) because the direction of motion of the CRQ is
6602opposite to $k$. So
6603$\cos\theta_{qCQ}=-\cos\mathit{\theta}_{\mathit{kq}}$, and from
6604(\ref{q-cos}) one can find that
6605\begin{equation}
6606\cos \theta_{qCQ} =1-\frac{\tilde{\mu}\cdot (k-\Delta -q)}{k\cdot q}.
6607\label{cos_q}
6608\end{equation}
6609So in this case the equation (\ref{resid_rest})\ can be replaced by
6610the more stringent one:
6611\begin{equation}
6612q>\frac{M_{N-1}^{2}-M_{\min }^{2}+2\frac{p\cdot 
6613\tilde{\mu}}{k}(k-\Delta )}{2\cdot (E+p+\frac{p\cdot \tilde{\mu}}{k})}.
6614\end{equation}
6615
6616The integrated kinematical quark exchange probability (in the range
6617from $z_{\rm{low}}$ to $z_{\rm{high}}$) is
6618\begin{equation}
6619\frac{\tilde{\mu}}{4k(n-2)}\cdot z^{n-2}\label{z_probabII}
6620\end{equation}
6621and the total kinematical probability of hadronization of the quark-parton
6622with energy $k$ into a nuclear fragment with mass\ $\mu $ is
6623\begin{equation}
6624\frac{\tilde{\mu}}{4k(n-2)}\cdot 
6625\left( z_{\rm{high}}^{n-2}-z_{\rm{low}}^{n-2}\right).
6626\label{tot_kin_probabII}
6627\end{equation}
6628This can be compared with the vacuum probability of the quark fusion mechanism
6629from Appendix C:
6630\begin{equation}
6631\frac{M-2k}{4k(N-3)}z_{\max }^{N-3}.
6632\end{equation}
6633The similarity is very important, as the absolute probabilities
6634define the competition between vacuum and nuclear channels.
6635
6636Equations (\ref{z_probabII})\ and (\ref{tot_kin_probabII})\ can be used for
6637randomization of $z$:
6638\begin{equation}
6639z=z_{\rm{low}}+\sqrt[n-2]{R}\cdot (z_{\rm{high}}-z_{\rm{low}}),
6640 \label{z_randomII}
6641\end{equation}
6642where $R$\ is a random number, uniformly distributed in the interval (0,1).
6643
6644Equation (\ref{tot_kin_probabII})\ can be used to control the competition
6645between different nuclear fragments and hadrons in the hadronization
6646process, but in contrast to the case of ``in vacuum'' hadronization
6647it is not enough to
6648take into account only quark combinatorics of the Quasmon and the outgoing
6649hadron. In the case of hadronization in nuclear matter, different parent bound
6650clusters should be taken into account as well. For example,
6651tritium can be radiated as a
6652result of quark exchange with a bound tritium cluster or as a result of
6653quark exchange with a bound $^3$He cluster.
6654
6655To calculate the yield of fragments it is necessary to calculate the
6656probability to find a cluster with certain proton and neutron content
6657in a nucleus. One could consider any particular probability as an
6658independent parameter, but in such a case the process of tuning the model
6659would be difficult. We proposed the following scenario of
6660clusterization. A gas of quasi-free nucleons is close to the phase
6661transition to a liquid phase bound by strong quark exchange
6662forces. Precursors of the liquid phase are nuclear clusters, which may
6663be considered as ``drops'' of the liquid phase within the nucleus. Any
6664cluster can meet another nucleon and absorb it (making it bigger),
6665or it can release one of the nucleons (making it smaller).  The
6666first parameter $\varepsilon_{1}$\ is the percentage of quasi-free
6667nucleons not involved in the clusterization process. The rest of the
6668nucleons ($1-\varepsilon_{1}$) clusterize.
6669We assume that since on the periphery of the nucleus the density
6670is lower, one can consider only dibaryon clusters, and neglect
6671triple-baryon clusters.
6672Still we denote the number of nucleons
6673clusterized in dibaryons on the periphery by the parameter
6674$\varepsilon_{2}$.  In the dense part of the nucleus, strong quark
6675exchange forces make clusters out of quasi-free nucleons with high
6676probability.  To characterize the distribution of clusters the parameter
6677$\omega$\ of clusterization probability was used.
6678
6679If the number of nucleons involved in clusterization is
6680$a=(1-\varepsilon_{1}-\varepsilon _{2})\cdot A$, then the probability
6681to find a cluster consisting of $\nu$\ nucleons is defined by the
6682distribution
6683\begin{equation}
6684P_{\nu }\propto C_{\nu }^{a}\cdot \omega ^{\nu -1},
6685\end{equation}
6686where $C_{\nu }^{a}$ is the corresponding binomial coefficient.
6687The coefficient of proportionality can be found from the equation
6688\begin{equation}
6689a=b\cdot \sum\limits_{\nu =1}^{a}\nu \cdot C_{\nu }^{a}\cdot \omega ^{\nu
6690-1}=b\cdot a\cdot (1+\omega )^{a-1}.
6691\end{equation}
6692Thus, the number of clusters consisting of $\nu$\ nucleons is
6693\begin{equation}
6694P_{\nu }=\frac{C_{\nu }^{a}\cdot \omega ^{\nu -1}}{(1+\omega )^{a-1}}.
6695\end{equation}
6696For clusters with an even number of nucleons we used only isotopically
6697symmetric configurations ($\nu=2n$, $n$\ protons and $n$\ neutrons) and
6698for odd clusters ($\nu =2n+1$) we used only two configurations: $n$\
6699neutrons with $n+1$\ protons and $n+1$\ neutrons with $n$\
6700protons. This restriction, which we call ``isotopic focusing'',
6701can be considered as an empirical rule of the CHIPS model
6702which helps to describe data. It is applied in the case of nuclear
6703clusterization (isotopically symmetric clusters) and in the case of
6704hadronization in nuclear matter.  In the hadronization process the
6705Quasmon is shifted from isotopic symmetric state (e.g., by capturing
6706a negative pion) and transfers excessive charge to the outgoing nuclear
6707cluster. This tendency is symmetric with respect to the Quasmon and
6708the parent cluster.
6709
6710The temperature parameter used to calculate the number of
6711quark-partons in a Quasmon (see equation~\ref{temperatureII}) was chosen
6712to be $T=180$ MeV, which is the same as in Appendix C.
6713
6714The CHIPS model is mostly a model of fragmentation conserving
6715energy, momentum, and charge. But to compare it with experimental data
6716one needs to model also the first interaction of the projectile with the
6717nucleus.  For proton-antiproton annihilation this was easy, as we
6718assumed that in the interaction at rest, a proton and antiproton always
6719create a Quasmon. In the case of pion capture the pion can be captured by
6720different clusters. We assumed that the probability of capture is
6721proportional to the number of nucleons in a cluster.  After the
6722capture the Quasmon is formed, and the CHIPS generator produces
6723fragments consecutively and recursively, choosing at each step the
6724quark-parton four-momentum $k$, the type of parent and outgoing fragment,
6725and the four-momentum of the exchange quark-parton $q$, to produce
6726a final state hadron and the new Quasmon with less energy.
6727
6728In the CHIPS model we consider this process as a chaotic process
6729with large number of degrees of freedom and do not take into account
6730any final state interactions of outgoing hadrons. Nevertheless, when
6731the excitation energy dissipates, and in some step the Quasmon mass
6732drops below mass shell, the quark-parton mechanism of hadronization
6733fails. To model the event exclusively, it becomes necessary to
6734continue fragmentation at the hadron level. Such fragmentation process
6735is known as nuclear evaporation. It is modeled using the
6736non-relativistic phase space approach.  In the non-relativistic case the
6737phase space of nucleons can be integrated as well as in the
6738ultra-relativistic case of quark-partons.
6739
6740The general formula for the non-relativistic phase space can be found starting
6741with the phase space for two particles $\tilde{\Phi}_{2}$. It is
6742proportional to the CMS momentum:
6743\begin{equation}
6744\tilde{\Phi}_2(W_2) \propto \sqrt{W_2}\label{F2}
6745\end{equation}
6746where $W_2$\ is a total kinetic energy of the two non-relativistic
6747particles.  If the phase space integral is known for $n-1$\ hadrons
6748then it is possible to calculate the phase space integral for $n$\
6749hadrons:
6750\begin{eqnarray}
6751\tilde{\Phi}_{n}(W_n) &=&\int \tilde{\Phi}_{n-1}(W_{n-1}) \cdot
6752\delta (W_{n}-W_{n-1}-E_{\rm{kin}}\nonumber \\
6753&&\times \sqrt{E_{\rm{kin}}}dE_{\rm{kin}} dW_{n-1}\label{Fn} 
6754\end{eqnarray}
6755Using (\ref{F2})\ and (\ref{Fn})\ one can find that
6756\begin{equation}
6757\tilde{\Phi}_{n}(W_n)\propto W_{n}^{\frac{3}{2}n-\frac{5}{2}}
6758\end{equation}
6759and the spectrum of hadrons, defined by the phase space of residual
6760$n-1$ nucleons, can be written as
6761\begin{equation}
6762\frac{dN}{\sqrt{E_{\rm{kin}}}dE_{\rm{kin}}} \propto 
6763\left(1-\frac{E_{\rm{kin}}}{W_{n}}\right)^{\frac{3}{2}n-4}.
6764\label{evap_spectr}
6765\end{equation}
6766This spectrum can be randomized. The only problem is from which level one
6767should measure the thermal kinetic energy when most nucleons in nuclei
6768are filling nuclear levels with zero temperature. To model the evaporation
6769process we used this unknown level as a parameter $U$\ of the evaporation
6770process. Comparison with experimental data gives $U=1.7$ MeV. Thus, the
6771total kinetic energy of $A$\ nucleons is
6772\begin{equation}
6773W_{A}=U\cdot A+E_{\rm{ex}},
6774\end{equation}
6775where $E_{\rm{ex}}$ is the excitation energy of the nucleus.
6776
6777To\  be\  radiated,\ \  the nucleon\ \  should\ \  overcome\ \  the threshold
6778\begin{equation}
6779U_{\rm{thresh}}=U+U_{\rm{bind}}+E_{CB},
6780\end{equation}
6781where $U_{\rm{bind}}$\ is a separation energy of the nucleon, and
6782$E_{CB}$\ is the Coulomb barrier energy which is non-zero only for
6783positive particles and can be calculated using formula
6784(\ref{CoulBar}).
6785
6786Among several experimental investigations of nuclear
6787pion capture at rest we have selected four published results which
6788constitute, in our opinion, a representative data set covering a wide
6789range of target nuclei, types of produced hadrons and nuclei
6790fragments, and their energy range. In the first publication
6791\cite{MIPHI}\ the spectra of charged fragments (protons, deuterons,
6792tritium, $^{3}$He, $^{4}$He) in pion capture were measured on
679317 nuclei within one experimental setup. To verify the spectra we
6794compared them for a carbon target with detailed measurements of the
6795spectra of charged fragments given in Ref.~\cite{Mechtersheimer}. In
6796addition, we took $^{6}$Li spectra for a carbon
6797target from the same paper.
6798
6799The neutron spectra were added from Ref.~\cite{Cernigoi} and
6800Ref.~\cite{Madey}. We present data and Monte Carlo distributions as
6801the invariant phase space function
6802$f=\frac{d\sigma}{pdE}$\ depending on the variable
6803$k=\frac{p+E_{\rm{kin}}}{2}$\ as defined in equation~(\ref{k}).
6804
6805Spectra on $^{9}$Be, $^{12}$C, $^{28}$Si ($^{27}$Al for secondary
6806neutrons), $^{59}$Co ($^{64}$Cu for secondary neutrons), and
6807$^{181}$Ta\ are shown in Figures~\ref{be0405}\ through~\ref{ta73108}.
6808The data are described well, including the total energy spent in the
6809reaction to yield the particular type of fragments.
6810
6811The evaporation process for nucleons is described well, too.  It is
6812exponential in $k$, and looks especially impressive for Si/Al and
6813Co/Cu data, where the Coulomb barrier is low, and one can see proton
6814evaporation as a continuation of the evaporation spectra from
6815secondary neutrons. This way the exponential behavior of the
6816evaporation process can be followed over 3 orders of
6817magnitude. Clearly seen is\ the\ transition region at\ \ $k \approx
681890$\ MeV\ \ (kinetic energy $15-20$\ MeV)\ \ between the quark-level
6819hadronization process and the hadron-level evaporation process. For
6820light target nuclei the evaporation process becomes much less
6821prominent.
6822
6823The $^{6}$Li spectrum on a carbon target exhibits an interesting regularity
6824when plotted as a function of $k$: it practically coincides with the
6825spectrum of $^{4}$He fragments, and shows exponential behavior in a
6826wide range of $k$, corresponding to a few orders of magnitude in the
6827invariant cross section.  To keep the figure readable,
6828we did not plot the $^{6}$Li spectrum
6829generated by CHIPS. It coincides with the
6830$^{4}$He spectrum at $k > 200$\ MeV, and underestimates lithium
6831emission at lower energies, similarly to the $^{3}$He and tritium data.
6832
6833Between the region where hadron-level processes dominate and the
6834kinematic limit all hadronic spectra slopes become close when plotted
6835as a function of $k$. In addition to this general behavior there is an
6836effect of strong proton-neutron splitting. For protons and neutrons
6837it reaches almost an order of magnitude. To model such splitting in
6838the CHIPS generator, the mechanism of ``isotopic focusing'' was used,
6839which locally transfers the negative charge from the pion to the first
6840radiated nuclear fragment.
6841
6842\begin{table}
6843\caption{Clusterization parameters}
6844\label{tab:1}
6845\begin{tabular}{llllll}
6846\hline\noalign{\smallskip}
6847& $^{9}$Be & $^{12}$C & $^{28}$Si & $^{59}$Co & $^{181}$Ta \\
6848\noalign{\smallskip}\hline\noalign{\smallskip}
6849$\varepsilon_{1}$ & 0.45 & 0.40 & 0.35 & 0.33 & 0.33 \\
6850$\varepsilon_{2}$ & 0.15 & 0.15 & 0.05 & 0.03 & 0.02 \\
6851$\omega $ & 5.00 & 5.00 & 5.00 & 5.00 & 5.00 \\
6852\noalign{\smallskip}\hline
6853\end{tabular}
6854\end{table}
6855
6856Thus, the model qualitatively describes all typical features of the
6857pion capture process. The question is what can be extracted from the
6858experimental data with this tool. The clusterization parameters are
6859listed in Table~\ref{tab:1}. No formal fitting procedure has been
6860performed. A balanced qualitative agreement with all data was used to
6861tune the parameters. The difference between the $\frac{\varepsilon
6862_{2}}{\varepsilon _{1}}$\ ratio and the parameter $\omega$\ (which is
6863the same for all nuclei) is an indication that there is a
6864phase transition between the gas phase and the liquid phase of the
6865nucleus. The large value of the parameter $\omega$, determining the
6866average size of a nuclear cluster, is critical in describing
6867the model spectra
6868at large $k$, where the fragment spectra approach the kinematical
6869limits.
6870
6871Using the same parameters of clusterization we compared the data
6872\cite{Ryckbosch} on $\gamma$\ absorption on Al and Ca nuclei
6873(Fig.~\ref{gam62}) with the CHIPS results. One can see that the
6874spectra of secondary protons and deuterons are qualitatively described
6875by the CHIPS model.
6876
6877\begin{figure}[tbp]
6878\resizebox{1.00\textwidth}{!}
6879{
6880   \includegraphics{be0405k.eps}
6881}
6882\caption{\protect{Comparison of the CHIPS model results with
6883experimental data on proton, neutron, and nuclear fragment production
6884in the capture of negative pions on $^9$Be.
6885Proton~\cite{MIPHI} and neutron~\cite{Cernigoi}\ experimental spectra
6886are shown in the upper left panel by open circles and open squares,
6887respectively. The model calculations are shown by the two
6888corresponding solid lines. The same arrangement
6889is used to present $^{3}$He~\cite{MIPHI}
6890and tritium~\cite{MIPHI}
6891spectra in the lower left panel. Deuterium~\cite{MIPHI} 
6892and $^{4}$He~\cite{MIPHI} spectra are
6893shown in the right panels of the figure by open squares
6894and lines (CHIPS model). The average kinetic
6895energy carried away by each nuclear fragment is shown in the panels
6896by the two numbers: first is the average calculated using the
6897experimental data shown; second is the model result.}}
6898\label{be0405}
6899\end{figure}
6900
6901\begin{figure}[tbp]
6902\resizebox{1.00\textwidth}{!}
6903{
6904   \includegraphics{c0606k.eps}
6905}
6906\caption{\protect{Same as in Figure~\ref{be0405}, for
6907pion capture on $^{12}$C. The experimental neutron spectrum
6908is taken from \cite{Madey}. In addition, the detailed data on
6909charged particle production, including the $^{6}$Li spectrum, taken from
6910Ref.~\cite{Mechtersheimer}, are superimposed on the plots as a series of
6911dots.}}
6912\label{c0606}
6913\end{figure}
6914
6915\begin{figure}[tbp]
6916\resizebox{1.00\textwidth}{!}
6917{
6918   \includegraphics{si1414k.eps}
6919}
6920\caption{\protect{Same as in Figure~\ref{be0405}, for
6921pion capture on $^{28}$Si nucleus. The experimental neutron spectrum
6922is taken from~\cite{Madey}, for the reaction on $^{27}$Al.}}
6923\label{si1414}
6924\end{figure}
6925
6926\begin{figure}[tbp]
6927\resizebox{1.00\textwidth}{!}
6928{
6929   \includegraphics{co2732k.eps}
6930}
6931\caption{\protect{Same as in Figure~\ref{be0405}, for
6932pion capture on $^{59}$Co. The experimental neutron spectrum
6933is taken from~\cite{Madey}, for the reaction on $^{64}$Cu.}}
6934\label{co2732}
6935\end{figure}
6936
6937\begin{figure}[tbp]
6938\resizebox{1.00\textwidth}{!}
6939{
6940   \includegraphics{ta73108k.eps}
6941}
6942\caption{\protect{Same as in Figure~\ref{be0405}, for
6943pion capture on $^{181}$Ta. The experimental neutron
6944spectrum is taken from~\cite{Madey}.}}
6945\label{ta73108}
6946\end{figure}
6947
6948\begin{figure}[tbp]
6949\resizebox{0.70\textwidth}{!}
6950{
6951   \includegraphics{gam62.eps}
6952}
6953\caption{\protect{Comparison of CHIPS model with
6954experimental data~\cite{Ryckbosch} on
6955proton and deuteron production at $90^{\circ}$ 
6956in photonuclear reactions on $^{27}$Al
6957and $^{40}$Ca at 59 -- 65 MeV. Open circles and solid squares represent the
6958experimental proton and deuteron spectra,
6959respectively. Solid
6960and dashed lines show the results of the corresponding CHIPS model
6961calculation. Statistical errors in the CHIPS results are not shown and
6962can be judged by the point-to-point variations in the lines. The
6963comparison is absolute, using the values of total
6964photonuclear cross section 3.6 mb for Al and 5.4 mb for Ca,
6965as given in Ref.~\cite{Ahrens}.
6966}}
6967\label{gam62}
6968\end{figure}
6969
6970The CHIPS model covers a wide spectrum of hadronic reactions with a
6971large number of degrees of freedom. In the case of nuclear reactions the
6972CHIPS generator helps to understand phenomena such as an order of
6973magnitude splitting of neutron and proton spectra, high yield of
6974energetic nuclear fragments, and emission of nucleons which
6975kinematically can be produced only if seven or more nucleons are involved
6976in the reaction.
6977
6978The CHIPS generator allows to extract collective parameters of a
6979nucleus such as clusterization. The qualitative conclusion based on the fit
6980to the experimental data is that the main fraction of nucleons is
6981clusterized, at least in
6982heavy nuclei. The nuclear clusters can be considered
6983as drops of a liquid nuclear phase. The quark exchange makes
6984the phase space of quark-partons of each cluster common, stretching
6985kinematic limits for particle production.
6986
6987The hypothetical quark exchange process is important not only for the
6988nuclear clusterization, but for the nuclear hadronization process,
6989too. The quark exchange between the excited cluster (Quasmon) and a
6990neighboring nuclear cluster, even at low excitation level, operates with
6991quark-partons at energies comparable with the nucleon mass. As a
6992result it easily reaches the kinematic limits of the reaction,
6993revealing the multinucleon nature of the process.
6994
6995Up to now the most underdeveloped part of the model has been the initial
6996interaction between projectile and target. That is why we started
6997with proton-antiproton annihilation and pion capture on nuclei at
6998rest, which do not involve any interaction cross section. The further
6999development of the model will require a better understanding
7000of the mechanism of the first interaction.  However, we believe that
7001even the basic model will be useful in the understanding the nature of
7002multihadron fragmentation, and because of its features, is a suitable
7003candidate for the hadron production and hadron cascade parts of the
7004newly developed event generation and detector simulation Monte Carlo
7005computer codes.
7006
7007\section{Appendix E. Modeling of real and virtual photon
7008  interactions with nuclei below pion production threshold.}
7009
7010
7011In the example of
7012the photonuclear reaction discussed in the Appendix D, namely
7013the description of $90^{\circ}$ proton and deuteron spectra in
7014$A({\gamma},X)$ reactions at $E_{\gamma} = 59-65$ MeV, the assumption
7015on the initial Quasmon excitation mechanism was the same. The
7016description of the $90^{\circ}$ data was satisfactory, but the
7017generated data showed very little angular dependence, as the velocity
7018of Quasmons produced in the initial state was small, and the
7019fragmentation process was almost isotropic.  Experimentally, the
7020angular dependence of secondary protons in photo-nuclear reactions is
7021quite strong even at low energies (see, for example,
7022Ref.~\cite{Ryckebusch}). This is a challenging experimental fact which
7023is difficult to explain in any model. It's enough to say that if the
7024angular dependence of secondary protons in the $\gamma ^{40}$Ca
7025interaction at 60 MeV is analyzed in terms of relativistic boost, then
7026the velocity of the source should reach $0.33 c$; hence the mass
7027of the source should be less than pion mass. The main subject of the present
7028publication is to show that the quark-exchange mechanism used in the
7029CHIPS model can not only model the clusterization of nucleons in nuclei
7030and hadronization of intranuclear excitations into nuclear fragments, but
7031can also model complicated mechanisms of interaction of photons and
7032hadrons in nuclear matter.
7033
7034In Ref. Appendix D we defined a quark-exchange diagram which
7035helps to keep track of the kinematics of the quark-exchange process
7036(see Fig.~1 in Apendix D). To apply the same diagram to
7037the first interaction of a photon with a nucleus, it is necessary to
7038assume that the quark-exchange process takes place in nuclei
7039continuously, even
7040without any external interaction. Nucleons with high momenta do not
7041leave the nucleus because of the lack of excess energy. The
7042hypothesis of the CHIPS model is that the quark-exchange forces
7043between nucleons \cite{NN QEX}\ continuously create clusters in normal
7044nuclei. Since a low-energy photon (below the pion production threshold)
7045cannot be absorbed by a free nucleon, other absorption mechanisms
7046involving more than one nucleon have to be used.
7047
7048The simplest scenario is photon absorption by a quark-parton in
7049the nucleon. At low energies and in vacuum this does not work because there
7050is no corresponding excited baryonic state. But in nuclear matter
7051there is a possibility to exchange this quark with a neighboring nucleon
7052or a nuclear cluster. The diagram for the process is shown in
7053Fig.~\ref{diagram1}. In this case the photon is absorbed by a
7054quark-parton from the parent cluster $\rm{PC}_1$, and then
7055the secondary nucleon or cluster $\rm{PC}_2$
7056absorbs the entire momentum of the quark and photon. The exchange
7057quark-parton $q$ restores the balance of color, producing the
7058final-state hadron F and the residual Quasmon RQ. The process looks like a
7059knockout of a quasi-free nucleon or cluster out of the nucleus. It should be
7060emphasized that in this scenario the CHIPS event generator
7061produces not only ``quasi-free'' nucleons but ``quasi-free'' fragments
7062too. The yield of these quasi-free nucleons or fragments is
7063concentrated in the forward direction.
7064
7065The second scenario which provides for an angular dependence is the absorption
7066of the photon by a colored fragment ($\rm{CF}_2$ 
7067in Fig.~\ref{diagram2}). In this
7068scenario, both the primary quark-parton with momentum $k$ and the photon
7069with momentum $q_{\gamma}$ are absorbed by a parent cluster ($\rm{PC}_2$ in
7070Fig.~\ref{diagram2}), and the recoil quark-parton with momentum $q$
7071cannot fully compensate the momentum $k+q_{\gamma}$.
7072As a result the radiation of the
7073secondary fragment in the forward direction becomes more probable.
7074
7075In both cases the angular dependence is defined by the first act of
7076hadronization. The further fragmentation of the residual Quasmon is
7077almost isotropic.
7078
7079\begin{figure}[tbp]
7080\resizebox{0.70\textwidth}{!}
7081{
7082   \includegraphics{diagram1.eps}
7083}
7084\caption{\protect{Diagram of photon absorption in the quark
7085exchange mechanism. $\rm{PC}_{1,2}$ stand for parent clusters
7086with bound masses
7087$\tilde{\mu}_{1,2}$, participating in the quark-exchange. $\rm{CF}_{1,2}$
7088stand for the colored nuclear fragments in the process of quark
7089exchange. F($\mu$) denotes the outgoing hadron with mass $\mu$ in the
7090final state. RQ is the residual Quasmon which carries the rest of the
7091excitation energy and momentum. $M_{\min}$ characterizes
7092its minimum mass defined by its quark content. Dashed lines indicate
7093colored objects. The photon is absorbed by a
7094quark-parton $k$ from the parent cluster $\rm{PC}_1$.
7095}}
7096\label{diagram1}
7097\end{figure}
7098
7099\begin{figure}[tbp]
7100\resizebox{0.70\textwidth}{!}
7101{
7102   \includegraphics{diagram2.eps}
7103}
7104\caption{\protect{Diagram of photon absorption in the
7105quark-exchange mechanism. The notation is the same as in
7106Fig.~\ref{diagram1}. The photon is absorbed by the colored fragment
7107$\rm{CF}_2$.
7108}}
7109\label{diagram2}
7110\end{figure}
7111
7112It was shown in Appendix C that the energy spectrum of quark
7113partons in a Quasmon can be calculated as
7114\begin{equation}
7115\frac{dW}{k^{\ast }dk^{\ast }}\propto 
7116\left(1-\frac{2k^{\ast }}{M} \right)^{N-3}\label{spectrum_1III}
7117\end{equation}
7118where $k^{\ast }$ is the energy of the primary quark-parton in the Center
7119of Mass System (CMS) of the Quasmon, $M$\ is the mass of the Quasmon,
7120and $N$, the number of
7121quark-partons in the Quasmon, can be calculated from the equation
7122\begin{equation}
7123<M^{2}>=4\cdot N\cdot (N-1)\cdot T^{2}\label{temperatureIII}
7124\end{equation}
7125Here $T$ is the temperature of the
7126system.
7127
7128In the first scenario of the $\gamma A$ interaction
7129(Fig.~\ref{diagram1}), as both interacting particles are massless, we
7130assumed that the cross section for the interaction of the photon with a
7131particular quark-parton is proportional to the charge of the quark-parton
7132squared, and inversely proportional to the mass of the photon-parton
7133system $s$, which can be calculated as
7134\begin{equation}
7135s=2\omega k(1-\cos (\theta _{k})).  \label{s}
7136\end{equation}
7137Here $\omega $\ is the energy of the photon, and $k$ is the energy of
7138the quark-parton in the Laboratory System (LS):
7139\begin{equation}
7140k=k^{\ast }\cdot \frac{E_{N}+p_{N}\cdot \cos (\theta _{k})}{M_{N}}.
7141\end{equation}
7142In the case of a virtual photon, equation~(\ref{s}) can be written as
7143\begin{equation}
7144s=2k(\omega -q_{\gamma}\cdot \cos (\theta _{k})),
7145\end{equation}
7146where $q_{\gamma}$ is the momentum of the virtual photon. In both cases
7147equation~(\ref{spectrum_1III}) transforms into
7148\begin{equation}
7149\frac{dW}{dk^{\ast }}\propto \left(1-\frac{2k^{\ast }}{M} \right)^{N-3},
7150\end{equation}
7151and the angular distribution in $\cos (\theta _{k})$\ converges to a
7152$\delta $-function: in the case of a real photon
7153$\cos (\theta _{k})=1$, and
7154in the case of a virtual photon
7155$\cos (\theta _{k})=\frac{\omega }{q_{\gamma}}$.
7156
7157In the second scenario for the photon interaction
7158(Fig.~\ref{diagram2}) we assumed
7159that both the photon and the primary quark-parton, randomized
7160according to
7161equation~(\ref{spectrum_1III}), enter the parent cluster $\rm{PC}_2$,
7162and after that the normal procedure of quark exchange
7163continues, in which the recoiling quark-parton $q$ returns
7164to the first cluster.
7165
7166An additional parameter in the model is the relative contribution of
7167both mechanisms. As a first approximation we assumed equal
7168probability, but in the future, when more detailed data are obtained,
7169this parameter can be adjusted.
7170
7171\begin{figure}[tbp]
7172\resizebox{0.80\textwidth}{!}
7173{
7174   \includegraphics{gam62.eps}
7175}
7176\caption{\protect{Comparison of the CHIPS model results (lines in the
7177figure) with the
7178experimental data~\cite{Ryckbosch} on
7179proton spectra at $90^{\circ}$ 
7180in the photonuclear reactions on $^{40}$Ca at 59--65 MeV (open
7181circles),
7182and proton spectra at $60^{\circ}$ (triangles) and $150^{\circ}$ 
7183(diamonds).
7184Statistical errors in the CHIPS results are not shown but
7185can be judged by the point-to-point variations in the lines. The
7186comparison is absolute, using the value of total
7187photonuclear cross section of 5.4 mb for Ca,
7188as given in Ref.~\cite{Ahrens}.
7189} }
7190\label{gam62III}
7191\end{figure}
7192
7193\begin{figure}[tbp]
7194\resizebox{0.80\textwidth}{!}
7195{
7196   \includegraphics{gamm_c0606_e123.eps}
7197}
7198\caption{\protect{Comparison of the CHIPS model results (lines in the
7199figure) with the
7200experimental data~\cite{Harty} on
7201proton spectra at $57^{\circ}$, $77^{\circ}$, $97^{\circ}$,
7202$117^{\circ}$, and $127^{\circ}$
7203in the photonuclear reactions on $^{12}$C at 123 MeV (open
7204circles).
7205The value of the total
7206photonuclear cross section was set at 1.8 mb.
7207}  }
7208\label{gam_123}
7209\end{figure}
7210
7211\begin{figure}[tbp]
7212\resizebox{0.80\textwidth}{!}
7213{
7214   \includegraphics{gamm_c0606_e151.eps}
7215}
7216\caption{\protect{Same as in Fig.~\ref{gam_123}, for the photon energy
7217151 MeV.}}
7218\label{gam_151}
7219\end{figure}
7220
7221\begin{figure}[tbp]
7222\resizebox{0.80\textwidth}{!}
7223{
7224   \includegraphics{vgam_c0606k.eps}
7225}
7226\caption{\protect{Comparison of the CHIPS model results (line in the
7227figure) with the experimental data~\cite{Bates} (open circles) on the
7228proton spectrum measured in parallel kinematics in the
7229$^{12}$C(e,e$^{\prime}$p)\ reaction at an energy transfer equal to 210
7230MeV and momentum transfer equal to 585 MeV/$c$.  Statistical errors in
7231the CHIPS result are not shown but can be judged by the point-to-point
7232variations in the line.  The relative normalization is arbitrary.
7233}  }
7234\label{vgam}
7235\end{figure}
7236
7237We begin the comparison with the data on proton production in the
7238$^{40}$Ca$(\gamma,X)$\ reaction at $90^{\circ}$\ at 59--65 MeV
7239\cite{Ryckbosch}, and at $60^{\circ}$\ and $150^{\circ}$\ at 60 MeV
7240\cite{Abeele}.  We analyzed these data together to compare the angular
7241dependence generated by CHIPS with experimental data. The data are
7242presented as a function of
7243the invariant inclusive cross section
7244$f=\frac{d\sigma }{p_{p}dE_{p}}$\ depending on the variable
7245$k=\frac{T_{p}+p_{p}}{2}$,
7246where $T_{p}$\ and $p_{p}$\ are the kinetic energy and the momentum of the
7247secondary proton. As one can see from Fig.~\ref{gam62III}, the angular
7248dependence of the proton yield in photoproduction on $^{40}$Ca at $60$ MeV is
7249reproduced quite well by the CHIPS event generator.
7250
7251The second set of measurements that we use for the benchmark
7252comparison deals with the secondary proton yields in
7253$^{12}$C$(\gamma,X)$ reactions at 123 and 151 MeV \cite{Harty},
7254which is still below the pion production threshold on
7255a free nucleon. Inclusive spectra of protons have been measured in
7256$\gamma ^{12}$C reactions at $57^{\circ}$, $77^{\circ}$, $97^{\circ}$,
7257$117^{\circ}$, and $127^{\circ}$.
7258Originally, these data were presented as a function of
7259the missing energy. We present the data in Figs.~\ref{gam_123} 
7260and \ref{gam_151} together with CHIPS calculations in
7261the form of the invariant inclusive cross section dependent on $k$.
7262All parameters of the model such as temperature $T$ and parameters
7263of clusterization for the particular nucleus were the same as in
7264Appendix D, where pion capture spectra were fitted.
7265The agreement between the experimental data and the CHIPS model results is
7266quite remarkable. Both data and calculations show significant strength
7267in the proton yield cross section up to the kinematical limits of the
7268reaction. The angular distribution in the model is not as prominent as
7269in the experimental data, but agrees well qualitatively.
7270
7271Using the same parameters, we applied the CHIPS event generator to the
7272$^{12}$C(e,e$^{\prime }$p) reaction measured in Ref.\cite{Bates}. The
7273proton spectra were measured in parallel kinematics in the interaction
7274of virtual photons with energy $\omega = 210$ MeV and momentum
7275$q_{\gamma} = 585$ MeV/$c$. To account for the experimental conditions
7276in the CHIPS event generator, we have selected protons generated in
7277the forward direction with respect to the direction of the virtual
7278photon, with the relative angle $\Theta_{qp} < 6^{\circ}$.  The CHIPS
7279generated distribution and the experimental data are shown in
7280Fig.~\ref{vgam} in the form of the invariant inclusive cross section as a
7281function of $k$.  The CHIPS event generator works only with ground
7282states of nuclei so we did not expect any narrow peaks for
7283$^{1}p_{3/2}$-shell knockout or for other shells. Nevertheless we
7284found that the CHIPS event generator fills in the so-called
7285``$^{1}s_{1/2}$-shell knockout'' region, which is usually artificially
7286smeared by a Lorentzian~\cite{Lorentzian}.  In the regular
7287fragmentation scenario the spectrum of protons below $k = 300$ MeV is
7288normal; it falls down to the kinematic limit. The additional yield at
7289$k > 300$ MeV is a reflection of the specific first act of
7290hadronization with the quark exchange kinematics. The slope increase
7291with momentum is approximated well by the model, but it is obvious
7292that the yield close to the kinematic limit of the $2 \rightarrow 2$
7293reaction can only be described in detail if the excited states of the
7294residual nucleus are taken into account.
7295
7296The angular dependence of the proton yield in low-energy photo-nuclear
7297reactions is described in the CHIPS model and event generator. The
7298most important assumption in the description is the hypothesis of a
7299direct interaction of the photon with an asymptotically free quark in
7300the nucleus, even at low energies. This means that asymptotic freedom of
7301QCD and dispersion sum rules~\cite{sum_rules} can in some way be
7302generalized for low energies.  The knockout of a proton from a nuclear
7303shell or the homogeneous distributions of nuclear evaporation cannot
7304explain significant angular dependences at low energies.
7305
7306The same mechanism appears to be capable of modeling proton yields in
7307such reactions as the $^{16}$C(e,e$^{\prime }$p) reaction measured at MIT
7308Bates \cite{Bates}, where it was shown that the region of missing
7309energy above 50 MeV reflects ``two-or-more-particle knockout'' (or the
7310``continuum'' in terms of the shell model). The CHIPS model may help
7311to understand and model such phenomena.
7312
7313%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%****************************
7314\begin{thebibliography}{}
7315\bibitem{STAND_ALONE}  \noindent M. V. Kossov, Manual for the CHIPS
7316event generator,High Energy Accelerator Research Organization (KEK)
7317Internal 2000-17, February 2001, H/R
7318
7319\bibitem{CHIPS1}  \noindent P. V. Degtyarenko, M. V. Kossov, and H.P.
7320Wellisch, Chiral invariant phase space event generator, I.
7321Nucleon-antinucleon annihilation at rest, Eur. Phys. J. A {\bf 8}, 217-222
7322(2000).
7323
7324\bibitem{CHIPS2}  P. V. Degtyarenko, M. V. Kossov, and H. P. Wellisch,
7325Chiral invariant phase space event generator, II.Nuclear pion capture at
7326rest, Eur. Phys. J. A 9, (be published) (2001).
7327
7328\bibitem{CHIPS3}  P. V. Degtyarenko, M. V. Kossov, and H. P. Wellisch,
7329Chiral invariant phase space event generator, III Photonuclear reactions
7330below $\Delta $(3,3) excitation, Eur. Phys. J. A 9, (be published) (2001).
7331
7332\bibitem{GEANT4}  S. Giani et al., Geant4: Object Oriented Toolkit for
7333Simulation in HEP, LCB status report CERN/LHCC/98-44, November 1998.
7334
7335\bibitem{MC2000}  J. P. Wellisch, On hadronic models in GEANT4, Program
7336and Book of Abstracts.International Conference on Advanced Monte Carlo for
7337Radiation Physics, Particle Transport Simulation and Applications, 23-26
7338October 2000, IST,Lisbon, Portugal, p. 330.
7339
7340\bibitem{massSpectr}  M. V. Kossov, CHIPS: masses of hadrons. (be
7341published).
7342
7343\bibitem{chpd.eqPhotons}  L. D. Landau, E. M. Lifshitz, ``Course of
7344Theoretical Physics'' v.4, part 1, ``Relativistic Quantum Theory'',
7345Pergamon Press, paragraph 96, The method of equivalent photons.
7346
7347\bibitem{Shadowing}  J. Eickmeyer et al. Phys. Rev. Letters {\bf 36 }(1976)
7348289-291.
7349
7350\bibitem{Guilo}  D'Agostini, Hard Scattering Process in High Energy
7351Gamma-Induced Reactions, DESY 94-169, September 1994.
7352
7353\bibitem{Electronuc}  F. W. Brasse et al. Nuclear Physics {\bf B39 }(1972)
7354421-431.
7355
7356\bibitem{PenCB}  A. Lepretre et al. Nuclear Physics {\bf A390 }(1982)
7357221-239.
7358
7359\bibitem{K_parameter}  M.V. Kossov and L.M. Voronina, Preprint ITEP
7360165-84, Moscow (1984)
7361
7362\bibitem{DINREG} P.V. Degtyarenko and M.V. Kossov, Preprint ITEP
736311-92, Moscow (1992)
7364
7365\bibitem{ARGUS} P.V. Degtyarenko et al., Z. Phys. A - Atomic Nuclei,
7366{\textbf{335}} (1990) 231
7367
7368\bibitem{TPC} P.V. Degtyarenko et al., Phys. Rev. C {\textbf{50}} (1994)
7369R541
7370
7371\bibitem{GDINR} P.V. Degtyarenko, \textit{Applications of the photonuclear
7372fragmentation model to radiation protection problems}, in:
7373Proceedings of Second Specialist's Meeting on Shielding Aspects of
7374Accelerators, Targets and Irradiation Facilities (SATIF-2), CERN,
7375Geneva, Switzerland, 12-13 October 1995, published by Nuclear Energy
7376Agency, Organization for Economic Co-operation and Development, pages
737767 - 91 (1996)
7378
7379\bibitem{sum_rules}  C. Bernard, A. Duncan, J. LoSecco, and S. Weinberg,
7380Phys. Rev. D \textbf{12} (1975) 792;
7381
7382 E. Poggio, H. Quinn, and S. Weinberg, Phys. Rev. D \textbf{13} (1976) 1958
7383
7384\bibitem{Feynman-Wilson}  K.G. Wilson, Proc. Fourteenth Scottish
7385Universities Summer School in Physics (1973), eds R. L. Crawford, R.
7386Jennings (Academic Press, New York, 1974)
7387
7388\bibitem{Chiral_Bag} C.A.Z. Vasconcellos et al., Eur. Phys. J. C
7389{\textbf{4}} (1998) 115;
7390
7391G.A. Miller, A.W. Thomas, S. Theberge, Phys. Lett. B {\textbf{91}} (1980)
7392192;
7393
7394C.E. de Tar, Phys. Rev. D {\textbf{24}} (1981) 752;
7395
7396M.A.B. B\'{e}g, G.T. Garvey, Comments Nucl. Part. Phys. {\textbf{18}}
7397(1988) 1
7398
7399\bibitem{Parton_Models} B. Andersson, G. Gustafson, G. Ingelman,
7400T. Sj\"{o}strand, Phys. Rep. {\textbf{97}} (1983) 31
7401
7402\bibitem{CHdetail.PDG}  Monte Carlo particle numbering scheme, in:
7403 Particle Data Group, \textit{Review of Particle Physics},
7404 Eur. Phys. J. C {\textbf{3}} (1998) 180
7405
7406\bibitem{Hagedorn} R. Hagedorn, Nuovo Cimento Suppl. {\textbf{3}} (1965) 147
7407
7408\bibitem{Duality} Yu.L. Dokshitzer, V.S. Fadin and V.A. Khoze,
7409Phys. Lett. {\textbf{115B}} (1982) 242L
7410
7411\bibitem{JETSET} T. Sj\"{o}strand, Comp. Phys. Comm. {\textbf{92}} (1994)
741274
7413
7414\bibitem{GENBOD} F. James, \textit{Monte Carlo Phase Space}, CERN 68-15
7415(1968)
7416
7417\bibitem{OZI}  S. Ocubo, Phys. Lett. {\textbf{5}} (1963) 165;
7418
7419G. Zweig, CERN Preprint 8419/TH-412 (1964);
7420
7421I. Iizuka, Progr. Theor. Phys. Suppl. {\textbf{37}} (1966) 21
7422
7423\bibitem{OZI_violation} V.E. Markushin, M.P. Locher,
7424Eur. Phys. J. A {\textbf{1}} (1998) 91
7425
7426\bibitem{pap_exdata}  C. Amsler, Rev.Mod.Phys. {\textbf{70}} (1998) 1293;
7427
7428C. Amsler and F. Myher, Annu. Rev. Nucl. Part. Sci. {\textbf{41}} (1991)
7429219
7430
7431\bibitem{pispectrum} J. Sedlak and V. Simak, Sov. J. Part. Nucl.
7432{\textbf{19}} (1988) 191
7433
7434\bibitem{POPCORN} B. Andersson, G. Gustafson, T. Sj\"{o}strand, Nucl.
7435Phys. B {\textbf{197}}(1982) 45;
7436
7437B. Andersson, G. Gustafson, T. Sj\"{o}strand, Physica Scripta {\textbf{32}}
7438(1985) 574
7439
7440\bibitem{Energy_Dep} P. Gregory et al., Nucl. Phys. B {\textbf{102}} (1976)
7441189
7442
7443\bibitem{FNAL}  V.I.~Efremenko et al., Phys. Rev. C \textbf{22} (1980) 700.
7444
7445\bibitem{FAS}  S.V~Boyarinov et al., Phys. At. Nucl. \textbf{56}
7446(1993) 72.
7447
7448\bibitem{NN QEX}  K.~Maltman and N.~Isgur, Phys. Rev. D \textbf{29} (1984) 952.
7449
7450\bibitem{Kp QUEX}  K.~Maltman and N.~Isgur, Phys. Rev. D \textbf{34} (1986)
74511372.
7452
7453\bibitem{EMC}  P.~Hoodbhoy and R.~J.~Jaffe, Phys. Rev. D \textbf{35}
7454(1987) 113.
7455
7456\bibitem{QUEX}  N.~Isgur, Nucl. Phys. \textbf{A497} (1989) 91.
7457
7458\bibitem{MIPHI}  A.~I.~Amelin et al., ``Energy spectra of charged particles
7459in the reaction of $\pi^-$ absorption at rest by $^{6,7}$Li, $^{9}$Be, $%
7460^{10,11}$B, $^{12}$C, $^{28}$Si, $^{40}$Ca, $^{59}$Co, $^{93}$Nb, $%
7461^{114,117,120,124}$Sn, $^{169}$Tm, $^{181}$Ta and $^{209}$Bi nuclei'',
7462Moscow Physics and Engineering Institute Preprint No. 034-90, Moscow, 1990.
7463
7464\bibitem{Mechtersheimer}  G.~Mechtersheimer et al., Nucl. Phys.
7465                          \textbf{A324} (1979) 379.
7466
7467\bibitem{Cernigoi}  C.~Cernigoi et al., Nucl. Phys. \textbf{A456} (1986) 599.
7468
7469\bibitem{Madey}  R.~Madey et al., Phys. Rev. C \textbf{25} (1982) 3050.
7470
7471\bibitem{Ryckbosch}  D.~Ryckbosch et al., Phys. Rev. C \textbf{42} (1990) 444.
7472
7473\bibitem{Ahrens}  J.~Ahrens et al.,  Nucl. Phys. \textbf{A446} (1985) 229c.
7474
7475\bibitem{Ryckebusch} Jan~Ryckebusch et al., Phys. Rev. C \textbf{49} (1994)
74762704.
7477
7478\bibitem{Abeele} C.~Van~den~Abeele; private communication cited
7479in the reference: Jan~Ryckebusch et al., Phys. Rev. C \textbf{49} (1994)
74802704.
7481
7482\bibitem{Harty} P.D.~Harty et al. (unpublished);
7483private communication cited
7484in the reference: Jan~Ryckebusch et al., Phys. Rev. C \textbf{49} (1994)
74852704.
7486
7487\bibitem{Bates}  L.B.~Weinstein et al., Phys. Rev. Lett. \textbf{64} (1990)
74881646.
7489
7490\bibitem{Lorentzian}  J.P.~Jeukenne and C.~Mahaux, Nucl. Phys. A \textbf{394}
7491(1983) 445.
7492
7493\end{thebibliography}
7494
7495\end{document}
Note: See TracBrowser for help on using the repository browser.