10 """Return configured ComponentAccumulator and tool for MaterialMapping"""
13 LayerMaterialName =
'LayerMaterialITK'
14 LayerMaterialDirectory =
'/GLOBAL/TrackingGeo/'
17 from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig
import TrackingGeometryCondAlgCfg
19 geom_cond_key =
'AtlasTrackingGeometry'
20 kwargs.setdefault(
"TrackingGeometryReadKey", geom_cond_key)
22 if 'MappingVolumeName' not in kwargs :
23 if flags.Detector.GeometryHGTD:
24 kwargs.setdefault(
"MappingVolumeName",
'HGTD::Detectors::HGTD')
26 kwargs.setdefault(
"MappingVolumeName",
'InDet::Containers::InnerDetector')
28 if 'ExtrapolationEngine' not in kwargs :
29 from TrkConfig.AtlasExtrapolationEngineConfig
import AtlasExtrapolationEngineCfg
32 if 'MaterialMapper' not in kwargs :
33 MaterialMapper = CompFactory.Trk.MaterialMapper(
"MaterialMapper")
34 kwargs.setdefault(
"MaterialMapper", MaterialMapper)
36 if 'LayerMaterialRecordAnalyser' not in kwargs :
37 LayerMaterialAnalyser = CompFactory.Trk.LayerMaterialAnalyser(name=
"LayerMaterialRecordAnalyser")
38 kwargs.setdefault(
"LayerMaterialRecordAnalyser", LayerMaterialAnalyser)
40 if 'LayerMaterialCreators' not in kwargs :
41 BinnedLayerMaterialCreator = CompFactory.Trk.BinnedLayerMaterialCreator(name=
"BinnedLayerMaterialCreator")
42 BinnedLayerMaterialCreator.LayerMaterialName = LayerMaterialName
43 BinnedLayerMaterialCreator.LayerMaterialDirectory = LayerMaterialDirectory
44 LayerMaterialCreators = [BinnedLayerMaterialCreator]
45 kwargs.setdefault(
"LayerMaterialCreators", LayerMaterialCreators)
47 if 'LayerMaterialAnalysers' not in kwargs :
48 BinnedLayerMaterialAnalyser = CompFactory.Trk.LayerMaterialAnalyser(name=
"BinnedLayerMaterialAnalyser")
49 BinnedLayerMaterialAnalyser.LayerMaterialName = LayerMaterialName
50 BinnedLayerMaterialAnalyser.ValidationTreeName =
'BinnedLayerMaterialAnalyser'
51 BinnedLayerMaterialAnalyser.ValidationTreeDescription =
'Output of the BinnedLayerMaterialAnalyser'
52 BinnedLayerMaterialAnalyser.ValidationTreeFolder =
'/val/BinnedLayerMaterialAnalyser'
53 LayerMaterialAnalysers = [ BinnedLayerMaterialAnalyser ]
54 kwargs.setdefault(
"LayerMaterialAnalysers", LayerMaterialAnalysers)
56 histSvc = CompFactory.THistSvc(Output = [
"val DATAFILE='AtlasGeant4Geometry.root' TYPE='ROOT' OPT='RECREATE'"])
57 result.addService( histSvc )
59 algo = CompFactory.Trk.MaterialMapping(name=name, **kwargs)
60 result.addEventAlgo(algo, primary =
True)
62 from RegistrationServices.OutputConditionsAlgConfig
import OutputConditionsAlgCfg
64 outputFile=
"AtlasLayerMaterial.pool.root",
65 ObjectList=[
'Trk::LayerMaterialMap#'+LayerMaterialDirectory+LayerMaterialName],
66 WriteIOV=
True,IOVTagList=[flags.ITk.trackingGeometry.materialTag+
str(flags.ITk.trackingGeometry.version)] ))
68 result.addService(CompFactory.IOVRegistrationSvc(RecreateFolders =
True))