1 """Configure the algorithm to carry PileUpTools for Digitization
3 Copyright (C) 2002-2019 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
9 PileUpToolsAlg, PileUpMTAlg, DigitizationAlg = CompFactory.getComps(
10 "PileUpToolsAlg",
"PileUpMTAlg",
"DigitizationAlg"
16 Return ComponentAccumulator with the correct algorithm to carry Digitization PileUpTools
18 Keyword argument "PileUpTools" may be an AlgTool or list of AlgTools.
23 PileUpTools = kwargs.setdefault(
"PileUpTools", [])
24 if not isinstance(PileUpTools, list):
25 kwargs[
"PileUpTools"] = [PileUpTools]
28 kwargs[
"ExtraInputs"] = flags.Digitization.ExtraInputs
31 if flags.Concurrency.NumThreads > 0
and flags.Digitization.PileUp:
34 if flags.Digitization.DoXingByXingPileUp:
40 if flags.Common.ProductionStep == ProductionStep.PileUpPresampling:
41 kwargs[
"EventInfoKey"] = flags.Overlay.BkgPrefix +
"EventInfo"
43 acc.addEventAlgo(Alg(flags.Digitization.DigiSteeringConf, **kwargs))