3 """Define method to construct configured Tile muon receiver decision algorithm"""
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaConfiguration.Enums
import ProductionStep
8 from TileConfiguration.TileConfigFlags
import TileRunType
11 """Return component accumulator with configured Tile muon receiver decision algorithm
14 flags -- Athena configuration flags
16 Name -- name of TileMuonReceiverDecision algorithm. Defaults to TileMuonReceiverDecision.
19 name = kwargs.get(
'Name',
'TileMuonReceiverDecision')
23 TileMuonReceiverDecision=CompFactory.TileMuonReceiverDecision
25 MuonReceiverEneThreshCellD6Low = 500,
26 MuonReceiverEneThreshCellD6andD5Low = 500,
27 MuonReceiverEneThreshCellD6High = 600,
28 MuonReceiverEneThreshCellD6andD5High = 600)
31 if flags.Common.ProductionStep == ProductionStep.PileUpPresampling:
32 muRcvDecisionAlg.TileMuonReceiverContainer = flags.Overlay.BkgPrefix +
'TileMuRcvCnt'
34 from TileConditions.TileInfoLoaderConfig
import TileInfoLoaderCfg
37 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
40 from TileConditions.TileEMScaleConfig
import TileEMScaleCondAlgCfg
43 acc.addEventAlgo(muRcvDecisionAlg, primary =
True)
49 """Return component accumulator with configured Tile muon receiver decision algorithm and Output stream
52 flags -- Athena configuration flags
56 muRcvDecisionAlg = acc.getPrimary()
58 if hasattr(muRcvDecisionAlg,
'TileMuonReceiverContainer'):
59 muRcvContainer = muRcvDecisionAlg.TileMuonReceiverContainer
61 muRcvContainer = muRcvDecisionAlg.getDefaultProperty(
'TileMuonReceiverContainer')
62 muRcvContainer =
str(muRcvContainer).
split(
'+').pop()
63 outputItemList = [
'TileMuonReceiverContainer#' + muRcvContainer]
65 if flags.Output.doWriteRDO:
66 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
67 acc.merge(
OutputStreamCfg(flags, streamName =
'RDO', ItemList = outputItemList) )
73 if __name__ ==
"__main__":
75 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
76 from AthenaConfiguration.TestDefaults
import defaultConditionsTags, defaultTestFiles
77 from AthenaCommon.Logging
import log
84 flags.Input.Files = defaultTestFiles.RDO_RUN2
85 flags.Tile.RunType = TileRunType.PHY
86 flags.Output.RDOFileName =
'myRDO->TileMuonReceiverDecision.pool.root'
87 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN2_MC
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'))
108 acc.printConfig(withDetails =
True, summariseProps =
True)
109 acc.store(
open(
'TileMuonReceiverDecision.pkl',
'wb') )
111 sc = acc.run(maxEvents=3)
114 sys.exit(
not sc.isSuccess())