analyzer.modules.common.event_level_corrections

Classes

PileupSF

Apply pileup scale factors to Monte Carlo events.

L1PrefiringSF

Apply L1 prefiring scale factors to Monte Carlo events.

PosNegGenWeight

Abstract base class for all analyzer modules.

GoldenLumi

Apply a golden JSON luminosity selection for data events.

NoiseFilter

Apply standard noise filters to data events.

Module Contents

class analyzer.modules.common.event_level_corrections.PileupSF[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Apply pileup scale factors to Monte Carlo events.

This analyzer evaluates the pileup weight based on the number of true interactions in the event and applies systematic variations if requested.

Parameters

weight_namestr, optional

Name of the column where the pileup weights are stored, by default “pileup_sf”.

should_runMetadataExpr, optional

Condition to determine if the module should run. By default runs only on MC samples.

weight_name: str = 'pileup_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]
class analyzer.modules.common.event_level_corrections.L1PrefiringSF[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Apply L1 prefiring scale factors to Monte Carlo events.

This analyzer retrieves the L1 prefiring weight and adds it to a named weight column, optionally applying systematic variations.

Parameters

weight_namestr, optional

Name of the output weight column, by default “l1_prefiring”.

should_runMetadataExpr, optional

Condition to determine if the module should run. By default, it runs on MC samples for Run 2.

weight_name: str = 'l1_prefiring'[source]
should_run: analyzer.core.analysis_modules.MetadataExpr[source]
getParameterSpec(metadata)[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]
class analyzer.modules.common.event_level_corrections.PosNegGenWeight[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Abstract base class for all analyzer modules. Subclasses must implement the inputs and run methods.

should_run: analyzer.core.analysis_modules.MetadataExpr[source]
weight_name: str = 'pos_neg_weight'[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]
class analyzer.modules.common.event_level_corrections.GoldenLumi[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Apply a golden JSON luminosity selection for data events.

This analyzer filters events to only include those that are within certified good luminosity sections for the given data-taking era.

Parameters

selection_namestr, optional

Name of the selection column to store the golden JSON filter, by default “golden_lumi”.

should_runMetadataExpr, optional

Condition to determine if the module should run. By default, only runs on real data samples.

Notes

  • The certified luminosity sections are read from the metadata for the given era under “golden_json”.

selection_name: str = 'golden_lumi'[source]
should_run: analyzer.core.analysis_modules.MetadataExpr[source]
inputs(metadata)[source]
outputs(metadata)[source]
run(columns, params)[source]
class analyzer.modules.common.event_level_corrections.NoiseFilter[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Apply standard noise filters to data events.

This analyzer combines multiple event-level noise flags and produces a single selection column indicating events that pass all required noise filters.

Parameters

selection_namestr, optional

Name of the selection column to store the combined noise filter, by default “noise_filters”.

selection_name: str = 'noise_filters'[source]
inputs(metadata)[source]
outputs(metadata)[source]
run(columns, params)[source]
adlExport(metadata)[source]