40 """Return ComponentAccumulator with configured MM_DigitizationTool"""
43 from RngComps.RngCompsConfig
import AthRNGSvcCfg
44 kwargs.setdefault(
"RndmSvc", result.getPrimaryAndMerge(
AthRNGSvcCfg(flags)))
46 if flags.Digitization.PileUp:
48 if flags.Digitization.DoXingByXingPileUp:
52 intervals += [result.popToolsAndMerge(
MM_RangeCfg(flags))]
53 kwargs.setdefault(
"PileUpMergeSvc", result.getPrimaryAndMerge(
PileUpMergeSvcCfg(flags, Intervals=intervals)).name)
55 kwargs.setdefault(
"PileUpMergeSvc",
'')
57 kwargs.setdefault(
"OnlyUseContainerName", flags.Digitization.PileUp)
59 kwargs.setdefault(
"OutputObjectName",
"MM_DIGITS")
60 if flags.Common.ProductionStep == ProductionStep.PileUpPresampling:
61 kwargs.setdefault(
"OutputSDOName", flags.Overlay.BkgPrefix +
"MM_SDO")
63 kwargs.setdefault(
"OutputSDOName",
"MM_SDO")
66 if not flags.Muon.usePhaseIIGeoSetup:
67 from MuonConfig.MuonCalibrationConfig
import NSWCalibToolCfg, MMCalibSmearingToolCfg
68 kwargs.setdefault(
"CalibrationTool", result.popToolsAndMerge(
NSWCalibToolCfg(flags)))
71 kwargs.setdefault(
"CheckSimHits",
True)
72 the_tool = CompFactory.MM_DigitizationTool(name, **kwargs)
73 elif flags.Muon.doFastMMDigitization:
74 kwargs.setdefault(
"StreamName",
"MmSimForklift")
75 kwargs.setdefault(
"SimHitKey",
"xMmSimHits")
77 from MuonConfig.MuonCondAlgConfig import MmDigitEffiCondAlgCfg
78 result.merge(MmDigitEffiCondAlgCfg(flags,readFromJSON="EffMapMM.json"))
79 kwargs.setdefault("EffiDataKey", "MmDigitEff")
82 kwargs.setdefault(
"EffiDataKey",
"")
84 from MuonConfig.MuonCalibrationConfig
import NswErrorCalibDbAlgCfg
86 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
88 the_tool = CompFactory.MuonR4.MmFastDigiTool(name, **kwargs)
90 from MuonConfig.MuonCalibrationConfig
import NSWCalibToolCfg, MMCalibSmearingToolCfg
91 kwargs.setdefault(
"CalibrationTool", result.popToolsAndMerge(
NSWCalibToolCfg(flags)))
94 kwargs.setdefault(
"CheckSimHits",
True)
96 kwargs.setdefault(
"StreamName",
"MmSimForklift")
97 kwargs.setdefault(
"SimHitKey",
"xMmSimHits")
99 kwargs.setdefault(
"EffiDataKey",
"")
101 from MuonConfig.MuonCalibrationConfig
import NswErrorCalibDbAlgCfg
103 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
105 the_tool = CompFactory.MuonR4.MM_DigitizationTool(name, **kwargs)
108 result.setPrivateTools(the_tool)