-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JES up/down systematic evaluation #57
Comments
nanoAOD-tools seems to have a python version of this https://github.com/cms-nanoAOD/nanoAOD-tools/tree/master/python/postprocessing/modules/jme |
since @quark2 needs this the most, can you check this |
If you run the following after full recipe for production, then (it will take about 20 minutes, depending on the number of events, of course) you can obtain nanoAOD_[...]_Skim.root;
The output file nanoAOD_[...]_Skim.root contains all of the source, including new branches of shifted jet and MET like the followings:
and so on. I think this is what we are looking for. See https://github.com/cms-nanoAOD/nanoAOD-tools/blob/master/python/postprocessing/modules/jme/jetmetUncertainties.py#L159, where the analyse() is the main part of the works. Also we need to check what is shaken for each of these evaluations. If everything so far is okay, then we need to consider other problems: how to apply. For run2_2016v5, we can overwrite the existing root files by the one with the systematic evaluations. Or, we can make 'friend tree files' (This nanoAOD post-process program supports this) and then keep them separately. Also we need to think about how to apply this to new productions, such as run2_2016v6 or run2_2017vX (how to run this in crab job?) |
One problem of the above solution is that the 'python' code is seriously slow. I estimated the requested time and obtained that it will take about 30 hours (NOT 30 minutes!) with 700 cores! I think it's because the post-process code consists of 'pure python' code, i.e., it runs the loop over events and calculates in python, not in a built-in functions. Of course, we have crab, so it might not be a problem, but to me it's not satisfied. Maybe porting the code into C/C++ or using a 'compiler' for python (there are such things, you know) can be solutions for this situ. Meanwhile, for the next versions of nanoAOD we can find a neat solution which lives in CATTools; see https://github.com/vallot/CATTools/blob/cat80x/CatProducer/plugins/CATJetProducer.cc#L219-L226 and https://github.com/vallot/CATTools/blob/cat80x/CatProducer/plugins/CATJetProducer.cc#L236-L265. If we apply these prescriptions to our producer now, we will have the systematic evaluations in the next versions without any post stuffs |
See a new pull request: #114; I added the codes for jet uncertainty evaluator used in CATTools |
Alright, most of most of my code (and code in CATTools) agrees with the stuffs in nanoAOD, except for the additional mass scale factor. See https://github.com/cms-nanoAOD/nanoAOD-tools/blob/master/python/postprocessing/modules/jme/jetSmearer.py#L176, which evaluates jet_mass_jmrUpVal, while the nominal scale factor is 0.1, not 1.0 (see the line 162 in the code)! According to the evaluator I think 0.1 makes no sense, because the nominal value has to be closer to the reco jet as much as possible, right? Also I cannot find any description in twiki pages about the additional jet scale factor (not only jet_mass_jmrNomVal, but also jet_mass_jmr[Up, Down]Val). What is the basis for this variable? (FYI, nanoAOD guys refered to the followings in their code: https://twiki.cern.ch/twiki/bin/view/CMS/JetResolution and https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookJetEnergyResolution for JER, and https://twiki.cern.ch/twiki/bin/view/CMS/JECDataMC and https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookJetEnergyCorrections#JetCorUncertainties for JES.) |
I made codes for evaluation of JER/JES uncertainties on the fly; see 4aeabb7. I checked that my code reproduces the evaluations provided by nanoAOD guys (the postprocess tool in NanoAODTools). My code takes only few additional costs, so I think we can evaluate on the fly without any problem.
|
Did you look at the twikis on L238? What do they say? |
First of all, I cannot find any of jet mass uncertainty, at least in CMS twiki. But also no mention about that in the TopJME. I think then we can ignore about jet mass uncertainty. |
One thing more: Note that in general the nominal value of s_JER (in JetResolution page) is not 1. According to TopJME twiki page seems like we need to apply the 'nominal factor' of JER to our 'nominal' (i.e., default) mode. Actually, many of analyser codes in CATTools uses jet kinematic variables with the nominal factor. I think we need to discuss and investigate about this. |
I investigated whether nominal JER smearing is applied to our nanoAOD or not. According to the jet_cff.py, there is no nominal smearing. Only (L2)L3 JEC are applied (see here and here, of which the cfi codes can be found in here and here and the plugin codes are here and here; only JEC is found). But other analysis' are using nominal smeared jets as a nominal jets. I think we need to replace our jets by smeared ones. |
No description provided.
The text was updated successfully, but these errors were encountered: