3 """Define methods to configure TrkDetDescrAlgs"""
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
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))
74 """Return configured ComponentAccumulator and tool for MaterialMapping"""
78 from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig
import TrackingGeometryCondAlgCfg
80 geom_cond_key =
'AtlasTrackingGeometry'
81 kwargs.setdefault(
"TrackingGeometryReadKey", geom_cond_key)
83 if 'MaterialMapper' not in kwargs :
84 MaterialMapper = CompFactory.Trk.MaterialMapper(
"MaterialMapper")
85 kwargs.setdefault(
"MaterialMapper", MaterialMapper)
87 if 'MinEta' not in kwargs :
89 kwargs.setdefault(
"MinEta", minEta)
91 if 'MaxEta' not in kwargs :
93 kwargs.setdefault(
"MaxEta", maxEta)
95 histSvc = CompFactory.THistSvc(Output = [
"val DATAFILE='AtlasTrackingGeometry.root' TYPE='ROOT' OPT='RECREATE'"])
96 result.addService( histSvc )
98 algo = CompFactory.Trk.MaterialValidation(name=name, **kwargs)
99 result.addEventAlgo(algo, primary =
True)