matching
#
Distance-based methods.
Functions:
|
Factory to generate a function with name selector_name that cleans the field to_clean in an array following the |
Classes:
alias of |
|
|
- cleaning_factory(selector_name, to_clean, clean_against, metric=None)[source]#
Factory to generate a function with name selector_name that cleans the field to_clean in an array following the
NanoAODSchema
against the field(s) clean_against. First, the necessary column names to construct four-momenta for the different object fields are constructed, i.e.pt
,eta
,phi
ande
for the different objects. Finally, the actual selector function is generated, which uses these columns.- Parameters:
selector_name (
str
) – Name of theSelector
class to be initialized.to_clean (
str
) – Name of the field to be cleaned (e.g."Jet"
).clean_against (
list
[str
]) – Names of the fields of object to clean field to_clean against (e.g.["Muon"]
).metric (
Optional
[Callable
], default:None
) – Function to use for the cleaning. If None, usedelta_r()
.
- Return type:
- Returns:
Instance of
Selector
.
- delta_r_jet_lepton#
alias of
func
Methods:call_func
(events, to_clean, clean_against[, ...])Abstract function to perform a cleaning of field to_clean against a (list of) field(s) clean_against based on an abitrary metric metric (e.g.
Attributes:
data_only
mc_only
name
nominal_only
shifts_only
uses
- class jet_lepton_delta_r_cleaning(*args, **kwargs)[source]#
Bases:
Selector
Methods:
call_func
(events, stats[, threshold])Function to apply the selection requirements necessary for a cleaning of jets against leptons.
Attributes:
- call_func(events, stats, threshold=0.4, **kwargs)#
Function to apply the selection requirements necessary for a cleaning of jets against leptons.
The function calls the requirements to clean the field Jet against the concatination of the fields [Muon, Electron], i.e. all leptons and passes the desired threshold for the selection
- Parameters:
- Return type:
- Returns:
Tuple containing the events array and a
SelectionResult
with indices of cleaned jets in the “Jet” object field.
- data_only = False#
- mc_only = False#
- nominal_only = False#
- shifts_only = None#
- uses = {<class 'columnflow.selection.matching.func'>}#