7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.Enums
import ProductionStep
10 from DigitizationConfig.PileUpMergeSvcConfig
import PileUpMergeSvcCfg, PileUpXingFolderCfg
24 """Return a PileUpXingFoldertool for AFP SID"""
28 kwargs.setdefault(
"ItemList", [
"AFP_SIDSimHitCollection#AFP_SIDSimHitCollection"])
33 """Return a PileUpXingFoldertool for AFP TD"""
37 kwargs.setdefault(
"ItemList", [
"AFP_TDSimHitCollection#AFP_TDSimHitCollection"])
42 """Return ComponentAccumulator with AFP digitization tool."""
45 if flags.Digitization.PileUp:
47 if flags.Digitization.DoXingByXingPileUp:
53 kwargs.setdefault(
"mergeSvc", acc.getPrimaryAndMerge(
PileUpMergeSvcCfg(flags, Intervals=intervals)).name)
54 kwargs.setdefault(
"OnlyUseContainerName",
True)
56 kwargs.setdefault(
"mergeSvc",
'')
57 kwargs.setdefault(
"OnlyUseContainerName",
False)
59 from RngComps.RngCompsConfig
import AthRNGSvcCfg
60 kwargs.setdefault(
"RndmSvc", acc.getPrimaryAndMerge(
AthRNGSvcCfg(flags)).name)
62 acc.setPrivateTools(CompFactory.AFP_PileUpTool(name, **kwargs))
67 """Return ComponentAccumulator with AFP_DigitizationTool for Overlay"""
69 kwargs.setdefault(
"mergeSvc",
'')
70 kwargs.setdefault(
"OnlyUseContainerName",
False)
72 acc.setPrivateTools(tool)
77 """Return ComponentAccumulator with Output for AFP. Not standalone."""
79 if flags.Output.doWriteRDO:
80 ItemList = [
"AFP_TDDigiCollection#AFP_TDDigiCollection",
81 "AFP_SiDigiCollection#AFP_SiDigiCollection",
82 "xAOD::AFPSiHitContainer#AFPSiHitContainer",
"xAOD::AFPSiHitAuxContainer#AFPSiHitContainerAux.",
83 "xAOD::AFPToFHitContainer#AFPToFHitContainer",
"xAOD::AFPToFHitAuxContainer#AFPToFHitContainerAux."]
84 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
90 """Return ComponentAccumulator for AFP digitization"""
92 if "PileUpTools" not in kwargs:
94 kwargs[
"PileUpTools"] = PileUpTools
95 from DigitizationConfig.PileUpToolsConfig
import PileUpToolsCfg
101 """Return ComponentAccumulator with AFP_DigiTop."""
103 if flags.Common.ProductionStep != ProductionStep.FastChain:
104 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
105 acc.merge(
SGInputLoaderCfg(flags,Load={(
'AFP_TDSimHitCollection',
'StoreGateSvc+AFP_TDSimHitCollection'),
106 (
'AFP_SIDSimHitCollection',
'StoreGateSvc+AFP_SIDSimHitCollection')} ) )
107 if "DigitizationTool" not in kwargs:
110 if flags.Concurrency.NumThreads > 0:
111 kwargs.setdefault(
"Cardinality", flags.Concurrency.NumThreads)
114 kwargs.setdefault(
"ExtraInputs", flags.Overlay.ExtraInputs)
116 acc.addEventAlgo(CompFactory.AFP_DigiTop(
"AFP_DigiTop", **kwargs))
121 """Return ComponentAccumulator for AFP digitization and Output"""
130 """Return ComponentAccumulator for AFP digitization and Output"""