ATLAS Offline Software
Functions
L1CALOCore Namespace Reference

Functions

def L1CALOCoreCfg (flags, deriv='L1CALO1', **kwargs)
 
def addEfexTOBs (slimminghelper, allVariables, postFix="")
 
def addJfexTOBs (slimminghelper, allVariables, postFix="")
 
def addGfexTOBs (slimminghelper, allVariables, postFix="")
 

Function Documentation

◆ addEfexTOBs()

def L1CALOCore.addEfexTOBs (   slimminghelper,
  allVariables,
  postFix = "" 
)
add the list of eFEX containers for given postFix string

Definition at line 496 of file L1CALOCore.py.

496 def addEfexTOBs(slimminghelper, allVariables, postFix = ""):
497  """
498  add the list of eFEX containers for given postFix string
499  """
500  slimminghelper.AppendToDictionary.update (
501  {"L1_eEMRoI"+postFix : "xAOD::eFexEMRoIContainer",
502  "L1_eEMRoI"+postFix+"Aux" : "xAOD::eFexEMRoIAuxContainer",
503  "L1_eTauRoI"+postFix : "xAOD::eFexTauRoIContainer",
504  "L1_eTauRoI"+postFix+"Aux" : "xAOD::eFexTauRoIAuxContainer",
505  "L1_eTauRoIAlt"+postFix : "xAOD::eFexTauRoIContainer",
506  "L1_eTauRoIAlt"+postFix+"Aux" : "xAOD::eFexTauRoIAuxContainer",
507  "L1_cTauRoI"+postFix : "xAOD::eFexTauRoIContainer",
508  "L1_cTauRoI"+postFix+"Aux" : "xAOD::eFexTauRoIAuxContainer",
509  "L1_eEMxRoI"+postFix : "xAOD::eFexEMRoIContainer",
510  "L1_eEMxRoI"+postFix+"Aux" : "xAOD::eFexEMRoIAuxContainer",
511  "L1_eTauxRoI"+postFix : "xAOD::eFexTauRoIContainer",
512  "L1_eTauxRoI"+postFix+"Aux" : "xAOD::eFexTauRoIAuxContainer",
513  "L1_eTauxRoIAlt"+postFix : "xAOD::eFexTauRoIContainer",
514  "L1_eTauxRoIAlt"+postFix+"Aux" : "xAOD::eFexTauRoIAuxContainer"} )
515 
516  allVariables += ["L1_eEMRoI" + postFix,
517  "L1_eTauRoI" + postFix,
518  "L1_eTauRoIAlt" + postFix,
519  "L1_cTauRoI" + postFix,
520  "L1_eEMxRoI" + postFix,
521  "L1_eTauxRoI" + postFix,
522  "L1_eTauxRoIAlt" + postFix]
523 
524  return slimminghelper, allVariables
525 
526 

◆ addGfexTOBs()

def L1CALOCore.addGfexTOBs (   slimminghelper,
  allVariables,
  postFix = "" 
)
add the list of gFEX containers for given postFix string

Definition at line 573 of file L1CALOCore.py.

573 def addGfexTOBs(slimminghelper, allVariables, postFix = ""):
574  """
575  add the list of gFEX containers for given postFix string
576  """
577  slimminghelper.AppendToDictionary.update (
578  {"L1_gFexRhoRoI"+postFix : "xAOD::gFexJetRoIContainer",
579  "L1_gFexRhoRoI"+postFix+"Aux" : "xAOD::gFexJetRoIAuxContainer",
580  "L1_gFexSRJetRoI"+postFix : "xAOD::gFexJetRoIContainer",
581  "L1_gFexSRJetRoI"+postFix+"Aux" : "xAOD::gFexJetRoIAuxContainer",
582  "L1_gScalarEJwoj"+postFix : "xAOD::gFexGlobalRoIContainer",
583  "L1_gScalarEJwoj"+postFix+"Aux" : "xAOD::gFexGlobalRoIAuxContainer",
584  "L1_gFexLRJetRoI"+postFix : "xAOD::gFexJetRoIContainer",
585  "L1_gFexLRJetRoI"+postFix+"Aux" : "xAOD::gFexJetRoIAuxContainer",
586  "L1_gMETComponentsJwoj"+postFix : "xAOD::gFexGlobalRoIContainer",
587  "L1_gMETComponentsJwoj"+postFix+"Aux" : "xAOD::gFexGlobalRoIAuxContainer",
588  "L1_gMHTComponentsJwoj"+postFix : "xAOD::gFexGlobalRoIContainer",
589  "L1_gMHTComponentsJwoj"+postFix+"Aux" : "xAOD::gFexGlobalRoIAuxContainer",
590  "L1_gMSTComponentsJwoj"+postFix : "xAOD::gFexGlobalRoIContainer",
591  "L1_gMSTComponentsJwoj"+postFix+"Aux" : "xAOD::gFexGlobalRoIAuxContainer"})
592 
593  allVariables += ["L1_gFexRhoRoI" + postFix,
594  "L1_gFexSRJetRoI" + postFix,
595  "L1_gScalarEJwoj" + postFix,
596  "L1_gFexLRJetRoI" + postFix,
597  "L1_gMETComponentsJwoj" + postFix,
598  "L1_gMHTComponentsJwoj" + postFix,
599  "L1_gMSTComponentsJwoj" + postFix]
600 
601  return slimminghelper, allVariables

◆ addJfexTOBs()

def L1CALOCore.addJfexTOBs (   slimminghelper,
  allVariables,
  postFix = "" 
)
add the list of jFEX containers for given postFix string

Definition at line 527 of file L1CALOCore.py.

527 def addJfexTOBs(slimminghelper, allVariables, postFix = ""):
528  """
529  add the list of jFEX containers for given postFix string
530  """
531  slimminghelper.AppendToDictionary.update (
532  {"L1_jFexMETRoI"+postFix : "xAOD::jFexMETRoIContainer",
533  "L1_jFexMETRoI"+postFix+"Aux" : "xAOD::jFexMETRoIAuxContainer",
534  "L1_jFexTauRoI"+postFix : "xAOD::jFexTauRoIContainer",
535  "L1_jFexTauRoI"+postFix+"Aux" : "xAOD::jFexTauRoIAuxContainer",
536  "L1_jFexFwdElRoI"+postFix : "xAOD::jFexFwdElRoIContainer",
537  "L1_jFexFwdElRoI"+postFix+"Aux" : "xAOD::jFexFwdElRoIAuxContainer",
538  "L1_jFexSRJetRoI"+postFix : "xAOD::jFexSRJetRoIContainer",
539  "L1_jFexSRJetRoI"+postFix+"Aux" : "xAOD::jFexSRJetRoIAuxContainer",
540  "L1_jFexLRJetRoI"+postFix : "xAOD::jFexLRJetRoIContainer",
541  "L1_jFexLRJetRoI"+postFix+"Aux" : "xAOD::jFexLRJetRoIAuxContainer",
542  "L1_jFexSumETRoI"+postFix : "xAOD::jFexSumETRoIContainer",
543  "L1_jFexSumETRoI"+postFix+"Aux" : "xAOD::jFexSumETRoIAuxContainer",
544  "L1_jFexMETxRoI"+postFix : "xAOD::jFexMETRoIContainer",
545  "L1_jFexMETxRoI"+postFix+"Aux" : "xAOD::jFexMETRoIAuxContainer",
546  "L1_jFexTauxRoI"+postFix : "xAOD::jFexTauRoIContainer",
547  "L1_jFexTauxRoI"+postFix+"Aux" : "xAOD::jFexTauRoIAuxContainer",
548  "L1_jFexFwdElxRoI"+postFix : "xAOD::jFexFwdElRoIContainer",
549  "L1_jFexFwdElxRoI"+postFix+"Aux" : "xAOD::jFexFwdElRoIAuxContainer",
550  "L1_jFexSRJetxRoI"+postFix : "xAOD::jFexSRJetRoIContainer",
551  "L1_jFexSRJetxRoI"+postFix+"Aux" : "xAOD::jFexSRJetRoIAuxContainer",
552  "L1_jFexLRJetxRoI"+postFix : "xAOD::jFexLRJetRoIContainer",
553  "L1_jFexLRJetxRoI"+postFix+"Aux" : "xAOD::jFexLRJetRoIAuxContainer",
554  "L1_jFexSumETxRoI"+postFix : "xAOD::jFexSumETRoIContainer",
555  "L1_jFexSumETxRoI"+postFix+"Aux" : "xAOD::jFexSumETRoIAuxContainer"})
556 
557  allVariables += ["L1_jFexMETRoI" + postFix,
558  "L1_jFexTauRoI" + postFix,
559  "L1_jFexFwdElRoI" + postFix,
560  "L1_jFexSRJetRoI" + postFix,
561  "L1_jFexLRJetRoI" + postFix,
562  "L1_jFexSumETRoI" + postFix,
563  "L1_jFexMETxRoI" + postFix,
564  "L1_jFexTauxRoI" + postFix,
565  "L1_jFexFwdElxRoI" + postFix,
566  "L1_jFexSRJetxRoI" + postFix,
567  "L1_jFexLRJetxRoI" + postFix,
568  "L1_jFexSumETxRoI" + postFix]
569 
570  return slimminghelper, allVariables
571 
572 

◆ L1CALOCoreCfg()

def L1CALOCore.L1CALOCoreCfg (   flags,
  deriv = 'L1CALO1',
**  kwargs 
)
Core fragment for L1CALO derivations

Definition at line 15 of file L1CALOCore.py.

15 def L1CALOCoreCfg(flags, deriv='L1CALO1', **kwargs):
16  """
17  Core fragment for L1CALO derivations
18  """
19  from AthenaCommon.Logging import logging
20  log = logging.getLogger('L1CALO')
21  log.info('Called L1CaloCore config for derivation %s',deriv)
22 
23  streamNameStem = "DAOD_" + deriv
24  streamName = "Stream" + streamNameStem
25 
26  acc = ComponentAccumulator()
27 
28  # the derivation can also be run on pool files e.g. MC - need to switch off many decoders etc..
29  # Note: static content not allowed when running on pool
30  isNotPool = flags.Input.Format is not Format.POOL
31 
32  fillSuperCells=False
33 
34  # decode the legacy L1Calo information - required because flags.Trigger.doLVL1 is False
35  if isNotPool:
36  from TrigT1CaloByteStream.LVL1CaloRun2ByteStreamConfig import LVL1CaloRun2ReadBSCfg
37  acc.merge(LVL1CaloRun2ReadBSCfg(flags))
38 
39 
40  # set up thinning tools
41  thinningTools = []
42 
43  # set up legacy trigger tower thinning for L1CALO1
44  if 'L1CALO1' in deriv and isNotPool:
45  from TrigT1CaloCalibTools.L1CaloCalibToolsConfig import LegacyTriggerTowerThinningCfg
46  LegacyTowerThinningTool = acc.getPrimaryAndMerge(LegacyTriggerTowerThinningCfg(
47  flags,
48  name = "L1CALOCaloThinningTool",
49  StreamName = streamName,
50  TriggerTowerLocation = "xAODTriggerTowers",
51  MinCaloCellET = 0.8,
52  MinADC = 36,
53  UseRandom = True,
54  MinRandom = 0.01 ) )
55  thinningTools.append(LegacyTowerThinningTool)
56 
57  # set up decorators
58  # Legacy Trigger Tower decorator
59  if isNotPool:
60  from TrigT1CaloCalibTools.L1CaloCalibToolsConfig import LegacyTriggerTowerDecoratorCfg
61  acc.merge(LegacyTriggerTowerDecoratorCfg(flags, name = 'L1CaloTriggerTowerDecorator'))
62 
63  # setup skimming tool example (AOD data only)
64  skimmingTools = []
65  if not isNotPool and not flags.Input.isMC:
66  # example trigger skimming tool as with JETM10.py
67  skimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool(name = "L1CALOSkimmingTool1",
68  TriggerListOR = ["HLT_noalg_L1XE.*"] )
69  acc.addPublicTool(skimmingTool, primary = True)
70  skimmingTools.append(skimmingTool)
71 
72  #
73  augmentationTools = []
74 
75  # Set up the derivation kernel
76  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
77  acc.addEventAlgo(DerivationKernel(
78  name = "DFL1CALO_KERN",
79  AugmentationTools = augmentationTools,
80  ThinningTools = thinningTools,
81  SkimmingTools = skimmingTools,
82  RunSkimmingFirst = not isNotPool,
83  doChronoStat=(flags.Concurrency.NumThreads <= 1),
84  OutputLevel = INFO))
85 
86  # Phase 1 setup
87  # emulate/decorate the input towers
88  # first need to decode LATOME readout
89  if isNotPool:
90  from L1CaloFEXSim.L1CaloFEXSimCfg import ReadSCellFromByteStreamCfg
91  acc.merge(ReadSCellFromByteStreamCfg(flags))
92 
93  # Emulate jFEX input towers
94  emulatedDataTowersKey = "L1_jFexEmulatedTowers"
95  if flags.Trigger.L1.dojFex and isNotPool:
96  from L1CaloFEXAlgos.FexEmulatedTowersConfig import jFexEmulatedTowersCfg
97  acc.merge(jFexEmulatedTowersCfg(flags, writeKey=emulatedDataTowersKey))
98 
99  # Decorate any jFEX data towers
100  extraJfexInfo = False # for decorating with SCell inputs to the towers
101  if flags.Trigger.L1.dojFex and isNotPool:
102  from L1CaloFEXAlgos.L1CaloFEXAlgosConfig import L1CalojFEXDecoratorCfg
103  acc.merge(L1CalojFEXDecoratorCfg(flags, ExtraInfo=extraJfexInfo))
104 
105  # Decorate the emulated jFEX towers
106  if flags.Trigger.L1.dojFex and isNotPool:
107  acc.merge(L1CalojFEXDecoratorCfg(flags,name='jFexTower2SCellEmulatedDecorator',jTowersReadKey=emulatedDataTowersKey,ExtraInfo=extraJfexInfo))
108 
109  # Emulate eFEX input towers
110  if flags.Trigger.L1.doeFex and isNotPool:
111  from L1CaloFEXAlgos.FexEmulatedTowersConfig import eFexEmulatedTowersCfg
112  eFexEmulatedTool = eFexEmulatedTowersCfg(flags,'L1_eFexEmulatedTowers')
113  acc.merge(eFexEmulatedTool)
114 
115  # Re-simulate from LATOME (for both data and POOL files with SCells)
116  from L1CaloFEXSim.L1CaloFEXSimCfg import L1CaloFEXSimCfg
117  if isNotPool:
118  acc.merge(L1CaloFEXSimCfg(flags, simulateAltTau=True))
119  else:
120  SCellType = flags.Trigger.L1.L1CaloSuperCellContainerName
121  if SCellType in flags.Input.Collections:
122  acc.merge(L1CaloFEXSimCfg(flags, simulateAltTau=True))
123 
124  # decorate the eFEX TOBs
125  if flags.Trigger.L1.doeFex and isNotPool:
126  # Temporary fix to ensure the L1 TOBs are decoded by the Trigger
127  from TrigDecisionTool.TrigDecisionToolConfig import getRun3NavigationContainerFromInput
128  ExtraInputs = [('xAOD::TrigCompositeContainer', 'StoreGateSvc+'+getRun3NavigationContainerFromInput(flags))]
129  acc.addEventAlgo( CompFactory.LVL1.eFexTOBDecorator('eFexTOBDecorator',
130  eFexEMRoIContainer = 'L1_eEMRoI',
131  eFexTauRoIContainer = 'L1_eTauRoI',
132  ExtraInputs=ExtraInputs) )
133  acc.addEventAlgo( CompFactory.LVL1.eFexTOBDecorator('eFexTOBDecoratorSim',
134  eFexEMRoIContainer = 'L1_eEMRoISim',
135  eFexTauRoIContainer = 'L1_eTauRoIAltSim',
136  ExtraInputs=[]) )
137 
138  if fillSuperCells :
139  acc.addEventAlgo( CompFactory.LVL1.eFexTOBSuperCellDecorator('eFexTOBSuperCellDecoratorSim',
140  eFexEMRoIContainer = 'L1_eEMRoISim',
141  eFexTauRoIContainer = 'L1_eTauxRoISim') )
142 
143  # set up the slimming helper
144  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
145 
146  L1CaloSlimmingHelper = SlimmingHelper("L1CaloSlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
147 
148  AllVariables = []
149  StaticContent = []
150  SmartCollections = []
151  ExtraVariables = []
152 
153  L1CaloSlimmingHelper.IncludeTriggerNavigation = True # Trigger info is actually stored only when running on data...
154  L1CaloSlimmingHelper.IncludeAdditionalTriggerContent = False # precludes EGamma/Jet TriggerContent
155 
156  L1CaloSlimmingHelper.IncludeEGammaTriggerContent = True
157  L1CaloSlimmingHelper.IncludeJetTriggerContent = True
158  L1CaloSlimmingHelper.IncludeBJetTriggerContent = True
159  L1CaloSlimmingHelper.IncludeTauTriggerContent = True # does not select any Run3 HLT collections - added below
160 
161  # Container selection based on share/L1CALO versions
162  # Note: if the container is in the on-the-fly list (ContainersOnTheFly.py) then we do not have to add it to the dictionary
163  # We can do smart slimming if the container is in the smart list (FullListOfSmartContainers.py)
164 
165  # some gymnastics for HLT from RAWD
166  if isNotPool and L1CaloSlimmingHelper.IncludeEGammaTriggerContent:
167  # replicate adding EGammaTriggerContent
168  # switch the eGamma Trigger off for RAW data - smart slimming not required
169  L1CaloSlimmingHelper.IncludeEGammaTriggerContent = False
170  ElToKeep = ['ptcone20', 'ptvarcone20', 'ptcone30', 'ptvarcone30', 'trk_d0','cl_eta2','cl_phi2', 'deltaEta1PearDistortion']
171  ElVars = '.'.join(ElToKeep)
172  StaticContent += ["xAOD::ElectronContainer#HLT_egamma_Electrons"]
173  StaticContent += ["xAOD::ElectronAuxContainer#HLT_egamma_ElectronsAux."+ElVars]
174  StaticContent += ["xAOD::ElectronContainer#HLT_egamma_Electrons_GSF"]
175  StaticContent += ["xAOD::ElectronAuxContainer#HLT_egamma_Electrons_GSFAux."+ElVars]
176  # non-slimmed
177  L1CaloSlimmingHelper.AppendToDictionary.update({"HLT_CaloEMClusters_Electron":"xAOD::CaloClusterContainer",
178  "HLT_CaloEMClusters_ElectronAux":"xAOD::CaloClusterAuxContainer"})
179  AllVariables += ["HLT_CaloEMClusters_Electron"]
180  L1CaloSlimmingHelper.AppendToDictionary.update({"HLT_IDTrack_Electron_IDTrig":"xAOD::TrackParticleContainer",
181  "HLT_IDTrack_Electron_IDTrigAux":"xAOD::TrackParticleAuxContainer"})
182  AllVariables += ["HLT_IDTrack_Electron_IDTrig"]
183  L1CaloSlimmingHelper.AppendToDictionary.update({"HLT_IDTrack_Electron_GSF":"xAOD::TrackParticleContainer",
184  "HLT_IDTrack_Electron_GSFAux":"xAOD::TrackParticleAuxContainer"})
185  AllVariables += ["HLT_IDTrack_Electron_GSF"]
186 
187  if isNotPool and L1CaloSlimmingHelper.IncludeJetTriggerContent:
188  # replicate adding JetTriggerContent - easier because this is genuine smart slimming
189  # Update the dictionary with the containers that will be smart slimmed
190  L1CaloSlimmingHelper.AppendToDictionary.update ({"HLT_AntiKt4EMTopoJets_nojcalib":"xAOD::JetContainer",
191  "HLT_AntiKt4EMTopoJets_nojcalibAux":"xAOD::JetAuxContainer",
192  "HLT_AntiKt4EMTopoJets_nojcalib_ftf":"xAOD::JetContainer",
193  "HLT_AntiKt4EMTopoJets_nojcalib_ftfAux":"xAOD::JetAuxContainer",
194  "HLT_AntiKt4EMTopoJets_subjesIS":"xAOD::JetContainer",
195  "HLT_AntiKt4EMTopoJets_subjesISAux":"xAOD::ShallowAuxContainer",
196  "HLT_AntiKt4EMPFlowJets_nojcalib_ftf":"xAOD::JetContainer",
197  "HLT_AntiKt4EMPFlowJets_nojcalib_ftfAux":"xAOD::JetAuxContainer",
198  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf":"xAOD::JetContainer",
199  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftfAux":"xAOD::ShallowAuxContainer",
200  "HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf":"xAOD::JetContainer",
201  "HLT_AntiKt4EMPFlowJets_subjesgscIS_ftfAux":"xAOD::ShallowAuxContainer",
202  "HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_jes_ftf":"xAOD::JetContainer",
203  "HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_jes_ftfAux":"xAOD::JetAuxContainer",
204  "HLT_IDVertex_FS":"xAOD::VertexContainer",
205  "HLT_IDVertex_FSAux":"xAOD::VertexAuxContainer",
206  "HLT_TCEventInfo_jet":"xAOD::TrigCompositeContainer",
207  "HLT_TCEventInfo_jetAux":"xAOD::TrigCompositeAuxContainer",
208  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTagging": "xAOD::BTaggingContainer",
209  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTaggingAux": "xAOD::BTaggingAuxContainer",
210  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJets": "xAOD::JetContainer",
211  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJetsAux": "xAOD::JetAuxContainer"})
212 
213  AllVariables += ["HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTagging", "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJets"]
214 
215  if L1CaloSlimmingHelper.IncludeTauTriggerContent:
216  L1CaloSlimmingHelper.AppendToDictionary.update ({"HLT_TrigTauRecMerged_MVA":"xAOD::TauJetContainer",
217  "HLT_TrigTauRecMerged_MVAAux":"xAOD::TauJetAuxContainer",
218  "HLT_TrigTauRecMerged_LLP":"xAOD::TauJetContainer",
219  "HLT_TrigTauRecMerged_LLPAux":"xAOD::TauJetAuxContainer",
220  "HLT_TrigTauRecMerged_LRT":"xAOD::TauJetContainer",
221  "HLT_TrigTauRecMerged_LRTAux":"xAOD::TauJetAuxContainer",
222  "HLT_TrigTauRecMerged_CaloMVAOnly":"xAOD::TauJetContainer",
223  "HLT_TrigTauRecMerged_CaloMVAOnlyAux":"xAOD::TauJetAuxContainer"})
224  AllVariables += ["HLT_TrigTauRecMerged_MVA", "HLT_TrigTauRecMerged_LLP", "HLT_TrigTauRecMerged_LRT", "HLT_TrigTauRecMerged_CaloMVAOnly"]
225 
226  # Generic event info
227  L1CaloSlimmingHelper.AppendToDictionary.update({"EventInfo":"xAOD::EventInfo","EventInfoAux":"xAOD::EventAuxInfo"})
228 
229  # We keep all of EventInfo rather than smart slim
230  AllVariables += ["EventInfo","Kt4EMPFlowEventShape"]
231 
232  # Physics Objects
233  # Those for which there is smart slimming but not in the on the fly list
234  L1CaloSlimmingHelper.AppendToDictionary.update (
235  {"Muons":"xAOD::MuonContainer", "MuonsAux":"xAOD::MuonAuxContainer",
236  "Photons":"xAOD::PhotonContainer", "PhotonsAux":"xAOD::PhotonAuxContainer",
237  "TauJets":"xAOD::TauJetContainer", "TauJetsAux":"xAOD::TauJetAuxContainer"}
238  )
239  AllVariables += ["AntiKt4EMPFlowJets","AntiKt10LCTopoJets","Muons","Photons"]
240  AllVariables += ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"]
241  # TauJets require smart slimming in order not to cause issues
242  SmartCollections += ["TauJets"]
243 
244  # Use unslimmed electrons in order to use Likelihood qualities
245  L1CaloSlimmingHelper.AppendToDictionary.update (
246  {"Electrons":"xAOD::ElectronContainer", "ElectronsAux":"xAOD::ElectronAuxContainer"} )
247  AllVariables += ["Electrons"]
248 
249  L1CaloSlimmingHelper.AppendToDictionary.update (
250  {"ForwardElectrons":"xAOD::ElectronContainer", "ForwardElectronsAux":"xAOD::ElectronAuxContainer"} )
251  AllVariables += ["ForwardElectrons"]
252 
253  # Missing ET - unslimmed container
254  AllVariables += ["METAssoc_AntiKt4EMPFlow"]
255 
256  # using MET slimming as per share/L1CALOX.py
257  if isNotPool:
258  StaticContent += ["xAOD::MissingETContainer#MET_Reference_AntiKt4EMPFlow"]
259  StaticContent += ["xAOD::MissingETAuxContainer#MET_Reference_AntiKt4EMPFlowAux.-ConstitObjectLinks.-ConstitObjectWeights"]
260 
261  StaticContent += ["xAOD::MissingETContainer#MET_Core_AntiKt4EMPFlow"]
262  StaticContent += ["xAOD::MissingETAuxContainer#MET_Core_AntiKt4EMPFlowAux.name.mpx.mpy.sumet.source"]
263 
264  StaticContent += ["xAOD::MissingETContainer#MET_Track"]
265  StaticContent += ["xAOD::MissingETAuxContainer#MET_TrackAux.name.mpx.mpy"]
266  else:
267  AllVariables += ["MET_Reference_AntiKt4EMPFlow"]
268  AllVariables += ["MET_Core_AntiKt4EMPFlow"]
269  L1CaloSlimmingHelper.AppendToDictionary.update (
270  {"MET_Track":"xAOD::MissingETContainer", "MET_TrackAux":"xAOD::MissingETAuxContainer"} )
271  AllVariables += ["MET_Track"]
272 
273  # Primary vertices
274  if isNotPool:
275  StaticContent += ["xAOD::VertexContainer#PrimaryVertices"]
276  StaticContent += ["xAOD::VertexAuxContainer#PrimaryVerticesAux.-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"]
277  else:
278  L1CaloSlimmingHelper.AppendToDictionary.update(
279  {"PrimaryVertices":"xAOD::VertexContainer","PrimaryVerticesAux":"xAOD::VertexAuxContainer"}
280  )
281  AllVariables += ["PrimaryVertices"]
282 
283 
284  # Egamma CP additions
285  L1CaloSlimmingHelper.AppendToDictionary.update (
286  {"egammaTopoSeededClusters":"xAOD::CaloClusterContainer","egammaTopoSeededClustersAux":"xAOD::CaloClusterAuxContainer"}
287  )
288  AllVariables += ["egammaTopoSeededClusters"]
289 
290  # GSF vertices and tracks
291  if isNotPool:
292  StaticContent += ["xAOD::VertexContainer#GSFConversionVertices"]
293  # we have to disable vxTrackAtVertex branch since it is not xAOD compatible
294  StaticContent += ["xAOD::VertexAuxContainer#GSFConversionVerticesAux.-vxTrackAtVertex"]
295  #
296  trackParticleAuxExclusions="-caloExtension.-cellAssociation.-clusterAssociation.-trackParameterCovarianceMatrices.-parameterX.-parameterY.-parameterZ.-parameterPX.-parameterPY.-parameterPZ.-parameterPosition"
297  StaticContent += ["xAOD::TrackParticleContainer#GSFTrackParticles"]
298  StaticContent += ["xAOD::TrackParticleAuxContainer#GSFTrackParticlesAux."+trackParticleAuxExclusions]
299  else:
300  L1CaloSlimmingHelper.AppendToDictionary.update (
301  {"GSFConversionVertices":"xAOD::VertexContainer",
302  "GSFConversionVerticesAux":"xAOD::VertexAuxContainer",
303  "GSFTrackParticles":"xAOD::TrackParticleContainer",
304  "GSFTrackParticlesAux":"xAOD::TrackParticleAuxContainer"}
305  )
306  AllVariables += ["GSFConversionVertices","GSFTrackParticles"]
307 
308  L1CaloSlimmingHelper.AppendToDictionary.update (
309  {"egammaClusters":"xAOD::CaloClusterContainer",
310  "egammaClustersAux":"xAOD::CaloClusterAuxContainer",
311  "TauPi0Clusters":"xAOD::CaloClusterContainer",
312  "TauPi0ClustersAux":"xAOD::CaloClusterAuxContainer",
313  "CaloCalTopoClusters":"xAOD::CaloClusterContainer",
314  "CaloCalTopoClustersAux":"xAOD::CaloClusterAuxContainer",
315  "MuonSegments":"xAOD::MuonSegmentContainer",
316  "MuonSegmentsAux":"xAOD::MuonSegmentAuxContainer"}
317  )
318  AllVariables += ["egammaClusters","TauPi0Clusters","CaloCalTopoClusters","MuonSegments"]
319 
320  # Add b-tagging information directly using ExtraVariables - as done for PHYSLITE
321  ExtraVariables += [
322  'BTagging_AntiKt4EMPFlow.DL1dv01_pu.DL1dv01_pc.DL1dv01_pb.GN2v00_pu.GN2v00_pc.GN2v00_pb'
323  ]
324 
325  # L1Calo information
326  # Legacy RoI Containers
327  L1CaloSlimmingHelper.AppendToDictionary.update (
328  {"LVL1EmTauRoIs":"xAOD::EmTauRoIContainer",
329  "LVL1EmTauRoIsAux":"xAOD::EmTauRoIAuxContainer",
330  "LVL1EnergySumRoI":"xAOD::EnergySumRoI",
331  "LVL1EnergySumRoIAux":"xAOD::EnergySumRoIAuxInfo",
332  "LVL1JetEtRoI":"xAOD::JetEtRoI",
333  "LVL1JetEtRoIAux":"xAOD::JetEtRoIAuxInfo",
334  "LVL1JetRoIs":"xAOD::JetRoIContainer",
335  "LVL1JetRoIsAux":"xAOD::JetRoIAuxContainer",
336  "LVL1MuonRoIs":"xAOD::MuonRoIContainer",
337  "LVL1MuonRoIsAux":"xAOD::MuonRoIAuxContainer"}
338  )
339  AllVariables += [ "LVL1EmTauRoIs","LVL1EnergySumRoI","LVL1JetEtRoI","LVL1JetRoIs","LVL1MuonRoIs"]
340 
341  # Legacy sub-systems
342  L1CaloSlimmingHelper.AppendToDictionary.update (
343  {"JEMTobRoIsRoIB":"xAOD::JEMTobRoIContainer",
344  "JEMTobRoIsRoIBAux":"xAOD::JEMTobRoIAuxContainer",
345  "JEMTobRoIs":"xAOD::JEMTobRoIContainer",
346  "JEMTobRoIsAux":"xAOD::JEMTobRoIAuxContainer",
347  "JEMEtSums":"xAOD::JEMEtSumsContainer",
348  "JEMEtSumsAux":"xAOD::JEMEtSumsAuxContainer"}
349  )
350  AllVariables += ["JEMTobRoIsRoIB",
351  "JEMTobRoIs",
352  "JEMEtSums"]
353 
354  L1CaloSlimmingHelper.AppendToDictionary.update (
355  {"CMXCPHits":"xAOD::CMXCPHitsContainer",
356  "CMXCPHitsAux":"xAOD::CMXCPHitsAuxContainer",
357  "CMXCPTobs":"xAOD::CMXCPTobContainer",
358  "CMXCPTobsAux":"xAOD::CMXCPTobAuxContainer",
359  "CMXEtSums":"xAOD::CMXEtSumsContainer",
360  "CMXEtSumsAux":"xAOD::CMXEtSumsAuxContainer",
361  "CMXJetHits":"xAOD::CMXJetHitsContainer",
362  "CMXJetHitsAux":"xAOD::CMXJetHitsAuxContainer",
363  "CMXJetTobs":"xAOD::CMXJetTobContainer",
364  "CMXJetTobsAux":"xAOD::CMXJetTobAuxContainer",
365  "CMXRoIs":"xAOD::CMXRoIContainer",
366  "CMXRoIsAux":"xAOD::CMXRoIAuxContainer"}
367  )
368  AllVariables += ["CMXCPHits",
369  "CMXCPTobs",
370  "CMXEtSums",
371  "CMXJetHits",
372  "CMXJetTobs",
373  "CMXRoIs"]
374 
375 
376  L1CaloSlimmingHelper.AppendToDictionary.update (
377  {"CPMTobRoIs":"xAOD::CPMTobRoIContainer",
378  "CPMTobRoIsAux":"xAOD::CPMTobRoIAuxContainer",
379  "CPMTobRoIsRoIB":"xAOD::CPMTobRoIContainer",
380  "CPMTobRoIsRoIBAux":"xAOD::CPMTobRoIAuxContainer",
381  "CPMTowers":"xAOD::CPMTowerContainer",
382  "CPMTowersAux":"xAOD::CPMTowerAuxContainer",
383  "CPMTowersOverlap":"xAOD::CPMTowerContainer",
384  "CPMTowersOverlapAux":"xAOD::CPMTowerAuxContainer",
385  "RODHeaders":"xAOD::RODHeaderContainer",
386  "RODHeadersAux":"xAOD::RODHeaderAuxContainer",
387  "xAODTriggerTowers":"xAOD::TriggerTowerContainer",
388  "xAODTriggerTowersAux":"xAOD::TriggerTowerAuxContainer",
389  "JetElements":"xAOD::JetElementContainer",
390  "JetElementsAux":"xAOD::JetElementAuxContainer",
391  "JetElementsOverlap":"xAOD::JetElementContainer",
392  "JetElementsOverlapAux":"xAOD::JetElementAuxContainer",
393  "L1TopoRawData":"xAOD::L1TopoRawDataContainer",
394  "L1TopoRawDataAux":"xAOD::L1TopoRawDataAuxContainer",
395  "L1_Phase1L1TopoRAWData":"xAOD::L1TopoRawDataContainer",
396  "L1_Phase1L1TopoRAWDataAux":"xAOD::L1TopoRawDataAuxContainer"}
397  )
398  AllVariables += ["CPMTobRoIs",
399  "CPMTobRoIsRoIB",
400  "CPMTowers",
401  "CPMTowersOverlap",
402  "RODHeaders",
403  "xAODTriggerTowers",
404  "JetElements",
405  "JetElementsOverlap",
406  "L1TopoRawData",
407  "L1_Phase1L1TopoRAWData"]
408 
409 
410  # Phase 1
411  # TOBs from HLT
412  L1CaloSlimmingHelper,AllVariables = addEfexTOBs(L1CaloSlimmingHelper, AllVariables)
413  L1CaloSlimmingHelper,AllVariables = addJfexTOBs(L1CaloSlimmingHelper, AllVariables)
414  L1CaloSlimmingHelper,AllVariables = addGfexTOBs(L1CaloSlimmingHelper, AllVariables)
415 
416  # re-simulated
417  L1CaloSlimmingHelper,AllVariables = addEfexTOBs(L1CaloSlimmingHelper, AllVariables, "Sim")
418  L1CaloSlimmingHelper,AllVariables = addJfexTOBs(L1CaloSlimmingHelper, AllVariables, "Sim")
419  L1CaloSlimmingHelper,AllVariables = addGfexTOBs(L1CaloSlimmingHelper, AllVariables, "Sim")
420 
421 
422  # FEX input data towers
423  L1CaloSlimmingHelper.AppendToDictionary.update (
424  {"L1_eFexDataTowers":"xAOD::eFexTowerContainer",
425  "L1_eFexDataTowersAux":"xAOD::eFexTowerAuxContainer",
426  "L1_jFexDataTowers":"xAOD::jFexTowerContainer",
427  "L1_jFexDataTowersAux":"xAOD::jFexTowerAuxContainer",
428  "L1_gFexDataTowers":"xAOD::gFexTowerContainer",
429  "L1_gFexDataTowersAux":"xAOD::gFexTowerAuxContainer",
430  "L1_gFexDataTowers50":"xAOD::gFexTowerContainer",
431  "L1_gFexDataTowers50Aux":"xAOD::gFexTowerAuxContainer"}
432  )
433  AllVariables += ["L1_eFexDataTowers","L1_jFexDataTowers","L1_gFexDataTowers","L1_gFexDataTowers50"]
434 
435  # Emulated eFEX input tower data from LATOME
436  L1CaloSlimmingHelper.AppendToDictionary.update (
437  {"L1_eFexEmulatedTowers":"xAOD::eFexTowerContainer",
438  "L1_eFexEmulatedTowersAux":"xAOD::eFexTowerAuxContainer"}
439  )
440  AllVariables += ["L1_eFexEmulatedTowers"]
441 
442  # Emulated jFEX input tower data from LATOME
443  L1CaloSlimmingHelper.AppendToDictionary.update (
444  {"L1_jFexEmulatedTowers":"xAOD::jFexTowerContainer",
445  "L1_jFexEmulatedTowersAux":"xAOD::jFexTowerAuxContainer"}
446  )
447  AllVariables += ["L1_jFexEmulatedTowers"]
448 
449  # Truth collections
450  if flags.Input.isMC:
451  from DerivationFrameworkMCTruth.MCTruthCommonConfig import PreJetMCTruthAugmentationsCfg,AddTruthJetsCfg
452  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTruthCollectionNavigationDecorationsCfg,AddBornLeptonCollectionCfg
453  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTruthMETCfg,PostJetMCTruthAugmentationsCfg
454 
455  acc.merge(PreJetMCTruthAugmentationsCfg(flags,decorationDressing = 'dressedPhoton'))
456  acc.merge(AddTruthJetsCfg(flags))
457  acc.merge(AddTruthMETCfg(flags))
458  acc.merge(PostJetMCTruthAugmentationsCfg(flags, decorationDressing = 'dressedPhoton'))
459  acc.addEventAlgo(CompFactory.DerivationFramework.LockDecorations(name ="L1CALOTruthContentsLockDecoration", Decorations = ['TruthParticles.dressedPhoton']))
460  acc.merge(AddTruthCollectionNavigationDecorationsCfg(flags, ["TruthElectrons", "TruthMuons", "TruthPhotons", "TruthTaus", "TruthNeutrinos"]))
461  # Special collection for Born leptons
462  acc.merge(AddBornLeptonCollectionCfg(flags))
463 
464  L1CaloSlimmingHelper.AppendToDictionary.update (
465  {'TruthElectrons':'xAOD::TruthParticleContainer','TruthElectronsAux':'xAOD::TruthParticleAuxContainer',
466  'TruthMuons':'xAOD::TruthParticleContainer','TruthMuonsAux':'xAOD::TruthParticleAuxContainer',
467  'TruthPhotons':'xAOD::TruthParticleContainer','TruthPhotonsAux':'xAOD::TruthParticleAuxContainer',
468  'TruthTaus':'xAOD::TruthParticleContainer','TruthTausAux':'xAOD::TruthParticleAuxContainer',
469  'TruthNeutrinos':'xAOD::TruthParticleContainer','TruthNeutrinosAux':'xAOD::TruthParticleAuxContainer',
470  'BornLeptons':'xAOD::TruthParticleContainer','BornLeptonsAux':'xAOD::TruthParticleAuxContainer',
471  'MET_Truth':'xAOD::MissingETContainer','MET_TruthAux':'xAOD::MissingETAuxContainer'}
472  )
473  AllVariables += [
474  "TruthElectrons",
475  "TruthMuons",
476  "TruthPhotons",
477  "TruthTaus",
478  "TruthNeutrinos",
479  "BornLeptons",
480  "MET_Truth"
481  ]
482 
483  L1CaloSlimmingHelper.AllVariables = AllVariables
484  L1CaloSlimmingHelper.StaticContent = StaticContent
485  L1CaloSlimmingHelper.SmartCollections = SmartCollections
486  L1CaloSlimmingHelper.ExtraVariables = ExtraVariables
487 
488  # Output stream
489  L1CaloItemList = L1CaloSlimmingHelper.GetItemList()
490  acc.merge(OutputStreamCfg(flags, streamNameStem, ItemList=L1CaloItemList, AcceptAlgs=["DFL1CALO_KERN"]))
491  acc.merge(SetupMetaDataForStreamCfg(flags, streamNameStem, AcceptAlgs=["DFL1CALO_KERN"], createMetadata=[MetadataCategory.CutFlowMetaData,MetadataCategory.TriggerMenuMetaData]))
492 
493  return acc
494 
495 
L1CaloFEXSimCfg.ReadSCellFromByteStreamCfg
def ReadSCellFromByteStreamCfg(flags, key='SCell', SCmask=True)
Definition: L1CaloFEXSimCfg.py:24
L1CaloFEXAlgosConfig.L1CalojFEXDecoratorCfg
def L1CalojFEXDecoratorCfg(flags, name="jFexTower2SCellDecorator", jTowersReadKey="L1_jFexDataTowers", ExtraInfo=False, SCMasking=True)
Definition: L1CaloFEXAlgosConfig.py:12
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
L1CALOCore.L1CALOCoreCfg
def L1CALOCoreCfg(flags, deriv='L1CALO1', **kwargs)
Definition: L1CALOCore.py:15
L1CaloCalibToolsConfig.LegacyTriggerTowerDecoratorCfg
def LegacyTriggerTowerDecoratorCfg(flags, name, **kwargs)
Definition: L1CaloCalibToolsConfig.py:59
L1CALOCore.addGfexTOBs
def addGfexTOBs(slimminghelper, allVariables, postFix="")
Definition: L1CALOCore.py:573
L1CaloCalibToolsConfig.LegacyTriggerTowerThinningCfg
def LegacyTriggerTowerThinningCfg(flags, name, **kwargs)
Definition: L1CaloCalibToolsConfig.py:11
LVL1CaloRun2ByteStreamConfig.LVL1CaloRun2ReadBSCfg
def LVL1CaloRun2ReadBSCfg(flags, forRoIBResultToxAOD=False)
Definition: LVL1CaloRun2ByteStreamConfig.py:121
FexEmulatedTowersConfig.eFexEmulatedTowersCfg
def eFexEmulatedTowersCfg(flags, name, writeKey="L1_eFexEmulatedTowers")
Definition: FexEmulatedTowersConfig.py:23
python.MCTruthCommonConfig.AddBornLeptonCollectionCfg
def AddBornLeptonCollectionCfg(flags)
Definition: MCTruthCommonConfig.py:362
python.TrigDecisionToolConfig.getRun3NavigationContainerFromInput
def getRun3NavigationContainerFromInput(flags)
Definition: TrigDecisionToolConfig.py:63
python.MCTruthCommonConfig.AddTruthMETCfg
def AddTruthMETCfg(flags)
Definition: MCTruthCommonConfig.py:79
python.MCTruthCommonConfig.PreJetMCTruthAugmentationsCfg
def PreJetMCTruthAugmentationsCfg(flags, **kwargs)
Definition: MCTruthCommonConfig.py:91
python.MCTruthCommonConfig.PostJetMCTruthAugmentationsCfg
def PostJetMCTruthAugmentationsCfg(flags, **kwargs)
Definition: MCTruthCommonConfig.py:127
L1CALOCore.addEfexTOBs
def addEfexTOBs(slimminghelper, allVariables, postFix="")
Definition: L1CALOCore.py:496
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
L1CALOCore.addJfexTOBs
def addJfexTOBs(slimminghelper, allVariables, postFix="")
Definition: L1CALOCore.py:527
python.MCTruthCommonConfig.AddTruthCollectionNavigationDecorationsCfg
def AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=[], prefix='')
Definition: MCTruthCommonConfig.py:331
FexEmulatedTowersConfig.jFexEmulatedTowersCfg
def jFexEmulatedTowersCfg(flags, name="jFexEmulatedTowerMaker", writeKey="L1_jFexEmulatedTowers")
Definition: FexEmulatedTowersConfig.py:9
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
SlimmingHelper
Definition: SlimmingHelper.py:1
python.MCTruthCommonConfig.AddTruthJetsCfg
def AddTruthJetsCfg(flags)
Definition: MCTruthCommonConfig.py:62
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:66
L1CaloFEXSimCfg
Definition: L1CaloFEXSimCfg.py:1