cms-nanoAOD / cmssw

CMS NanoAOD software integration repository
http://cms-sw.github.io/
Apache License 2.0
3 stars 10 forks source link

Flag to keep all PS weights #542

Closed swertz closed 4 years ago

swertz commented 4 years ago

PR description:

Add a flag (default false) to keep all the available PS weights instead of the regular 4 (ISR/FSR x up/down), as asked by JME for their custom ntuple production. @camclean @alefisico

If set to true, the whole PS weight array is kept, apart from the first two entries (these correspond to either [XWGTUP * PSweight * match_eff, XWGTUP * PSweight] or [PSweight * match_eff, PSweight], so they'll be equal to 1 most of the time after normalizing the weights by the second entry, see #506).

Also fix the PS weight normalization in the case where the weights are parsed according to the lumi header (see #441): the PS weights should be normalized by the Baseline weight (assumed to be the first PS weight seen).

PR validation:

Tested in 106X: produced nanoAOD files for TTToSemiLeptonic (2016 and 2018) and for one of the parameter scan files mentioned in #441 [1].

[1] /store/mc/RunIIAutumn18MiniAOD/SMS-TChiWZ_ZToLL_mZMin-0p1_mC1-325to1000_TuneCP2_13TeV-madgraphMLM-pythia8/MINIAODSIM/GridpackScan_102X_upgrade2018_realistic_v15-v1/70000/FFE78E85-6F7A-9441-8963-980A38403D1F.root

mariadalfonso commented 4 years ago

@swertz Thanks for fast follow up.

A PR must be opened in cms-sw master? we are slowly dismissing cms-nanoAOD and we will follow the review on cms-sw.

Question: for the simple solution "default factor-2 ISR/FSR scale variations" are there plots in PhysicsTools/NanoAOD/python/nanoDQM_cfi.py ?

Thanks

swertz commented 4 years ago

A PR must be opened in cms-sw master? we are slowly dismissing cms-nanoAOD and we will follow the review on cms-sw.

Ok... I'll re-open on cms-sw then. Perhaps it would be good to update the how-to-contribute guide (see https://twiki.cern.ch/twiki/bin/viewauth/CMSPublic/WorkBookNanoAOD#Recipe_for_the_current_HEAD_of_N).

Question: for the simple solution "default factor-2 ISR/FSR scale variations" are there plots in PhysicsTools/NanoAOD/python/nanoDQM_cfi.py ?

I don't see any weights in the plot list. If nothing prevents it I could add the PDF,PS,LHEScale weight arrays?

mariadalfonso commented 4 years ago

A PR must be opened in cms-sw master? we are slowly dismissing cms-nanoAOD and we will follow the review on cms-sw.

Ok... I'll re-open on cms-sw then. Perhaps it would be good to update the how-to-contribute guide (see https://twiki.cern.ch/twiki/bin/viewauth/CMSPublic/WorkBookNanoAOD#Recipe_for_the_current_HEAD_of_N).

Question: for the simple solution "default factor-2 ISR/FSR scale variations" are there plots in PhysicsTools/NanoAOD/python/nanoDQM_cfi.py ?

I don't see any weights in the plot list. If nothing prevents it I could add the PDF,PS,LHEScale weight arrays?

Would be better to keep this PR limited to the PSweights. So we can add the factor-2 ISR/FSR for now.

All the other weights PDF,LHEScale,.... can be added in the DQM when a revision will be done for that content. Note that a revision of an entire GEN for central nano might happen this fall following on the discussion at the XPOG 25 aug.