MC@NLO v2.2

These notes are to help you run MC@NLO, generating an STDHEP file that can be converted to HEPG using a standard tool (such as Sebastian's converter).

Installing and running MC@NLO

The instructions already provided by the MC@NLO authors (see link above) are already very good. A few observations :

Example for generating 10,000 ppbar->WW events :

It is possible to execute all the necessary steps in a single run of MC@NLO. However in this example the process is separated into "NLO" and "parton showering" steps, which makes it easier to re-run the parton showering step without redoing the NLO integrations. This requires various intermediate files to be stored in a "data" directory, as specified in the run scripts below.

[mcv22] > rm -rf Linux                               (remove object files from previous compilations)
[mcv22] > ./MCatNLO_wwnlo.input        (this does the "NLO" part only. The file "data/ww10k.events" is generated. This file can be used multiple times for the parton showering phase. You can also skip lengthy integration steps in further "NLO" runs by saving certain other data files and setting BASES=OFF as described in the MC@NLO documentation)
[mcv22] > rm -rf Linux
[mcv22] > ./MCatNLO_wwps.input         (this generates the full hadron level events. If generating STDHEP files as described below, the output file is "Linux/mcatnlo.stdhep")
Generating STDHEP output files
  1. Add the following file to the MC@NLO source code area : mcatnlo_to_stdhep.f
  2. Specify mcatnlo_to_stdhep.o in the list of user analysis object files : see variable HWUTI in the above scripts.
  3. Link against stdhep libraries by adding the STDHEP variable to the makefile as in this example. Note that in this example I pick up the libraries from the relevant ups installed product. This is the easiest way if you have access to a machine with the CDF software installed.
  4. Re-run the second of the above steps (the full event generation). The STDHEP output file has a standard name and location relative to the MC@NLO installation directory : "Linux/mcatnlo.stdhep". Make sure you copy this file to a safe place before re-running.
Interpreting the output

The HEPG bank structure does not include an entry for an event weight (although the STDHEP common block HEPEV4 does provide such a variable, which is correctly filled in the code provided here). However MC@NLO generates a mixture of positive and negative weighted events, in common with most other NLO programs. The positive and negative weights are equal in magnitude (the relationship between the magnitude and the total cross section can be selected by the user as described in the MC@NLO documentation although this is unimportant here). Hence only the sign needs to be encoded in the output. This is done by adding 0.1 GeV to the energy of the first particle in the event record for negative weight events. Since the first two entries represent the incoming proton and anti-proton, all analysis code must contain logic something like this :
 

 double energy1 = fGenpBlock->Particle(0)->Energy();    // This code depends on your analysis environment.
 double energy2 = fGenpBlock->Particle(1)->Energy();    // This works in Stntuple.

 if ((energy1-energy2) >= 0.01) {
   weight = -1.0;
   cout << "negative weight event" << endl;                        // Of order 10% of events will have a negative weight.
 }
 else {
   weight = 1.0;
 }

  my_histo->Fill(my_quantity,weight)                                // Fill histograms with the appropriate weights.
 

Miscellaneous



Dave Waters, 8th October 2003