131 """Configure the TCAL1 derivation framework"""
133 TCAL1Prefix =
'TCAL1_'
134 from DerivationFrameworkPhys.TriggerListsHelper
import TriggerListsHelper
135 TCAL1TriggerListsHelper = TriggerListsHelper(flags)
138 acc.merge(
TCAL1KernelCfg(flags, name=
"TCAL1Kernel", StreamName=
"StreamDAOD_TCAL1", Prefix=TCAL1Prefix, TriggerListsHelper=TCAL1TriggerListsHelper))
140 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
141 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
142 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
143 TCAL1SlimmingHelper =
SlimmingHelper(
"TCAL1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
144 TCAL1SlimmingHelper.SmartCollections = [
'EventInfo',
'Muons',
'AntiKt4EMTopoJets',
'AntiKt4EMPFlowJets',
'MET_Baseline_AntiKt4EMTopo',
'MET_Baseline_AntiKt4EMPFlow',
'PrimaryVertices',
'BTagging_AntiKt4EMPFlow']
146 TCAL1ExtraVariables = f
'Muons.{TCAL1Prefix}etrkcone40'
148 TCAL1ExtraVariables += f
'.{TCAL1Prefix}cells_'.
join([
'',
'energy',
'et',
'eta',
'phi',
'gain',
'bad',
'time',
'quality'])
149 TCAL1ExtraVariables += f
'.{TCAL1Prefix}cells_'.
join([
'',
'sampling',
'sinTh',
'cosTh',
'cotTh',
'x',
'y',
'z'])
151 TCAL1ExtraVariables += f
'.{TCAL1Prefix}cells_'.
join([
'',
'side',
'section',
'module',
'tower',
'sample'])
152 TCAL1ExtraVariables += f
'.{TCAL1Prefix}cells_'.
join([
'',
'r',
'dx',
'dy',
'dz',
'dr',
'dphi',
'deta',
'volume'])
154 TCAL1ExtraVariables += f
'.{TCAL1Prefix}cells_muon_'.
join([
'',
'dx',
'dedx',
'x',
'y',
'z',
'eta',
'phi'])
155 TCAL1ExtraVariables += f
'.{TCAL1Prefix}cells_to_muon_'.
join([
'',
'dx',
'dy',
'dz',
'deta',
'dphi'])
157 for pmt
in [
'pmt1',
'pmt2']:
158 TCAL1ExtraVariables += f
'.{TCAL1Prefix}cells_{pmt}_'.
join([
'',
'ros',
'drawer',
'channel',
'energy',
'time',
'quality',
'qbit',
'bad',
'gain'])
160 TCAL1SlimmingHelper.ExtraVariables = [TCAL1ExtraVariables]
164 if flags.Trigger.EDMVersion == 2:
165 from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import AddRun2TriggerMatchingToSlimmingHelper
167 OutputContainerPrefix =
"TrigMatch_",
168 TriggerList = TCAL1TriggerListsHelper.Run2TriggerNamesTau)
170 OutputContainerPrefix =
"TrigMatch_",
171 TriggerList = TCAL1TriggerListsHelper.Run2TriggerNamesNoTau)
173 if flags.Trigger.EDMVersion == 3
or (flags.Trigger.EDMVersion == 2
and flags.Trigger.doEDMVersionConversion):
174 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
177 TCAL1ItemList = TCAL1SlimmingHelper.GetItemList()
178 acc.merge(
OutputStreamCfg(flags,
"DAOD_TCAL1", ItemList=TCAL1ItemList, AcceptAlgs=[
"TCAL1Kernel"]))
179 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_TCAL1", AcceptAlgs=[
"TCAL1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))