-
Notifications
You must be signed in to change notification settings - Fork 36
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
Update to latest 2022pre-EE recommendations; sync W+c selections #85
Conversation
mondalspandan
commented
Nov 29, 2023
•
edited by uttiyasarkar
Loading
edited by uttiyasarkar
- workflow : unified W+c & semilep electron/muon channel into one workflow
- workflow : unified DY electron/muon channel into one workflow
- util: array_writer to wrap common items
- metadata:remove bad files - scripts: implement remove bad files in fetch.py script - plot: fix wrong axis defintion & add new variables definitions - helpers: update xsections - wf: add pv info & weight info in BTA_ttbar_wf
Conflicts: metadata/test_bta_run3.json
- ci: only trigger if changes - doc,ci: add customize commit message to run ci - wf: fix dtype bug
- ci: only trigger if changes - doc,ci: add customize commit message to run ci - wf: fix dtype bug
Changes to which variables are looked for, changes in output structure, etc.
Merge master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mondalspandan thank you for he changes on workflows especially create the array writer and merge the workflows!
- I think we can remove the old files which already merged as the single workflow and try to improve the arraywriter a bit (seems now it's based on Wc workflow)-> or you can leave it, I will try to merge with other workflows
- Is there any reason you want to have separate lumimask instead of taking the merged one? They are same contents
- For the Wc selections, thanks for merging the selection with Agostino's selection, can you please put some comments as references?
@@ -653,6 +653,7 @@ python runner.py --workflow emctag_ttdilep_sf --json metadata/test_bta_run3.json | |||
- `ci:skip syst` : remove `--isSyst all` option | |||
- `ci:JERC_split` : change systematic option to split JERC uncertainty sources `--isSyst JERC_split` | |||
- `ci:weight_only` : change systematic option to weight only variations `--isSyst weight_only` | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to add additional line here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the full 2022 json instead of separated case? what is the reason for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question above
"SoftMuon_dxySig", | ||
"Muon_sip3d", | ||
], # other fields, for Data and MC | ||
othersMC=["Pileup_nTrueInt", "Pileup_nPU"], # other fields, for MC only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe genwei
as well?
if "MET" in obj and ("pt" != kin or "phi" != kin): | ||
continue | ||
if (obj != "Muon" and obj != "SoftMuon") and ( | ||
"pfRelIso04_all" == kin or "d" in kin | ||
): | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if "MET" in obj and ("pt" != kin or "phi" != kin): | |
continue | |
if (obj != "Muon" and obj != "SoftMuon") and ( | |
"pfRelIso04_all" == kin or "d" in kin | |
): | |
continue | |
if obj not in pruned_events.fields : continue | |
if kin not in pruned_events[obj].fields:continue |
I think this way can skip the contents which is not in the branch
event_jet = ak.pad_none(event_jet, 1, axis=1) | ||
# event_jet = ak.pad_none(event_jet, 1, axis=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
# req_QCDveto = ( | ||
# (iso_lep.pfRelIso04_all < 0.05) | ||
# & (abs(iso_lep.dz) < isolepdz) | ||
# & (abs(iso_lep.dxy) < isolepdxy) | ||
# & (iso_lep.sip3d < isolepsip3d) | ||
# & ( | ||
# iso_lep.pt | ||
# / ak.firsts( | ||
# events.Jet[ | ||
# (events.Jet.muonIdx1 == iso_lepindx) | ||
# | ((events.Jet.muonIdx2 == iso_lepindx)) | ||
# ].pt | ||
# ) | ||
# > 0.75 | ||
# ) | ||
# ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make the comments of the old selections, refers to the selections of the run2 project?
https://github.com/mondalspandan/VHcc-cTagSF
& (event_jet.pt > 20) | ||
& ((event_jet.pt / event_jet.E) > 0.03) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the comments with new selections
|
||
## Soft Muon cuts | ||
soft_muon = events.Muon[softmu_mask(events, self._campaign)] | ||
soft_muon = events.Muon[softmu_mask(events, self._campaign, dxySigcut)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the comments with new selections
f"{self.name}/{dataset}/{systematics[0]}_{events.metadata['filename'].split('/')[-1].replace('.root','')}_{int(events.metadata['entrystop']/self.chunksize)}.root" | ||
) as fout: | ||
fout["Events"] = uproot_writeable(pruned_ev, include=out_branch) | ||
array_writer(self, pruned_ev, events, systematics[0], dataset, isRealData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you put the SoftMuon, MuonJet, dilep
as customized variables used in arraywriter
?