ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
Digitization
DigitizationConfig
python
PileUpMergeSvcConfig.py
Go to the documentation of this file.
1
"""ComponentAccumulator configuration for PileUpMergeSvc
2
3
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4
"""
5
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
6
from
AthenaConfiguration.ComponentFactory
import
CompFactory
7
from
AthenaConfiguration.Enums
import
ProductionStep
8
9
10
def
PileUpMergeSvcCfg
(flags, name="PileUpMergeSvc", Intervals=[], **kwargs):
11
"""Return ComponentAccumulator with PileUpMergeSvc
12
13
If doing XingByXingPileUp, Intervals should contian PileUpXingFolder tools.
14
Otherwise it should be empty, and we enforce that here.
15
"""
16
acc = ComponentAccumulator()
17
18
if
not
flags.Digitization.DoXingByXingPileUp:
19
# handle input type variety
20
if
not
isinstance(Intervals, list):
21
Intervals = [Intervals]
22
kwargs[
"Intervals"
] = Intervals
23
24
presampling = flags.Common.ProductionStep == ProductionStep.PileUpPresampling
25
if
presampling:
26
kwargs.setdefault(
27
"EventInfoKeyName"
, flags.Overlay.BkgPrefix +
"EventInfo"
28
)
# FIXME Make default?
29
else
:
30
kwargs.setdefault(
"EventInfoKeyName"
,
"EventInfo"
)
# FIXME Make default?
31
acc.addService(CompFactory.PileUpMergeSvc(name, **kwargs), primary=
True
)
32
return
acc
33
34
35
def
PileUpXingFolderCfg
(flags, name="PileUpXingFolder", **kwargs):
36
"""Return a configured PileUpXingFolder tool"""
37
acc = ComponentAccumulator()
38
acc.setPrivateTools(CompFactory.PileUpXingFolder(name, **kwargs))
39
return
acc
python.PileUpMergeSvcConfig.PileUpMergeSvcCfg
PileUpMergeSvcCfg(flags, name="PileUpMergeSvc", Intervals=[], **kwargs)
Definition
PileUpMergeSvcConfig.py:10
python.PileUpMergeSvcConfig.PileUpXingFolderCfg
PileUpXingFolderCfg(flags, name="PileUpXingFolder", **kwargs)
Definition
PileUpMergeSvcConfig.py:35
Generated on
for ATLAS Offline Software by
1.17.0