3 ComponentAccumulator tool configuration for ISF_ActsTools
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from AthenaCommon.Logging
import logging
9 from ISF_Algorithms.CollectionMergerConfig
import CollectionMergerCfg
12 """Return ActsFatrasWriteHandler configured with ComponentAccumulator"""
14 mlog = logging.getLogger(name)
15 mlog.info(
'Start configuration ActsFatrasWriteHandler')
17 if flags.Detector.EnablePixel:
18 bare_collection_name =
"PixelHits"
19 merger_input_property =
"PixelHits"
21 if flags.Detector.EnableITkPixel:
22 bare_collection_name =
"ITkPixelHits"
23 merger_input_property =
"ITkPixelHits"
25 mergeable_collection_suffix =
"_Fatras"
28 mergeable_collection_suffix,
29 merger_input_property,
33 if flags.Detector.EnableSCT:
34 bare_collection_name =
"SCT_Hits"
35 merger_input_property =
"SCTHits"
37 if flags.Detector.EnableITkPixel:
38 bare_collection_name =
"ITkStripHits"
39 merger_input_property =
"ITkStripHits"
43 mergeable_collection_suffix,
44 merger_input_property,
48 kwargs.setdefault(
"PixelCollectionName", pixel_hits_collection_name)
49 kwargs.setdefault(
"SCTCollectionName", sct_hits_collection_name)
51 acc.setPrivateTools(CompFactory.ActsFatrasWriteHandler(name=name, **kwargs))
55 """Return ISF_FatrasSimHitCreatorID configured with ComponentAccumulator"""
57 mlog = logging.getLogger(name)
58 mlog.info(
'Start configuration ISF_ActsFatrasSimTool')
59 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometryToolCfg
62 kwargs.setdefault(
"MaxSteps", 2000)
65 from ISF_Services.ISF_ServicesConfig
import TruthServiceCfg
66 kwargs.setdefault(
"TruthRecordService", acc.getPrimaryAndMerge(
TruthServiceCfg(flags)))
67 from RngComps.RngCompsConfig
import AthRNGSvcCfg
68 kwargs.setdefault(
"RNGService", acc.getPrimaryAndMerge(
AthRNGSvcCfg(flags)))
72 if flags.Detector.EnablePixel:
73 if (flags.Sim.ISFRun
and flags.Sim.ISF.HITSMergingRequired.get(
'ID',
True)):
74 writtenContainers += [(
"SiHitCollection",
"PixelHits_Fatras")]
75 if flags.Detector.EnableSCT:
76 if (flags.Sim.ISFRun
and flags.Sim.ISF.HITSMergingRequired.get(
'ID',
True)):
77 writtenContainers += [(
"SiHitCollection",
"SCT_Hits_Fatras")]
78 if flags.Detector.EnableITkPixel:
79 if (flags.Sim.ISFRun
and flags.Sim.ISF.HITSMergingRequired.get(
'ITk',
True)):
80 writtenContainers += [(
"SiHitCollection",
"ITkPixelHits_Fatras")]
81 if flags.Detector.EnableITkStrip:
82 if (flags.Sim.ISFRun
and flags.Sim.ISF.HITSMergingRequired.get(
'ITk',
True)):
83 writtenContainers += [(
"SiHitCollection",
"ITkStripHits_Fatras")]
85 kwargs.setdefault(
"ExtraOutputs", writtenContainers)
86 acc.setPrivateTools(CompFactory.ISF.ActsFatrasSimTool(name, **kwargs))