source: HiSusy/trunk/Pythia8/pythia8170/phpdoc/AlpgenAndMLM.php @ 1

Last change on this file since 1 was 1, checked in by zerwas, 11 years ago

first import of structure, PYTHIA8 and DELPHES

File size: 32.0 KB
Line 
1
2<html>
3<head>
4<title>ALPGEN and MLM merging</title>
5<link rel="stylesheet" type="text/css" href="pythia.css"/>
6<link rel="shortcut icon" href="pythia32.gif"/>
7</head>
8<body>
9
10<script language=javascript type=text/javascript>
11function stopRKey(evt) {
12var evt = (evt) ? evt : ((event) ? event : null);
13var node = (evt.target) ? evt.target :((evt.srcElement) ? evt.srcElement : null);
14if ((evt.keyCode == 13) && (node.type=="text"))
15{return false;}
16}
17
18document.onkeypress = stopRKey;
19</script>
20<?php
21if($_POST['saved'] == 1) {
22if($_POST['filepath'] != "files/") {
23echo "<font color='red'>SETTINGS SAVED TO FILE</font><br/><br/>"; }
24else {
25echo "<font color='red'>NO FILE SELECTED YET.. PLEASE DO SO </font><a href='SaveSettings.php'>HERE</a><br/><br/>"; }
26}
27?>
28
29<form method='post' action='AlpgenAndMLM.php'>
30
31<h2>ALPGEN and MLM merging</h2>
32
33This manual page describes the ALPGEN [<a href="Bibliography.php" target="page">Man03</a>] and MLM merging
34[<a href="Bibliography.php" target="page">Man02</a>] interfaces for PYTHIA 8. While future versions of
35ALPGEN will be able to write out events in LHEF format, previous
36versions always output events in an ALPGEN native format (a combination
37of a ".unw" and a "_unw.par" file). The ALPGEN component of this code
38contains a reader for this native format (for unweighted events), as
39well as parameter reading for both ALPGEN native and LHE file formats.
40Although designed to work together with the MLM component, they are
41implemented entirely separately and it is possible to use one without
42the other.
43
44<p/>
45It should be noted that all the functionality described here is provided
46through external routines, and therefore the presence of these features is
47dependent on the main program being used. This structure allows for the
48easy extensibility of the merging scheme. The files of interest are located
49in the <code>examples/</code> subdirectory:
50<ul>
51<li>
52<code>MLMhooks.h</code> : provides a
53<?php $filepath = $_GET["filepath"];
54echo "<a href='UserHooks.php?filepath=".$filepath."' target='page'>";?><code>UserHooks</code></a> derived
55class for performing the MLM merging procedure. All <code>MLM:*</code>
56options, described below, are implemented in this file. Further
57technical details of this class are given at the end of this manual
58page.
59</li>
60<li>
61<code>LHAupAlpgen.h</code> : provides three classes for the reading of
62ALPGEN event and parameter files. <code>LHAupAlpgen</code> is an
63<?php $filepath = $_GET["filepath"];
64echo "<a href='LesHouchesAccord.php?filepath=".$filepath."' target='page'>";?><code>LHAup</code></a> derived
65class for reading in ALPGEN native format event files.
66<code>AlpgenPar</code> is a class for the parsing of ALPGEN parameter
67files, making the information available through a simple interface.
68<code>AlpgenHooks</code> is a
69<?php $filepath = $_GET["filepath"];
70echo "<a href='UserHooks.php?filepath=".$filepath."' target='page'>";?><code>UserHooks</code></a> derived class that
71provides the <code>Alpgen:*</code> options, described below. Further
72technical details of these classes are given at the end of this manual
73page.
74</li>
75<li>
76<code>main32.cc, main32.cmnd</code> : a sample main program and card
77file showing the usage of the previous two files. It combines the Alpgen
78and MLM UserHooks classes together, such that the functionality of both
79is available, and reads in a sample ALPGEN event file while performing
80the MLM merging procedure. Some commented out sets of options are
81provided in the card file, which can be activated to try different
82merging setups.
83</li>
84<li>
85<code>main32.unw, main32_unw.par</code> : an ALPGEN format event and
86parameter file containing 100 W + 3 jet events. It is not feasible
87to package large event files with the PYTHIA distribution, but this
88sample is enough to show the different components in action.
89</li>
90</ul>
91
92<h2>ALPGEN</h2>
93
94<b>NB: these options are provided by the AlpgenHooks class,
95which must be loaded for this functionality to be present</b>
96
97<p/>
98ALPGEN event files that have been written out in LHEF format should be
99read in through the normal LHEF machinery
100(see <?php $filepath = $_GET["filepath"];
101echo "<a href='BeamParameters.php?filepath=".$filepath."' target='page'>";?>beam parameters</a>). Files in
102ALPGEN's native format, instead, may be processed using the
103<code>Alpgen:file</code> option below. When using this option, the
104ALPGEN parameter file is stored in the PYTHIA Info object under the key
105<code>AlpgenPar</code>, see the "Header information" section of the
106<?php $filepath = $_GET["filepath"];
107echo "<a href='EventInformation.php?filepath=".$filepath."' target='page'>";?>Event Information</a> manual page for
108more details. Processes not implemented by the PYTHIA 6 interface
109supplied with ALPGEN are also not implemented here.
110
111<p/>
112When reading in ALPGEN native event files, some momenta are shifted by
113the file reader to ensure energy-momentum conservation. The magnitude of
114these shifts should be small (around the MeV level in the worst case)
115and warnings will be produced if they are above a set threshold. A large
116number of warnings may signify unexpected behaviour and should
117potentially be investigated. It is also known that certain event
118classes, for example an event with both light and heavy <i>b</i>
119quarks may give rise to these warnings.
120
121<p/>
122The ALPGEN file reader supports the reading of the event and parameter
123files in gzip format with file extensions ".unw.gz" and "_unw.par.gz"
124respectively. This requires the use of external libraries, however, and
125the <code>README</code> file in the main directory contains instructions
126on how to enable this.
127
128<p/>
129All other <code>Alpgen:*</code> options apply to both LHE and native
130file formats, and include options to guide the MLM merging procedure
131based on the parameters that are read in with the events file.
132
133<br/><br/><table><tr><td><strong>Alpgen:file </td><td></td><td> <input type="text" name="1" value="void" size="20"/>  &nbsp;&nbsp;(<code>default = <strong>void</strong></code>)</td></tr></table>
134This option is used to read in ALPGEN format event files. Using this option
135overrides any previously set beam options inside PYTHIA. The path to the
136files, not including any file extension, should be provided e.g. for input
137files <i>input_unw.par</i> and <i>input.unw</i>, the value
138<i>input</i> should be used.
139 
140
141<br/><br/><strong>Alpgen:setMasses</strong>  <input type="radio" name="2" value="on" checked="checked"><strong>On</strong>
142<input type="radio" name="2" value="off"><strong>Off</strong>
143 &nbsp;&nbsp;(<code>default = <strong>on</strong></code>)<br/>
144When switched on, any particle masses provided by ALPGEN are set in
145the PYTHIA <?php $filepath = $_GET["filepath"];
146echo "<a href='ParticleDataScheme.php?filepath=".$filepath."' target='page'>";?>particle database</a>.
147 
148
149<br/><br/><strong>Alpgen:setMLM</strong>  <input type="radio" name="3" value="on" checked="checked"><strong>On</strong>
150<input type="radio" name="3" value="off"><strong>Off</strong>
151 &nbsp;&nbsp;(<code>default = <strong>on</strong></code>)<br/>
152When switched on, the merging parameters (see below) are set according to
153the ALPGEN hard process cuts:
154<ul>
155<li> <i>MLM:eTjetMin = min(ptjmin + 5., 1.2 * ptjmin), </i> </li>
156<li> <i>MLM:coneRadius = drjmin, </i>
157<li> <i>MLM:etaJetMax = etajmax, </i>
158</ul>
159where the <code>ptjmin</code>, <code>drjmin</code> and
160<code>etajmax</code> are the incoming ALPGEN parameters. Note that any
161existing values of these parameters are overwritten.
162 
163
164<br/><br/><strong>Alpgen:setNjet</strong>  <input type="radio" name="4" value="on" checked="checked"><strong>On</strong>
165<input type="radio" name="4" value="off"><strong>Off</strong>
166 &nbsp;&nbsp;(<code>default = <strong>on</strong></code>)<br/>
167When switched on, the <code>MLM:nJet</code> parameter (see below) is set
168to the incoming <code>njet</code> ALPGEN parameter. Note that any
169existing value of this parameter is overwritten.
170 
171
172
173<h2>MLM Merging</h2>
174
175<b>NB: these options are provided by the MLMhooks class,
176which must be loaded for this functionality to be present</b>
177
178<p/>
179This section describes the MLM merging interface for PYTHIA 8. The most
180common reference to the algorithm is [<a href="Bibliography.php" target="page">Man02</a>]. In many respects,
181however, the implementation provided in the ALPGEN package should be
182considered the official description of the MLM merging procedure.
183Although designed primarily to work with events generated with ALPGEN, it
184can in principle also be used with events from a different source. This
185should not be done without thought, however, and it is up to the user to
186understand the details of the algorithm and the implications of using a
187different hard process generator.
188
189<p/>
190A brief description of the MLM procedure, as implemented, is given here.
191First, either the CellJet or SlowJet jet algorithm is chosen, see the
192<?php $filepath = $_GET["filepath"];
193echo "<a href='EventAnalysis.php?filepath=".$filepath."' target='page'>";?>Event Analysis</a> page for more details.
194Both of these algorithms have an <i>R</i> and <i>etaMax</i>
195parameter. In addition, CellJet has an <i>eTmin</i> and SlowJet has a
196<i>pTmin</i> parameter. These are the primary three parameters of the
197merging procedure, and in practice are set dependent on the cuts applied
198to the matrix element (ME) generation. We stress that the merging
199procedure is not tied to the geometry of a specific physical detector,
200but only to the match between the original partons and the resulting
201jets, using standard jet algorithms in the phase space region where
202partons have been generated.
203
204<p/>
205ME samples with different jet multiplicities are run through the event
206generator, and the generation interrupted after parton showers have been
207applied, but before resonance decays and beam remnants have been
208processed. Note in particular that top quarks will not yet
209be decayed, which may lead to slight differences with the PYTHIA 6
210interface included with the ALPGEN package. In what follows, the
211hardness measure of jets/partons is taken to be <i>eT</i> when CellJet
212is used and <i>pT</i> when SlowJet is used. The hard system (ignoring
213all MPI systems) is then analysed:
214<ul>
215  <li>
216    The particles in the original matrix element process are sorted into
217    light partons, heavy partons and other particles. For backwards
218    compatibility, a light parton is defined as the set <i>(d, u, s, c,
219    b, g)</i> with zero mass. A heavy parton is defined as the set
220    <i>(c, b, t)</i> with non-zero mass.
221  </li>
222  <li>
223    All particles not originating from the heavy partons or other
224    particles are passed to the jet algorithm and clustered.
225  </li>
226  <li>
227    Clustered jets are matched to the light partons in the original ME
228    process. There are two different methods which can be used:
229    <ul>
230      <li>
231        Method 1: The following is done for each parton, in order
232        of decreasing hardness. The <i>delta R</i> between the parton
233        and all jets is calculated and the smallest value taken. If
234        this is less than the jet <i>R</i> parameter, possibly
235        multiplied by a constant, the jet and parton are considered to
236        match, and the jet is removed from further consideration.
237        Note that for CellJet the <i>delta R</i> measure is in
238        <i>(eta, phi)</i>, while for SlowJet, it is in
239        <i>(y, phi)</i>.
240      </li>
241      <li>
242        Method 2: This method is only possible when using the SlowJet
243        algorithm. Before the clustering is performed, extremely soft
244        "ghost" particles are added to the event at the
245        <i>(y, phi)</i> coordinates of the original matrix element
246        partons. If such a particle is clustered into a jet, the parton
247        and jet are considered to match. The idea of "ghost" particles
248        was originally introduced by FastJet as a way to measure jet
249        areas [<a href="Bibliography.php" target="page">Cac06</a>] and should not affect clustering with an
250        infrared-safe jet algorithm.
251      </li>
252    </ul>
253  <li>
254    If there is a light ME parton remaining which has not been matched
255    to a jet, then the event is vetoed. If all ME partons have been
256    matched to a jet, but there are still some extra jets remaining,
257    then two options are possible:
258    <ul>
259      <li>
260        Exclusive mode: the event is vetoed. This is typically used when
261        there are ME samples with higher jet multiplicities, which would
262        fill in the extra jets.
263      </li>
264      <li>
265        Inclusive mode: the event is retained if the extra jets are softer
266        than the softest matched jet. This is typically used when
267        there is no ME sample with higher jet multiplicity, so the parton
268        shower should be allowed to give extra jets.
269    </ul>
270  </li>
271  <li>
272    All particles originating from the heavy partons are passed to the
273    jet algorithm and clustered.
274  </li>
275  <li>
276    The clustered jets are again matched to the original partons, but
277    there is no requirement for a match to be present; all matched jets
278    are immediately discarded. The matching procedure is much the same
279    as for light partons, but with two differences when <i>delta R</i>
280    matching is used. First, a different <i>R</i> parameter than that
281    used by the jet algorithm may optionally be given. Second, all jets
282    that are within the given radius of the parton are matched, not
283    just the one with the smallest <i>delta R</i> measure. If there
284    are still extra jets remaining then in exclusive mode the event is
285    immediately vetoed, while in inclusive mode the event is retained if
286    the extra jets are softer than the softest <em>light</em> matched jet.
287  </li>
288</ul>
289
290<p/>
291Some different options are provided, specified further below. These
292are set so that, by default, the algorithm closely follows the official
293MLM interface provided in the ALPGEN package. All vetoing of events
294is done through the usual
295<?php $filepath = $_GET["filepath"];
296echo "<a href='UserHooks.php?filepath=".$filepath."' target='page'>";?><code>UserHooks</code></a> machinery, and is
297therefore already taken into account in the cross section.
298In the output from
299<code><?php $filepath = $_GET["filepath"];
300echo "<a href='EventStatistics.php?filepath=".$filepath."' target='page'>";?>Pythia::statistics()</a></code>,
301the difference between the "Selected" and "Accepted" columns gives the
302number of events that have not survived the vetoing procedure. It is
303still the responsibility of the user to add together the results from
304runs with different jet multiplicities. In the simplest case, when
305ALPGEN input is used and the hard process parameters are used to guide
306the merging procedure, it is enough to set the <code>MLM:nJetMax</code>
307parameter (see below).
308
309
310<h3>Merging</h3>
311
312<br/><br/><strong>MLM:merge</strong>  <input type="radio" name="5" value="on"><strong>On</strong>
313<input type="radio" name="5" value="off" checked="checked"><strong>Off</strong>
314 &nbsp;&nbsp;(<code>default = <strong>off</strong></code>)<br/>
315Master switch to activate MLM merging.
316 
317
318
319<h3>Exclusive mode</h3>
320
321The following settings determine whether clustered jets which do not
322match an original hard parton are allowed. They are typically permitted
323in the highest jet multiplicity sample, where the parton shower may
324produce extra hard jets, without risk of double counting. Any
325extra jet produced by the shower must be softer than any matched light
326jet, or else the event is vetoed.
327
328<br/><br/><table><tr><td><strong>MLM:exclusive </td><td>  &nbsp;&nbsp;(<code>default = <strong>2</strong></code>; <code>minimum = 0</code>; <code>maximum = 2</code>)</td></tr></table>
329Exclusive or inclusive merging.
330<br/>
331<input type="radio" name="6" value="0"><strong>0 </strong>:  The merging is run in inclusive mode. <br/>
332<input type="radio" name="6" value="1"><strong>1 </strong>:  The merging is run in exclusive mode. <br/>
333<input type="radio" name="6" value="2" checked="checked"><strong>2 </strong>: If <ei>MLM:nJet &lt; MLM:nJetMax</ei>, then the merging is run in exclusive mode, otherwise it is run in inclusive mode. If <ei>MLM:nJetMax &lt; 0</ei> or <ei>MLM:nJet &lt; 0</ei>, then the algorithm defaults to exclusive mode. <br/>
334
335<modepick name="MLM:nJet" default="-1" min="-1">
336The number of additional light jets in the incoming process.
337This is used when <ei>MLM:exclusive = 2</ei>.
338Note that for ALPGEN input, this value may be automatically set.
339
340<br/><br/><table><tr><td><strong>MLM:nJetMax </td><td>  &nbsp;&nbsp;(<code>default = <strong>-1</strong></code>; <code>minimum = -1</code>)</td></tr></table>
341This parameter is used to indicate the maximum number of jets that will be
342matched. This is used when <ei>MLM:exclusive = 2</ei>.
343</modepick>
344
345
346<h3>Jet algorithm</h3>
347
348The choice of jet algorithm and associated parameters can be adjusted with
349the settings below. The PYTHIA 8 internal <code>CellJet</code> and
350<code>SlowJet</code> routines are used, see the
351<aloc href="EventAnalysis">Event Analysis</aloc> page for more details.
352
353<modepick name="MLM:jetAlgorithm" default="1" min="1" max="2">
354The choice of jet algorithm to use when merging against hard partons.
355<br/>
356<input type="radio" name="7" value="1"><strong>1 </strong>: The CellJet algorithm.<br/>
357<input type="radio" name="7" value="2"><strong>2 </strong>: The SlowJet algorithm.<br/>
358
359<br/><br/><table><tr><td><strong>MLM:nEta </td><td>  &nbsp;&nbsp;(<code>default = <strong>100</strong></code>; <code>minimum = 50</code>)</td></tr></table>
360Specific to the CellJet algorithm, the number of bins in pseudorapidity.
361</modepick>
362
363<modepick name="MLM:nPhi" default="60" min="30">
364Specific to the CellJet algorithm, the number of bins in phi.
365</modepick>
366
367<parm name="MLM:eTseed" default="1.5" min="0.0">
368Specific to the CellJet algorithm, the minimum <ei>eT</ei> for a cell
369to be acceptable as the trial center of a jet.
370</parm>
371
372<parm name="MLM:eTthreshold" default="0.1">
373Specific to the CellJet algorithm, cells with <ei>eT &lt; eTthreshold</ei>
374are completely neglected by the jet algorithm.
375</parm>
376
377<modepick name="MLM:slowJetPower" default="-1" min="-1" max="1">
378The power to use in the SlowJet algorithm.
379<br/>
380<input type="radio" name="8" value="-1"><strong>-1 </strong>: The anti-kT algorithm.<br/>
381<input type="radio" name="8" value="0"><strong>0 </strong>: The Cambridge/Aachen algorithm.<br/>
382<input type="radio" name="8" value="1"><strong>1 </strong>: The kT algorithm.<br/>
383
384
385<h3>Merging parameters</h3>
386
387The following options are the three main parameters for the merging
388procedure. Although here they are in principle free parameters, they should
389be heavily influenced by the hard process generation cuts. For ALPGEN
390input, these values may be set automatically.
391
392<br/><br/><table><tr><td><strong>MLM:eTjetMin </td><td></td><td> <input type="text" name="9" value="20.0" size="20"/>  &nbsp;&nbsp;(<code>default = <strong>20.0</strong></code>; <code>minimum = 5.0</code>)</td></tr></table>
393For the CellJet algorithm, this gives the minimum transverse energy
394inside a cone for a jet to be accepted. For the SlowJet algorithm, this
395is instead the minimum transverse momentum required for a cluster to be
396accepted as a jet.
397 
398
399<br/><br/><table><tr><td><strong>MLM:coneRadius </td><td></td><td> <input type="text" name="10" value="0.7" size="20"/>  &nbsp;&nbsp;(<code>default = <strong>0.7</strong></code>; <code>minimum = 0.1</code>)</td></tr></table>
400For the CellJet algorithm, this gives the size of the cone in (eta, phi)
401space drawn around the geometric center of the jet. For the SlowJet
402algorithm, this gives the <i>R</i> parameter.
403 
404
405<br/><br/><table><tr><td><strong>MLM:etaJetMax </td><td></td><td> <input type="text" name="11" value="2.5" size="20"/>  &nbsp;&nbsp;(<code>default = <strong>2.5</strong></code>; <code>minimum = 0.1</code>)</td></tr></table>
406For both jet algorithms, this defines the maximum pseudorapidity that
407the detector is assumed to cover. In this context, however, it is tied
408to the phase space region in which partons have been generated.
409Specifically, particles within <i>etaJetMax + coneRadius</i> are
410passed to the jet algorithm, with only jets within <i>etaJetMax</i>
411retained in the merging.
412 
413
414
415<h3>Jet matching</h3>
416
417The following parameters control the criteria for matching a clustered jet
418to a hard parton.
419
420<br/><br/><table><tr><td><strong>MLM:jetAllow </td><td>  &nbsp;&nbsp;(<code>default = <strong>1</strong></code>; <code>minimum = 1</code>; <code>maximum = 2</code>)</td></tr></table>
421Controls which particles are clustered by the jet algorithm.
422<br/>
423<input type="radio" name="12" value="1" checked="checked"><strong>1 </strong>:  This option explicitly disallows top quarks, leptons and photons. All other particle types are passed to the jet algorithm. <br/>
424<input type="radio" name="12" value="2"><strong>2 </strong>:  No extra particles are disallowed. <br/>
425
426<br/><br/><table><tr><td><strong>MLM:jetMatch </td><td>  &nbsp;&nbsp;(<code>default = <strong>1</strong></code>; <code>minimum = 1</code>; <code>maximum = 2</code>)</td></tr></table>
427Criteria for matching a clustered jet to a parton.
428<br/>
429<input type="radio" name="13" value="1" checked="checked"><strong>1 </strong>: This option can be used with both the CellJet and SlowJet algorithms. The <ei>delta R</ei> between each parton and jet is taken, and the minimal value compared against <ei>MLM:coneMatchLight * MLM:coneRadius</ei> for light jets or <ei>MLM:coneMatchHeavy * MLM:coneRadiusHeavy</ei> for heavy jets. Note that by default <ei>MLM:coneRadiusHeavy = MLM:coneRadius</ei>, see below. If below this value, the parton and jet are considered to match. With CellJet, the <ei>delta R</ei> measure is in <ei>(eta, phi)</ei>, while with SlowJet it is in <ei>(y, phi)</ei>. <br/>
430<input type="radio" name="13" value="2"><strong>2 </strong>: This option can only be used with the SlowJet algorithm. The hard partons are inserted into the parton level event as "ghost" particles, but at the correct <ei>(y, phi)</ei> position. If this particle is then clustered into a jet, it is considered a match. <br/>
431
432<br/><br/><table><tr><td><strong>MLM:coneMatchLight </td><td></td><td> <input type="text" name="14" value="1.5" size="20"/>  &nbsp;&nbsp;(<code>default = <strong>1.5</strong></code>; <code>minimum = 0.1</code>)</td></tr></table>
433The <code>coneMatchLight</code> parameter used when
434<i>MLM:jetMatch = 1</i>.
435 
436
437<br/><br/><table><tr><td><strong>MLM:coneRadiusHeavy </td><td></td><td> <input type="text" name="15" value="-1.0" size="20"/>  &nbsp;&nbsp;(<code>default = <strong>-1.0</strong></code>)</td></tr></table>
438The <code>coneRadiusHeavy</code> parameter used when
439<i>MLM:jetMatch = 1</i>. When assigned a negative value,
440the value of <code>MLM:coneRadius</code> is used.
441 
442
443<br/><br/><table><tr><td><strong>MLM:coneMatchHeavy </td><td></td><td> <input type="text" name="16" value="1.0" size="20"/>  &nbsp;&nbsp;(<code>default = <strong>1.0</strong></code>; <code>minimum = 0.1</code>)</td></tr></table>
444The <code>coneMatchHeavy</code> parameter used when
445<i>MLM:jetMatch = 1</i>.
446 
447
448
449<h2>Class information</h2>
450
451Some more technical information about the different classes is given
452below. For clarity, some limited information on certain private methods
453is provided.
454
455<h3>LHAupAlpgen</h3>
456
457This class is derived from the
458<?php $filepath = $_GET["filepath"];
459echo "<a href='LesHouchesAccord.php?filepath=".$filepath."' target='page'>";?><code>LHAup</code></a> base class, and
460uses the standard machinery to pass initialisation and event data to
461PYTHIA. These standard functions are not documented here. The complete
462parameter file is stored in the PYTHIA Info object, if given, under the
463key <code>AlpgenPar</code>.
464
465<a name="method1"></a>
466<p/><strong>LHAupAlpgen::LHAupAlpgen(const char *baseFNin, Info *infoPtrIn = NULL) &nbsp;</strong> <br/>
467The constructor for the class takes the base filename for the ALPGEN
468format files (without file extensions) and optionally a pointer to a
469PYTHIA Info class, used for warning/error message printing and for
470storing the ALPGEN parameter file. The event and
471parameter files are opened immediately, with the <code>AlpgenPar</code>
472class, described below, used to parse the parameter file.
473 
474
475<a name="method2"></a>
476<p/><strong>bool LHAupAlpgen::addResonances() &nbsp;</strong> <br/>
477This is a private method used when an event is read in. The information
478read from the event file does not always contain a complete listing of
479all particles and four-momenta, and so various details must be
480reconstructed. Exactly which details are filled in can vary based on the
481ALPGEN process in question.
482 
483
484<a name="method3"></a>
485<p/><strong>bool LHAupAlpgen::rescaleMomenta() &nbsp;</strong> <br/>
486This is another private method used when an event is read in.
487It shuffles and rescales momenta in an event to ensure energy-momentum
488conservation.  First, <i>pT</i> is made to balance by splitting any
489imbalance between all outgoing particles with their energies also
490scaled. Second, the <i>e/pZ</i> of the two incoming particles are
491scaled to balance the outgoing particles. Finally, any intermediate
492resonances are recalculated from their decay products.
493 
494
495<h3>AlpgenPar</h3>
496
497This class parses an ALPGEN parameter file and makes the information
498available through a simple interface. The information is stored
499internally in key/value (string/double) format. All lines prior to:
500<pre>  ************** run parameters </pre>
501are ignored, and in the general case, a line e.g.
502<pre>  10   3.00000000000000        ! njets</pre>
503would be stored with key "njets" and value "3.0". The following lines
504are special cases where the line may be split or the key translated:
505<pre>
506  3 ! hard process code
507  0.000   4.700 174.300  80.419  91.188 120.000 ! mc,mb,mt,mw,mz,mh
508  912.905 0.0914176   ! Crosssection +- error (pb)
509  100 29787.4  ! unwtd events, lum (pb-1) Njob= 2
510</pre>
511In the first line, the key "hard process code" is translated to
512"hpc". In the second, the mass values are split and each given an entry
513in the internal store. In the third, the cross section and cross section
514error are stored under the keys "xsecup" and "xerrup" respectively.
515Finally, the number of events and luminosity are stored under the keys
516"nevent" and "lum" respectively. In the event that a duplicate key is
517present, with differing values, the stored value is overwritten and a
518warning given.
519
520<a name="method4"></a>
521<p/><strong>AlpgenPar::AlpgenPar(Info *infoPtrIn = NULL) &nbsp;</strong> <br/>
522The constructor does nothing except for store the PYTHIA Info
523pointer, if given. This is used for warning/error message printing.
524 
525
526<a name="method5"></a>
527<p/><strong>bool AlpgenPar::parse(const string paramStr) &nbsp;</strong> <br/>
528This method parses an ALPGEN parameter file. The parameter file is
529passed as a single string, mainly intended to be read out from the
530PYTHIA Info object using the header information methods.
531 
532
533<a name="method6"></a>
534<p/><strong>bool AlpgenPar::haveParam(const string &amp;paramIn) &nbsp;</strong> <br/>
535Method to check if a parameter with key <code>paramIn</code> is present.
536Returns true if present, else false.
537 
538
539<a name="method7"></a>
540<p/><strong>double AlpgenPar::getParam(const string &amp;paramIn) &nbsp;</strong> <br/>
541 
542<strong>int AlpgenPar::getParamAsInt(const string &amp;paramIn) &nbsp;</strong> <br/>
543Return the parameter with key <code>paramIn</code> as a double or
544integer. The presence of a parameter should have already been checked
545using the <code>haveParam()</code> function above. If the parameter is
546not present, 0 is returned.
547 
548
549<a name="method8"></a>
550<p/><strong>void AlpgenPar::void printParams() &nbsp;</strong> <br/>
551Method to print a list of stored parameters.
552 
553
554<h3>AlpgenHooks</h3>
555
556This <?php $filepath = $_GET["filepath"];
557echo "<a href='UserHooks.php?filepath=".$filepath."' target='page'>";?><code>UserHooks</code></a> derived class
558provides all the <code>Alpgen:*</code> options. It is provided as a
559UserHooks class such that the code works regardless of whether ALPGEN
560native or LHE file formats are used. It is declared with virtual
561inheritance so that it may be combine with other UserHooks classes, see
562the "Combining UserHooks" section below.
563
564<a name="method9"></a>
565<p/><strong>AlpgenHooks(Pythia &amp;pythia) &nbsp;</strong> <br/>
566The constructor takes a PYTHIA object as input, so that the beam
567parameter settings can be overridden if the <code>Alpgen:file</code>
568option is given. If this is the case, an <code>LHAupAlpgen</code>
569instance is automatically created and passed to PYTHIA.
570 
571
572<a name="method10"></a>
573<p/><strong>bool initAfterBeams() &nbsp;</strong> <br/>
574This is the only UserHooks method that is overridden. It is called
575directly after PYTHIA has initialised the beams, and therefore the
576header information should be present in the PYTHIA Info object. The
577<code>AlpgenPar</code> class is used to parse ALPGEN parameters, if
578present, which are then used to set further PYTHIA settings.
579 
580 
581<h3>MLMhooks</h3>
582
583This <?php $filepath = $_GET["filepath"];
584echo "<a href='UserHooks.php?filepath=".$filepath."' target='page'>";?><code>UserHooks</code></a> derived class
585provides all the <code>MLM:*</code> options. It is also declared with
586virtual inheritance for combining with other UserHooks classes. It
587uses standard UserHooks methods to perform the merging procedure
588outlined previously in this manual page, and therefore detailed method
589information is not given.
590
591<h3>Combining UserHooks</h3>
592
593It is possible to combine multiple UserHooks classes together, such that
594the functionality of both is present. A prerequisite is that the
595different UserHooks classes should be declared with virtual inheritance,
596e.g.
597<pre>
598  class MLMhooks : virtual public UserHooks
599</pre>
600Without this option, when combining two UserHooks derived classes
601together, two copies of the base UserHooks class would be created
602leading to ambiguity.
603
604<p/>
605An example combining the AlpgenHooks and MLMhooks classes together is
606given in <code>main32.cc</code>:
607<pre>
608  class AlpgenAndMLMhooks : public AlpgenHooks, public MLMhooks {
609  public:
610    AlpgenAndMLMhooks(Pythia &pythia)
611      : AlpgenHooks(pythia), MLMhooks() {}
612 
613    virtual bool initAfterBeams() {
614      // Call init of both AlpgenHooks and MLMhooks (order important)
615      if (!AlpgenHooks::initAfterBeams()) return false;
616      if (!MLMhooks::initAfterBeams())    return false;
617      return true;
618    }
619  };
620</pre>
621This class inherits from both AlpgenHooks and MLMhooks. Any functions
622which are present in both classes should be overridden with a function
623that calls the different parent methods in the desired order. In the
624above example, the only shared methods are the constructor and
625<code>initAfterBeams()</code>.
626
627<input type="hidden" name="saved" value="1"/>
628
629<?php
630echo "<input type='hidden' name='filepath' value='".$_GET["filepath"]."'/>"?>
631
632<table width="100%"><tr><td align="right"><input type="submit" value="Save Settings" /></td></tr></table>
633</form>
634
635<?php
636
637if($_POST["saved"] == 1)
638{
639$filepath = $_POST["filepath"];
640$handle = fopen($filepath, 'a');
641
642if($_POST["1"] != "void")
643{
644$data = "Alpgen:file = ".$_POST["1"]."\n";
645fwrite($handle,$data);
646}
647if($_POST["2"] != "on")
648{
649$data = "Alpgen:setMasses = ".$_POST["2"]."\n";
650fwrite($handle,$data);
651}
652if($_POST["3"] != "on")
653{
654$data = "Alpgen:setMLM = ".$_POST["3"]."\n";
655fwrite($handle,$data);
656}
657if($_POST["4"] != "on")
658{
659$data = "Alpgen:setNjet = ".$_POST["4"]."\n";
660fwrite($handle,$data);
661}
662if($_POST["5"] != "off")
663{
664$data = "MLM:merge = ".$_POST["5"]."\n";
665fwrite($handle,$data);
666}
667if($_POST["6"] != "2")
668{
669$data = "MLM:exclusive = ".$_POST["6"]."\n";
670fwrite($handle,$data);
671}
672if($_POST["7"] != "-1")
673{
674$data = "MLM:nJetMax = ".$_POST["7"]."\n";
675fwrite($handle,$data);
676}
677if($_POST["8"] != "100")
678{
679$data = "MLM:nEta = ".$_POST["8"]."\n";
680fwrite($handle,$data);
681}
682if($_POST["9"] != "20.0")
683{
684$data = "MLM:eTjetMin = ".$_POST["9"]."\n";
685fwrite($handle,$data);
686}
687if($_POST["10"] != "0.7")
688{
689$data = "MLM:coneRadius = ".$_POST["10"]."\n";
690fwrite($handle,$data);
691}
692if($_POST["11"] != "2.5")
693{
694$data = "MLM:etaJetMax = ".$_POST["11"]."\n";
695fwrite($handle,$data);
696}
697if($_POST["12"] != "1")
698{
699$data = "MLM:jetAllow = ".$_POST["12"]."\n";
700fwrite($handle,$data);
701}
702if($_POST["13"] != "1")
703{
704$data = "MLM:jetMatch = ".$_POST["13"]."\n";
705fwrite($handle,$data);
706}
707if($_POST["14"] != "1.5")
708{
709$data = "MLM:coneMatchLight = ".$_POST["14"]."\n";
710fwrite($handle,$data);
711}
712if($_POST["15"] != "-1.0")
713{
714$data = "MLM:coneRadiusHeavy = ".$_POST["15"]."\n";
715fwrite($handle,$data);
716}
717if($_POST["16"] != "1.0")
718{
719$data = "MLM:coneMatchHeavy = ".$_POST["16"]."\n";
720fwrite($handle,$data);
721}
722fclose($handle);
723}
724
725?>
726</body>
727</html>
728
729<!-- Copyright (C) 2012 Torbjorn Sjostrand -->
Note: See TracBrowser for help on using the repository browser.