analyzer.modules.common.selection

Classes

SelectOnColumns

Apply a selection based on one or more boolean selection columns and

NObjFilter

Select events based on the number of objects in a collection.

SelectAllTriggers

Selection trigger by trigger for each dataset. Takes advantage of the selection flow to get the yield.

Module Contents

class analyzer.modules.common.selection.SelectOnColumns[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Apply a selection based on one or more boolean selection columns and optionally save the cutflow.

This analyzer performs an AND of the specified selection columns (or all default selections if none are provided) and filters the events accordingly. Optionally, it stores a cutflow summary for monitoring.

Parameters

sel_namestr

Name of the selection to be saved in the cutflow summary, eg selection or preselection.

selection_nameslist of str or None, optional

List of selection column names to use. If None, defaults to all selections in columns.pipeline_data["Selections"] that have not yet been processed.

save_cutflowbool, optional

If True, stores cutflow information for monitoring, by default True.

sel_name: str[source]
selection_names: list[str] | None = None[source]
save_cutflow: bool = True[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]
class analyzer.modules.common.selection.NObjFilter[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Select events based on the number of objects in a collection.

This analyzer filters events according to the number of objects

in a given column, requiring the count to be within specified limits.

Parameters

selection_namestr

Name of the selection to store the result.

input_colColumn

Column containing the collection of objects to count.

min_countint or None, optional

Minimum number of objects required to pass, by default None.

max_countint or None, optional

Maximum number of objects allowed to pass, by default None.

selection_name: str[source]
input_col: analyzer.core.columns.Column[source]
min_count: int | None = None[source]
max_count: int | None = None[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]
adlExport(metadata)[source]
class analyzer.modules.common.selection.SelectAllTriggers[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Selection trigger by trigger for each dataset. Takes advantage of the selection flow to get the yield.

Parameters

sel_namestr

Name of the selection to be saved in the cutflow summary, eg selection or preselection.

sel_name: str[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]