aMC@NLO output .hep vs. .lhe

Asked by Christopher W. Murphy

In MadGraph 5.1 when events were hadronized with Pythia, a .hep and a .lhe file were generated automatically. However, in MadGraph 5.2 (aMC@NLO), only a .hep file is generated. There are several things that may fixed this issue.

Is there an option, maybe in a card I can modify, to generate a .lhe file as well?
Is there a script to convert .hep to .lhe?
Is there a tutorial or something else I can use to learn about .hep files?

Thank you in advance

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
Pavel Demin Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi Christopher,

Let me first remind that lhe file produced after Pythia SHOULDN'T be use in a analysis.
The HEP to LHE converter is not a real converter ( the information are NOT equivalent on both files).
In particular, in order to create the LHE, the code launch a basic --outdated-- jet algorithm (I think cone algorithm) and I even heard that the converter contains some hard-coded jet smearing.
The usage of LHE file should be use ONLY in order to have fast validation of the output file (looking if distribution are fine,...)

> Is there a script to convert .hep to .lhe?

yes this is the script pythia-pgs/hep2lhe

> Is there a tutorial or something else I can use to learn about .hep files?

I doubt about it since the hep format is a binary format (not human readable).

Cheers,

Olivier

Revision history for this message
Christopher W. Murphy (v-cmurphy) said :
#2

Hi Olivier,

Thank you for the response. Please excuse my ignorance, but how am I supposed to analyze the .hep file if converting it to .lhe isn't a good idea? I am looking for the aMC@NLO equivalent of MadGraph parton level results, not detector level results. I understand that one has to go to at least the hadron level with aMC@NLO to avoid double counting.

-Chris

Revision history for this message
Johan Alwall (johan-alwall) said :
#3

Hello Chris,

Let me slightly modify parts of Olivier's response.

The pythia_events.lhe file is generated from the pythia_events.hep file by a small Fortran program called hep2lhe.f, in pythia-pgs/src. This should be viewed as exactly what you ask for, namely, an example of how to read and analyze an STDHEP file. The program opens an STDHEP file, reads event by event, converts the event into Pythia format, and then performs some simple analysis of the event, including jet clustering, some simple b tagging based on b hadrons in a jet, and output into an LHE file. As a service to the user, there are two jet algorithms to choose from, a simple cone jet and a simple kt-clustering. These are in fact the jet algorithms used in the respective jet matching schemes (cone- and kt-jet MLM matching). There is no smearing, except for the fact that the cone jet algorithm is based on "calorimeter cells", so the cell size creates a certain smearing. You can make a number of settings in the pythia_card.dat; which settings you can change can be easily read off the source code hep2lhe.f. The resulting .lhe file can then be plotted with existing plotting programs such as MadAnalysis.

When you read aMC@NLO files, there is however something you need to look out for: You will have some events with negative weight, and this negative weight *must* be passed on to any analysis. So if you want to use hep2lhe and MadAnalysis to plot NLO files, you need to make sure that the sign of the weight is read by hep2lhe and passed on to the .lhe file, and that MadAnalysis correctly takes this into account. None of which (I think) is the case at present, since these were written with only LO files in mind. This will be fixed in future versions, but has not yet been done.

Finally, note that it is not trivial to compare the output after showering with parton level output. What you can do is compare aMC@NLO output after shower and LO output after shower (perhaps including jet matching, depending on what the aim is of your project). These outputs are directly comparable, in particular if you use the same showering program and settings.

All the best,
Johan

Revision history for this message
Johan Alwall (johan-alwall) said :
#4

Oh, one more thing: You find the manual for STDHEP at:
http://cepa.fnal.gov/psm/stdhep/

All the best,
Johan

Revision history for this message
Daniele Barducci (db3e11) said :
#5

I think my question is connected with this topic, so I will not open a new one.
I understood that lhe file produced after Pythia shouldn't be use in a analysis, but what about the root file?
Does it have the same issues since (I think) is produced from the LHE?

Cheers

Daniele

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#6

I would say yes.

But I've asked Pavel (the author of that part of the code) to corss-check.

Cheers,

Olivier

Revision history for this message
Pavel Demin (pavel-demin) said :
#7

You can convert STDHEP to ROOT directly. This way, the ROOT files created from the STDHEP files contain all the information from the STDHEP files.

No jet clustering is performed in the STDHEP to ROOT converter.

Revision history for this message
Daniele Barducci (db3e11) said :
#8

Hi Thanks,
So in principle the root file coming from this conversion could be used to perform analysis I guess.
And how do I convert a STDHEP file into ROOT? Is there some .exe in pythia folder to do this?

Thanks a lot!

Daniele

Revision history for this message
Pavel Demin (pavel-demin) said :
#9

Hi Daniele,

You can use Delphes to convert STDHEP to ROOT.

Here are the commands that I'm using:

# setup ROOT environment variables

wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.0.11.tar.gz
tar -zxf Delphes-3.0.11.tar.gz

cd Delphes-3.0.11
make

./DelphesSTDHEP examples/converter_card.tcl output.root input.hep

or

gunzip < input.hep.gz | ./DelphesSTDHEP examples/converter_card.tcl output.root

Regards,

Pavel

Revision history for this message
Daniele Barducci (db3e11) said :
#10

Thanks a lot!

Can you help with this problem?

Provide an answer of your own, or ask Christopher W. Murphy for more information if necessary.

To post a message you must log in.