1 """Combined Tile Digitization functions
3 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.Enums
import ProductionStep
7 from AthenaConfiguration.Enums
import LHCPeriod
8 from TileConfiguration.TileConfigFlags
import TileRunType
11 """Return ComponentAccumulator with standard Tile Trigger Digitization configuration"""
13 from TileSimAlgs.TileHitToTTL1Config
import TileHitToTTL1OutputCfg
16 if flags.GeoModel.Run > LHCPeriod.Run1:
17 from TileSimAlgs.TileMuonReceiverConfig
import TilePulseForTileMuonReceiverOutputCfg
20 from TileSimAlgs.TileMuonReceiverDecisionConfig
import TileMuonReceiverDecisionOutputCfg
23 from TileL2Algs.TileL2Config
import TileRawChannelToL2OutputCfg
30 """Return ComponentAccumulator with Overlay Tile Trigger Digitization configuration"""
33 if flags.GeoModel.Run > LHCPeriod.Run1:
34 from TileSimAlgs.TileMuonReceiverConfig
import TilePulseForTileMuonReceiverOutputCfg
37 from TileSimAlgs.TileMuonReceiverDecisionConfig
import TileMuonReceiverDecisionOutputCfg
40 from TileL2Algs.TileL2Config
import TileRawChannelToL2OutputCfg
47 """Return ComponentAccumulator with standard Tile Digitization configuration"""
49 from TileSimAlgs.TileDigitsMakerConfig
import TileDigitsMakerOutputCfg
52 if flags.Common.ProductionStep != ProductionStep.PileUpPresampling
and flags.Output.doWriteRDO:
53 from TileRecUtils.TileRawChannelMakerConfig
import TileRawChannelMakerOutputCfg
56 from TileRecUtils.TileRawChannelMakerConfig
import TileRawChannelMakerCfg
59 if flags.Digitization.EnableCaloHSTruthRecoInputs:
60 if flags.Output.doWriteRDO:
61 from TileRecUtils.TileRawChannelMakerConfig
import TileRawChannelMakerDigiHSTruthOutputCfg
64 from TileRecUtils.TileRawChannelMakerConfig
import TileRawChannelMakerDigiHSTruthCfg
71 if __name__ ==
"__main__":
73 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
74 from AthenaConfiguration.TestDefaults
import defaultConditionsTags, defaultTestFiles
75 from AthenaCommon.Logging
import log
82 flags.Input.Files = defaultTestFiles.HITS_RUN2
83 flags.Tile.RunType = TileRunType.PHY
84 flags.Output.RDOFileName =
'myRDO-TileDigitization.pool.root'
85 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN2_MC
86 flags.Digitization.PileUp =
False
94 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
97 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
100 if 'EventInfo' not in flags.Input.Collections:
101 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
103 inputKey=
'McEventInfo',
104 outputKey=
'EventInfo'))
109 acc.printConfig(withDetails =
True, summariseProps =
True)
110 acc.store(
open(
'TileDigitization.pkl',
'wb') )
112 sc = acc.run(maxEvents=3)
115 sys.exit(
not sc.isSuccess())