1 """ComponentAccumulator configuration for PileUpMergeSvc
3 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaConfiguration.Enums
import ProductionStep
11 """Return ComponentAccumulator with PileUpMergeSvc
13 If doing XingByXingPileUp, Intervals should contian PileUpXingFolder tools.
14 Otherwise it should be empty, and we enforce that here.
18 if not flags.Digitization.DoXingByXingPileUp:
20 if not isinstance(Intervals, list):
21 Intervals = [Intervals]
22 kwargs[
"Intervals"] = Intervals
24 presampling = flags.Common.ProductionStep == ProductionStep.PileUpPresampling
27 "EventInfoKeyName", flags.Overlay.BkgPrefix +
"EventInfo"
30 kwargs.setdefault(
"EventInfoKeyName",
"EventInfo")
31 acc.addService(CompFactory.PileUpMergeSvc(name, **kwargs), primary=
True)
36 """Return a configured PileUpXingFolder tool"""
38 acc.setPrivateTools(CompFactory.PileUpXingFolder(name, **kwargs))