1 """Define methods to construct configured BCM Digitization tools and algs
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
8 from RngComps.RngCompsConfig
import AthRNGSvcCfg
9 from PixelGeoModel.PixelGeoModelConfig
import PixelReadoutGeometryCfg
10 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
11 from DigitizationConfig.TruthDigitizationOutputConfig
import TruthDigitizationOutputCfg
12 from DigitizationConfig.PileUpToolsConfig
import PileUpToolsCfg
13 from DigitizationConfig.PileUpMergeSvcConfig
import PileUpMergeSvcCfg, PileUpXingFolderCfg
27 """Return a BCM configured PileUpXingFolder tool"""
31 kwargs.setdefault(
"CacheRefreshFrequency", 1.0)
32 kwargs.setdefault(
"ItemList", [
"SiHitCollection#BCMHits"])
37 """Return a ComponentAccumulator with configured BCM_DigitizationTool"""
39 kwargs.setdefault(
"RndmSvc",
41 kwargs.setdefault(
"HitCollName",
"BCMHits")
42 if flags.Common.ProductionStep == ProductionStep.PileUpPresampling:
43 kwargs.setdefault(
"OutputRDOKey", flags.Overlay.BkgPrefix +
"BCM_RDOs")
44 kwargs.setdefault(
"OutputSDOKey", flags.Overlay.BkgPrefix +
"BCM_SDO_Map")
45 elif flags.Common.isOverlay:
46 kwargs.setdefault(
"OnlyUseContainerName",
False)
47 kwargs.setdefault(
"OutputRDOKey", flags.Overlay.SigPrefix +
"BCM_RDOs")
48 kwargs.setdefault(
"OutputSDOKey", flags.Overlay.SigPrefix +
"BCM_SDO_Map")
50 kwargs.setdefault(
"OutputRDOKey",
"BCM_RDOs")
51 kwargs.setdefault(
"OutputSDOKey",
"BCM_SDO_Map")
52 if flags.Digitization.DoInnerDetectorNoise:
53 kwargs.setdefault(
"ModNoise", [90.82] * 8)
55 kwargs.setdefault(
"ModNoise", [0.0] * 8)
56 kwargs.setdefault(
"ModSignal", [450.0] * 8)
57 kwargs.setdefault(
"NinoThr", [330.0] * 8)
59 kwargs.setdefault(
"MIPDeposit", 0.33)
62 kwargs.setdefault(
"EffDistanceParam", 4.0)
63 kwargs.setdefault(
"EffSharpnessParam", 0.11)
64 kwargs.setdefault(
"TimeDelay", 9.0)
65 if flags.Digitization.DoXingByXingPileUp:
68 kwargs.setdefault(
"RndmSvc", acc.getPrimaryAndMerge(
AthRNGSvcCfg(flags)).name)
70 BCM_DigitizationTool = CompFactory.BCM_DigitizationTool
76 """Return ComponentAccumulator with BCM_DigitizationTool for non-overlay"""
78 if flags.Digitization.PileUp:
80 if not flags.Digitization.DoXingByXingPileUp:
82 kwargs.setdefault(
"MergeSvc", acc.getPrimaryAndMerge(
PileUpMergeSvcCfg(flags, Intervals=intervals)).name)
84 kwargs.setdefault(
"MergeSvc",
'')
85 kwargs.setdefault(
"OnlyUseContainerName", flags.Digitization.PileUp)
87 acc.setPrivateTools(tool)
92 """Return ComponentAccumulator with BCM_DigitizationTool for Overlay"""
94 kwargs.setdefault(
"MergeSvc",
'')
95 kwargs.setdefault(
"OnlyUseContainerName",
False)
97 acc.setPrivateTools(tool)
102 """Return ComponentAccumulator with Output for BCM. Not standalone."""
104 if flags.Output.doWriteRDO:
105 ItemList = [
"BCM_RDO_Container#*"]
106 if flags.Digitization.EnableTruth:
107 ItemList += [
"InDetSimDataCollection#*"]
114 """Return ComponentAccumulator for BCM digitization"""
116 if "PileUpTools" not in kwargs:
118 kwargs[
"PileUpTools"] = PileUpTools
124 """Return ComponentAccumulator with BCM Overlay digitization"""
126 if flags.Common.ProductionStep != ProductionStep.FastChain:
127 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
130 if "DigitizationTool" not in kwargs:
132 kwargs[
"DigitizationTool"] = tool
134 if flags.Concurrency.NumThreads > 0:
135 kwargs.setdefault(
"Cardinality", flags.Concurrency.NumThreads)
138 kwargs.setdefault(
"ExtraInputs", flags.Overlay.ExtraInputs)
140 BCM_Digitization = CompFactory.BCM_Digitization
147 """Return ComponentAccumulator for BCM digitization and Output"""
154 """Return ComponentAccumulator with BCM Overlay digitization and Output"""