cms-jet / JetToolbox

Python framework for configuration of jet tools via the jet toolbox.
https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetToolbox
7 stars 36 forks source link

default parameters overiding user specified #71

Closed fojensen closed 5 years ago

fojensen commented 5 years ago

I am trying to create the analog of the slimmedGenJetsAK8 collection but with neutrinos included in the clustering. I am trying to do this using the the jetToolbox; giving it a collection of status=1 packedGenParticles (using CandPtrSelector).

Before I get ahead of myself I am trying to understand some behavior of the jetToolbox where it seems to be automatically selecting lots of parameters "behind my back"; where I feel my configuration should explicitly forbid these things. Two specific things: a) I am not specifying a PU mitigation method or jet corrections, but it seems to be applying the usual ('AK8PF', ['L2Relative', 'L3Absolute'], 'None') corrections. b) I have specified not to run on MC, although from looking at my log file it seems as though the ak8GenJetsNoNu producer is running. (along with many other gen/parton things).

jetToolbox( process, 'ak8', 'jetSequence', 'noOutput', miniAOD='True', newPFCollection="True",

nameNewPFCollection="stablePackedGenParticles",

nameNewPFCollection='packedPFCandidates', PUMethod = '', Cut='pt>=170.', postFix='example', runOnMC='False' )

I have attached my configuration file for reproducibility.

example_cfg.py.zip

alefisico commented 5 years ago

Hi @fojensen 1) If you dont specify a PUMethod, the JTB will create only PFJets, and since you dont specify JETCorrLevels, it will use the default ones. So if you dont want any jet corrections, you need to add JETCorrLevels="" 2) I think it is just that you are using False as text and not as a boolean. Can you try with runOnMC=False?

fojensen commented 5 years ago

Thanks for the comments.

Adding JETCorrLevels="" leads to a python error regarding container sizes. Adding JETCorrLevels=[''] leads to the same behavior as if I didn't specify anything at all, that is: "|----` jetToolBox: Applying these corrections: ('AK8PF', ['L2Relative', 'L3Absolute', 'L2L3Residual'], 'None')"

ahh! The text was returning True, thanks for catching that. I suppose I put the quotes because I see some in the parameters explanation on the twiki: https://twiki.cern.ch/CMS/JetToolbox#Arguments Now that it is False, it seems a patJetPartonMatchAK8PFexample and patJetGenJetMatchAK8PFexample are trying to run, and I then get a segfault in cmsRun (apparently after selectedPatJetsAK8PFexample is constructed.)

jetToolbox( process, 'ak8', 'jetSequence', 'noOutput', miniAOD=True, newPFCollection=True, nameNewPFCollection='packedPFCandidates', PUMethod = '', Cut='pt>=170.', postFix='example', runOnMC=False,

JETCorrLevels=['']

)