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 *****************')
26 from egammaAlgs.egammaAODFixesConfig
import runAODFix
27 doneFix, fixes = runAODFix(flags)
28 logPLCPAlgCfg.info(f
'Existing egamma AOD fixes for timing cut issue : {fixes}')
29 if 'egammatopoIsoFix' in fixes:
30 FixedElDict.update({
"ElectronIsolationCorrectionAlg.isolationCorrectionTool.FixTimingIssueInCore":
False})
31 FixedPhDict.update({
"PhotonIsolationCorrectionAlg.isolationCorrectionTool.FixTimingIssueInCore":
False})
32 if 'egClusterL2_3Fix' in fixes:
33 FixedElDict.update({
"ElectronCalibrationAndSmearingAlg.calibrationAndSmearingTool.FixForMissingCells":
False})
34 FixedPhDict.update({
"PhotonCalibrationAndSmearingAlg.calibrationAndSmearingTool.FixForMissingCells":
False})
36 from AnalysisAlgorithmsConfig.ConfigFactory
import ConfigFactory
37 from AnalysisAlgorithmsConfig.ConfigSequence
import ConfigSequence
38 configSeq = ConfigSequence ()
41 factory = ConfigFactory()
44 subConfig = factory.makeConfig (
'CommonServices')
45 subConfig.setOptionValue (
'.runSystematics',
False)
46 subConfig.setOptionValue (
'.fixDAODTruthRecord',
False)
47 configSeq += subConfig
51 from AnalysisAlgorithmsConfig.ConfigAccumulator
import ExpertModeWarning
52 warnings.simplefilter(
'ignore', ExpertModeWarning)
55 configSeq += factory.makeConfig (
'PileupReweighting')
58 configSeq += factory.makeConfig (
'EventCleaning')
59 configSeq.setOptionValue (
'.noFilter',
True)
60 configSeq.setOptionValue (
'.GRLDict', getGoodRunsLists())
64 logPLCPAlgCfg.info(
'Do Muons')
66 subConfig = factory.makeConfig (
'Muons')
67 subConfig.setOptionValue (
'.containerName',
'AnalysisMuons')
68 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
69 configSeq += subConfig
70 subConfig = factory.makeConfig (
'Muons.WorkingPoint')
71 subConfig.setOptionValue (
'.containerName',
'AnalysisMuons')
72 subConfig.setOptionValue (
'.selectionName',
'loose')
73 subConfig.setOptionValue (
'.trackSelection',
False)
74 subConfig.setOptionValue (
'.quality',
'Loose')
75 subConfig.setOptionValue (
'.isolation',
'NonIso')
76 configSeq += subConfig
77 subConfig = factory.makeConfig (
'Thinning')
78 subConfig.setOptionValue (
'.containerName',
'AnalysisMuons')
79 subConfig.setOptionValue (
'.selectionName',
'loose')
80 subConfig.setOptionValue (
'.deepCopy',
True)
81 subConfig.setOptionValue (
'.sortPt',
True)
82 subConfig.setOptionValue (
'.noUniformSelection',
True)
83 subConfig.setOptionValue (
'.containerType',
'xAOD::MuonContainer')
84 configSeq += subConfig
88 logPLCPAlgCfg.info(
'Do Electrons')
90 subConfig = factory.makeConfig (
'Electrons')
91 subConfig.setOptionValue (
'.containerName',
'AnalysisElectrons')
92 subConfig.setOptionValue (
'.isolationCorrection',
True)
93 subConfig.setOptionValue (
'.minPt', 0.)
94 subConfig.setOptionValue (
'.decorateSamplingPattern',
True)
95 subConfig.setOptionValue (
'.decorateEmva',
True)
96 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
97 if len(FixedElDict) > 0:
98 subConfig.setOptionValue (
'.propertyOverrides', FixedElDict)
99 configSeq += subConfig
100 subConfig = factory.makeConfig (
'Electrons.WorkingPoint')
101 subConfig.setOptionValue (
'.containerName',
'AnalysisElectrons')
102 subConfig.setOptionValue (
'.selectionName',
'looseLH')
103 subConfig.setOptionValue (
'.trackSelection',
False)
104 subConfig.setOptionValue (
'.identificationWP',
'LooseLH')
105 subConfig.setOptionValue (
'.addSelectionToPreselection',
False)
106 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
107 subConfig.setOptionValue (
'.doFSRSelection',
True)
108 subConfig.setOptionValue (
'.noEffSF',
True)
109 configSeq += subConfig
110 subConfig = factory.makeConfig (
'Electrons.WorkingPoint')
111 subConfig.setOptionValue (
'.containerName',
'AnalysisElectrons')
112 subConfig.setOptionValue (
'.selectionName',
'looseDNN')
113 subConfig.setOptionValue (
'.trackSelection',
False)
114 subConfig.setOptionValue (
'.identificationWP',
'LooseDNN')
115 subConfig.setOptionValue (
'.addSelectionToPreselection',
False)
116 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
117 subConfig.setOptionValue (
'.doFSRSelection',
True)
118 subConfig.setOptionValue (
'.noEffSF',
True)
119 configSeq += subConfig
120 subConfig = factory.makeConfig (
'Thinning')
121 subConfig.setOptionValue (
'.containerName',
'AnalysisElectrons')
122 subConfig.setOptionValue (
'.selectionName',
'looseLH||looseDNN')
123 subConfig.setOptionValue (
'.deepCopy',
True)
124 subConfig.setOptionValue (
'.sortPt',
True)
125 subConfig.setOptionValue (
'.noUniformSelection',
True)
126 subConfig.setOptionValue (
'.containerType',
'xAOD::ElectronContainer')
127 configSeq += subConfig
130 subConfig = factory.makeConfig (
'Electrons')
131 subConfig.setOptionValue (
'.containerName',
'AnalysisSiHitElectrons')
132 subConfig.setOptionValue (
'.isolationCorrection',
True)
133 subConfig.setOptionValue (
'.minPt', 0.)
134 subConfig.setOptionValue (
'.postfix',
'SiHit')
135 subConfig.setOptionValue (
'.decorateEmva',
True)
136 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
137 if len(FixedElDict) > 0:
138 subConfig.setOptionValue (
'.propertyOverrides', FixedElDict)
139 configSeq += subConfig
140 subConfig = factory.makeConfig (
'Electrons.WorkingPoint')
141 subConfig.setOptionValue (
'.containerName',
'AnalysisSiHitElectrons')
142 subConfig.setOptionValue (
'.selectionName',
'SiHits')
143 subConfig.setOptionValue (
'.trackSelection',
False)
144 subConfig.setOptionValue (
'.identificationWP',
'SiHitElectron')
145 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
146 subConfig.setOptionValue (
'.doFSRSelection',
True)
147 subConfig.setOptionValue (
'.noEffSF',
True)
148 subConfig.setOptionValue (
'.postfix',
'SiHit')
149 configSeq += subConfig
150 subConfig = factory.makeConfig (
'Thinning')
151 subConfig.setOptionValue (
'.containerName',
'AnalysisSiHitElectrons')
152 subConfig.setOptionValue (
'.selectionName',
'SiHits')
153 subConfig.setOptionValue (
'.deepCopy',
True)
154 subConfig.setOptionValue (
'.sortPt',
True)
155 subConfig.setOptionValue (
'.noUniformSelection',
True)
156 subConfig.setOptionValue (
'.containerType',
'xAOD::ElectronContainer')
157 configSeq += subConfig
161 logPLCPAlgCfg.info(
'Do Photons')
163 subConfig = factory.makeConfig (
'Photons')
164 subConfig.setOptionValue (
'.containerName',
'AnalysisPhotons')
165 subConfig.setOptionValue (
'.recomputeIsEM',
False)
166 subConfig.setOptionValue (
'.minPt', 0.)
167 subConfig.setOptionValue (
'.decorateEmva',
True)
168 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
169 if len(FixedPhDict) > 0:
170 subConfig.setOptionValue (
'.propertyOverrides', FixedPhDict)
171 configSeq += subConfig
172 subConfig = factory.makeConfig (
'Photons.WorkingPoint')
173 subConfig.setOptionValue (
'.containerName',
'AnalysisPhotons')
174 subConfig.setOptionValue (
'.selectionName',
'loose')
175 subConfig.setOptionValue (
'.qualityWP',
'Loose')
176 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
177 subConfig.setOptionValue (
'.doFSRSelection',
True)
178 subConfig.setOptionValue (
'.recomputeIsEM',
False)
179 subConfig.setOptionValue (
'.noEffSFForID',
True)
180 subConfig.setOptionValue (
'.noEffSFForIso',
True)
181 configSeq += subConfig
182 subConfig = factory.makeConfig (
'Thinning')
183 subConfig.setOptionValue (
'.containerName',
'AnalysisPhotons')
184 subConfig.setOptionValue (
'.selectionName',
'loose')
185 subConfig.setOptionValue (
'.deepCopy',
True)
186 subConfig.setOptionValue (
'.sortPt',
True)
187 subConfig.setOptionValue (
'.noUniformSelection',
True)
188 subConfig.setOptionValue (
'.containerType',
'xAOD::PhotonContainer')
189 configSeq += subConfig
195 subConfig = factory.makeConfig (
'TauJets')
196 subConfig.setOptionValue (
'.containerName',
'AnalysisTauJets')
197 subConfig.setOptionValue (
'.addGlobalFELinksDep',
True)
198 subConfig.setOptionValue (
'.rerunTruthMatching',
False)
199 configSeq += subConfig
200 subConfig = factory.makeConfig (
'TauJets.WorkingPoint')
201 subConfig.setOptionValue (
'.containerName',
'AnalysisTauJets')
202 subConfig.setOptionValue (
'.selectionName',
'baseline')
203 subConfig.setOptionValue (
'.quality',
'Baseline')
204 configSeq += subConfig
205 subConfig = factory.makeConfig (
'Thinning')
206 subConfig.setOptionValue (
'.containerName',
'AnalysisTauJets')
207 subConfig.setOptionValue (
'.selectionName',
'baseline')
208 subConfig.setOptionValue (
'.deepCopy',
True)
209 subConfig.setOptionValue (
'.sortPt',
True)
210 subConfig.setOptionValue (
'.noUniformSelection',
True)
211 subConfig.setOptionValue (
'.containerType',
'xAOD::TauJetContainer')
212 configSeq += subConfig
215 jetContainer =
'AntiKt4EMPFlowJets'
216 subConfig = factory.makeConfig (
'Jets')
217 subConfig.setOptionValue (
'.containerName',
'AnalysisJets')
218 subConfig.setOptionValue (
'.jetCollection', jetContainer)
219 subConfig.setOptionValue (
'.runFJvtSelection',
False)
220 subConfig.setOptionValue (
'.runJvtSelection',
False)
221 subConfig.setOptionValue (
'.runNNJvtUpdate',
False)
222 subConfig.setOptionValue (
'.runUncertainties',
False)
223 subConfig.setOptionValue (
'.outputTruthLabelIDs',
True)
224 configSeq += subConfig
225 subConfig = factory.makeConfig (
'Thinning')
226 subConfig.setOptionValue (
'.containerName',
'AnalysisJets')
227 subConfig.setOptionValue (
'.deepCopy',
True)
228 subConfig.setOptionValue (
'.sortPt',
True)
229 subConfig.setOptionValue (
'.noUniformSelection',
True)
230 subConfig.setOptionValue (
'.containerType',
'xAOD::JetContainer')
231 configSeq += subConfig
233 largeRjetContainer=
'AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets'
234 subConfig = factory.makeConfig (
'Jets')
235 subConfig.setOptionValue (
'.containerName',
'AnalysisLargeRJets')
236 subConfig.setOptionValue (
'.jetCollection', largeRjetContainer)
237 subConfig.setOptionValue (
'.runGhostMuonAssociation',
False)
239 subConfig.setOptionValue (
'.minPt', 0.)
240 subConfig.setOptionValue (
'.maxPt', 0.)
241 subConfig.setOptionValue (
'.maxRapidity', 0.)
242 subConfig.setOptionValue (
'.minMass', 0.)
243 subConfig.setOptionValue (
'.maxMass', 0.)
244 subConfig.setOptionValue (
'.runUncertainties',
False)
245 subConfig.setOptionValue (
'.outputTruthLabelIDs',
True)
246 configSeq += subConfig
247 subConfig = factory.makeConfig (
'Thinning')
248 subConfig.setOptionValue (
'.containerName',
'AnalysisLargeRJets')
249 subConfig.setOptionValue (
'.deepCopy',
True)
250 subConfig.setOptionValue (
'.sortPt',
True)
251 subConfig.setOptionValue (
'.noUniformSelection',
True)
252 subConfig.setOptionValue (
'.containerType',
'xAOD::JetContainer')
253 configSeq += subConfig
255 from AnalysisAlgorithmsConfig.ConfigAccumulator
import ConfigAccumulator
256 configAccumulator = ConfigAccumulator (dataType=
None, algSeq=
None,
257 autoconfigFromFlags=flags, noSysSuffix=
True, noSystematics=
True)
258 configSeq.fullConfigure (configAccumulator)
259 return configAccumulator.CA
265 """Configure the derivation framework driving algorithm (kernel) for PHYSLITE"""
266 acc = ComponentAccumulator()
270 if 'StreamAOD' in flags.Input.ProcessingTags:
272 from DerivationFrameworkPhys.PhysCommonConfig
import PhysCommonAugmentationsCfg
273 acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs[
'TriggerListsHelper']))
279 thinningToolsArgs = {
280 'ElectronCaloClusterThinningToolName' :
"PHYSLITEElectronCaloClusterThinningTool",
281 'PhotonCaloClusterThinningToolName' :
"PHYSLITEPhotonCaloClusterThinningTool",
282 'ElectronGSFTPThinningToolName' :
"PHYSLITEElectronGSFTPThinningTool",
283 'PhotonGSFTPThinningToolName' :
"PHYSLITEPhotonGSFTPThinningTool"
286 if 'StreamAOD' in flags.Input.ProcessingTags:
287 thinningToolsArgs.update({
288 'TrackParticleThinningToolName' :
"PHYSLITETrackParticleThinningTool",
289 'MuonTPThinningToolName' :
"PHYSLITEMuonTPThinningTool",
290 'TauJetThinningToolName' :
"PHYSLITETauJetThinningTool",
291 'TauJets_MuonRMThinningToolName' :
"PHYSLITETauJets_MuonRMThinningTool",
292 'DiTauTPThinningToolName' :
"PHYSLITEDiTauTPThinningTool",
293 'DiTauLowPtThinningToolName' :
"PHYSLITEDiTauLowPtThinningTool",
294 'DiTauLowPtTPThinningToolName' :
"PHYSLITEDiTauLowPtTPThinningTool",
297 from DerivationFrameworkPhys.PhysCommonThinningConfig
import PhysCommonThinningCfg
298 acc.merge(PhysCommonThinningCfg(flags, StreamName = kwargs[
'StreamName'], **thinningToolsArgs))
301 for key
in thinningToolsArgs:
302 thinningTools.append(acc.getPublicTool(thinningToolsArgs[key]))
309 if 'StreamAOD' in flags.Input.ProcessingTags:
312 from DerivationFrameworkHiggs.HiggsPhysContent
import HiggsAugmentationAlgsCfg
313 acc.merge(HiggsAugmentationAlgsCfg(flags))
316 from IsolationSelection.IsolationSelectionConfig
import IsoCloseByAlgsCfg
317 acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite =
True))
320 from LeptonTaggers.LeptonTaggersConfig
import DecoratePLITAlgsCfg
321 acc.merge(DecoratePLITAlgsCfg(flags))
338 if 'StreamAOD' in flags.Input.ProcessingTags:
339 from METReconstruction.METAssocCfg
import AssocConfig, METAssocConfig
340 from METReconstruction.METAssociatorCfg
import getAssocCA
341 associators = [AssocConfig(
'PFlowJet',
'AnalysisJets'),
342 AssocConfig(
'Muon',
'AnalysisMuons'),
343 AssocConfig(
'Ele',
'AnalysisElectrons'),
344 AssocConfig(
'Gamma',
'AnalysisPhotons'),
345 AssocConfig(
'Tau',
'AnalysisTauJets'),
346 AssocConfig(
'Soft',
'')]
347 PHYSLITE_cfg = METAssocConfig(
'AnalysisMET',
352 components_PHYSLITE_cfg = getAssocCA(PHYSLITE_cfg,METName=
'AnalysisMET')
353 acc.merge(components_PHYSLITE_cfg)
354 elif 'StreamDAOD_PHYS' in flags.Input.ProcessingTags:
355 from DerivationFrameworkJetEtMiss.METCommonConfig
import METRemappingCfg
357 METRemap_cfg = METRemappingCfg(flags)
358 acc.merge(METRemap_cfg)
361 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
362 acc.addEventAlgo(DerivationKernel(name, ThinningTools = thinningTools))
369 acc = ComponentAccumulator()
375 from DerivationFrameworkPhys.TriggerListsHelper
import TriggerListsHelper
376 PHYSLITETriggerListsHelper = TriggerListsHelper(flags)
379 streamName =
'StreamDAOD_PHYSLITE' if 'StreamAOD' in flags.Input.ProcessingTags
else 'StreamD2AOD_PHYSLITE'
382 acc.merge(
PHYSLITEKernelCfg(flags, name=
"PHYSLITEKernel", StreamName = streamName, TriggerListsHelper = PHYSLITETriggerListsHelper))
387 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
388 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
389 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
391 PHYSLITESlimmingHelper =
SlimmingHelper(
"PHYSLITESlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
392 PHYSLITESlimmingHelper.ExtraVariables = []
394 PHYSLITESlimmingHelper.IncludeTriggerNavigation =
False
395 PHYSLITESlimmingHelper.IncludeJetTriggerContent =
False
396 PHYSLITESlimmingHelper.IncludeMuonTriggerContent =
False
397 PHYSLITESlimmingHelper.IncludeEGammaTriggerContent =
False
398 PHYSLITESlimmingHelper.IncludeTauTriggerContent =
False
399 PHYSLITESlimmingHelper.IncludeEtMissTriggerContent =
False
400 PHYSLITESlimmingHelper.IncludeBJetTriggerContent =
False
401 PHYSLITESlimmingHelper.IncludeBPhysTriggerContent =
False
402 PHYSLITESlimmingHelper.IncludeMinBiasTriggerContent =
False
406 if flags.Trigger.EDMVersion == 2:
408 from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import TriggerMatchingCommonRun2Cfg
409 acc.merge(TriggerMatchingCommonRun2Cfg(flags,
410 name =
"PHYSLITETrigMatchNoTau",
411 OutputContainerPrefix =
"AnalysisTrigMatch_",
412 ChainNames = PHYSLITETriggerListsHelper.Run2TriggerNamesNoTau,
413 InputElectrons =
"AnalysisElectrons",
414 InputPhotons =
"AnalysisPhotons",
415 InputMuons =
"AnalysisMuons",
416 InputTaus =
"AnalysisTauJets"))
417 acc.merge(TriggerMatchingCommonRun2Cfg(flags,
418 name =
"PHYSLITETrigMatchTau",
419 OutputContainerPrefix =
"AnalysisTrigMatch_",
420 ChainNames = PHYSLITETriggerListsHelper.Run2TriggerNamesTau,
422 InputElectrons =
"AnalysisElectrons",
423 InputPhotons =
"AnalysisPhotons",
424 InputMuons =
"AnalysisMuons",
425 InputTaus =
"AnalysisTauJets"))
427 from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import AddRun2TriggerMatchingToSlimmingHelper
428 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSLITESlimmingHelper,
429 OutputContainerPrefix =
"AnalysisTrigMatch_",
430 TriggerList = PHYSLITETriggerListsHelper.Run2TriggerNamesTau)
431 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSLITESlimmingHelper,
432 OutputContainerPrefix =
"AnalysisTrigMatch_",
433 TriggerList = PHYSLITETriggerListsHelper.Run2TriggerNamesNoTau)
436 if flags.Trigger.EDMVersion == 3
or (flags.Trigger.EDMVersion == 2
and flags.Trigger.doEDMVersionConversion):
438 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
439 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(PHYSLITESlimmingHelper)
442 PHYSLITESlimmingHelper.AppendToDictionary.update({
443 'TruthEvents':
'xAOD::TruthEventContainer',
'TruthEventsAux':
'xAOD::TruthEventAuxContainer',
444 'MET_Truth':
'xAOD::MissingETContainer',
'MET_TruthAux':
'xAOD::MissingETAuxContainer',
445 'TruthElectrons':
'xAOD::TruthParticleContainer',
'TruthElectronsAux':
'xAOD::TruthParticleAuxContainer',
446 'TruthMuons':
'xAOD::TruthParticleContainer',
'TruthMuonsAux':
'xAOD::TruthParticleAuxContainer',
447 'TruthPhotons':
'xAOD::TruthParticleContainer',
'TruthPhotonsAux':
'xAOD::TruthParticleAuxContainer',
448 'TruthTaus':
'xAOD::TruthParticleContainer',
'TruthTausAux':
'xAOD::TruthParticleAuxContainer',
449 'TruthNeutrinos':
'xAOD::TruthParticleContainer',
'TruthNeutrinosAux':
'xAOD::TruthParticleAuxContainer',
450 'TruthBSM':
'xAOD::TruthParticleContainer',
'TruthBSMAux':
'xAOD::TruthParticleAuxContainer',
451 'TruthBoson':
'xAOD::TruthParticleContainer',
'TruthBosonAux':
'xAOD::TruthParticleAuxContainer',
452 'TruthTop':
'xAOD::TruthParticleContainer',
'TruthTopAux':
'xAOD::TruthParticleAuxContainer',
453 'TruthForwardProtons':
'xAOD::TruthParticleContainer',
'TruthForwardProtonsAux':
'xAOD::TruthParticleAuxContainer',
454 'BornLeptons':
'xAOD::TruthParticleContainer',
'BornLeptonsAux':
'xAOD::TruthParticleAuxContainer',
455 'TruthBosonsWithDecayParticles':
'xAOD::TruthParticleContainer',
'TruthBosonsWithDecayParticlesAux':
'xAOD::TruthParticleAuxContainer',
456 'TruthBosonsWithDecayVertices':
'xAOD::TruthVertexContainer',
'TruthBosonsWithDecayVerticesAux':
'xAOD::TruthVertexAuxContainer',
457 'TruthBSMWithDecayParticles':
'xAOD::TruthParticleContainer',
'TruthBSMWithDecayParticlesAux':
'xAOD::TruthParticleAuxContainer',
458 'TruthBSMWithDecayVertices':
'xAOD::TruthVertexContainer',
'TruthBSMWithDecayVerticesAux':
'xAOD::TruthVertexAuxContainer',
459 'TruthPrimaryVertices':
'xAOD::TruthVertexContainer',
'TruthPrimaryVerticesAux':
'xAOD::TruthVertexAuxContainer',
460 'AnalysisElectrons':
'xAOD::ElectronContainer',
'AnalysisElectronsAux':
'xAOD::ElectronAuxContainer',
461 'AnalysisSiHitElectrons':
'xAOD::ElectronContainer',
'AnalysisSiHitElectronsAux':
'xAOD::ElectronAuxContainer',
462 'AnalysisMuons':
'xAOD::MuonContainer',
'AnalysisMuonsAux':
'xAOD::MuonAuxContainer',
463 'AnalysisJets':
'xAOD::JetContainer',
'AnalysisJetsAux':
'xAOD::AuxContainerBase',
464 'AnalysisPhotons':
'xAOD::PhotonContainer',
'AnalysisPhotonsAux':
'xAOD::PhotonAuxContainer',
465 'AnalysisTauJets':
'xAOD::TauJetContainer',
'AnalysisTauJetsAux':
'xAOD::TauJetAuxContainer',
466 'MET_Core_AnalysisMET':
'xAOD::MissingETContainer',
'MET_Core_AnalysisMETAux':
'xAOD::MissingETAuxContainer',
467 'METAssoc_AnalysisMET':
'xAOD::MissingETAssociationMap',
'METAssoc_AnalysisMETAux':
'xAOD::MissingETAuxAssociationMap',
468 'AnalysisLargeRJets':
'xAOD::JetContainer',
'AnalysisLargeRJetsAux':
'xAOD::AuxContainerBase'
471 PHYSLITESlimmingHelper.SmartCollections = [
473 'InDetTrackParticles',
477 from DerivationFrameworkMuons.MuonsCommonConfig
import MuonVariablesCfg
480 from DerivationFrameworkHiggs.HiggsPhysContent
import setupHiggsSlimmingVariables
481 setupHiggsSlimmingVariables(flags, PHYSLITESlimmingHelper)
484 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import addTruth3ContentToSlimmerTool
485 addTruth3ContentToSlimmerTool(PHYSLITESlimmingHelper, reduced=
True)
487 if 'StreamAOD' in flags.Input.ProcessingTags:
488 from DerivationFrameworkMCTruth.HFClassificationCommonConfig
import HFClassificationCommonCfg
489 acc.merge(HFClassificationCommonCfg(flags))
492 btag_variables = [f
'{flags.BTagging.AK4TaggerName}_p{x}' for x
in [
'b',
'c',
'u',
'tau']]
493 PHYSLITESlimmingHelper.ExtraVariables += [
494 '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.PLIT_PLITel_pelxpromp.PLIT_PLITel_pnpxall',
495 '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',
496 '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',
497 'GSFTrackParticles.chiSquared.phi.d0.theta.qOverP.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.z0.vz.charge.vertexLink.numberOfPixelHits.numberOfSCTHits.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfInnermostPixelLayerHits.numberOfNextToInnermostPixelLayerHits.originalTrackParticle',
498 'GSFConversionVertices.trackParticleLinks.x.y.z.px.py.pz.pt1.pt2.neutralParticleLinks.minRfirstHit',
499 'egammaClusters.calE.calEta.calPhi.calM.e_sampl.eta_sampl.ETACALOFRAME.PHICALOFRAME.ETA2CALOFRAME.PHI2CALOFRAME.constituentClusterLinks.samplingPattern',
500 "AnalysisMuons.{var_string}".format(var_string =
".".join(MuonVariablesCfg(flags))),
501 'CombinedMuonTrackParticles.qOverP.d0.z0.vz.phi.theta.truthOrigin.truthType.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.numberOfPixelDeadSensors.numberOfPixelHits.numberOfPixelHoles.numberOfSCTDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfTRTHits.numberOfTRTOutliers.chiSquared.numberDoF',
502 'ExtrapolatedMuonTrackParticles.d0.z0.vz.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.truthOrigin.truthType.qOverP.theta.phi',
503 'MuonSpectrometerTrackParticles.phi.d0.z0.vz.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.vertexLink.theta.qOverP',
504 'InDetForwardTrackParticles.vz.truthType.truthOrigin.numberDoF.numberOfTRTHits.numberOfSCTHoles.theta.numberOfTRTOutliers.numberOfPrecisionLayers.numberOfSCTDeadSensors.numberOfPixelHoles.numberOfSCTHits.numberOfPrecisionHoleLayers.numberOfPixelDeadSensors.phi.numberOfPixelHits.z0.d0.qOverP.chiSquared.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag',
505 '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',
506 'AnalysisJets.pt.eta.phi.m.numConstit.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.DetectorEta.DetectorY.JVFCorr.NNJvtPass.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.GhostUnAssocMuonSegmentCount.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)),
507 'TruthPrimaryVertices.t.x.y.z',
508 'MET_Core_AnalysisMET.name.mpx.mpy.sumet.source',
509 'METAssoc_AnalysisMET.',
510 'InDetTrackParticles.numberOfTRTHits.numberOfTRTOutliers',
511 'EventInfo.RandomRunNumber.PileupWeight_NOSYS.correctedScaledInteractionsPerCrossing.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ.HF_Classification.HF_SimpleClassification.{GRL_Deco_names}'.format(GRL_Deco_names=
'.'.join(str(key)
for key
in (getGoodRunsLists()).keys())),
512 'Kt4EMPFlowEventShape.Density',
513 'Kt4EMPFlowNeutEventShape.Density',
514 'TauTracks.flagSet.trackLinks',
515 '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',
519 PHYSLITEItemList = PHYSLITESlimmingHelper.GetItemList()
521 formatString =
'D2AOD_PHYSLITE' if 'StreamDAOD_PHYS' in flags.Input.ProcessingTags
else 'DAOD_PHYSLITE'
522 acc.merge(OutputStreamCfg(flags, formatString, ItemList=PHYSLITEItemList, AcceptAlgs=[
"PHYSLITEKernel"]))
523 acc.merge(SetupMetaDataForStreamCfg(flags, formatString, AcceptAlgs=[
"PHYSLITEKernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))