Fork me on GitHub

Opened 7 years ago

Last modified 7 years ago

#1076 new Bug

Issues when reading weights from LHE files. With fix.

Reported by: Nikolaj O. Sørensen Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Hello

I have been having some trouble when reading Les Houches Event files with reweighting information. I only been using the converter_card.tcl. I do not know if this is a known issue, but I did not find any tickets about anything similar in the last year or so. However I found a fix and wanted to let you know.

No matter what weights I put in the <wgt id=".."> ... </wgt> tag, the output weight branch only contained something more or less zero.
For instance the example file testlhef3.lhe (linked in the example from the LHEF.h webpage http://home.thep.lu.se/~leif/LHEF/index.html), produces weights between 1.402e-42 and 1.414e-42.

After spending some time looking through the source code I found that while the branch created in DelphesLHEF.cpp contained objects of class Weight, DelphesLHEFReader::AnalyzeEvent returns objects of class LHEFWeight. When changing line 105 in DelphesLHEF.cpp

from:
branchWeight = treeWriter->NewBranch("Weight", Weight::Class());

to:
branchWeight = treeWriter->NewBranch("Weight", LHEFWeight::Class());

and recompiled Delphes, the correct weights showed up in the output ROOT file.

If this is a known issue or something specific to my system, then I apologize for taking your time.

Best regards
Nikolaj O. S.

Change History (2)

comment:1 by Michele Selvaggi, 7 years ago

Hi Nikolaj,

I believe you are right. We did not update the LHEF reader when switching to LHEv3.
The reason is because people are not actually supposed to use the LHEFReader, given that its output is non physical.

If you actually use that LHEF file with the Pythia8 reader as explained here you'll see that weights are properly stored:

https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/Pythia8

Keep in mind that LHEReader should be used only for debugging purposes. This said, thanks for spotting this, it has been corrected now:

https://github.com/delphes/delphes/commit/abcacdbbc5c3be2d92635505dfc0fc10c48b8adb

Thanks,
Michele

comment:2 by Nikolaj O. Sørensen, 7 years ago

Hi Michele

Happy to help!
In this case I am only using Delphes to convert the output LHE files from Madgraph to root for easier access to the reweighting information. The events are at parton level so I do not expect them to correspond directly to physical observables.

Cheers!
Nikolaj

Note: See TracTickets for help on using tickets.