Opened 10 years ago
Closed 10 years ago
#637 closed How to (fixed)
Handling event reweighting: LHE and CMS
Reported by: | Sebastien Wertz | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Delphes code | Version: | Delphes 3 |
Keywords: | CMS, weight | Cc: |
Description (last modified by )
Hi,
I'm using the simple converter card provided in the examples to convert LHE files provided by MadGraph, and GEN files produced by CMSSW when hadronizing the events from the LHE files using Pythia.
When running on the LHE file, the event weights located in the first line of the LHE events are included in the branch Delphes.EventLHE.Weight. The weights one gets when using the reweighting feature of MadEvent (located in the <rwgt> section of the LHE file) end up in Delphes.Rwgt.Weight. So far, so good.
When running on CMS GEN files, the "base" event weights end up in Event.Weight. But the reweighting information (located in Events.LHEEventProduct_source_LHEFile.obj.weights_ in the CMS file) seems to be lost in the process...
What do I have to add to the converted card to keep this information when running on CMS files (if it is possible)?
If you want to have a look, I have files located in
/home/fynu/swertz/storage/delphesOutput/testReweight/TTbar_1j_reweight_OtG1_OG0__OtG0_OG1__OtG-1_OG0_0: MadEvent LHE output: unweighted_events.lhe Delphes from LHE: reweight_OtG1_OG0__OtG0_OG1__OtG-1_OG0__0.root CMS from LHE: Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max1j_LHE_pythia8_cff_py_GEN.root Delphes from CMS: Delphes.root
Cheers,
Sébastien
Change History (7)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Hi Sébastien,
Current version of DelphesCMSFWLite.cpp does not contain any code to read the LHE weights from the CMS files.
You should modify DelphesCMSFWLite.cpp to add the Rwgt branch and fill it as it's done in DelphesLHEF.cpp and DelphesLHEFReader.cpp.
Cheers,
Pavel
comment:3 by , 10 years ago
I've just updated DelphesCMSFWLite.cpp. Here is its location:
https://cp3.irmp.ucl.ac.be/projects/delphes/browser/git/readers/DelphesCMSFWLite.cpp
Could you please check if it works for you?
comment:4 by , 10 years ago
Hi Pavel,
Thank you for your answer.
It doesn't seem to work: there is no branch Rwgt in the output...
comment:5 by , 10 years ago
Description: | modified (diff) |
---|
comment:7 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Sorry I made a mistake, I didn't have time to check.
It works fine indeed, thanks very much! :)
The file names came out wrong: