# LHE root file isue

Asked by Huanian Zhang on 2013-01-28

Hello,

Right now I am using the root file(generate from Madgraph) just at parton level to do some work. There are two sets of valuable, which is Px Py Pz E, another is PT Eta Phi Mass. But for my case, Px is not equal to PT*cos(Phi), and Py also not equal to PT*sin(phi). It is pretty wired. Could you help me to figure out what is going on. Thank you very much. Have a good day.

Huanian
University of Arizona

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
Pavel Demin Edit question
Solved by:
Huanian Zhang
Solved:
2013-01-30
Last query:
2013-01-30
2013-01-30
Whiteboard:
 Olivier Mattelaer (olivier-mattelaer) said on 2013-01-28: #1

Hi,

Since the LHE events (the text file) contains PT Eta Phi Mass, I will trust those information (but cross-check with the text file to be sure).

The problem is in the lhe -> root conversion. Pavel Demin is the responsible for this part of the code.
Pavel could you cross-check this point?

Cheers,

Olivier

 Pavel Demin (pavel-demin) said on 2013-01-30: #2

Could you, please, provide the LHE file that has this problem?

 Huanian Zhang (fantasyzhn) said on 2013-01-30: #4

Dear Professors,

I already send lhe file and root file to you both. The files are a little large and I use the Google Drive to upload the files. If you can not download the files, let me know. Then I will rerun 100 events files. Thank you very much and have a good day.

Huanian Zhang
University of Arizona

 Pavel Demin (pavel-demin) said on 2013-01-30: #5

Dear Huanian Zhang,

I can confirm that there is a problem in the latest version of the converters.

It is Phi that is not correctly calculated.

To fix this problem the following line

element->Phi = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());

should be replaced with

element->Phi = (cosTheta == 1.0 ? signPz*999.9 : momentum.Phi());

in the following files:

test/ExRootHEPEVTConverter.cpp
test/ExRootLHEFConverter.cpp
test/ExRootSTDHEPConverter.cpp

Thank you very much for finding this problem!

Regards,

Pavel Demin

 Pavel Demin (pavel-demin) said on 2013-01-30: #6

Correction to my previous comment.

The correct line should be

element->Phi = momentum.Phi();

 Huanian Zhang (fantasyzhn) said on 2013-01-30: #7

Dear Professor Demin,

I check all those files and correct them. Thank you very much for your help. Have a nice day.

Best
Huanian

 Pavel Demin (pavel-demin) said on 2013-01-30: #8

The fixed version is in the bzr repository now.