ATLAS Offline Software
TriggerTransBSConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 '''
3 ComponentAccumulator configuration for producing transient ByteStream,
4 which is required when running HLT selection algorithms on MC RDO inputs
5 '''
6 
7 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8 from ByteStreamCnvSvc.ByteStreamConfig import TransientByteStreamCfg
9 
10 # ----------------------------------------------------------
11 # Base function
12 # ----------------------------------------------------------
13 def triggerTransBSCfg_Base(flags, itemList, typeNames, extraInputs, seqName="AthAlgSeq"):
14  '''
15  Base function for system-specific transient BS configurations.
16  Arguments:
17  flags - Configuration AthConfigFlags
18  itemList - Objects to be written to transient BS
19  typeNames - Objects to be read from transient BS
20  extraInputs - Objects to be produced before writing transient BS (scheduler dependency)
21  seqName - The sequence where transient BS writing algorithm should be placed
22  '''
23  acc = ComponentAccumulator(seqName)
24  transBSCfg = TransientByteStreamCfg(
25  flags,
26  item_list=itemList,
27  type_names=typeNames,
28  extra_inputs=extraInputs)
29 
30  acc.merge(transBSCfg, sequenceName=seqName)
31  return acc
32 
33 # ----------------------------------------------------------
34 # Level-1 Trigger
35 # ----------------------------------------------------------
36 def triggerTransBSCfg_LVL1(flags, seqName="AthAlgSeq"):
37  itemList = []
38  typeNames = []
39  extraInputs = []
40 
41  if flags.Trigger.enableL1CaloLegacy or not flags.Trigger.enableL1MuonPhase1:
42  itemList += ["ROIB::RoIBResult#RoIBResult"]
43  extraInputs += [('ROIB::RoIBResult', 'StoreGateSvc+RoIBResult')]
44 
45  if flags.Trigger.enableL1MuonPhase1 or flags.Trigger.enableL1CaloPhase1:
46  itemList += ["xAOD::TrigCompositeContainer#L1TriggerResult"]
47  extraInputs += [('xAOD::TrigCompositeContainer', 'StoreGateSvc+L1TriggerResult')]
48 
49  acc = triggerTransBSCfg_Base(flags, itemList, typeNames, extraInputs, seqName)
50 
51  from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamEncoderCfg
52  acc.merge(L1TriggerByteStreamEncoderCfg(flags))
53 
54  return acc
55 
56 # ----------------------------------------------------------
57 # ID
58 # ----------------------------------------------------------
59 def triggerTransBSCfg_ID(flags, seqName="AthAlgSeq"):
60  itemList = []
61  typeNames = []
62  extraInputs = []
63 
64  # Pixel
65  itemList += ["PixelRDO_Container#*"]
66  typeNames += ["InDet::PixelClusterContainer/PixelOnlineClusters"]
67  extraInputs += [('PixelHitDiscCnfgData','ConditionStore+PixelHitDiscCnfgData')]
68  extraInputs += [('PixelCablingCondData','ConditionStore+PixelCablingCondData')]
69  # SCT
70  itemList += ["SCT_RDO_Container#*"]
71  typeNames += ["InDet::SCT_ClusterContainer/SCT_OnlineClusters"]
72  extraInputs += [('SCT_CablingData','ConditionStore+SCT_CablingData')]
73  # TRT
74  itemList += ["TRT_RDO_Container#*"]
75  typeNames += ["InDet::TRT_DriftCircleContainer/TRT_DriftCircle"]
76 
77  return triggerTransBSCfg_Base(flags, itemList, typeNames, extraInputs, seqName)
78 
79 
80 # ----------------------------------------------------------
81 # Calo
82 # ----------------------------------------------------------
83 def triggerTransBSCfg_Calo(flags, seqName="AthAlgSeq"):
84  itemList = []
85  typeNames = []
86  extraInputs = []
87 
88  # LAr
89  from LArByteStream.LArByteStreamConfig import LArRawDataContByteStreamToolCfg
90  acc, larExtraInputs = LArRawDataContByteStreamToolCfg(flags, InitializeForWriting=True,DSPRunMode = 4, RodBlockVersion = 10)
91  itemList += ["LArRawChannelContainer#*"]
92  extraInputs += larExtraInputs
93  # Tile
94  from TileByteStream.TileByteStreamConfig import TileRawChannelContByteStreamToolCfg
95  tileCfg, tileExtraInputs = TileRawChannelContByteStreamToolCfg(flags, InitializeForWriting=True)
96  acc.merge(tileCfg)
97  itemList += ["TileRawChannelContainer#*"]
98  typeNames += ["TileCellIDC/TileCellIDC"]
99  extraInputs += tileExtraInputs
100  from TileConditions.TileBadChannelsConfig import TileBadChannelsCondAlgCfg
101  acc.merge( TileBadChannelsCondAlgCfg(flags) )
102  extraInputs += [('TileBadChannels','ConditionStore+TileBadChannels')]
103 
104  acc.merge(triggerTransBSCfg_Base(flags, itemList, typeNames, extraInputs, seqName))
105  return acc
106 
107 
108 # ----------------------------------------------------------
109 # Muon
110 # ----------------------------------------------------------
111 def triggerTransBSCfg_Muon(flags, seqName="AthAlgSeq"):
112  itemList = []
113  typeNames = []
114  extraInputs = []
115 
116  # MDT
117  itemList += ["MdtCsmContainer#*"]
118  typeNames += ["MdtDigitContainer/MDT_DIGITS",
119  "MdtCsmContainer/MDTCSM"]
120  extraInputs += [('MuonMDT_CablingMap','ConditionStore+MuonMDT_CablingMap')]
121  # RPC
122  itemList += ["RpcPadContainer#*"]
123  typeNames += ["RpcDigitContainer/RPC_DIGITS",
124  "RpcPadContainer/RPCPAD"]
125  # TGC
126  itemList += ["TgcRdoContainer#*"]
127  typeNames += ["TgcDigitContainer/TGC_DIGITS",
128  "TgcRdoContainer/TGCRDO"]
129  # CSC
130  itemList += ["CscRawDataContainer#*"]
131  typeNames += ["CscDigitContainer/CSC_DIGITS",
132  "CscRawDataContainer/CSCRDO"]
133 
134  return triggerTransBSCfg_Base(flags, itemList, typeNames, extraInputs, seqName)
135 
136 # ----------------------------------------------------------
137 # Combined configuration with all sub-subsystems
138 # ----------------------------------------------------------
139 def triggerTransBSCfg(flags, seqName="AthAlgSeq"):
140  acc = triggerTransBSCfg_LVL1(flags, seqName)
141  if flags.Trigger.doID:
142  acc.merge(triggerTransBSCfg_ID(flags, seqName), sequenceName=seqName)
143  if flags.Trigger.doCalo:
144  acc.merge(triggerTransBSCfg_Calo(flags, seqName), sequenceName=seqName)
145  if flags.Trigger.doMuon:
146  acc.merge(triggerTransBSCfg_Muon(flags, seqName), sequenceName=seqName)
147  return acc
python.TriggerTransBSConfig.triggerTransBSCfg_LVL1
def triggerTransBSCfg_LVL1(flags, seqName="AthAlgSeq")
Definition: TriggerTransBSConfig.py:36
python.TriggerTransBSConfig.triggerTransBSCfg
def triggerTransBSCfg(flags, seqName="AthAlgSeq")
Definition: TriggerTransBSConfig.py:139
python.TriggerTransBSConfig.triggerTransBSCfg_Base
def triggerTransBSCfg_Base(flags, itemList, typeNames, extraInputs, seqName="AthAlgSeq")
Definition: TriggerTransBSConfig.py:13
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.ByteStreamConfig.TransientByteStreamCfg
def TransientByteStreamCfg(flags, item_list=None, type_names=None, extra_inputs=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:160
python.LArByteStreamConfig.LArRawDataContByteStreamToolCfg
def LArRawDataContByteStreamToolCfg(flags, name="LArRawDataContByteStreamTool", InitializeForWriting=False, DSPRunMode=4, RodBlockVersion=0, **kwargs)
Definition: LArByteStreamConfig.py:6
python.TriggerTransBSConfig.triggerTransBSCfg_Muon
def triggerTransBSCfg_Muon(flags, seqName="AthAlgSeq")
Definition: TriggerTransBSConfig.py:111
python.TileBadChannelsConfig.TileBadChannelsCondAlgCfg
def TileBadChannelsCondAlgCfg(flags, **kwargs)
Definition: TileBadChannelsConfig.py:10
TrigT1ResultByteStreamConfig.L1TriggerByteStreamEncoderCfg
def L1TriggerByteStreamEncoderCfg(flags)
Definition: TrigT1ResultByteStreamConfig.py:299
TileByteStreamConfig.TileRawChannelContByteStreamToolCfg
def TileRawChannelContByteStreamToolCfg(flags, name="TileRawChannelContByteStreamTool", InitializeForWriting=False, **kwargs)
Definition: TileByteStreamConfig.py:58
python.TriggerTransBSConfig.triggerTransBSCfg_ID
def triggerTransBSCfg_ID(flags, seqName="AthAlgSeq")
Definition: TriggerTransBSConfig.py:59
python.TriggerTransBSConfig.triggerTransBSCfg_Calo
def triggerTransBSCfg_Calo(flags, seqName="AthAlgSeq")
Definition: TriggerTransBSConfig.py:83