scikit-hep / pylhe

Lightweight Python interface to read Les Houches Event (LHE) files

Home Page:https://pypi.org/project/pylhe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: `rwgt` overwritten by `weights`

APN-Pucky opened this issue · comments

https://github.com/scikit-hep/scikit-hep-testdata/blob/main/src/skhep_testdata/data/pylhe-testlhef3.lhe#L337

  <rwgt>
   <wgt id="1001"> 0.50109E+02 </wgt>
   <wgt id="1002"> 0.45746E+02 </wgt>
   <wgt id="1003"> 0.52581E+02 </wgt>
   <wgt id="1004"> 0.50109E+02 </wgt>
   <wgt id="1005"> 0.45746E+02 </wgt>
   <wgt id="1006"> 0.52581E+02 </wgt>
   <wgt id="1007"> 0.50109E+02 </wgt>
   <wgt id="1008"> 0.45746E+02 </wgt>
   <wgt id="1009"> 0.52581E+02 </wgt>
  </rwgt>
  <weights> 1.000e+00 0.204e+00 1.564e+00 </weights>

Unfortunately, #220 overwrites the values from rwgt by those of weights. I did not know madgraph uses both...

Ideally I think one would have both available as rwgt and weight attribute, but that would be a breaking change i.e. renaming current weights to rwgt. WDYT?