analyzer.modules.common.jets

Attributes

Classes

FilterNear

Filter objects based on proximity to another collection.

VetoMapFilter

Apply a detector veto map to an input jet collection

VetoMap

Event-level veto selection based on detector veto maps.

JetEtaPhiVeto

Event-level veto based on jet ($eta$, $phi$) regions.

HT

Compute the scalar sum of jet transverse momenta (H_T).

JetFilter

This analyzer filters an input jet collection according to transverse

TopVecHistograms

Produce kinematic histograms for the leading objects in a collection.

JetCombos

Compute invariant masses for specified combinations of jets.

JetComboHistograms

Build composite objects from specified combinations

JetScaleCorrections

This analyzer adjusts jet transverse momentum (pT) and mass

JetResolutionCorrections

This analyzer adjusts jet transverse momentum (pT) and mass to account

PileupJetIdSF

Compute pileup jet ID scale factors for Monte Carlo events.

Module Contents

analyzer.modules.common.jets.logger[source]
class analyzer.modules.common.jets.FilterNear[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Filter objects based on proximity to another collection.

This analyzer removes entries from a target collection that are within a specified angular distance ($Delta R$) of objects in a second collection. Objects in the target collection are kept only if no nearby object is found within the given distance threshold. Proximity is determined using the nearest method on the target collection.

Parameters

target_colColumn

Column containing the collection to be filtered.

near_colColumn

Column containing the collection of nearby reference objects.

output_colColumn

Column where the filtered target collection will be stored.

max_drfloat

Maximum $Delta R$ distance used to define proximity.

target_col: analyzer.core.columns.Column[source]
near_col: analyzer.core.columns.Column[source]
output_col: analyzer.core.columns.Column[source]
max_dr: float[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]
adlExport(metadata)[source]
class analyzer.modules.common.jets.VetoMapFilter[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Apply a detector veto map to an input jet collection in order to remove jets falling into problematic detector regions. The veto map is evaluated as a function of jet ($eta$, $phi$) coordinates.

Parameters

input_colColumn

Column containing the input jet collection.

output_colColumn

Column where the filtered jet collection will be stored.

should_runMetadataExpr, optional

Expression controlling whether this module should run for a given dataset based on metadata. By default, this filter runs only for Run 2 datasets.

veto_typestr

Identifier passed to the correction evaluator to select the appropriate veto map. Defaults to "jetvetomap".

input_col: analyzer.core.columns.Column[source]
output_col: analyzer.core.columns.Column[source]
should_run: analyzer.core.analysis_modules.MetadataExpr[source]
veto_type: str = 'jetvetomap'[source]
run(columns, params)[source]
getCorr(metadata)[source]
preloadForMeta(metadata)[source]
inputs(metadata)[source]
outputs(metadata)[source]
class analyzer.modules.common.jets.VetoMap[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Event-level veto selection based on detector veto maps. Events are excluded if any jet passing a loose selection lies withing a vetoed $eta$-$phi$ region.

Parameters

input_colColumn

Column containing the input jet collection.

selection_namestr, optional

Name of the event-level selection to be added to the column collection, by default "jet_veto_map".

should_runMetadataExpr, optional

Expression controlling whether this module should run for a given dataset based on metadata. By default, this filter runs only for Run 3 datasets.

input_col: analyzer.core.columns.Column[source]
selection_name: str = 'jet_veto_map'[source]
should_run: analyzer.core.analysis_modules.MetadataExpr[source]
veto_type: str = 'jetvetomap'[source]
run(columns, params)[source]
getCorr(metadata)[source]
preloadForMeta(metadata)[source]
inputs(metadata)[source]
outputs(metadata)[source]
class analyzer.modules.common.jets.JetEtaPhiVeto[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Event-level veto based on jet ($eta$, $phi$) regions.

This analyzer defines an event-level selection that vetoes events containing jets within a specified rectangular region in (η, φ) space. The veto can optionally be restricted to a specific run range.

Parameters

input_colColumn

Column containing the input jet collection.

phi_rangetuple of float

Inclusive (min, max) range in phi defining the veto region.

eta_rangetuple of float

Inclusive (min, max) range in eta defining the veto region.

run_rangetuple of float or None, optional

Optional run range over which the veto should be applied. If None, the veto is applied to all runs.

selection_namestr, optional

Name of the event-level selection to be added, by default "jet_eta_phi_veto".

input_col: analyzer.core.columns.Column[source]
phi_range: tuple[float, float][source]
eta_range: tuple[float, float][source]
run_range: tuple[float, float] | None = None[source]
selection_name: str = 'jet_eta_phi_veto'[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]
class analyzer.modules.common.jets.HT[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Compute the scalar sum of jet transverse momenta (H_T).

Parameters

input_colColumn

Column containing the jet collection whose pT values will be summed.

output_colColumn, optional

Column where the computed H_T values will be stored. By default, a column named "HT" is created.

input_col: analyzer.core.columns.Column[source]
output_col: analyzer.core.columns.Column[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]
adlExport(metadata)[source]
class analyzer.modules.common.jets.JetFilter[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

This analyzer filters an input jet collection according to transverse momentum and pseudorapidity requirements, with optional jet ID and pileup ID selections. The resulting filtered jet collection is written to a new output column.

Parameters

input_colColumn

Column containing the input jet collection to be filtered.

output_colColumn

Column where the filtered jet collection will be stored.

min_ptfloat, optional

Minimum transverse momentum (pT) threshold for jets, by default 30.0.

max_abs_etafloat, optional

Maximum absolute pseudorapidity allowed for jets, by default 2.4.

include_pu_idbool, optional

Whether to apply pileup jet ID requirements (for supported eras), by default False.

include_jet_idbool, optional

Whether to apply jet ID requirements, by default False.

Notes

  • Jet ID selection requires both the tight and tightLepVeto bits to be set (bitmask 0b100 and 0b010).

  • Pileup ID selection is only applied for 2016–2018 eras. Jets with pT > 50 GeV automatically pass the PU ID requirement.

input_col: analyzer.core.columns.Column[source]
output_col: analyzer.core.columns.Column[source]
min_pt: float = 30.0[source]
max_abs_eta: float = 2.4[source]
include_pu_id: bool = False[source]
include_jet_id: bool = False[source]
lint()[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]
adlExport(metadata)[source]
class analyzer.modules.common.jets.TopVecHistograms[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Produce kinematic histograms for the leading objects in a collection.

This analyzer creates histograms of $p_T$,$eta$, and $phi$ for the first N objects in a vector-like collection (e.g. jets), where N is configurable. Histograms are produced only for events where the corresponding object exists.

Parameters

prefixstr

Prefix used for naming the generated histograms.

input_colColumn

Column containing the object collection (e.g. jets).

max_idxint

Maximum number of leading objects for which histograms are produced.

prefix: str[source]
input_col: analyzer.core.columns.Column[source]
max_idx: int[source]
run(columns, params)[source]
outputs(metadata)[source]
inputs(metadata)[source]
class analyzer.modules.common.jets.JetCombos[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Compute invariant masses for specified combinations of jets.

This analyzer calculates the invariant mass for each group of jets defined by their indices in the input collection. The results are stored in new columns named using the prefix and the (min, max) indices of the jets in the combination.

Parameters

prefixstr

Prefix used for naming the generated mass columns.

input_colColumn

Column containing the jet collection.

jet_comboslist of list of int

List of jet index combinations. Each inner list specifies the indices of jets to be combined (e.g. [0, 1] for the leading two jets).

prefix: str[source]
input_col: analyzer.core.columns.Column[source]
jet_combos: list[list[int]][source]
getNames()[source]
run(columns, params)[source]
outputs(metadata)[source]
inputs(metadata)[source]
class analyzer.modules.common.jets.JetComboHistograms[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Build composite objects from specified combinations of jets (by index) and produces histograms of their invariant mass and transverse momentum. Each combination is treated independently, and histograms are filled only for events where all required jets are present.

Parameters

prefixstr

Prefix used for naming the generated histograms.

input_colColumn

Column containing the jet collection.

jet_comboslist of list of int

List of jet index combinations. Each inner list specifies the indices of jets to be combined (e.g. [0, 1] for the leading two jets).

prefix: str[source]
input_col: analyzer.core.columns.Column[source]
jet_combos: list[list[int]][source]
mass_axis: analyzer.modules.common.axis.RegularAxis[source]
run(columns, params)[source]
outputs(metadata)[source]
inputs(metadata)[source]
class analyzer.modules.common.jets.JetScaleCorrections[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

This analyzer adjusts jet transverse momentum (pT) and mass according to jet energy corrections (JEC) derived from calibration campaigns. Both nominal (“central”) and systematic variations (up/down JES) are supported. Corrections are applied per jet based on its kinematics and dataset metadata.

Parameters

input_colColumn

Column containing the input jet collection.

output_colColumn

Column where the corrected jets will be stored.

jet_typestr, optional

Jet type for which corrections are applied (e.g. "AK4"), by default "AK4".

use_regroupedbool, optional

Whether to use regrouped JES systematics from metadata (recommended), by default True.

input_col: analyzer.core.columns.Column[source]
output_col: analyzer.core.columns.Column[source]
jet_type: str = 'AK4'[source]
use_regrouped: bool = True[source]
static getKeyJec(name, jet_type, metadata)[source]
run(columns, params)[source]
getCorrection(metadata)[source]
getParameterSpec(metadata)[source]
preloadForMeta(metadata)[source]
inputs(metadata)[source]
outputs(metadata)[source]
class analyzer.modules.common.jets.JetResolutionCorrections[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

This analyzer adjusts jet transverse momentum (pT) and mass to account for detector resolution effects in simulated (MC) events. Smearing is applied based on the per-jet resolution, matching to generated jets, and optional systematic variations.

Parameters

input_colColumn

Column containing the reconstructed jet collection.

genjet_colColumn

Column containing the generator-level jets used for matching.

output_colColumn

Column where the smeared jets will be stored.

jet_typestr, optional

Jet type (e.g., "AK4") for which JER corrections are applied, by default "AK4".

use_regroupedbool, optional

Whether to use regrouped JER systematics, by default True.

should_runMetadataExpr, optional

Expression controlling whether this module should run (default: MC events only).

Notes

  • Jets are matched to gen-jets via metadata-specified columns.

  • Correction sets are cached per file to avoid repeated I/O.

input_col: analyzer.core.columns.Column[source]
genjet_col: analyzer.core.columns.Column[source]
output_col: analyzer.core.columns.Column[source]
jet_type: str = 'AK4'[source]
use_regrouped: bool = True[source]
should_run: analyzer.core.analysis_modules.MetadataExpr[source]
static getKeyJer(name, jet_type, metadata)[source]
run(columns, params)[source]
getParameterSpec(metadata)[source]
getSmearer(metadata)[source]
getCorrection(metadata)[source]
preloadForMeta(metadata)[source]
inputs(metadata)[source]
outputs(metadata)[source]
class analyzer.modules.common.jets.PileupJetIdSF[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Compute pileup jet ID scale factors for Monte Carlo events.

This analyzer calculates per-event weights corresponding to the pileup jet ID efficiency correction. Only jets with pT < 50 GeV and matched to a generator-level jet are considered.

Parameters

input_colColumn

Column containing the input jet collection.

working_pointstr

Pileup ID working point to use (e.g., "loose", "medium", "tight").

weight_namestr, optional

Name of the weight column to store, by default "puid_sf".

should_runMetadataExpr, optional

Expression controlling whether this module should run. By default, runs only for Run 2 Monte Carlo datasets.

Notes

  • The per-jet scale factors are combined multiplicatively per event.

  • Uses correction files defined in dataset metadata under metadata["era"]["jet_pileup_id"].

input_col: analyzer.core.columns.Column[source]
working_point: str[source]
weight_name: str = 'puid_sf'[source]
should_run: analyzer.core.analysis_modules.MetadataExpr[source]
getParameterSpec(metadata)[source]
run(columns, params)[source]
getCorrection(metadata)[source]
preloadForMeta(metadata)[source]
inputs(metadata)[source]
outputs(metadata)[source]