Skip to content

Conversation

@sihyunjeon
Copy link

No description provided.

Si Hyun Jeon and others added 2 commits July 21, 2024 12:26
self.mask = ak.ones_like(self.objects["pt"], dtype=bool)
for variable, cut in cuts.items():
self.CreateMask(variable, cut)
return self.objects[self.mask]
Copy link
Author

Choose a reason for hiding this comment

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

not implemented yet but CollectObject can also take the campaign as an input and we can do

if campaign == "RunIISummer20UL18":
    mask_hem = eta < blah & phi > blah
    self.mask = self.mask & mask_hem

So we can keep all object selection issues here

elif sign == "!=":
self.mask = self.mask & (loaded != value)
else:
pass
Copy link
Author

Choose a reason for hiding this comment

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

this part i am not so proud of but didn't find a way to better configure this in a generic way. any ideas?
but because dask already optimizes the pipeline, it won't disturb the computing performance too much

looseElectrons = coll.Electron({
"pt" : (">", 53),
"eta" : ("<", 2.4),
})
Copy link
Author

Choose a reason for hiding this comment

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

Just demonstrating how it could be used,
other id selections have to be implemented here as well

Copy link
Author

Choose a reason for hiding this comment

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

if you want more userfirendly approach, we can add
"id" : "tight"
and then in the back in CollectObject, we could do something like

if id == "tight":
    id_cut = 2
elif id == "loose":
    id_cut = 1
...
mask = electron.id > id_cut

but maybe not worth it? not sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant