-
Notifications
You must be signed in to change notification settings - Fork 14
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
UL: Corrections #72
Comments
An additional comment, we need to double check one by one against the corrections implemented by KIT. Still, we want to implement ours using correctionlib. |
Electron id, photon id, MET phi corrections, and pu weight are included at correction.py file with json files (https://gitlab.cern.ch/cms-nanoAOD/jsonpog-integration) |
For nlo ewk scale factor, the root files are made by monojet analysis. At the last meeting, we discussed that this scale factor can be used. https://github.com/ParticleChef/decaf/blob/master/analysis/utils/corrections.py#L220 |
Can you point me to the part of your code where these are used? Also, how about muon isolation weights? For what concerns trigger weight, most likely you're also missing single muon and MET trigger, am I right? |
Yes I'm not uploaded muon trigger, isolation weight yet. And I included the MET trigger and nlo sf from previous corrections.py file. The btag weight part is modifying now. |
I make quick test with json file and btageff.merged file existed.
I printed the values and I got error like this
Which part should I fix to solve this error? |
To avoid this shape mismatch you can use real data/MC in the test. My suggestion is that we finish first implementing all corrections with correctionlib (when possible). I'll then do a quick review of the code and then we structure a test. |
I finished the modifying btag. How you implement the jec? Other than jec, I modified all corrections I need. |
For jet you can follow this: https://github.com/nsmith-/boostedhiggs/blob/master/boostedhiggs/build_jec.py |
I update the corrections.py and jet energy correction files. |
When run the correction.py, the error is accured at import uproot_methods
Instead of this, update error lines to uproot3. And separate the '2016' to '2016preVFP' and '2016postVFP' at btag part. |
Hi think you want to do the other way around, which means using the latest awkward version, changing the code lines to use what the latest awkward version wants you to use. |
Then, is there no need to change the version of Awkward? |
In general you want to use the latest version of everything, both awkward and uproot. If we need to change the code a bit to adjust to the format the new versions may want, that's what I would do. |
The current correction.py works in awkward version 1.9.0. I checked my current setup and latest version of some module.
Is it okay to change the version in current coffea (0.7.12)? |
where the current version automatically installed when you installed coffea 0.7.12? |
I forgot which version is installed when I installed coffea 0.7.12. All module are installed at /uscms/home/jhong/.local/lib/python3.6/site-packages/ |
I think that if you didn't upgrade packages by hand, those are the versions that coffea installed by itself. I wouldn't touch them then, but in the correction.py code, wherever you are using using uproot3, use uproot instead. If this makes the code crash, then we need to understand why. |
@ParticleChef were you able to use uproot instead of uproot3? Besides that I don't think that this needs more work. |
Actually, we need also to implement the UL ttbar corrections: https://github.com/mcremone/decaf/blob/master/analysis/utils/corrections.py#L352-L353 To be found here: |
@ParticleChef any news on this? |
Hi. I I checked the uproot, uproot3 and uproot_methods.
And using uproot without uproot_methods, the lookup_tools has error:
Everything works well when I change all uproot to uproot3 (I don't include uproot_methods) |
@alejands can you look into this? |
I forgot to mention that we also need to updated these corrections: https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L311-L320 A good place to start would be asking the boosted Higgs team, or digging into their code: https://github.com/nsmith-/boostedhiggs/tree/master/boostedhiggs |
I modified the btageff.py file for making btageff merged file used in corrections.py file. Does it need any other process other than reduce.py and merge.py to make btageff.merged files? |
@ParticleChef I really have a strong preference for adding boolean as attributes of objects. For example, here: https://github.com/ParticleChef/decaf/blob/forBtagw/analysis/processors/btageff.py#L52 I really prefer this: https://github.com/mcremone/decaf/blob/master/analysis/processors/btageff.py#L49 |
@ParticleChef can you open a separate issue for this? Also in this case we should move from |
After going through the twiki above and going around some TOP PAG twikis to double check, it appears that no updates have been made to the top pt reweighting function for data-NLO (data/POWHEG+Pythia8). The recommendation still matches our code. decaf/analysis/utils/corrections.py Lines 308 to 309 in ed33cc1
I did notice this line in the twiki...
|
I was able to update |
I noticed these output filenames were changed by @ParticleChef, presumably while testing: Line 347 in ed33cc1
decaf/analysis/utils/corrections.py Line 631 in ed33cc1
Should these be changed back or left as is? |
Output filenames above updated in commit 87ddf88. |
Here is the way to implement the new corrections: https://github.com/jennetd/hbb-coffea/blob/master/boostedhiggs/corrections.py#L25-L47 @alejands you can take https://github.com/jennetd/hbb-coffea/blob/master/boostedhiggs/data/msdcorr.json |
The PR has been updated with the new msd corrections (commit 7471585). The new |
I had a look and this still needs work.
I noticed that only EWK corrections are implemented: https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L290-L305 @ParticleChef can you confirm that this is because samples are already NLO in QCD? Also, systematic variations need to be implemented. They can be taken from here: https://github.com/mcremone/decaf/blob/master/analysis/utils/corrections.py#L248-L350
This won't work unfortunately: https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L602-L621 We need to implement this: https://github.com/nsmith-/boostedhiggs/blob/master/boostedhiggs/build_jec.py I'll open a new issue for this. |
I took care of that. JERCs need to be updated to UL though: https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L658-L799 @alejands can you check which are the recommendations? |
Yes, I know that KIT people generated those samples in NLO QCD so NLO QCD corrections are not applied additionally. |
@alejands ping on this. |
Good, but I believe we still want systematic variations. I re-implemented those. |
I'm modifying btagging weight on corrections file with btagging json file. https://github.com/ParticleChef/decaf/blob/forBtagw/analysis/utils/correctionsBTseperate.py#L35 |
@ParticleChef I strongly suggest you use the btagging weight calculation I implemented in the latest version of corrections.py, there were a lot of things I fixed. Also, the version you have, as well as the current version of corrections.py, won't work with the new https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L475-L487 |
Also, on a separate note, I don't know which If you are using the one was already in |
I checked the new version of btag weight at correction file on your area today. I will use new version. And the I have one question when draw the 2D plot of efficiency.
So it should be used like this:
Do you have any idea to merge all dataset? |
The new version of https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L487-L498 |
I checked quickly that "deepJet_comb" has only 4 and 5 for hadron flavor in json file. So I should use "deepJet_incl" for light sf (hadron flavor 0). |
It depends on what you are loading here: https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L475-L476 Also, which error are you referring to? |
I updated the codes and I got another error when compile the corrections.py file.
|
To address this I have already changed the setup file: https://github.com/mcremone/decaf/blob/UL/setup.sh#L8 |
It needed a lot of work, but now the b-tagging class works. |
For nlo scale factor in correction.py, the method using
|
@ParticleChef There should not be any https://github.com/mcremone/decaf/blob/UL/analysis/processors/hadmonotopv2.py#L671-L676 Also, is https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L23-L39 |
I took care of it: https://github.com/mcremone/decaf/blob/UL/analysis/utils/corrections.py#L369-L507 |
First of all, pull the current most up to date version from the master branch:
https://github.com/mcremone/decaf/blob/master/analysis/utils/corrections.py
then replace the corrections one by one with the ones recommended for UL. Please be mindful of a couple of things:
The text was updated successfully, but these errors were encountered: