ATLAS Offline Software
Loading...
Searching...
No Matches
PixelRawDataByteStreamCnvConfig.py
Go to the documentation of this file.
2# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3#
4
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory import CompFactory
7from AthenaConfiguration.Enums import ProductionStep
8from PixelConditionsAlgorithms.PixelConditionsConfig import PixelCablingCondAlgCfg, PixelHitDiscCnfgAlgCfg
9
10
11def PixelRawDataProviderToolCfg(flags, prefix="", suffix="", storeInDetTimeCollections=True):
12 acc = ComponentAccumulator()
13 decoder = CompFactory.PixelRodDecoder(CheckDuplicatedPixel = False if "data15" in flags.Input.ProjectName else True)
14 acc.setPrivateTools(CompFactory.PixelRawDataProviderTool(Decoder = decoder, StoreInDetTimeCollections = storeInDetTimeCollections))
15 return acc
16
17
18def PixelRawDataProviderAlgCfg(flags, **kwargs):
19 """ Main function to configure Pixel raw data decoding """
20 acc = PixelCablingCondAlgCfg(flags)
21 acc.merge(PixelHitDiscCnfgAlgCfg(flags))
22
23 if flags.Common.ProductionStep is ProductionStep.MinbiasPreprocessing:
24 kwargs.setdefault("RDOKey", f"{flags.Overlay.BkgPrefix}PixelRDOs")
25 else:
26 kwargs.setdefault("RDOKey", "PixelRDOs")
27
28 from PixelReadoutGeometry.PixelReadoutGeometryConfig import PixelReadoutManagerCfg
29 acc.merge (PixelReadoutManagerCfg(flags))
30
31 from RegionSelector.RegSelToolConfig import regSelTool_Pixel_Cfg
32 regSelTool = acc.popToolsAndMerge(regSelTool_Pixel_Cfg(flags))
33 storeInDetTimeCollections = kwargs.pop("StoreInDetTimeCollections",True)
34
35 prefix = kwargs.pop("prefix","")
36 suffix = kwargs.pop("suffix","")
37 providerTool = acc.popToolsAndMerge(PixelRawDataProviderToolCfg(flags, prefix, suffix, storeInDetTimeCollections))
38 acc.addEventAlgo(CompFactory.PixelRawDataProvider(RegSelTool = regSelTool,
39 ProviderTool = providerTool,
40 **kwargs))
41 return acc
42
43
44def TrigPixelRawDataProviderAlgCfg(flags, suffix, RoIs, **kwargs):
45 kwargs.setdefault('name', 'TrigPixelRawDataProvider'+suffix)
46 kwargs.setdefault('prefix', "Trig")
47 kwargs.setdefault('suffix', suffix)
48 kwargs.setdefault('RoIs', RoIs)
49 kwargs.setdefault('isRoI_Seeded', True)
50 kwargs.setdefault('RDOCacheKey', flags.Trigger.InDetTracking.PixRDOCacheKey)
51 kwargs.setdefault('BSErrorsCacheKey', flags.Trigger.InDetTracking.PixBSErrCacheKey)
52 kwargs.setdefault('StoreInDetTimeCollections', False)
53 return PixelRawDataProviderAlgCfg(flags, **kwargs)
TrigPixelRawDataProviderAlgCfg(flags, suffix, RoIs, **kwargs)
PixelRawDataProviderToolCfg(flags, prefix="", suffix="", storeInDetTimeCollections=True)