LDMX-Software / ldmx-sw

The Light Dark Matter eXperiment simulation and reconstruction framework.
https://ldmx-software.github.io
GNU General Public License v3.0
20 stars 16 forks source link

Support LHE v3.0 #1270

Closed tvami closed 2 months ago

tvami commented 2 months ago

Is your feature request related to a problem? Please describe.

Both the NLO MadGraph LHE output and default MadGraph 3.5.3 LHE output are formatted with the lhef3.0 formatting. A typical block looks like

<event>
 6      1 +1.2560691e-08 1.79574400e+03 7.81860800e-03 1.15969700e-01
        1 -1    0    0  501    0 +0.0000000000e+00 +0.0000000000e+00 +1.7616005291e+03 1.7616005291e+03 0.0000000000e+00 0.0000e+00 1.0000e+00
       11 -1    0    0    0    0 -0.0000000000e+00 -0.0000000000e+00 -1.0000000000e+03 1.0000000000e+03 0.0000000000e+00 0.0000e+00 -1.0000e+00
        1  1    1    2  501    0 -8.3240135047e+01 +1.6927747814e+02 +5.6965842916e+02 6.0007875367e+02 0.0000000000e+00 0.0000e+00 1.0000e+00
       11  1    1    2    0    0 +2.7632667555e+02 -1.4043744658e+02 +2.1270782660e+02 3.7593048230e+02 0.0000000000e+00 0.0000e+00 -1.0000e+00
  9000003  1    1    2    0    0 +1.1820400163e+02 -6.1600025824e+02 +1.1629746329e+02 8.7781695365e+02 6.0300000000e+02 0.0000e+00 -1.0000e+00
 -9000003  1    1    2    0    0 -3.1129054213e+02 +5.8716022669e+02 -1.3706318994e+02 9.0777433950e+02 6.0300000000e+02 0.0000e+00 -1.0000e+00
<mgrwt>
<rscale>  0 0.18863665E+03</rscale>
<asrwt>0</asrwt>
<pdfrwt beam="1">  1        1 0.27101546E+00 0.18863665E+03</pdfrwt>
<pdfrwt beam="2">  1       11 0.10000000E+01 0.17957444E+04</pdfrwt>
<totfact> 0.55095125E+00</totfact>
</mgrwt>
</event>

i.e. a change from v2.0 is that there is a block of <mgrwt>.

This leads to issues with the current implementation of the LHE reader, as it expects everything before </event> to be part of the event.

Describe the solution you'd like

Make the LHEReader able to read v3.0 files.

Describe alternatives you've considered

Forcing the MadGraph to output in v2.0, but I think it's better to just add the functionality to read v3.0 in LDMX