How to get output of Pythia8 in .hep or other format which can be converted to .root instead of .hepmc

Asked by krunal on 2017-08-15

I want a .root file in the end for analysis. But while using Pythia interface with MG5, I am getting .hepmc file which can not be converted to .root using ExRootAnalysis. Or is there any other way I could solve this problem? (I read a link which says to use HEPMC Analysis converter to do the same but I wished if there are any other options or update in this regard)
Thank you!

Question information

English Edit question
MadGraph5_aMC@NLO Edit question
No assignee Edit question
Last query:
Last reply:
shibasipu (shibasipu) said : #1

Hi Krunal,
                      Using standalone MadAnalysis5(provided u have installed delphes inside it), you can convert a hepmc file to a root
file. A simple script will do the job. If you need the script, please let me know.


krunal (krunal94) said : #2

Hi Shiba,

Sure. Please let me know the script. Also, as far as I know, MA5 also has an interface with fastjet. Can I also incorporate it as well as I want to analyze events clustered under both kt and anti-kt algorithm.

Kind regards,

shibasipu (shibasipu) said : #3

Hi Krunal,
                       yes, you can analyze events after importing the events files. I can send you an talk of Madanalysis where you can find these things. Pive lease write your email here.

Here is the lines you have to include in your script.
set main.fastsim.package = delphes
set main.fastsim.detector = cms
import /home/shibananda/RESEARCH/EVENT_GENERATORS/MG5_aMC_v2_5_2/pp2tt_2lmet_5Lakh/Events/run_01_*/*.hepmc.gz as pp2tt
Few things :
1. if you want to use atlas detector card, then change cms to atlas in the second line.
2. Give proper path to the events.
3. Suppose your script name is "hep2root". Then in the ma5 you need to run this command.
> ./bin/ma5 -R hep2root

Please let me know if you have any further query.


krunal (krunal94) said : #4

Hi Shiba,

Thank you for the reply. Please send me the MA5 talk. I'll go through it as well. My email id is : <email address hidden>

Kind regards,

shibasipu (shibasipu) said : #5

Hi Krunal,
                     I have sent you the talk to your email. if you need anything further please let me know.



I would like to add to what Shiba said that you can also steer the
reconstruction and MA5 analysis directly from within the MG5aMC interface
to MA5.
This can be done by either installing MA5 from within the interactive
command interface of MG5aMC with the command "install madanalysis5" or by
specifying the path of an already installed version in

You can then steer the analysis via the madanalysis_card in the Cards
directory of the process output. These cards contain additional meta-tag
that allow to specify the type of reconstruction for given hadron-level
analysis(es). We wlll document those shortly but they are rather
straightforward from the existing example you'll find in those cards.


On Wed, Aug 16, 2017 at 7:54 PM, shibasipu <
<email address hidden>> wrote:

> Question #656057 on MadGraph5_aMC@NLO changed:
> shibasipu posted a new comment:
> Hi Krunal,
> I have sent you the talk to your email. if you need
> anything further please let me know.
> Regards,
> Shiba
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.


Can you help with this problem?

Provide an answer of your own, or ask krunal for more information if necessary.

To post a message you must log in.