]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8145/htmldoc/SemiInternalResonances.html
New pythia8 version
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8145 / htmldoc / SemiInternalResonances.html
1 <html>
2 <head>
3 <title>Semi-Internal Resonances</title>
4 <link rel="stylesheet" type="text/css" href="pythia.css"/>
5 <link rel="shortcut icon" href="pythia32.gif"/>
6 </head>
7 <body>
8
9 <h2>Semi-Internal Resonances</h2>
10
11 The introduction of a new <a href="SemiInternalProcesses.html" target="page">
12 semi-internal process</a> may also involve a new particle,
13 not currently implemented in PYTHIA. Often it is then enough to 
14 use the <a href="ParticleDataScheme.html" target="page">standard machinery</a> 
15 to introduce a new particle (<code>id:all = ...</code>) and new
16 decay channels (<code>id:addChannel = ...</code>). By default this 
17 only allows you to define a fixed total width and fixed branching
18 ratios. Using <code><a href="ResonanceDecays.html" target="page">meMode</a></code> 
19 values 100 or bigger provides the possibility of a very 
20 simple threshold behaviour. 
21
22 <p/>
23 If you want to have complete freedom, however, there are two
24 ways to go. One is that you make the resonance decay part of the
25 hard process itself, either using the 
26 <a href="LesHouchesAccord.html" target="page">Les Houches interface</a> or
27 a semi-internal process. The other is for you to create a new
28 <code>ResonanceWidths</code> object, where you write the code
29 needed for a calculation of the partial width of a particular
30 channel.
31
32 <p/>
33 Here we will explain what is involved in setting up a resonance.
34 Should you actually go ahead with this, it is strongly recommended 
35 to use an existing resonance as a template, to get the correct 
36 structure. There also exists a sample main program, 
37 <code>main26.cc</code>, that illustrates how you could combine
38 a new process and a new resonance.
39
40 <p/>
41 There are three steps involved in implementing a new resonance:
42 <br/>1) providing the standard particle information, as already
43 outlined above (<code>id:all = ...</code>, 
44 <code>id:addChannel = ...</code>), except that now branching 
45 ratios need not be specified, since they anyway will be overwritten
46 by the dynamically calculated values.
47 <br/>2) writing the class that calculates the partial widths.
48 <br/>3) handing in a pointer to an instance of this class to PYTHIA.
49 <br/>We consider the latter two aspects in turn. 
50
51 <h3>The ResonanceWidths Class</h3> 
52
53 The resonance-width calculation has to be encoded in a new class.
54 The relevant code could either be put before the main program in the
55 same file, or be stored separately, e.g. in a matched pair
56 of <code>.h</code> and <code>.cc</code> files. The latter may be more
57 convenient, in particular if the calculations are lengthy, or 
58 likely to be used in many different runs, but of course requires 
59 that these additional files are correctly compiled and linked.
60
61 <p/>
62 The class has to be derived  from the <code>ResonanceWidths</code> 
63 base class. It can implement a number of methods. The constructor 
64 and the <code>calcWidth</code> ones are always needed, while others 
65 are for convenience. Much of the administrativ machinery is handled
66 by methods in the base class.
67
68 <p/>Thus, in particular, you must implement expressions for all 
69 possible final states, whether switched on in the current run or not, 
70 since all contribute to the total width needed in the denominator of 
71 the Breit-Wigner expression. Then the methods in the base class take 
72 care of selecting only allowed channels where that is required, and 
73 also of including effects of closed channels in secondary decays. 
74 These methods can be accessed indirectly via the 
75 <code><a href="ResonanceDecays.html" target="page">res...</a></code>
76 methods of the normal 
77 <code><a href="ParticleDataScheme.html" target="page">particle database</a></code>. 
78
79 <p/>
80 A <b>constructor</b> for the derived class obviously must be available.
81 Here you are quite free to allow a list of arguments, to set
82 the parameters of your model. The constructor must call the
83 base-class <code>initBasic(idResIn)</code> method, where the argument
84 <code>idResIn</code> is the PDG-style identity code you have chosen
85 for the new resonance. When you create several related resonances 
86 as instances of the same class you would naturally make 
87 <code>idResIn</code> an argument of the constructor; for the 
88 PYTHIA classes this convention is used also in cases when it is
89 not needed.
90 <br/>The <code>initBasic(...)</code> method will
91 hook up the <code>ResonanceWidths</code> object with the corresponding
92 entry in the generic particle database, i.e. with the normal particle
93 information you set up in point 1) above. It will store, in base-class
94 member variables, a number of quantities that you later may find useful:
95 <br/><code>idRes</code> : the identity code you provide;
96 <br/><code>hasAntiRes</code> : whether there is an antiparticle;
97 <br/><code>mRes</code> : resonance mass;
98 <br/><code>GammaRes</code> resonance width;
99 <br/><code>m2Res</code> : the squared mass;
100 <br/><code>GamMRat</code> : the ratio of width to mass.
101
102 <p/>
103 A <b>destructor</b> is only needed if you plan to delete the resonance
104 before the natural end of the run, and require some special behaviour 
105 at that point. If you call such a destructor you will leave a pointer 
106 dangling inside the <code>Pythia</code> object you gave it in to,
107 if that still exists. 
108
109 <a name="method1"></a>
110 <p/><strong>void ResonanceWidths::initConstants() &nbsp;</strong> <br/>
111 is called once during initialization, and can then be used to set up
112 further parameters specific to this particle species, such as couplings, 
113 and perform calculations that need not be repeated for each new event, 
114 thereby saving time. This method needs not be implemented.
115   
116
117 <a name="method2"></a>
118 <p/><strong>void ResonanceWidths::calcPreFac(bool calledFromInit = false) &nbsp;</strong> <br/>
119 is called once a mass has been chosen for the resonance, but before
120 a specific final state is considered. This routine can therefore 
121 be used to perform calculations that otherwise might have to be repeated 
122 over and over again in <code>calcWidth</code> below. It is optional 
123 whether you want to use this method, however, or put 
124 everything in <code>calcWidth()</code>. 
125 <br/>The optional argument will have the value <code>true</code> when 
126 the resonance is initialized, and then be <code>false</code> throughout 
127 the event generation, should you wish to make a distinction. 
128 In PYTHIA such a distinction is made for <i>gamma^*/Z^0</i> and  
129 <i>gamma^*/Z^0/Z'^0</i>, owing to the necessity of a special 
130 description of interference effects, but not for other resonances. 
131 <br/>In addition to the base-class member variables already described 
132 above, <code>mHat</code> contains the current mass of the resonance.
133 At initialization this agrees with the nominal mass <code>mRes</code>,
134 but during the run it will not (in general). 
135   
136
137 <a name="method3"></a>
138 <p/><strong>void ResonanceWidths::calcWidth(bool calledFromInit = false) &nbsp;</strong> <br/>
139 is the key method for width calculations and returns a partial width
140 value, as further described below. It is called for a specific 
141 final state, typically in a loop over all allowed final states,
142 subsequent to the <code>calcPreFac(...)</code> call above.
143 Information on the final state is stored in a number of base-class 
144 variables, for you to use in your calculations:
145 <br/><code>iChannel</code> : the channel number in the list of 
146 possible decay channels;
147 <br/><code>mult</code> : the number of decay products;
148 <br/><code>id1, id2, id3</code> : the identity code of up to the first 
149 three decay products, arranged in descending order of the absolute value 
150 of the identity code;
151 <br/><code>id1Abs, id2Abs, id3Abs</code> : the absolute value of the
152 above three identity codes;
153 <br/><code>mHat</code> : the current resonance mass, which is the same 
154 as in the latest <code>calcPreFac(...)</code> call;
155 <br/><code>mf1, mf2, mf3</code> : masses of the above decay products;
156 <br/><code>mr1, mr2, mr3</code> : squared ratio of the product masses
157 to the resonance mass; 
158 <br/><code>ps</code> : is only meaningful for two-body decays, where it
159 gives the phase-space factor
160 <i>ps = sqrt( (1. - mr1 - mr2)^2 - 4. * mr1 * mr2 )</i>;
161 <br/>In two-body decays the third slot is zero for the above properties. 
162 Should there be more than three particles in the decay, you would have 
163 to take care of the subsequent products yourself, e.g. using 
164 <br/><code>particlePtr->decay[iChannel].product(j);</code>
165 <br/>to extract the <code>j</code>'th decay products (with 
166 <code>j = 0</code> for the first, etc.). Currently we are not aware 
167 of any such examples.
168 <br/>The base class also contains methods for <i>alpha_em</i> and
169 <i>alpha_strong</i> evaluation, and can access many standard-model
170 couplings; see the existing code for examples. 
171 <br/>The result of your calculation should be stored in 
172 <br/><code>widNow</code> : the partial width of the current channel,
173 expressed in GeV. 
174   
175
176 <a name="method4"></a>
177 <p/><strong>double ResonanceWidths::widthChan( double mHat, int idAbs1, int idAbs2) &nbsp;</strong> <br/>
178 is not normally used. In PYTHIA the only exception is Higgs decays,
179 where it is used to define the width (except for colour factors) 
180 associated with a specific incoming/outgoing state. It allows the 
181 results of some loop expressions to be pretabulated. 
182   
183
184 <h3>Access to resonance widths</h3> 
185
186 Once you have implemented a class, it is straightforward to 
187 make use of it in a run. Assume you have written a new class 
188 <code>MyResonance</code>, which inherits from 
189 <code>ResonanceWidths</code>. You then create an instance of 
190 this class and hand it in to a <code>pythia</code> object with 
191 <pre>
192       ResonanceWidths* myResonance = new MyResonance();
193       pythia.setResonancePtr( myResonance); 
194 </pre>
195 If you have several resonances you can repeat the procedure any number
196 of times. When <code>pythia.init(...)</code> is called these resonances 
197 are initialized along with all the internal resonances, and treated in 
198 exactly the same manner. See also the <a href="ProgramFlow.html" target="page">Program 
199 Flow</a> 
200 description.
201
202 <p/>
203 If the code should be of good quality and general usefulness, 
204 it would be simple to include it as a permanently available process 
205 in the standard program distribution. The final step of that integration 
206 ought to be left for the PYTHIA authors, but basically all that is 
207 needed is to add one line in 
208 <code>ParticleData::initResonances</code>, where one creates an 
209 instance of the resonance in the same way as for the resonances already 
210 there. In addition, the particle data and decay table for the new
211 resonance has to be added to the permanent
212 <a href="ParticleData.html" target="page">particle database</a>, and the code itself 
213 to <code>include/ResonanceWidths.h</code> and 
214 <code>src/ResonanceWidths.cc</code>.
215
216 </body>
217 </html>
218
219 <!-- Copyright (C) 2010 Torbjorn Sjostrand -->