Skip to content
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

Closed
wants to merge 34 commits into from

Conversation

mondalspandan
Copy link
Contributor

@mondalspandan mondalspandan commented Nov 29, 2023

  • 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

Ming-Yan and others added 30 commits October 12, 2023 20:07
- 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.
Copy link
Collaborator

@Ming-Yan Ming-Yan left a 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`

Copy link
Collaborator

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?

Copy link
Collaborator

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?

Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe genwei as well?

Comment on lines 178 to 183
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Comment on lines 185 to 207
event_jet = ak.pad_none(event_jet, 1, axis=1)
# event_jet = ak.pad_none(event_jet, 1, axis=1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

Comment on lines +257 to +272
# 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
# )
# )
Copy link
Collaborator

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

Comment on lines +215 to +216
& (event_jet.pt > 20)
& ((event_jet.pt / event_jet.E) > 0.03)
Copy link
Collaborator

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)]
Copy link
Collaborator

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)
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants