Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.
This repository was archived by the owner on May 6, 2024. It is now read-only.

LHEReader doesn't work with all madgraph outputs #41

@awhitbeck

Description

@awhitbeck

I am analyzing some LHE files I got from our theory colleagues. In them there is auxiliary event-level information after each particle is listed. An example can be found here:

 7      1 +2.9536814e+04 1.71289800e+03 7.81860800e-03 8.21987300e-02
       11 -1    0    0    0    0 +0.0000000000e+00 +0.0000000000e+00 +3.9999999674e+01 4.0000000000e+01 5.1099890000e-03 0.0000e+00 -1.0000e+00
      623 -1    0    0    0    0 -0.0000000000e+00 -0.0000000000e+00 -5.9685589804e-12 1.7124600000e+03 1.7124600000e+03 0.0000e+00 1.0000e+00
       11  1    1    2    0    0 +1.9043651668e+00 -6.9159080595e-01 +8.7837770258e+00 9.0144145391e+00 5.1099890000e-03 0.0000e+00 -1.0000e+00
      623  1    1    2    0    0 +1.1962853951e-03 +3.8271048071e-01 +3.4922114418e-01 1.7124600784e+03 1.7124600000e+03 0.0000e+00 1.0000e+00
      622  2    1    2    0    0 -1.9055614522e+00 +3.0888032524e-01 +3.0867001504e+01 3.0985507087e+01 1.8982350000e+00 0.0000e+00 0.0000e+00
      -11  1    5    5    0    0 -2.8644920854e-01 -6.8086220641e-01 +5.8139920221e+00 5.8607299749e+00 5.1099890000e-03 0.0000e+00 -1.0000e+00
       11  1    5    5    0    0 -1.6191122511e+00 +9.8974253286e-01 +2.5053009602e+01 2.5124777233e+01 5.1099890000e-03 0.0000e+00 1.0000e+00
<mgrwt>
<rscale>  0 0.17128984E+04</rscale>
<asrwt>0</asrwt>
<pdfrwt beam="1">  1       11 0.10000000E+01 0.17128984E+04</pdfrwt>
<pdfrwt beam="2">  1      623 0.10000000E+01 0.17128984E+04</pdfrwt>
<totfact> 0.10000000E+01</totfact>
</mgrwt>
</event>

This breaks the LHEReader because the code expects that every line in between and (except the first?) is particle data. However, a simple fix can bypass this information and keep the code compatible with the usual LHE format we have: just change this to:

if (line == "</event>" or line=="<mgrwt>") {

This will short circuit the event block analysis and totally ignore weights. If these are useful, I guess someone will need to implement a class for interpreting and persisting this data, but for now, it's not useful to us, as far as I can tell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions