Output file of ExrootAnalysis in MG5

Asked by Wenjie S.

Hi, all.
I have created a mc sample in mg5 and added the ExrootAnalysis package, the output root file is /Events/run_01/unweighted_events.root. But it only has three branch classes including Event, Rwgt and Particle while I can find much more branch classes like Muon, Electron, Jet and so on in the doc RootTreeDescription.html.
I don’t know if I have missed some configuring options. If anyone know how to add these branches, please tell me, thanks.
I’m also puzzled about the mother code in particle.mother1 and particle.mother2. There are only two number and I can’t use it to find mother particle.

Question information

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

Hi,

We are not at all expert in that tool. So maybe this answer is fully... wrong.
But they are two type of event that can be handle by exrootanalysis
the LHEF file (output of MG5aMC) and the HepMC file (output of the parton-shower).

Looks like you are describing a root file created from a LHEF file and not from an HepMC file (which is likely what you are looking for).

> I’m also puzzled about the mother code in particle.mother1 and particle.mother2. There are only two number and I can’t use it to find mother particle.

Those should follow the LHEF convention (so please read that paper).

Cheers,

Olivier

> On 12 Oct 2023, at 05:35, Wenjie S. <email address hidden> wrote:
>
> New question #708165 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/708165
>
> Hi, all.
> I have created a mc sample in mg5 and added the ExrootAnalysis package, the output root file is /Events/run_01/unweighted_events.root. But it only has three branch classes including Event, Rwgt and Particle while I can find much more branch classes like Muon, Electron, Jet and so on in the doc RootTreeDescription.html.
> I don’t know if I have missed some configuring options. If anyone know how to add these branches, please tell me, thanks.
> I’m also puzzled about the mother code in particle.mother1 and particle.mother2. There are only two number and I can’t use it to find mother particle.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Wenjie S. (wjs15832) said :
#2

Hi, Olivier,

Thank you for your reply!

I think I can make a summary about what I want,

I have used delphes to perform detector simulation, the output file is tag_1_delphes_events.root, which detailly contain the branches like muons and electrons. So I want the sample file before detector simulation contains these branches either.

As you said, there are two event files unweighted_events.lhe and tag_1_pythia8_events.hepmc, what I used is unweighted_events.root. I think it's converted from unweighted_events.lhe. And I only get several branches as I discribed in question.

So if I want to use exrootanalysis to convert tag_1_pythia8_events.hepmc to rootfile, what command should I type? (I have tried hep2root.py but it still only contain branch events and branch particle)

I deduce that we can't get detailed branches directly from converters, we need to edit an extra code to write in a more detailed tree. Is it right?

Cheers,

Wenjie

Can you help with this problem?

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

To post a message you must log in.