]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8140/xmldoc/SemiInternalProcesses.xml
- Update to pythia8140
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8140 / xmldoc / SemiInternalProcesses.xml
1 <chapter name="Semi-Internal Processes">
2
3 <h2>Semi-Internal Processes</h2>
4
5 Normally users are expected to implement new processes via the
6 <aloc href="LesHouchesAccord">Les Houches Accord</aloc>. Then 
7 you do all flavour, colour and phase-space selection externally, 
8 before your process-level events are input for further processing
9 by PYTHIA. However, it is also possible to implement a 
10 new process in exactly the same way as the internal PYTHIA
11 ones, thus making use of the internal phase space selection machinery
12 to sample an externally provided cross-section expression. 
13 This page gives a brief summary how to do that. If you additionally 
14 want to introduce a new resonance species, with its own internal 
15 width calculations, you will find further instructions 
16 <aloc href="SemiInternalResonances">here</aloc>.
17
18 <p/>
19 Should you actually go ahead, it is strongly recommended to shop around 
20 for a similar process that has already been implemented, and to use that 
21 existing code as a template. Look for processes with the same combinations
22 of incoming flavours and colour flows, rather than the shape of the 
23 cross section itself. With a reasonable such match the task should be 
24 of medium difficulty, without it more demanding. 
25
26 <p/>
27 PYTHIA is rather good at handling the phase space of 
28 <ei>2 -> 1</ei> and <ei>2 -> 2</ei> processes, is more primitive for 
29 <ei>2 -> 3</ei> ones and does not at all address higher multiplicities. 
30 This limits the set of processes that you can implement in this 
31 framework. The produced particles may be resonances, however, so it is 
32 possible to end up with bigger "final" multiplicities through sequential 
33 decays, and to include further matrix-element weighting in those decays.   
34
35 <p/>
36 There are two steps involved in implementing a process:
37 <br/>1) writing a new class,  where the matrix elements are implemented, 
38 including information on incoming and outgoing flavours and colours, and 
39 <br/>2) making the process available.
40 <br/>We consider these two aspects in turn. An example where it all comes
41 together is found in <code>main25.cc</code>.
42
43 <h3>The Cross Section Class</h3> 
44
45 The matrix-element information has to be encoded in a new class.
46 The relevant code could either be put before the main program in the
47 same file, or be stored separately, e.g. in a matched pair
48 of <code>.h</code> and <code>.cc</code> files. The latter may be more
49 convenient, in particular if the cross sections are lengthy, or if you 
50 intend to build up your own little process library, but of course
51 requires that these additional files are correctly compiled and linked.
52
53 <p/>
54 The class has to be derived either from  
55 <code>Sigma1Process</code>, for <ei>2 -> 1</ei> processes, from 
56 <code>Sigma2Process</code>, for <ei>2 -> 2</ei> ones, or from 
57 <code>Sigma3Process</code>, for <ei>2 -> 3</ei> ones. (The 
58 <code>Sigma0Process</code> class is used for elastic, diffractive
59 and minimum-bias events, and is not recommended for use beyond that.) 
60 These are in their turn derived from the <code>SigmaProcess</code> 
61 base class. 
62
63 <p/>
64 The class can implement a number of methods. Some of these are 
65 compulsory, others strongly recommended, and the rest are to be
66 used only when the need arises to override the default behaviour. 
67 The methods are:
68
69 <p/>
70 A <b>constructor</b> for the derived class obviously must be available.
71 Here you are quite free to allow a list of arguments, to set
72 the parameters of your model, or even to create a set of closely
73 related but distinct processes. For instance, <ei>g g -> Q Qbar</ei>, 
74 <ei>Q = c</ei> or <ei>b</ei>, is only coded once, and then the 
75 constructor takes the quark code (4 or 5)  as argument, 
76 to allow the proper amount of differentiation. 
77
78 <p/>
79 A <b>destructor</b> is only needed if you plan to delete the process 
80 before the natural end of the run, and require some special behaviour 
81 at that point. If you call such a destructor you will leave a pointer 
82 dangling inside the <code>Pythia</code> object you gave it in to,
83 if that still exists. 
84
85 <method name="void SigmaProcess::initProc()"> 
86 is called once during initalization, and can then be used to set up
87 parameters, such as masses and couplings, and perform calculations 
88 that need not be repeated for each new event, thereby saving time. 
89 This method needs not be implemented, since in principle all 
90 calculations can be done in <code>sigmaHat</code> below.
91 </method>
92
93 <method name="void SigmaProcess::sigmaKin()">
94 is called once a kinematical configuration has been determined, but 
95 before the two incoming flavours are known. This routine can therefore 
96 be used to perform calculations that otherwise might have to be repeated 
97 over and over again in <code>sigmaHat</code> below. For instance 
98 a flavour-independent cross section calculation for a <ei>q g</ei> 
99 initial state would be repeated 20 times in <code>sigmaHat</code>, 
100 five times for the five quark flavours allowed in the incoming beams, 
101 times twice to include antiquarks, times twice since the (anti)quark 
102 could be in either of the two beams. You could therefore calculate the 
103 result once only and store it as a private data member of the class. 
104 It is optional whether you want to use this method, however, or put 
105 everything in <code>sigmaHat</code>.
106 </method>
107
108 <method name="double SigmaProcess::sigmaHat()">
109 is the key method for cross section calculations and returns a cross section
110 value, as further described below. It is called when also a preliminary set 
111 of incoming flavours has been picked, in addition to the kinematical ones 
112 already available for <code>sigmaKin</code>. Typically <code>sigmaHat</code> 
113 is called inside a loop over all allowed incoming flavour combinations,
114 stored in <code>id1</code> and <code>id2</code>, with fixed kinematics, 
115 as already illustrated above. The sum over the different flavour combinations 
116 provides the total cross section, while their relative size is used to make 
117 a selection of a specific incomimg state.
118 <br/>For a <ei>2 -> 1</ei> process, the returned value should be 
119 <ei>sigmaHat(sHat)</ei>, where <code>mH</code> (= <ei>mHat</ei>), 
120 <code>sH</code> (= <ei>sHat</ei>) and <code>sH2</code> (= <ei>sHat^2</ei>) 
121 are available to be used. 
122 <br/>For a <ei>2 -> 2</ei> process, instead
123 <ei>d(sigmaHat)/d(tHat)</ei> should be returned, based on
124 provided <code>mH, sH, sH2, tH, tH2, uH, uH2, m3, s3, m4, s4</code> and 
125 <code>pT2</code> values (<code>s3 = m3*m3</code> etc.). Overload the 
126 <code>convertME()</code> method below if you instead plan to return
127 <ei>|M|^2</ei>.
128 <br/>For a <ei>2 -> 3</ei> process, instead <ei>|M|^2</ei> should be 
129 returned, with normalization such that <ei>|M|^2 / (2 sHat)</ei> integrated 
130 over the three-body phase space gives the cross section. Here no standard 
131 set of variables exist. Instead the obvious ones, 
132 <code>mH, sH, m3, s3, m4, s4, m5, s5</code>, are complemented by the 
133 four-vectors <code>p3cm, p4cm, p5cm</code>, from which further invariants 
134 may be calculated. The four-vectors are defined in the CM frame of the 
135 subcollision, with incoming partons along the <ei>+-z</ei> axis.   
136 <br/>In either case, <ei>alpha_s</ei> and <ei>alpha_em</ei> have already 
137 been calculated, and are stored in <code>alpS</code> and <code>alpEM</code>. 
138 Also other standard variables may be used, like 
139 <code>CoupEW::sin2thetaW()</code>, and related flavour-dependent
140 vector and axial couplings in <code>CoupEW</code> and CKM combinations
141 in <code>VCKM</code>. 
142 <br/>In case some of the final-state particles are resonances, their 
143 squared masses have already been selected according to a Breit-Wigner
144 with a linearly running width <ei>Gamma(m) = Gamma(m_0) * m / m_0</ei>.
145 More precisely, the mass spectrum is weighted according to
146 <ei>w_BW(m^2) d(m^2)</ei>, where
147 <eq>
148 w_BW(m^2) = (1/pi) * (m * Gamma(m)) / ( (m^2 - m_0^2)^2 + (m * Gamma(m))^2 ) . 
149 </eq> 
150 If you would like to have another expression, the above weights are stored 
151 in <code>runBW3</code>, <code>runBW4</code> and <code>runBW5</code>, 
152 respectively. If you divide out one of these factors, you just remain with 
153 a phase space selection <ei>d(m^2)</ei> for this particle,
154 and can multiply on your desired shape factor instead. Unfortunately, the 
155 Monte Carlo efficiency will drop if your new mass distribution differs 
156 dramatically from the input one. Therefore it does make sense to adjust the 
157 database value of the width to be slightly (but not too much) broader 
158 than the distribution you have in mind. Also note that, already by default, 
159 the wings of the Breit-Wigner are oversampled (with a compensating lower 
160 internal weight) by partly sampling like <ei>(a + b/m^2 + c/m^4) d(m^2)</ei>,
161 where the last term is only used for <ei>gamma^*/Z^0</ei>.
162 <br>As alternative to the kinematics variables defined above, to be used
163 for cross section calculations, also the two arrays <code>mME[5]</code> 
164 and <code>pME[5]</code> can be used, for masses and four-momenta,
165 respectively. Here indices 0 and 1 are the two incoming beams, and 2
166 and onwards the outgoing particles. (Note that this differs from the normal
167 internal labelling, where slot 0 is left empty.) The four-momenta are 
168 defined in the rest frame of the subcollision, and do not represent the 
169 final kinematics. Furthermore, for <ei>2 -> 2</ei> processes of massive 
170 identical particles (or antiparticles) in the final state, such as 
171 <ei>t tbar</ei> or <ei>W^+ W^-</ei>, the kinematics is here adjusted 
172 so that the two particles have the same mass, formed as a suitable 
173 average of the actual Breit-Wigner-distributed masses. This allows the 
174 evaluation of matrix-element expressions that only have meaning if the 
175 two have the same mass.  
176 </method>
177
178 <method name="void SigmaProcess::setIdColAcol()">
179 is called only once an initial state and a kinematical configuration has 
180 been picked. This routine must set the complete flavour information and 
181 the colour flow of the process. This may involve further random choices,
182 between different possible final-state flavours or between possible 
183 competing colour flows. Private data members of the class may be used to 
184 retain some information from the previous steps above.
185 <br/>When this routine is called the two incoming flavours have already 
186 been selected and are available in <code>id1</code> and <code>id2</code>, 
187 whereas the one, two or three outgoing ones either are fixed for a given 
188 process or can be determined from the instate (e.g. whether a <ei>W^+</ei> 
189 or <ei>W^-</ei> was produced).  There is also a standard method in 
190 <code>VCKM</code> to pick a final flavour from an initial one with CKM 
191 mixing. Once you have figured out the value of
192 <code>id3</code> and, the case being, <code>id4</code> and 
193 <code>id5</code>, you store these values permanently by a call
194 <code>setId( id1, id2, id3, id4, id5)</code>, where the last two may be 
195 omitted if irrelevant. 
196 <br/>Correspondingly, the colours are stored with
197 <code>setColAcol( col1, acol1, col2, acol2, col3, acol3, col4, acol4, 
198 col5, acol5)</code>, where the final ones may be omitted if irrelevant.
199 Les Houches style colour tags are used, but starting with number 1
200 (and later shifted by the currently requested offset). The 
201 input is grouped particle by particle, with the colour index before the 
202 anticolour one. You may need to select colour flow dynamically, depending 
203 on the kinematics, when several distinct possibilities exist. Trivial 
204 operations, like swapping colours and anticolours, can be done with 
205 existing methods.
206 <br/>When the <code>id3Mass()</code> and <code>id4Mass()</code>
207 methods have been used, the order of the outgoing particles may be 
208 inconsistent with the way the <ei>tHat</ei> and <ei>uHat</ei>
209 variables have been defined. A typical example would be a process like
210 <ei>q g -> q' W</ei> with <ei>tHat</ei> defined between incoming and 
211 outgoing quark, but where <code>id3Mass() = 24</code> and so the
212 process is to be stored as <ei>q g -> W q'</ei>. One should then put
213 the variable <code>swapTU = true</code> in <code>setIdColAcol()</code>
214 for each event where the <ei>tHat</ei> and <ei>uHat</ei> variables 
215 should be swapped before the event kinematics is reconstructed. This 
216 variable is automatically restored to <code>false</code> for each new 
217 event.
218 </method>
219
220 <method name="double SigmaProcess::weightDecayFlav( Event& process)">
221 is called to allow a reweighting of the simultaneous flavour choices of 
222 resonance decay products. Is currently only used for the 
223 <ei>q qbar -> gamma*/Z^0 gamma*/Z^0</ei> process, and will likely not
224 be of interest for you. 
225 </method>
226
227 <method name="double SigmaProcess::weightDecay( Event& process, 
228 int iResBeg, int iResEnd)">
229 is called when the basic process has one or several resonances, after each 
230 set of related resonances in <code>process[i]</code>,
231 <code>iResBeg</code> &lt;= <code>i </code> &lt;= <code>iResEnd</code>, 
232 has been allowed to decay. The calculated weight, to be normalized 
233 to the range between 0 and 1, is used to decide whether to accept the 
234 decay(s) or try for a new decay configuration. The base-class version of
235 this method returns unity, i.e. gives isotropic decays by default. 
236 This method may be called repeatedly for a single event. For instance, in 
237 <ei>q qbar -> H^0 Z^0</ei> with <ei>H^0 -> W^+ W^-</ei>, a first call 
238 would be made after the <ei>H^0</ei> and <ei>Z^0</ei> decays, and then 
239 depend only on the <ei>Z^0</ei> decay angles since the <ei>H^0</ei> 
240 decays isotropically. The second call would be after the <ei>W^+ W^-</ei> 
241 decays and then involve correlations between the four daughter fermions.
242 </method>
243
244 <method name="string SigmaProcess::name()">
245 returns the name of the process, as you want it to be shown in listings.
246 </method>
247
248 <method name="int SigmaProcess::code()"> 
249 returns an integer identifier of the process. This has no internal function, 
250 but is only intended as a service for the user to rapidly (and hopefully
251 uniquely) identify which process occured in a given event. Numbers below 
252 10000 are reserved for internal PYTHIA use. 
253 </method>
254
255 <method name="string SigmaProcess::inFlux()">
256 this string specifies the combinations of incoming partons that are 
257 allowed for the process under consideration, and thereby which incoming
258 flavours <code>id1</code> and <code>id2</code> the <code>sigmaHat()</code> 
259 calls will be looped over. It is always possible to pick a wider flavour 
260 selection than strictly required and then put to zero cross sections in 
261 the superfluous channels, but of course this may cost some extra execution 
262 time. Currently allowed options are:
263 <br/>* <code>gg</code>: two gluons. 
264 <br/>* <code>qg</code>: one (anti)quark and one gluon.
265 <br/>* <code>qq</code>: any combination of two quarks, two antiquarks or
266 a quark and an antiquark.
267 <br/>* <code>qqbarSame</code>: a quark and its antiquark;
268 this is a subset of the above <code>qq</code> option.
269 <br/>* <code>ff</code>: any combination of two fermions, two antifermions 
270 or a fermion and an antifermion; is the same as <code>qq</code> for 
271 hadron beams but also allows processes to work with lepton beams.
272 <br/>* <code>ffbarSame</code>: a fermion and its antifermion; is the 
273 same as <code>qqbarSame</code> for hadron beams but also allows processes 
274 to work with lepton beams.
275 <br/>* <code>ffbarChg</code>: a fermion and an antifermion that combine 
276 to give charge +-1.
277 <br/>* <code>fgm</code>: a fermion and a photon (gamma).
278 <br/>* <code>ggm</code>: a gluon and a photon.
279 <br/>* <code>gmgm</code>: two photons.
280 </method>
281
282 <method name="bool SigmaProcess::convert2mb()">
283 it is assumed that cross sections normally come in dimensions such that
284 they, when integrated over the relevant phase space, obtain the dimension
285 GeV^-2, and therefore need to be converted to mb. If the cross section 
286 is already encoded as mb then <code>convert2mb()</code> should be 
287 overloaded to instead return <code>false</code>.
288 </method>
289
290 <method name="bool SigmaProcess::convertME()">
291 it is assumed that <ei>2 -> 2</ei> cross sections are encoded as 
292 <ei>d(sigmaHat)/d(tHat)</ei> in the <code>SigmaProcess::sigmaHat()</code>
293 methods. If <code>convertME()</code> is overloaded to instead return 
294 <code>true</code> then the return value is instead assumed to be the
295 squared matrix element <ei>|M|^2</ei>, and 
296 <code>SigmaProcess::sigmaHatWrap(...)</code> converts to 
297 <ei>d(sigmaHat)/d(tHat)</ei>.
298 This switch has no effect on <ei>2 -> 1</ei> and <ei>2 -> 3</ei> processes.
299 In the former one always needs to encode <ei>sigmaHat(sHat)</ei>,
300 in the latter always <ei>|M|^2</ei>. 
301 </method>
302
303 <method name="int SigmaProcess::id3Mass()"> 
304 </method>
305 <methodmore name="int SigmaProcess::id4Mass()"> 
306 </methodmore>
307 <methodmore name="int SigmaProcess::id5Mass()"> 
308 are the one, two or three final-state flavours, where masses are to be 
309 selected before the matrix elements are evaluated. Only the absolute value 
310 should be given. For massless particles, like gluons and photons, one need 
311 not give anything, i.e. one defaults to 0. The same goes for normal light 
312 quarks, where masses presumably are not implemented in the matrix elements.  
313 Later on, these quarks can still (automatically) obtain constituent masses, 
314 once a <ei>u</ei>, <ei>d</ei> or <ei>s</ei> flavour has been selected. 
315 </methodmore>
316
317 <method name="int SigmaProcess::resonanceA()"> 
318 </method>
319 <methodmore name="int SigmaProcess::resonanceB()"> 
320 are the codes of up to two <ei>s</ei>-channel resonances contributing to 
321 the matrix elements. These are used by the program to improve the phase-space 
322 selection efficiency, by partly sampling according to the relevant 
323 Breit-Wigners. Massless resonances (the gluon and photon) need not be 
324 specified.
325 </methodmore>
326
327 <method name="bool SigmaProcess::isSChannel()"> 
328 normally the choice of renormalization and factorization scales in 
329 <ei>2 -> 2</ei> and <ei>2 -> 3</ei> processes is based on the assumption 
330 that <ei>t</ei>- and <ei>u</ei>-channel exchanges dominates the 
331 cross section. In cases such as <ei>f fbar -> gamma* -> f' fbar'</ei> a 
332 <ei>2 -> 2</ei> process actually ought to be given scales as a 
333 <ei>2 -> 1</ei> one, in the sense that it proceeds entirely through 
334 an <ei>s</ei>-channel resonance. This can be achieved if you override the
335 default <code>false</code> to return <code>true</code>. See further the
336 page on <aloc href="CouplingsAndScales">couplings and scales</aloc>.
337 </method>
338
339 <method name="int SigmaProcess::idSChannel()"> 
340 normally no intermediate state is shown in the event record for  
341 <ei>2 -> 2</ei> and <ei>2 -> 3</ei> processes. However, in case 
342 that <code>idSChannel</code> is overloaded to return a nonzero value,
343 an intermediate particle with that identity code is inserted into the
344 event record, to make it a <ei>2 -> 1 -> 2</ei> or <ei>2 -> 1 -> 3</ei>
345 process. Thus if both <code>isSChannel</code> and <code>idSChannel</code>
346 are overloaded, a process will behave and look like it proceeded through
347 a resonance. The one difference is that the implementation of the 
348 matrix element is not based on the division into a production and a
349 decay of an intermediate resonance, but is directly describing the 
350 transition from the initial to the final state. 
351 </method>
352
353 <method name="int SigmaProcess::idTchan1()">
354 </method>
355 <methodmore name="int SigmaProcess::idTchan2()">
356 the non-QCD <ei>2 -> 3</ei> phase space selection machinery is rather 
357 primitive, as already mentioned. The efficiency can be improved in 
358 processes that proceed though <ei>t</ei>-channel exchanges, such as 
359 <ei>q qbar' -> H^0 q qbar'</ei> via <ei>Z^0 Z^0</ei> fusion, if the identity 
360 of the  <ei>t</ei>-channel-exchanged particles on the two side of the 
361 event are provided. Only the absolute value is of interest.
362 </methodmore>
363
364 <method name="double SigmaProcess::tChanFracPow1()">
365 </method>
366 <methodmore name="double SigmaProcess::tChanFracPow2()">
367 in the above kind of <ei>2 -> 3</ei> phase-space selection, the
368 sampling of <ei>pT^2</ei> is done with one part flat, one part weighted
369 like <ei>1 / (pT^2 + m_R^2)</ei> and one part  like 
370 <ei>1 / (pT^2 + m_R^2)^2</ei>. The above values provide the relative
371 amount put in the latter two channels, respectively, with the first 
372 obtaining the rest. Thus the sum of <code>tChanFracPow1()</code> and
373 <code>tChanFracPow2()</code> must be below unity. The final results
374 should be independent of these numbers, but the Monte Carlo efficiency 
375 may be quite low for a bad choice. Here <ei>m_R</ei> is the mass of the 
376 exchanged resonance specified by <code>idTchan1()</code> or 
377 <code>idTchan2()</code>. Note that the order of the final-state 
378 listing is important in the above <ei>q qbar' -> H^0 q qbar'</ei> example, 
379 i.e. the <ei>H^0</ei> must be returned by <code>id3Mass()</code>,
380 since it is actually the <ei>pT^2</ei> of the latter two that are 
381 selected independently, with the first <ei>pT</ei> then fixed  
382 by transverse-momentum conservation.
383 </methodmore>
384
385 <method name="bool SigmaProcess::useMirrorWeight()">
386 in <ei>2 -> 3</ei> processes the phase space selection used here
387 involves a twofold ambiguity basically corresponding to a flipping of 
388 the positions of last two outgoing particles. These are assumed equally 
389 likely by default, <code>false</code>, but for processes proceeding entirely 
390 through <ei>t</ei>-channel exchange the Monte Carlo efficiency can be 
391 improved by making a preselection based on the relative propagator
392 weights, <code>true</code>.  
393 </method>
394
395 <method name="int SigmaProcess::gmZmode()">
396 allows a possibility to override the global mode 
397 <code><aloc href="ElectroweakProcesses">WeakZ0:gmZmode</aloc></code> 
398 for a specific process. The global mode normally is used to switch off 
399 parts of the <ei>gamma^*/Z^0</ei> propagator for test purposes. The
400 above local mode is useful for processes where a <ei>Z^0</ei> really is
401 that and nothing more, such as <ei>q qbar -> H^0 Z^0</ei>. The default
402 value -1 returned by <code>gmZmode()</code> ensures that the global
403 mode is used, while 0 gives full <ei>gamma^*/Z^0</ei> interference,
404 1 <ei>gamma^*</ei> only and 2 <ei>Z^0</ei> only. 
405 </method>
406
407 <h3>Access to a process</h3> 
408
409 Once you have implemented a class, it is straightforward to make use of 
410 it in a run. Assume you have written a new class <code>MySigma</code>, 
411 which inherits from <code>Sigma1Process</code>, <code>Sigma2Process</code> 
412 or <code>Sigma3Process</code>, which in their turn inherit from 
413 <code>SigmaProcess</code>. You then create an instance of this class
414 and hand it in to a <code>pythia</code> object with 
415 <pre>
416       SigmaProcess* mySigma = new MySigma();
417       pythia.setSigmaPtr( mySigma); 
418 </pre>
419 If you have several processes you can repeat the procedure any number
420 of times. When <code>pythia.init(...)</code> is called these processes 
421 are initialized along with any internal processes you may have switched on, 
422 and treated in exactly the same manner. The  <code>pythia.next()</code> 
423 will therefore generate a mix of the different kinds of processes without 
424 distinction. See also the <aloc href="ProgramFlow">Program Flow</aloc> 
425 description.
426
427 <p/>
428 If the code should be of good quality and general usefulness, it would
429 be simple to include it as a permanently available process in the 
430 standard program distribution. The final step of that integration ought to 
431 be left for the PYTHIA authors, but here is a description of what is 
432 required.
433  
434 <p/>
435 A flag has to be defined, that allows the process to be switched on;
436 by default it should always be off. The name of the flag should be 
437 chosen of the type <code>model:process</code>. Here the 
438 <code>model</code> would be related to the general scenario considered,
439 e.g. <code>Compositeness</code>, while <code>process</code> would
440 specify instate and outstate, separated by a 2 (= to), e.g.
441 <code>ug2u*g</code>. 
442 When several processes are implemented and "belong together" it is 
443 also useful to define a <code>model:all</code> switch that affects
444 all the separate processes. 
445
446 <p/>
447 The flags should normally be stored in the <code>ProcessSelection.xml</code>
448 file or one of its daughters for a specific kind of processes. This is to 
449 make them easily found by users. You could create and use your own 
450 <code>.xml</code> file, so long as you then add that name to the 
451 list of files in the <code>Index.xml</code> file. (If not,
452 the flags would never be created and the program would not work.)  
453
454 <p/>
455 In the <code>ProcessContainer.c</code> file, the
456 <code>SetupContainers::init()</code> method needs to be expanded to
457 create instances of the processes switched on. This code is fairly
458 repetitive, and should be easy to copy and modify from the code 
459 already there. The basic structure is 
460 <br/>(i) check whether a process is requested by the user and, if so, 
461 <br/>(ii) create an instance of the matrix-element class, 
462 <br/>(iii)create a container for the matrix element and its associated 
463 phase-space handling, and 
464 <br>(iv) add the container to the existing process list.  
465
466 <p/>
467 Two minor variations are possible. One is that a set of related 
468 processes are lumped inside the the same initial check, i.e. are 
469 switched on all together. The second is that the matrix-element 
470 constructor may take arguments, as specified by you (see above). 
471 If so, the same basic matrix element may be recycled for a set of 
472 related processes, e.g. one for a composite <ei>u</ei> and one for 
473 a composite <ei>d</ei>. Obviously these variations may be combined.
474
475 </chapter>
476
477 <!-- Copyright (C) 2010 Torbjorn Sjostrand -->