ATLAS Offline Software
Loading...
Searching...
No Matches
ActsGPUGeometryConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5from AthDeviceComps.AthDeviceCompsConfig import MemoryResourcesToolCfg, CopyToolCfg
6
7# ============================================================
8# Service configurations
9# ============================================================
10
11def JSONDeviceDetectorDescriptionProviderSvcCfg(flags, **kwargs) -> ComponentAccumulator:
12
13 acc = ComponentAccumulator()
14
15 geoTag = flags.GeoModel.AtlasVersion
16 if geoTag not in ["ATLAS-P2-RUN4-03-00-01","ATLAS-P2-RUN4-03-00-00"]:
17 from AthenaCommon.Logging import logging
18 log = logging.getLogger("JSONDeviceDetectorDescriptionCfg")
19 log.warning(
20 "detray<->Athena id mapping (athenaIdentifierToDetrayMap.txt) is only "
21 "validated against geo tag %s — this job is using '%s'. The detray/"
22 "Athena identifier map will likely be incomplete or wrong for this "
23 "geometry, and RDOtoTracccCellConverterAlg may fail with "
24 "'No detray id found for Athena identifier ...' partway through the job.",
25 "ATLAS-P2-RUN4-03-00-*", geoTag,
26 )
27
28 kwargs.setdefault("MemoryResourcesTool", acc.popToolsAndMerge(MemoryResourcesToolCfg(flags)))
29 kwargs.setdefault("CopyProviderTool", acc.popToolsAndMerge(CopyToolCfg(flags)))
30 kwargs.setdefault("GeometryFile", "dev/ACTS/detray-itk/detray_detector_geometry-for-fun.json")
31 kwargs.setdefault("DigitizationFile", "dev/ACTS/detray-itk/ITk_digitization_config.json")
32 kwargs.setdefault("ConditionsFile", "dev/ACTS/detray-itk/ITk_conditions_config.json")
33 kwargs.setdefault("MapFile", "dev/ACTS/detray-itk/athenaIdentifierToDetrayMap.txt")
34 kwargs.setdefault("SurfaceGridFile", "dev/ACTS/detray-itk/detray_detector_surface_grids.json")
35 kwargs.setdefault("MaterialFile", "dev/ACTS/detray-itk/detray_detector_material_maps.json")
36 kwargs.setdefault("GeoIdMappingObjectName", "TracccGeometryIdMapping")
37 kwargs.setdefault("DeviceDigitizationObjectName", "TracccDeviceDigitizationConfig")
38 kwargs.setdefault("HostDigitizationObjectName", "TracccHostDigitizationConfig")
39 kwargs.setdefault("DeviceConditionsObjectName", "TracccDeviceCondConfig")
40 kwargs.setdefault("HostConditionsObjectName", "TracccHostCondConfig")
41 kwargs.setdefault("DeviceDetectorName", "TracccDeviceDetectorGeometry")
42 kwargs.setdefault("HostDetectorName", "TracccHostDetectorGeometry")
43 svc = CompFactory.ActsTrk.JSONDeviceDetectorDescriptionProviderSvc(**kwargs)
44 acc.addService(svc, primary=True, create=True)
45 return acc
ComponentAccumulator JSONDeviceDetectorDescriptionProviderSvcCfg(flags, **kwargs)