KIT-CMS / Excalibur

Analysis repository for Z+Jet studies
1 stars 4 forks source link

Gen weights #55

Closed HerrHorizontal closed 4 years ago

HerrHorizontal commented 4 years ago

Added feature to write out genWeights from a proper skim -- e.g. /portal/ekpbms1/home/mhorzela/CMSSW_10_6_0_skimUL2017/src/Kappa/Skimming/zjet/configs/jec17ul/1060_DYJetsToLL_Summer19-madgraphMLM_mc2017_realistic_v6-v3/test/106X_mc2017_realistic_v6/testKappaSkim_out_106X_mc2017_realistic_v6_numEvent100.root -- to NTuples.

Accordingly configs have been adjusted to test the new feature and it it works, as you can see in the produced testfile /portal/ekpbms1/home/mhorzela/CMSSW_10_6_9_excalibur/src/Excalibur/cfg/excalibur/jec17ul/mc17_DYJets_madgraph/mc17_mm_BCDEF_DYJets_Madgraph_JECComplexL1.root.

mschnepf commented 4 years ago

Looks good to me. Did you tested it?

HerrHorizontal commented 4 years ago

Yes I tested it. You can have a look into the successful test file in /portal/ekpbms1/home/mhorzela/CMSSW_10_6_9_excalibur/src/Excalibur/cfg/excalibur/jec17ul/mc17_DYJets_madgraph/mc17_mm_BCDEF_DYJets_Madgraph_JECComplexL1.root. The requested weights got filled from an appropriate skim, as they should.

mschnepf commented 4 years ago

The output file looks good. :+1: Is each genWeight_nominal value 1.0? If yes, do we need it?

HerrHorizontal commented 4 years ago

genWeight_nominal should be equal to generatorWeight within numerical uncertainty. So is genWeight_nominal_replica. In my opinion we can keep it as a cross-check, since a single branch should not effect the overall efficiency too much. We can also reconfigure it in the config to drop it. But in the skims I think we should keep them both.

To answer your question: The genWeight_nominal can in principle take on any value between (-inf,+inf) but should not be to far away from 1 for a well generated sample.

HerrHorizontal commented 4 years ago

I added a two commits, where I changed the default behaviour of Excalibur, when handling the genWeights

HerrHorizontal commented 4 years ago

A fix of #56 is necessary for this to work.

HerrHorizontal commented 4 years ago

there is still the default behaviour missing. See issue #56.

HerrHorizontal commented 4 years ago

Since this has effectively become the master branch, corresponding to the working JEC producer branch, I will merge this PR and open a new one for #56.