Madgraph output as lhco

Asked by Ameir Shaa

Hi MadGraph Team,

I apologize for this trivial question.

I am using Madgraph5 to perform some analysis and I would like to get the values of the pseudorapidity. So I wrote a script to parse the output LHE file with these equations:
theta = np.arccos(pz/p)
eta = -np.log(np.tan(0.5*theta))
where theta is the polar angle and eta is pseudorapidity. However, I get the wrong values. I suspect it is due to the repetitive nature of arccosine.

I also know that MadAnalysis5 can compute psuedorapidity for me. I installed MA5 in MG5 and I ran the simulations once again. However, the output LHE file remains the same and I do not get an output LHCO file with the psuedorapidity values.

How do I get MG5 to output the LHCO file?

Many thanks,
Ameir

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

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

Hi,

LHCO output is a deprecated format for detector level output.
So you should not have to deal with lhco at all.

Cheers,

Olivier

> On 9 Apr 2018, at 07:47, Ameir Shaa <email address hidden> wrote:
>
> New question #667754 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/667754
>
> Hi MadGraph Team,
>
> I apologize for this trivial question.
>
> I am using Madgraph5 to perform some analysis and I would like to get the values of the pseudorapidity. So I wrote a script to parse the output LHE file with these equations:
> theta = np.arccos(pz/p)
> eta = -np.log(np.tan(0.5*theta))
> where theta is the polar angle and eta is pseudorapidity. However, I get the wrong values. I suspect it is due to the repetitive nature of arccosine.
>
> I also know that MadAnalysis5 can compute psuedorapidity for me. I installed MA5 in MG5 and I ran the simulations once again. However, the output LHE file remains the same and I do not get an output LHCO file with the psuedorapidity values.
>
> How do I get MG5 to output the LHCO file?
>
> Many thanks,
> Ameir
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Ameir Shaa (ameirshaa) said :
#2

Hi Olivier,

Is there then a relatively painless way to extract the pseudorapidity values?

Many thanks,

Ameir

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

Well MA5 is the painless solution.

If for some reason this is not good enough for you
1) you can look at the file
madgraph/various/lhe_parser.py

at the bottom of the file, you have example of code to do plot with matplotlib. This is of course a bit more painfull that MA5 but this should allow you to have full control.

2) if you prefer root, you can also convert your lhe file to root and then use its magic.

Cheers,

Olivier

Revision history for this message
Ameir Shaa (ameirshaa) said :
#4

Hi Olivier,

I apologize but I’m still unclear. How do I use MA5 to extract the pseudorapidity values?

I installed MA5 in MG5 and all I get is the graph of pseudorapidity and not the individual values.. how do I extract the individual values for each event?

Many thanks,

Ameir

Revision history for this message
Ameir Shaa (ameirshaa) said :
#5

Hi Olivier,

I apologize but I’m still unclear. How do I use MA5 to extract the pseudorapidity values?

I installed MA5 in MG5 and all I get is the graph of pseudorapidity and not the individual values.. how do I extract the individual values for each event?

Many thanks,

Ameir

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

Ok This is a question for the MA5 develloper then.

Cheers,

Olivier

Revision history for this message
Benjamin Fuks (fuks) said :
#7

Hi Ameir.

This is indeed trivial to do in madanalysis. If you are interested, for instance, in the jet pseudorapidity distribution, it is enough to include
  plot ETA(j) 20 -5 5 [logy]
in the madanalysis5 card (20 bins with eta ranging from -5 to 5). More information can be found in the manual and here:
   http://madanalysis.irmp.ucl.ac.be/wiki/tutorials

Regards,

Benjamin

Can you help with this problem?

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

To post a message you must log in.