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 :
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)Generating STDHEP output files
[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")
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.Miscellaneous
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.