18 """do the CP algorithm configuration for PHYSLITE"""
20 from AthenaCommon.Logging
import logging
21 logPLCPAlgCfg = logging.getLogger(
'PLCPAlgCfg')
22 logPLCPAlgCfg.info(
'****************** STARTING PHYSLITE CPAlgorithmsCfg *****************')
24 forceEGammaFullSimConfig =
False
25 if not flags.Sim.ISF.Simulator.isFullSim():
26 logPLCPAlgCfg.warning(
"Forcing full simulation configuration for EGamma algorithms. This is not recommended for fast simulation but no recommendations available yet.")
27 forceEGammaFullSimConfig =
True
31 from egammaAlgs.egammaAODFixesConfig
import runAODFix
32 doneFix, fixes = runAODFix(flags)
33 logPLCPAlgCfg.info(f
'Existing egamma AOD fixes for timing cut issue : {fixes}')
34 if 'egammatopoIsoFix' in fixes:
35 FixedElDict.update({
"ElectronIsolationCorrectionAlg.isolationCorrectionTool.FixTimingIssueInCore":
False})
36 FixedPhDict.update({
"PhotonIsolationCorrectionAlg.isolationCorrectionTool.FixTimingIssueInCore":
False})
37 if 'egClusterL2_3Fix' in fixes:
38 FixedElDict.update({
"ElectronCalibrationAndSmearingAlg.calibrationAndSmearingTool.FixForMissingCells":
False})
39 FixedPhDict.update({
"PhotonCalibrationAndSmearingAlg.calibrationAndSmearingTool.FixForMissingCells":
False})
41 from AnalysisAlgorithmsConfig.ConfigFactory
import ConfigFactory
42 from AnalysisAlgorithmsConfig.ConfigSequence
import ConfigSequence
43 configSeq = ConfigSequence ()
46 factory = ConfigFactory()
49 subConfig = factory.makeConfig (
'CommonServices')
50 subConfig.setOptionValue (
'.runSystematics',
False)
51 subConfig.setOptionValue (
'.fixDAODTruthRecord',
False)
52 configSeq += subConfig
56 from AnalysisAlgorithmsConfig.ConfigAccumulator
import ExpertModeWarning
57 warnings.simplefilter(
'ignore', ExpertModeWarning)
62 configSeq += factory.makeConfig (
'PileupReweighting')
65 configSeq += factory.makeConfig (
'EventCleaning')
66 configSeq.setOptionValue (
'.noFilter',
True)
67 configSeq.setOptionValue (
'.GRLDict', getGoodRunsLists())
71 logPLCPAlgCfg.info(
'Do Muons')
73 subConfig = factory.makeConfig (
'Muons')
74 subConfig.setOptionValue (
'.containerName',
'AnalysisMuons')
75 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
76 configSeq += subConfig
77 subConfig = factory.makeConfig (
'Muons.WorkingPoint')
78 subConfig.setOptionValue (
'.containerName',
'AnalysisMuons')
79 subConfig.setOptionValue (
'.selectionName',
'loose')
80 subConfig.setOptionValue (
'.trackSelection',
False)
81 subConfig.setOptionValue (
'.quality',
'Loose')
82 subConfig.setOptionValue (
'.isolation',
'NonIso')
83 configSeq += subConfig
84 subConfig = factory.makeConfig (
'Thinning')
85 subConfig.setOptionValue (
'.containerName',
'AnalysisMuons')
86 subConfig.setOptionValue (
'.selectionName',
'loose')
87 subConfig.setOptionValue (
'.deepCopy',
True)
88 subConfig.setOptionValue (
'.sortPt',
True)
89 subConfig.setOptionValue (
'.noUniformSelection',
True)
90 subConfig.setOptionValue (
'.containerType',
'xAOD::MuonContainer')
91 configSeq += subConfig
95 logPLCPAlgCfg.info(
'Do Electrons')
97 subConfig = factory.makeConfig (
'Electrons')
98 subConfig.setOptionValue (
'.containerName',
'AnalysisElectrons')
99 subConfig.setOptionValue (
'.forceFullSimConfigForIso', forceEGammaFullSimConfig)
100 subConfig.setOptionValue (
'.isolationCorrection',
True)
101 subConfig.setOptionValue (
'.minPt', 0.)
102 subConfig.setOptionValue (
'.decorateSamplingPattern',
True)
103 subConfig.setOptionValue (
'.decorateEmva',
True)
104 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
105 if len(FixedElDict) > 0:
106 subConfig.setOptionValue (
'.propertyOverrides', FixedElDict)
107 configSeq += subConfig
108 subConfig = factory.makeConfig (
'Electrons.WorkingPoint')
109 subConfig.setOptionValue (
'.containerName',
'AnalysisElectrons')
110 subConfig.setOptionValue (
'.selectionName',
'looseLH')
111 subConfig.setOptionValue (
'.trackSelection',
False)
112 subConfig.setOptionValue (
'.identificationWP',
'LooseLH')
113 subConfig.setOptionValue (
'.addSelectionToPreselection',
False)
114 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
115 subConfig.setOptionValue (
'.doFSRSelection',
True)
116 subConfig.setOptionValue (
'.noEffSF',
True)
117 configSeq += subConfig
118 subConfig = factory.makeConfig (
'Electrons.WorkingPoint')
119 subConfig.setOptionValue (
'.containerName',
'AnalysisElectrons')
120 subConfig.setOptionValue (
'.selectionName',
'looseDNN')
121 subConfig.setOptionValue (
'.trackSelection',
False)
122 subConfig.setOptionValue (
'.identificationWP',
'LooseDNN')
123 subConfig.setOptionValue (
'.addSelectionToPreselection',
False)
124 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
125 subConfig.setOptionValue (
'.doFSRSelection',
True)
126 subConfig.setOptionValue (
'.noEffSF',
True)
127 configSeq += subConfig
128 subConfig = factory.makeConfig (
'Thinning')
129 subConfig.setOptionValue (
'.containerName',
'AnalysisElectrons')
130 subConfig.setOptionValue (
'.selectionName',
'looseLH||looseDNN')
131 subConfig.setOptionValue (
'.deepCopy',
True)
132 subConfig.setOptionValue (
'.sortPt',
True)
133 subConfig.setOptionValue (
'.noUniformSelection',
True)
134 subConfig.setOptionValue (
'.containerType',
'xAOD::ElectronContainer')
135 configSeq += subConfig
138 subConfig = factory.makeConfig (
'Electrons')
139 subConfig.setOptionValue (
'.containerName',
'AnalysisSiHitElectrons')
140 subConfig.setOptionValue (
'.forceFullSimConfigForIso', forceEGammaFullSimConfig)
141 subConfig.setOptionValue (
'.isolationCorrection',
True)
142 subConfig.setOptionValue (
'.minPt', 0.)
143 subConfig.setOptionValue (
'.postfix',
'SiHit')
144 subConfig.setOptionValue (
'.decorateEmva',
True)
145 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
146 if len(FixedElDict) > 0:
147 subConfig.setOptionValue (
'.propertyOverrides', FixedElDict)
148 configSeq += subConfig
149 subConfig = factory.makeConfig (
'Electrons.WorkingPoint')
150 subConfig.setOptionValue (
'.containerName',
'AnalysisSiHitElectrons')
151 subConfig.setOptionValue (
'.selectionName',
'SiHits')
152 subConfig.setOptionValue (
'.trackSelection',
False)
153 subConfig.setOptionValue (
'.identificationWP',
'SiHitElectron')
154 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
155 subConfig.setOptionValue (
'.doFSRSelection',
True)
156 subConfig.setOptionValue (
'.noEffSF',
True)
157 subConfig.setOptionValue (
'.postfix',
'SiHit')
158 configSeq += subConfig
159 subConfig = factory.makeConfig (
'Thinning')
160 subConfig.setOptionValue (
'.containerName',
'AnalysisSiHitElectrons')
161 subConfig.setOptionValue (
'.selectionName',
'SiHits')
162 subConfig.setOptionValue (
'.deepCopy',
True)
163 subConfig.setOptionValue (
'.sortPt',
True)
164 subConfig.setOptionValue (
'.noUniformSelection',
True)
165 subConfig.setOptionValue (
'.containerType',
'xAOD::ElectronContainer')
166 configSeq += subConfig
170 logPLCPAlgCfg.info(
'Do Photons')
172 subConfig = factory.makeConfig (
'Photons')
173 subConfig.setOptionValue (
'.containerName',
'AnalysisPhotons')
174 subConfig.setOptionValue (
'.forceFullSimConfigForIso', forceEGammaFullSimConfig)
175 subConfig.setOptionValue (
'.recomputeIsEM',
False)
176 subConfig.setOptionValue (
'.minPt', 0.)
177 subConfig.setOptionValue (
'.decorateEmva',
True)
178 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
179 if len(FixedPhDict) > 0:
180 subConfig.setOptionValue (
'.propertyOverrides', FixedPhDict)
181 configSeq += subConfig
182 subConfig = factory.makeConfig (
'Photons.WorkingPoint')
183 subConfig.setOptionValue (
'.containerName',
'AnalysisPhotons')
184 subConfig.setOptionValue (
'.selectionName',
'loose')
185 subConfig.setOptionValue (
'.qualityWP',
'Loose')
186 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
187 subConfig.setOptionValue (
'.doFSRSelection',
True)
188 subConfig.setOptionValue (
'.recomputeIsEM',
False)
189 subConfig.setOptionValue (
'.noEffSFForID',
True)
190 subConfig.setOptionValue (
'.noEffSFForIso',
True)
191 configSeq += subConfig
192 subConfig = factory.makeConfig (
'Thinning')
193 subConfig.setOptionValue (
'.containerName',
'AnalysisPhotons')
194 subConfig.setOptionValue (
'.selectionName',
'loose')
195 subConfig.setOptionValue (
'.deepCopy',
True)
196 subConfig.setOptionValue (
'.sortPt',
True)
197 subConfig.setOptionValue (
'.noUniformSelection',
True)
198 subConfig.setOptionValue (
'.containerType',
'xAOD::PhotonContainer')
199 configSeq += subConfig
205 subConfig = factory.makeConfig (
'TauJets')
206 subConfig.setOptionValue (
'.containerName',
'AnalysisTauJets')
207 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
208 configSeq += subConfig
209 subConfig = factory.makeConfig (
'TauJets.WorkingPoint')
210 subConfig.setOptionValue (
'.containerName',
'AnalysisTauJets')
211 subConfig.setOptionValue (
'.selectionName',
'baseline')
212 subConfig.setOptionValue (
'.quality',
'Baseline')
213 configSeq += subConfig
214 subConfig = factory.makeConfig (
'Thinning')
215 subConfig.setOptionValue (
'.containerName',
'AnalysisTauJets')
216 subConfig.setOptionValue (
'.selectionName',
'baseline')
217 subConfig.setOptionValue (
'.deepCopy',
True)
218 subConfig.setOptionValue (
'.sortPt',
True)
219 subConfig.setOptionValue (
'.noUniformSelection',
True)
220 subConfig.setOptionValue (
'.containerType',
'xAOD::TauJetContainer')
221 configSeq += subConfig
224 jetContainer =
'AntiKt4EMPFlowJets'
225 subConfig = factory.makeConfig (
'Jets')
226 subConfig.setOptionValue (
'.containerName',
'AnalysisJets')
227 subConfig.setOptionValue (
'.jetCollection', jetContainer)
228 subConfig.setOptionValue (
'.runFJvtSelection',
False)
229 subConfig.setOptionValue (
'.runJvtSelection',
False)
230 subConfig.setOptionValue (
'.runUncertainties',
False)
231 subConfig.setOptionValue (
'.outputTruthLabelIDs',
True)
232 configSeq += subConfig
233 subConfig = factory.makeConfig (
'Thinning')
234 subConfig.setOptionValue (
'.containerName',
'AnalysisJets')
235 subConfig.setOptionValue (
'.deepCopy',
True)
236 subConfig.setOptionValue (
'.sortPt',
True)
237 subConfig.setOptionValue (
'.noUniformSelection',
True)
238 subConfig.setOptionValue (
'.containerType',
'xAOD::JetContainer')
239 configSeq += subConfig
241 largeRjetContainer=
'AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets'
242 subConfig = factory.makeConfig (
'Jets')
243 subConfig.setOptionValue (
'.containerName',
'AnalysisLargeRJets')
244 subConfig.setOptionValue (
'.jetCollection', largeRjetContainer)
245 subConfig.setOptionValue (
'.runGhostMuonAssociation',
False)
247 subConfig.setOptionValue (
'.minPt', 0.)
248 subConfig.setOptionValue (
'.maxPt', 0.)
249 subConfig.setOptionValue (
'.maxRapidity', 0.)
250 subConfig.setOptionValue (
'.minMass', 0.)
251 subConfig.setOptionValue (
'.maxMass', 0.)
252 subConfig.setOptionValue (
'.runUncertainties',
False)
253 subConfig.setOptionValue (
'.outputTruthLabelIDs',
True)
254 configSeq += subConfig
255 subConfig = factory.makeConfig (
'Thinning')
256 subConfig.setOptionValue (
'.containerName',
'AnalysisLargeRJets')
257 subConfig.setOptionValue (
'.deepCopy',
True)
258 subConfig.setOptionValue (
'.sortPt',
True)
259 subConfig.setOptionValue (
'.noUniformSelection',
True)
260 subConfig.setOptionValue (
'.containerType',
'xAOD::JetContainer')
261 configSeq += subConfig
263 from AnalysisAlgorithmsConfig.ConfigAccumulator
import ConfigAccumulator
264 configAccumulator = ConfigAccumulator (dataType=
None, algSeq=
None,
265 autoconfigFromFlags=flags, noSysSuffix=
True, noSystematics=
True)
266 configSeq.fullConfigure (configAccumulator)
267 return configAccumulator.CA
273 """Configure the derivation framework driving algorithm (kernel) for PHYSLITE"""
274 acc = ComponentAccumulator()
278 if 'StreamAOD' in flags.Input.ProcessingTags:
280 from DerivationFrameworkPhys.PhysCommonConfig
import PhysCommonAugmentationsCfg
281 acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs[
'TriggerListsHelper']))
287 thinningToolsArgs = {
288 'ElectronCaloClusterThinningToolName' :
"PHYSLITEElectronCaloClusterThinningTool",
289 'PhotonCaloClusterThinningToolName' :
"PHYSLITEPhotonCaloClusterThinningTool",
290 'ElectronGSFTPThinningToolName' :
"PHYSLITEElectronGSFTPThinningTool",
291 'PhotonGSFTPThinningToolName' :
"PHYSLITEPhotonGSFTPThinningTool"
294 if 'StreamAOD' in flags.Input.ProcessingTags:
295 thinningToolsArgs.update({
296 'TrackParticleThinningToolName' :
"PHYSLITETrackParticleThinningTool",
297 'MuonTPThinningToolName' :
"PHYSLITEMuonTPThinningTool",
298 'TauJetThinningToolName' :
"PHYSLITETauJetThinningTool",
299 'TauJets_MuonRMThinningToolName' :
"PHYSLITETauJets_MuonRMThinningTool",
300 'DiTauTPThinningToolName' :
"PHYSLITEDiTauTPThinningTool",
301 'DiTauLowPtThinningToolName' :
"PHYSLITEDiTauLowPtThinningTool",
302 'DiTauLowPtTPThinningToolName' :
"PHYSLITEDiTauLowPtTPThinningTool",
305 from DerivationFrameworkPhys.PhysCommonThinningConfig
import PhysCommonThinningCfg
306 acc.merge(PhysCommonThinningCfg(flags, StreamName = kwargs[
'StreamName'], **thinningToolsArgs))
309 for key
in thinningToolsArgs:
310 thinningTools.append(acc.getPublicTool(thinningToolsArgs[key]))
317 if 'StreamAOD' in flags.Input.ProcessingTags:
320 from DerivationFrameworkHiggs.HiggsPhysContent
import HiggsAugmentationAlgsCfg
321 acc.merge(HiggsAugmentationAlgsCfg(flags))
324 from IsolationSelection.IsolationSelectionConfig
import IsoCloseByAlgsCfg
325 acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite =
True))
341 if 'StreamAOD' in flags.Input.ProcessingTags:
342 from METReconstruction.METAssocCfg
import AssocConfig, METAssocConfig
343 from METReconstruction.METAssociatorCfg
import getAssocCA
344 associators = [AssocConfig(
'PFlowJet',
'AnalysisJets'),
345 AssocConfig(
'Muon',
'AnalysisMuons'),
346 AssocConfig(
'Ele',
'AnalysisElectrons'),
347 AssocConfig(
'Gamma',
'AnalysisPhotons'),
348 AssocConfig(
'Tau',
'AnalysisTauJets'),
349 AssocConfig(
'Soft',
'')]
350 PHYSLITE_cfg = METAssocConfig(
'AnalysisMET',
355 components_PHYSLITE_cfg = getAssocCA(PHYSLITE_cfg,METName=
'AnalysisMET')
356 acc.merge(components_PHYSLITE_cfg)
357 elif 'StreamDAOD_PHYS' in flags.Input.ProcessingTags:
358 from DerivationFrameworkJetEtMiss.METCommonConfig
import METRemappingCfg
360 METRemap_cfg = METRemappingCfg(flags)
361 acc.merge(METRemap_cfg)
364 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
365 acc.addEventAlgo(DerivationKernel(name, ThinningTools = thinningTools))
372 acc = ComponentAccumulator()
378 from DerivationFrameworkPhys.TriggerListsHelper
import TriggerListsHelper
379 PHYSLITETriggerListsHelper = TriggerListsHelper(flags)
382 streamName =
'StreamDAOD_PHYSLITE' if 'StreamAOD' in flags.Input.ProcessingTags
else 'StreamD2AOD_PHYSLITE'
385 acc.merge(
PHYSLITEKernelCfg(flags, name=
"PHYSLITEKernel", StreamName = streamName, TriggerListsHelper = PHYSLITETriggerListsHelper))
390 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
391 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
392 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
394 PHYSLITESlimmingHelper =
SlimmingHelper(
"PHYSLITESlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
395 PHYSLITESlimmingHelper.ExtraVariables = []
397 PHYSLITESlimmingHelper.IncludeTriggerNavigation =
False
398 PHYSLITESlimmingHelper.IncludeJetTriggerContent =
False
399 PHYSLITESlimmingHelper.IncludeMuonTriggerContent =
False
400 PHYSLITESlimmingHelper.IncludeEGammaTriggerContent =
False
401 PHYSLITESlimmingHelper.IncludeTauTriggerContent =
False
402 PHYSLITESlimmingHelper.IncludeEtMissTriggerContent =
False
403 PHYSLITESlimmingHelper.IncludeBJetTriggerContent =
False
404 PHYSLITESlimmingHelper.IncludeBPhysTriggerContent =
False
405 PHYSLITESlimmingHelper.IncludeMinBiasTriggerContent =
False
409 if flags.Trigger.EDMVersion == 2:
411 from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import TriggerMatchingCommonRun2Cfg
412 acc.merge(TriggerMatchingCommonRun2Cfg(flags,
413 name =
"PHYSLITETrigMatchNoTau",
414 OutputContainerPrefix =
"AnalysisTrigMatch_",
415 ChainNames = PHYSLITETriggerListsHelper.Run2TriggerNamesNoTau,
416 InputElectrons =
"AnalysisElectrons",
417 InputPhotons =
"AnalysisPhotons",
418 InputMuons =
"AnalysisMuons",
419 InputTaus =
"AnalysisTauJets"))
420 acc.merge(TriggerMatchingCommonRun2Cfg(flags,
421 name =
"PHYSLITETrigMatchTau",
422 OutputContainerPrefix =
"AnalysisTrigMatch_",
423 ChainNames = PHYSLITETriggerListsHelper.Run2TriggerNamesTau,
425 InputElectrons =
"AnalysisElectrons",
426 InputPhotons =
"AnalysisPhotons",
427 InputMuons =
"AnalysisMuons",
428 InputTaus =
"AnalysisTauJets"))
430 from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import AddRun2TriggerMatchingToSlimmingHelper
431 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSLITESlimmingHelper,
432 OutputContainerPrefix =
"AnalysisTrigMatch_",
433 TriggerList = PHYSLITETriggerListsHelper.Run2TriggerNamesTau)
434 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSLITESlimmingHelper,
435 OutputContainerPrefix =
"AnalysisTrigMatch_",
436 TriggerList = PHYSLITETriggerListsHelper.Run2TriggerNamesNoTau)
439 if flags.Trigger.EDMVersion == 3
or (flags.Trigger.EDMVersion == 2
and flags.Trigger.doEDMVersionConversion):
441 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
442 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(PHYSLITESlimmingHelper)
445 PHYSLITESlimmingHelper.AppendToDictionary.update({
446 'TruthEvents':
'xAOD::TruthEventContainer',
'TruthEventsAux':
'xAOD::TruthEventAuxContainer',
447 'MET_Truth':
'xAOD::MissingETContainer',
'MET_TruthAux':
'xAOD::MissingETAuxContainer',
448 'TruthElectrons':
'xAOD::TruthParticleContainer',
'TruthElectronsAux':
'xAOD::TruthParticleAuxContainer',
449 'TruthMuons':
'xAOD::TruthParticleContainer',
'TruthMuonsAux':
'xAOD::TruthParticleAuxContainer',
450 'TruthPhotons':
'xAOD::TruthParticleContainer',
'TruthPhotonsAux':
'xAOD::TruthParticleAuxContainer',
451 'TruthTaus':
'xAOD::TruthParticleContainer',
'TruthTausAux':
'xAOD::TruthParticleAuxContainer',
452 'TruthNeutrinos':
'xAOD::TruthParticleContainer',
'TruthNeutrinosAux':
'xAOD::TruthParticleAuxContainer',
453 'TruthBSM':
'xAOD::TruthParticleContainer',
'TruthBSMAux':
'xAOD::TruthParticleAuxContainer',
454 'TruthBoson':
'xAOD::TruthParticleContainer',
'TruthBosonAux':
'xAOD::TruthParticleAuxContainer',
455 'TruthTop':
'xAOD::TruthParticleContainer',
'TruthTopAux':
'xAOD::TruthParticleAuxContainer',
456 'TruthForwardProtons':
'xAOD::TruthParticleContainer',
'TruthForwardProtonsAux':
'xAOD::TruthParticleAuxContainer',
457 'BornLeptons':
'xAOD::TruthParticleContainer',
'BornLeptonsAux':
'xAOD::TruthParticleAuxContainer',
458 'TruthBosonsWithDecayParticles':
'xAOD::TruthParticleContainer',
'TruthBosonsWithDecayParticlesAux':
'xAOD::TruthParticleAuxContainer',
459 'TruthBosonsWithDecayVertices':
'xAOD::TruthVertexContainer',
'TruthBosonsWithDecayVerticesAux':
'xAOD::TruthVertexAuxContainer',
460 'TruthBSMWithDecayParticles':
'xAOD::TruthParticleContainer',
'TruthBSMWithDecayParticlesAux':
'xAOD::TruthParticleAuxContainer',
461 'TruthBSMWithDecayVertices':
'xAOD::TruthVertexContainer',
'TruthBSMWithDecayVerticesAux':
'xAOD::TruthVertexAuxContainer',
462 'TruthPrimaryVertices':
'xAOD::TruthVertexContainer',
'TruthPrimaryVerticesAux':
'xAOD::TruthVertexAuxContainer',
463 'AnalysisElectrons':
'xAOD::ElectronContainer',
'AnalysisElectronsAux':
'xAOD::ElectronAuxContainer',
464 'AnalysisSiHitElectrons':
'xAOD::ElectronContainer',
'AnalysisSiHitElectronsAux':
'xAOD::ElectronAuxContainer',
465 'AnalysisMuons':
'xAOD::MuonContainer',
'AnalysisMuonsAux':
'xAOD::MuonAuxContainer',
466 'AnalysisJets':
'xAOD::JetContainer',
'AnalysisJetsAux':
'xAOD::AuxContainerBase',
467 'AnalysisPhotons':
'xAOD::PhotonContainer',
'AnalysisPhotonsAux':
'xAOD::PhotonAuxContainer',
468 'AnalysisTauJets':
'xAOD::TauJetContainer',
'AnalysisTauJetsAux':
'xAOD::TauJetAuxContainer',
469 'MET_Core_AnalysisMET':
'xAOD::MissingETContainer',
'MET_Core_AnalysisMETAux':
'xAOD::MissingETAuxContainer',
470 'METAssoc_AnalysisMET':
'xAOD::MissingETAssociationMap',
'METAssoc_AnalysisMETAux':
'xAOD::MissingETAuxAssociationMap',
471 'AnalysisLargeRJets':
'xAOD::JetContainer',
'AnalysisLargeRJetsAux':
'xAOD::AuxContainerBase'
474 PHYSLITESlimmingHelper.SmartCollections = [
476 'InDetTrackParticles',
480 from DerivationFrameworkMuons.MuonsCommonConfig
import MuonVariablesCfg
483 from DerivationFrameworkHiggs.HiggsPhysContent
import setupHiggsSlimmingVariables
484 setupHiggsSlimmingVariables(flags, PHYSLITESlimmingHelper)
487 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import addTruth3ContentToSlimmerTool
488 addTruth3ContentToSlimmerTool(PHYSLITESlimmingHelper, reduced=
True)
490 if 'StreamAOD' in flags.Input.ProcessingTags:
491 from DerivationFrameworkMCTruth.HFClassificationCommonConfig
import HFClassificationCommonCfg
492 acc.merge(HFClassificationCommonCfg(flags))
495 btag_variables = [f
'{flags.BTagging.AK4TaggerName}_p{x}' for x
in [
'b',
'c',
'u',
'tau']]
496 PHYSLITESlimmingHelper.ExtraVariables += [
497 'AnalysisElectrons.trackParticleLinks.f1.pt.eta.phi.charge.author.DFCommonElectronsLHVeryLoose.DFCommonElectronsLHLoose.DFCommonElectronsLHLooseBL.DFCommonElectronsLHMedium.DFCommonElectronsLHTight.DFCommonElectronsLHVeryLooseIsEMValue.DFCommonElectronsLHLooseIsEMValue.DFCommonElectronsLHLooseBLIsEMValue.DFCommonElectronsLHMediumIsEMValue.DFCommonElectronsLHTightIsEMValue.DFCommonElectronsDNNLoose.DFCommonElectronsDNNMedium.DFCommonElectronsDNNTight.DFCommonElectronsDNNVeryLooseNoCF97.DFCommonElectronsDNNMediumNoCF.DFCommonElectronsDNNTightNoCF.DFCommonElectronsECIDS.DFCommonElectronsECIDSResult.topoetcone20.topoetcone20ptCorrection.neflowisol20.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt500.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt500.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000.topoetcone20_CloseByCorr.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.caloClusterLinks.ambiguityLink.TruthLink.truthOrigin.truthType.truthPdgId.firstEgMotherTruthType.firstEgMotherTruthOrigin.firstEgMotherTruthParticleLink.firstEgMotherPdgId.ambiguityType.OQ.Eadded_Lr2.Eadded_Lr3.E_mva_only.DFCommonAddAmbiguity',
498 'AnalysisSiHitElectrons.pt.eta.phi.charge.author.topoetcone20_CloseByCorr.DFCommonElectronsLHVeryLoose.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.OQ.truthOrigin.truthType.firstEgMotherTruthType.firstEgMotherTruthOrigin.z0stheta.d0Normalized.nInnerExpPix.clEta.clPhi.E_mva_only',
499 'AnalysisPhotons.f1.pt.eta.phi.author.OQ.DFCommonPhotonsIsEMLoose.DFCommonPhotonsIsEMMedium.DFCommonPhotonsIsEMTight.DFCommonPhotonsIsEMTightIsEMValue.DFCommonPhotonsCleaning.DFCommonPhotonsCleaningNoTime.ptcone20.topoetcone20.topoetcone40.topoetcone20ptCorrection.topoetcone40ptCorrection.topoetcone20_CloseByCorr.topoetcone40_CloseByCorr.ptcone20_CloseByCorr.caloClusterLinks.vertexLinks.ambiguityLink.TruthLink.truthOrigin.truthType.Eadded_Lr2.Eadded_Lr3.E_mva_only.DFCommonPhotonsIsEMTightNF.DFCommonPhotonsIsEMTightNFIsEMValue.DFCommonPhotonsNFBDTTight.DFCommonPhotonsNFBDTTightIsEMValue.DFCommonPhotonsNFBDTScore',
500 'GSFTrackParticles.chiSquared.phi.d0.theta.qOverP.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.z0.vz.charge.vertexLink.numberOfPixelHits.numberOfSCTHits.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfInnermostPixelLayerHits.numberOfNextToInnermostPixelLayerHits.originalTrackParticle',
501 'GSFConversionVertices.trackParticleLinks.x.y.z.px.py.pz.pt1.pt2.neutralParticleLinks.minRfirstHit',
502 'egammaClusters.calE.calEta.calPhi.calM.e_sampl.eta_sampl.ETACALOFRAME.PHICALOFRAME.ETA2CALOFRAME.PHI2CALOFRAME.constituentClusterLinks.samplingPattern',
503 "AnalysisMuons.{var_string}".format(var_string =
".".join(MuonVariablesCfg(flags))),
504 'CombinedMuonTrackParticles.qOverP.d0.z0.vz.phi.theta.truthOrigin.truthType.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.numberOfPixelDeadSensors.numberOfPixelHits.numberOfPixelHoles.numberOfSCTDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfTRTHits.numberOfTRTOutliers.chiSquared.numberDoF',
505 'ExtrapolatedMuonTrackParticles.d0.z0.vz.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.truthOrigin.truthType.qOverP.theta.phi',
506 'MuonSpectrometerTrackParticles.phi.d0.z0.vz.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.vertexLink.theta.qOverP',
507 'InDetForwardTrackParticles.vz.truthType.truthOrigin.numberDoF.numberOfTRTHits.numberOfSCTHoles.theta.numberOfTRTOutliers.numberOfPrecisionLayers.numberOfSCTDeadSensors.numberOfPixelHoles.numberOfSCTHits.numberOfPrecisionHoleLayers.numberOfPixelDeadSensors.phi.numberOfPixelHits.z0.d0.qOverP.chiSquared.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag',
508 'AnalysisTauJets.pt.eta.phi.m.ptFinalCalib.etaFinalCalib.ptTauEnergyScale.etaTauEnergyScale.charge.nChargedTracks.isTauFlags.PanTau_DecayMode.NNDecayMode.RNNJetScoreSigTrans.GNTauScoreSigTrans_v0prune.GNTauVL_v0prune.GNTauL_v0prune.GNTauM_v0prune.GNTauT_v0prune.RNNEleScoreSigTrans_v1.EleRNNLoose_v1.EleRNNMedium_v1.EleRNNTight_v1.trackWidth.passTATTauMuonOLR.tauTrackLinks.vertexLink.truthParticleLink.truthJetLink.IsTruthMatched.truthOrigin.truthType.TESCompatibility',
509 'AnalysisJets.pt.eta.phi.m.numConstit.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.DetectorEta.DetectorY.JVFCorr.NNJvtPass.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.DFCommonJets_jetClean_LooseBad.DFCommonJets_jetClean_TightBad.Timing.btagging.btaggingLink.GhostTrack.DFCommonJets_fJvt.PSFrac.JetAccessorMap.EMFrac.Width.ActiveArea4vec_pt.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.EnergyPerSampling.SumPtChargedPFOPt500.isJvtHS.QGTransformer_ConstScore.{btag_var_string}'.format(btag_var_string =
".".join(btag_variables)),
510 'TruthPrimaryVertices.t.x.y.z',
511 'MET_Core_AnalysisMET.name.mpx.mpy.sumet.source',
512 'METAssoc_AnalysisMET.',
513 'InDetTrackParticles.numberOfTRTHits.numberOfTRTOutliers',
514 'EventInfo.RandomRunNumber.PileupWeight_NOSYS.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ.HF_Classification.HF_SimpleClassification.{GRL_Deco_names}'.format(GRL_Deco_names=
'.'.join(str(key)
for key
in (getGoodRunsLists()).keys())),
515 'Kt4EMPFlowEventShape.Density',
516 'Kt4EMPFlowNeutEventShape.Density',
517 'TauTracks.flagSet.trackLinks',
518 'AnalysisLargeRJets.pt.eta.phi.m.numConstit.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.DetectorEta.DetectorY.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.D2.C2.R10TruthLabel_R22v1.R10TruthLabel_R21Precision_2022v1.GhostBHadronsFinalCount.GhostCHadronsFinalCount.GN2Xv01_phbb.GN2Xv01_phcc.GN2Xv01_ptop.GN2Xv01_pqcd',
522 PHYSLITEItemList = PHYSLITESlimmingHelper.GetItemList()
524 formatString =
'D2AOD_PHYSLITE' if 'StreamDAOD_PHYS' in flags.Input.ProcessingTags
else 'DAOD_PHYSLITE'
525 acc.merge(OutputStreamCfg(flags, formatString, ItemList=PHYSLITEItemList, AcceptAlgs=[
"PHYSLITEKernel"]))
526 acc.merge(SetupMetaDataForStreamCfg(flags, formatString, AcceptAlgs=[
"PHYSLITEKernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))