ATLAS Offline Software
Functions
python.PHYSLITE Namespace Reference

Functions

def CPAlgorithmsCfg (flags)
 
def PHYSLITEKernelCfg (flags, name='PHYSLITEKernel', **kwargs)
 
def PHYSLITECfg (flags)
 

Function Documentation

◆ CPAlgorithmsCfg()

def python.PHYSLITE.CPAlgorithmsCfg (   flags)
do the CP algorithm configuration for PHYSLITE

Definition at line 17 of file PHYSLITE.py.

17 def CPAlgorithmsCfg(flags):
18  """do the CP algorithm configuration for PHYSLITE"""
19 
20  from AthenaCommon.Logging import logging
21  logPLCPAlgCfg = logging.getLogger('PLCPAlgCfg')
22  logPLCPAlgCfg.info('****************** STARTING PHYSLITE CPAlgorithmsCfg *****************')
23 
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
28 
29  from AnalysisAlgorithmsConfig.ConfigFactory import ConfigFactory
30  from AnalysisAlgorithmsConfig.ConfigSequence import ConfigSequence
31  configSeq = ConfigSequence ()
32 
33  # create factory object to build block configurations
34  factory = ConfigFactory()
35 
36  # Set up the systematics loader/handler algorithm:
37  subConfig = factory.makeConfig ('CommonServices')
38  subConfig.setOptionValue ('.runSystematics', False)
39  configSeq += subConfig
40 
41  # Create a pile-up analysis config
42  if flags.Input.isMC:
43  # setup config and lumicalc files for pile-up tool
44  configSeq += factory.makeConfig ('PileupReweighting')
45 
46  # Set up the GRL decoration analysis config
47  configSeq += factory.makeConfig ('EventCleaning')
48  configSeq.setOptionValue ('.noFilter', True)
49  configSeq.setOptionValue ('.GRLDict', getGoodRunsLists())
50 
51  # set up the muon analysis algorithm config (must come before electrons and photons to allow FSR collection):
52 
53  logPLCPAlgCfg.info('Do Muons')
54 
55  subConfig = factory.makeConfig ('Muons', containerName='AnalysisMuons')
56  configSeq += subConfig
57  subConfig = factory.makeConfig ('Muons.WorkingPoint', containerName='AnalysisMuons',
58  selectionName='loose')
59  subConfig.setOptionValue ('.trackSelection', False)
60  subConfig.setOptionValue ('.quality', 'Loose')
61  subConfig.setOptionValue ('.isolation', 'NonIso')
62  configSeq += subConfig
63  subConfig = factory.makeConfig ('Thinning', containerName='AnalysisMuons')
64  subConfig.setOptionValue ('.selectionName', 'loose')
65  subConfig.setOptionValue ('.deepCopy', True)
66  subConfig.setOptionValue ('.sortPt', True)
67  subConfig.setOptionValue ('.noUniformSelection', True)
68  configSeq += subConfig
69 
70  # set up the electron analysis config (For SiHits electrons, use: LooseLHElectronSiHits.NonIso):
71 
72  logPLCPAlgCfg.info('Do Electrons')
73 
74  subConfig = factory.makeConfig ('Electrons', containerName='AnalysisElectrons')
75  subConfig.setOptionValue ('.forceFullSimConfig', forceEGammaFullSimConfig)
76  subConfig.setOptionValue ('.isolationCorrection', True)
77  subConfig.setOptionValue ('.minPt', 0.)
78  configSeq += subConfig
79  subConfig = factory.makeConfig ('Electrons.WorkingPoint', containerName='AnalysisElectrons',
80  selectionName='loose')
81  subConfig.setOptionValue ('.trackSelection', False)
82  subConfig.setOptionValue ('.identificationWP', 'LooseLHElectron')
83  subConfig.setOptionValue ('.isolationWP', 'NonIso')
84  subConfig.setOptionValue ('.doFSRSelection', True)
85  subConfig.setOptionValue ('.noEffSF', True)
86  configSeq += subConfig
87  subConfig = factory.makeConfig ('Thinning', containerName='AnalysisElectrons')
88  subConfig.setOptionValue ('.selectionName', 'loose')
89  subConfig.setOptionValue ('.deepCopy', True)
90  subConfig.setOptionValue ('.sortPt', True)
91  subConfig.setOptionValue ('.noUniformSelection', True)
92  configSeq += subConfig
93 
94  # So SiHit electrons - should come after the standard selection in order to avoid keeping the same electrons twice
95  subConfig = factory.makeConfig ('Electrons', containerName='AnalysisSiHitElectrons')
96  subConfig.setOptionValue ('.forceFullSimConfig', forceEGammaFullSimConfig)
97  subConfig.setOptionValue ('.isolationCorrection', True)
98  subConfig.setOptionValue ('.minPt', 0.)
99  subConfig.setOptionValue ('.postfix', 'SiHit')
100  configSeq += subConfig
101  subConfig = factory.makeConfig ('Electrons.WorkingPoint', containerName='AnalysisSiHitElectrons', selectionName='SiHits')
102  subConfig.setOptionValue ('.trackSelection', False)
103  subConfig.setOptionValue ('.identificationWP', 'SiHitElectron')
104  subConfig.setOptionValue ('.isolationWP', 'NonIso')
105  subConfig.setOptionValue ('.doFSRSelection', True) # needed to veto FSR electrons
106  subConfig.setOptionValue ('.noEffSF', True)
107  subConfig.setOptionValue ('.postfix', 'SiHit')
108  configSeq += subConfig
109  subConfig = factory.makeConfig ('Thinning', containerName='AnalysisSiHitElectrons')
110  subConfig.setOptionValue ('.selectionName', 'SiHits')
111  subConfig.setOptionValue ('.deepCopy', True)
112  subConfig.setOptionValue ('.sortPt', True)
113  subConfig.setOptionValue ('.noUniformSelection', True)
114  configSeq += subConfig
115 
116  # set up the photon analysis config:
117 
118  logPLCPAlgCfg.info('Do Photons')
119 
120  subConfig = factory.makeConfig ('Photons', containerName='AnalysisPhotons')
121  subConfig.setOptionValue ('.forceFullSimConfig', forceEGammaFullSimConfig)
122  subConfig.setOptionValue ('.recomputeIsEM', False)
123  subConfig.setOptionValue ('.minPt', 0.)
124  configSeq += subConfig
125  subConfig = factory.makeConfig ('Photons.WorkingPoint', containerName='AnalysisPhotons',
126  selectionName='loose')
127  subConfig.setOptionValue ('.qualityWP', 'Loose')
128  subConfig.setOptionValue ('.isolationWP', 'NonIso')
129  subConfig.setOptionValue ('.doFSRSelection', True)
130  subConfig.setOptionValue ('.recomputeIsEM', False)
131  subConfig.setOptionValue ('.noEffSF', True)
132  configSeq += subConfig
133  subConfig = factory.makeConfig ('Thinning', containerName='AnalysisPhotons')
134  subConfig.setOptionValue ('.selectionName', 'loose')
135  subConfig.setOptionValue ('.deepCopy', True)
136  subConfig.setOptionValue ('.sortPt', True)
137  subConfig.setOptionValue ('.noUniformSelection', True)
138  configSeq += subConfig
139 
140 
141 
142  # set up the tau analysis algorithm config:
143  # Commented for now due to use of public tools
144  subConfig = factory.makeConfig ('TauJets', containerName='AnalysisTauJets')
145  configSeq += subConfig
146  subConfig = factory.makeConfig ('TauJets.WorkingPoint', containerName='AnalysisTauJets',
147  selectionName='baseline')
148  subConfig.setOptionValue ('.quality', 'Baseline')
149  configSeq += subConfig
150  subConfig = factory.makeConfig ('Thinning', containerName='AnalysisTauJets')
151  subConfig.setOptionValue ('.selectionName', 'baseline')
152  subConfig.setOptionValue ('.deepCopy', True)
153  subConfig.setOptionValue ('.sortPt', True)
154  subConfig.setOptionValue ('.noUniformSelection', True)
155  configSeq += subConfig
156 
157  # set up the jet analysis algorithm config:
158  jetContainer = 'AntiKt4EMPFlowJets'
159  subConfig = factory.makeConfig ('Jets', containerName='AnalysisJets',
160  jetCollection=jetContainer)
161  subConfig.setOptionValue ('.runFJvtUpdate', False)
162  subConfig.setOptionValue ('.runFJvtSelection', False)
163  subConfig.setOptionValue ('.runJvtSelection', False)
164  configSeq += subConfig
165  subConfig = factory.makeConfig ('Thinning', containerName='AnalysisJets')
166  subConfig.setOptionValue ('.deepCopy', True)
167  subConfig.setOptionValue ('.sortPt', True)
168  subConfig.setOptionValue ('.noUniformSelection', True)
169  configSeq += subConfig
170 
171  largeRjetContainer='AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets'
172  subConfig = factory.makeConfig ('Jets', containerName='AnalysisLargeRJets',
173  jetCollection=largeRjetContainer)
174  subConfig.setOptionValue ('.runGhostMuonAssociation', False)
175  configSeq += subConfig
176  subConfig = factory.makeConfig ('Thinning', containerName='AnalysisLargeRJets')
177  subConfig.setOptionValue ('.deepCopy', True)
178  subConfig.setOptionValue ('.sortPt', True)
179  subConfig.setOptionValue ('.noUniformSelection', True)
180  configSeq += subConfig
181 
182  from AnalysisAlgorithmsConfig.ConfigAccumulator import ConfigAccumulator
183  configAccumulator = ConfigAccumulator (dataType=None, algSeq=None,
184  autoconfigFromFlags=flags, noSysSuffix=True, noSystematics=True)
185  configSeq.fullConfigure (configAccumulator)
186  return configAccumulator.CA
187 
188 
189 
190 # Main algorithm config

◆ PHYSLITECfg()

def python.PHYSLITE.PHYSLITECfg (   flags)

Definition at line 289 of file PHYSLITE.py.

289 def PHYSLITECfg(flags):
290 
291  acc = ComponentAccumulator()
292 
293  # Get the lists of triggers needed for trigger matching.
294  # This is needed at this scope (for the slimming) and further down in the config chain
295  # for actually configuring the matching, so we create it here and pass it down
296  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
297  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
298  PHYSLITETriggerListsHelper = TriggerListsHelper(flags)
299 
300  # Set the stream name - varies depending on whether the input is AOD or DAOD_PHYS
301  streamName = 'StreamDAOD_PHYSLITE' if 'StreamAOD' in flags.Input.ProcessingTags else 'StreamD2AOD_PHYSLITE'
302 
303  # Common augmentations
304  acc.merge(PHYSLITEKernelCfg(flags, name="PHYSLITEKernel", StreamName = streamName, TriggerListsHelper = PHYSLITETriggerListsHelper))
305 
306  # ============================
307  # Define contents of the format
308  # =============================
309  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
310  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
311  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
312 
313  PHYSLITESlimmingHelper = SlimmingHelper("PHYSLITESlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
314  PHYSLITESlimmingHelper.ExtraVariables = []
315  # Trigger content
316  PHYSLITESlimmingHelper.IncludeTriggerNavigation = False
317  PHYSLITESlimmingHelper.IncludeJetTriggerContent = False
318  PHYSLITESlimmingHelper.IncludeMuonTriggerContent = False
319  PHYSLITESlimmingHelper.IncludeEGammaTriggerContent = False
320  PHYSLITESlimmingHelper.IncludeTauTriggerContent = False
321  PHYSLITESlimmingHelper.IncludeEtMissTriggerContent = False
322  PHYSLITESlimmingHelper.IncludeBJetTriggerContent = False
323  PHYSLITESlimmingHelper.IncludeBPhysTriggerContent = False
324  PHYSLITESlimmingHelper.IncludeMinBiasTriggerContent = False
325 
326  # Trigger matching
327  # Run 2
328  if flags.Trigger.EDMVersion == 2:
329  # Need to re-run matching so that new Analysis<X> containers are matched to triggers
330  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2Cfg
331  acc.merge(TriggerMatchingCommonRun2Cfg(flags,
332  name = "PHYSLITETrigMatchNoTau",
333  OutputContainerPrefix = "AnalysisTrigMatch_",
334  ChainNames = PHYSLITETriggerListsHelper.Run2TriggerNamesNoTau,
335  InputElectrons = "AnalysisElectrons",
336  InputPhotons = "AnalysisPhotons",
337  InputMuons = "AnalysisMuons",
338  InputTaus = "AnalysisTauJets"))
339  acc.merge(TriggerMatchingCommonRun2Cfg(flags,
340  name = "PHYSLITETrigMatchTau",
341  OutputContainerPrefix = "AnalysisTrigMatch_",
342  ChainNames = PHYSLITETriggerListsHelper.Run2TriggerNamesTau,
343  DRThreshold = 0.2,
344  InputElectrons = "AnalysisElectrons",
345  InputPhotons = "AnalysisPhotons",
346  InputMuons = "AnalysisMuons",
347  InputTaus = "AnalysisTauJets"))
348  # Now add the resulting decorations to the output
349  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
350  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSLITESlimmingHelper,
351  OutputContainerPrefix = "AnalysisTrigMatch_",
352  TriggerList = PHYSLITETriggerListsHelper.Run2TriggerNamesTau)
353  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSLITESlimmingHelper,
354  OutputContainerPrefix = "AnalysisTrigMatch_",
355  TriggerList = PHYSLITETriggerListsHelper.Run2TriggerNamesNoTau)
356 
357  # Run 3, or Run 2 with navigation conversion
358  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
359  # No need to run matching: just keep navigation so matching can be done by analysts
360  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
362 
363  # Event content
364  PHYSLITESlimmingHelper.AppendToDictionary.update({
365  'TruthEvents':'xAOD::TruthEventContainer','TruthEventsAux':'xAOD::TruthEventAuxContainer',
366  'MET_Truth':'xAOD::MissingETContainer','MET_TruthAux':'xAOD::MissingETAuxContainer',
367  'TruthElectrons':'xAOD::TruthParticleContainer','TruthElectronsAux':'xAOD::TruthParticleAuxContainer',
368  'TruthMuons':'xAOD::TruthParticleContainer','TruthMuonsAux':'xAOD::TruthParticleAuxContainer',
369  'TruthPhotons':'xAOD::TruthParticleContainer','TruthPhotonsAux':'xAOD::TruthParticleAuxContainer',
370  'TruthTaus':'xAOD::TruthParticleContainer','TruthTausAux':'xAOD::TruthParticleAuxContainer',
371  'TruthNeutrinos':'xAOD::TruthParticleContainer','TruthNeutrinosAux':'xAOD::TruthParticleAuxContainer',
372  'TruthBSM':'xAOD::TruthParticleContainer','TruthBSMAux':'xAOD::TruthParticleAuxContainer',
373  'TruthBoson':'xAOD::TruthParticleContainer','TruthBosonAux':'xAOD::TruthParticleAuxContainer',
374  'TruthTop':'xAOD::TruthParticleContainer','TruthTopAux':'xAOD::TruthParticleAuxContainer',
375  'TruthForwardProtons':'xAOD::TruthParticleContainer','TruthForwardProtonsAux':'xAOD::TruthParticleAuxContainer',
376  'BornLeptons':'xAOD::TruthParticleContainer','BornLeptonsAux':'xAOD::TruthParticleAuxContainer',
377  'TruthBosonsWithDecayParticles':'xAOD::TruthParticleContainer','TruthBosonsWithDecayParticlesAux':'xAOD::TruthParticleAuxContainer',
378  'TruthBosonsWithDecayVertices':'xAOD::TruthVertexContainer','TruthBosonsWithDecayVerticesAux':'xAOD::TruthVertexAuxContainer',
379  'TruthBSMWithDecayParticles':'xAOD::TruthParticleContainer','TruthBSMWithDecayParticlesAux':'xAOD::TruthParticleAuxContainer',
380  'TruthBSMWithDecayVertices':'xAOD::TruthVertexContainer','TruthBSMWithDecayVerticesAux':'xAOD::TruthVertexAuxContainer',
381  'TruthPrimaryVertices':'xAOD::TruthVertexContainer','TruthPrimaryVerticesAux':'xAOD::TruthVertexAuxContainer',
382  'AnalysisElectrons':'xAOD::ElectronContainer', 'AnalysisElectronsAux':'xAOD::ElectronAuxContainer',
383  'AnalysisSiHitElectrons':'xAOD::ElectronContainer', 'AnalysisSiHitElectronsAux':'xAOD::ElectronAuxContainer',
384  'AnalysisMuons':'xAOD::MuonContainer', 'AnalysisMuonsAux':'xAOD::MuonAuxContainer',
385  'AnalysisJets':'xAOD::JetContainer','AnalysisJetsAux':'xAOD::AuxContainerBase',
386  'AnalysisPhotons':'xAOD::PhotonContainer', 'AnalysisPhotonsAux':'xAOD::PhotonAuxContainer',
387  'AnalysisTauJets':'xAOD::TauJetContainer', 'AnalysisTauJetsAux':'xAOD::TauJetAuxContainer',
388  'MET_Core_AnalysisMET':'xAOD::MissingETContainer', 'MET_Core_AnalysisMETAux':'xAOD::MissingETAuxContainer',
389  'METAssoc_AnalysisMET':'xAOD::MissingETAssociationMap', 'METAssoc_AnalysisMETAux':'xAOD::MissingETAuxAssociationMap',
390  'AntiKt10TruthTrimmedPtFrac5SmallR20Jets':'xAOD::JetContainer', 'AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux':'xAOD::JetAuxContainer',
391  'AnalysisLargeRJets':'xAOD::JetContainer','AnalysisLargeRJetsAux':'xAOD::AuxContainerBase'
392  })
393 
394  PHYSLITESlimmingHelper.SmartCollections = [
395  'EventInfo',
396  'InDetTrackParticles',
397  'PrimaryVertices',
398  ]
399 
400  from DerivationFrameworkMuons.MuonsCommonConfig import MuonVariablesCfg
401 
402  # add in extra values for Higgs
403  from DerivationFrameworkHiggs.HiggsPhysContent import setupHiggsSlimmingVariables
404  setupHiggsSlimmingVariables(flags, PHYSLITESlimmingHelper)
405 
406  if flags.Input.isMC:
407  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
408  addTruth3ContentToSlimmerTool(PHYSLITESlimmingHelper)
409  from DerivationFrameworkMCTruth.HFClassificationCommonConfig import HFClassificationCommonCfg
410  acc.merge(HFClassificationCommonCfg(flags))
411 
412  # Save the extra variables which aren't included by other means
413  btag_variables = [f'GN2v01_p{x}' for x in ['b', 'c', 'u', 'tau']]
414  btag_variables += [f'DL1dv01_p{x}' for x in ['b', 'c', 'u']]
415  PHYSLITESlimmingHelper.ExtraVariables += [
416  'AnalysisElectrons.trackParticleLinks.f1.pt.eta.phi.m.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',
417  'AnalysisSiHitElectrons.pt.eta.phi.m.charge.author.topoetcone20_CloseByCorr.DFCommonElectronsLHVeryLoose.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.OQ.truthOrigin.truthType.firstEgMotherTruthType.firstEgMotherTruthOrigin.z0stheta.d0Normalized.nInnerExpPix.clEta.clPhi',
418  'AnalysisPhotons.f1.pt.eta.phi.m.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',
419  'GSFTrackParticles.chiSquared.phi.d0.theta.qOverP.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.z0.vz.charge.vertexLink.numberOfPixelHits.numberOfSCTHits.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfInnermostPixelLayerHits.numberOfNextToInnermostPixelLayerHits.originalTrackParticle',
420  'GSFConversionVertices.trackParticleLinks.x.y.z.px.py.pz.pt1.pt2.neutralParticleLinks.minRfirstHit',
421  'egammaClusters.calE.calEta.calPhi.calM.e_sampl.eta_sampl.ETACALOFRAME.PHICALOFRAME.ETA2CALOFRAME.PHI2CALOFRAME.constituentClusterLinks',
422  "AnalysisMuons.{var_string}".format(var_string = ".".join(MuonVariablesCfg(flags))),
423  'CombinedMuonTrackParticles.qOverP.d0.z0.vz.phi.theta.truthOrigin.truthType.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.numberOfPixelDeadSensors.numberOfPixelHits.numberOfPixelHoles.numberOfSCTDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfTRTHits.numberOfTRTOutliers.chiSquared.numberDoF',
424  'ExtrapolatedMuonTrackParticles.d0.z0.vz.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.truthOrigin.truthType.qOverP.theta.phi',
425  'MuonSpectrometerTrackParticles.phi.d0.z0.vz.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.vertexLink.theta.qOverP',
426  'InDetForwardTrackParticles.vz.truthType.truthOrigin.numberDoF.numberOfTRTHits.numberOfSCTHoles.theta.numberOfTRTOutliers.numberOfPrecisionLayers.numberOfSCTDeadSensors.numberOfPixelHoles.numberOfSCTHits.numberOfPrecisionHoleLayers.numberOfPixelDeadSensors.phi.numberOfPixelHits.z0.d0.qOverP.chiSquared.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag',
427  'AnalysisTauJets.pt.eta.phi.m.ptFinalCalib.etaFinalCalib.ptTauEnergyScale.etaTauEnergyScale.charge.isTauFlags.PanTau_DecayMode.NNDecayMode.RNNJetScore.RNNJetScoreSigTrans.RNNEleScore.RNNEleScoreSigTrans_v1.EleRNNLoose_v1.EleRNNMedium_v1.EleRNNTight_v1.passTATTauMuonOLR.tauTrackLinks.vertexLink.truthParticleLink.truthJetLink.IsTruthMatched.truthOrigin.truthType',
428  'AnalysisJets.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.DetectorEta.JVFCorr.NNJvtPass.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.DFCommonJets_jetClean_LooseBad.DFCommonJets_jetClean_TightBad.Timing.btagging.btaggingLink.GhostTrack.DFCommonJets_fJvt.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.PSFrac.JetAccessorMap.EMFrac.Width.ActiveArea4vec_pt.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.EnergyPerSampling.SumPtChargedPFOPt500.isJvtHS',
429  '.'.join(['BTagging_AntiKt4EMPFlow'] + btag_variables),
430  'TruthPrimaryVertices.t.x.y.z',
431  'MET_Core_AnalysisMET.name.mpx.mpy.sumet.source',
432  'METAssoc_AnalysisMET.',
433  'InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.numberOfTRTHits.numberOfTRTOutliers',
434  '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())),
435  'Kt4EMPFlowEventShape.Density',
436  'Kt4EMPFlowNeutEventShape.Density',
437  'TauTracks.pt.eta.phi.flagSet.trackLinks',
438  'AnalysisLargeRJets.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.DetectorEta.TrackSumMass.TrackSumPt.constituentLinks.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.D2.C2.R10TruthLabel_R22v1.R10TruthLabel_R21Precision_2022v1.R10TruthLabel_R21Precision.GhostBHadronsFinalCount.GhostCHadronsFinalCount.Parent.GN2Xv01_phbb.GN2Xv01_phcc.GN2Xv01_ptop.GN2Xv01_pqcd.GN2Xv02_phbb.GN2Xv02_phcc.GN2Xv02_ptop.GN2Xv02_pqcd',
439  ]
440 
441  # Output stream
442  PHYSLITEItemList = PHYSLITESlimmingHelper.GetItemList()
443 
444  formatString = 'D2AOD_PHYSLITE' if 'StreamDAOD_PHYS' in flags.Input.ProcessingTags else 'DAOD_PHYSLITE'
445  acc.merge(OutputStreamCfg(flags, formatString, ItemList=PHYSLITEItemList, AcceptAlgs=["PHYSLITEKernel"]))
446  acc.merge(SetupMetaDataForStreamCfg(flags, formatString, AcceptAlgs=["PHYSLITEKernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
447 
448  return acc
449 

◆ PHYSLITEKernelCfg()

def python.PHYSLITE.PHYSLITEKernelCfg (   flags,
  name = 'PHYSLITEKernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for PHYSLITE

Definition at line 191 of file PHYSLITE.py.

191 def PHYSLITEKernelCfg(flags, name='PHYSLITEKernel', **kwargs):
192  """Configure the derivation framework driving algorithm (kernel) for PHYSLITE"""
193  acc = ComponentAccumulator()
194 
195  # This block does the common physics augmentation which isn't needed (or possible) for PHYS->PHYSLITE
196  # Ensure block only runs for AOD input
197  if 'StreamAOD' in flags.Input.ProcessingTags:
198  # Common augmentations
199  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
200  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
201 
202  # Thinning tools
203  # These are set up in PhysCommonThinningConfig. Only thing needed here the list of tools to schedule
204  # This differs depending on whether the input is AOD or PHYS
205  # These are needed whatever the input since they are not applied in PHYS
206  thinningToolsArgs = {
207  'ElectronCaloClusterThinningToolName' : "PHYSLITEElectronCaloClusterThinningTool",
208  'PhotonCaloClusterThinningToolName' : "PHYSLITEPhotonCaloClusterThinningTool",
209  'ElectronGSFTPThinningToolName' : "PHYSLITEElectronGSFTPThinningTool",
210  'PhotonGSFTPThinningToolName' : "PHYSLITEPhotonGSFTPThinningTool"
211  }
212  # whereas these are only needed if the input is AOD since they are applied already in PHYS
213  if 'StreamAOD' in flags.Input.ProcessingTags:
214  thinningToolsArgs.update({
215  'TrackParticleThinningToolName' : "PHYSLITETrackParticleThinningTool",
216  'MuonTPThinningToolName' : "PHYSLITEMuonTPThinningTool",
217  'TauJetThinningToolName' : "PHYSLITETauJetThinningTool",
218  'TauJets_MuonRMThinningToolName' : "PHYSLITETauJets_MuonRMThinningTool",
219  'DiTauTPThinningToolName' : "PHYSLITEDiTauTPThinningTool",
220  'DiTauLowPtThinningToolName' : "PHYSLITEDiTauLowPtThinningTool",
221  'DiTauLowPtTPThinningToolName' : "PHYSLITEDiTauLowPtTPThinningTool",
222  })
223  # Configure the thinning tools
224  from DerivationFrameworkPhys.PhysCommonThinningConfig import PhysCommonThinningCfg
225  acc.merge(PhysCommonThinningCfg(flags, StreamName = kwargs['StreamName'], **thinningToolsArgs))
226  # Get them from the CA so they can be added to the kernel
227  thinningTools = []
228  for key in thinningToolsArgs:
229  thinningTools.append(acc.getPublicTool(thinningToolsArgs[key]))
230 
231 
232  # Higgs augmentations - 4l vertex, Higgs STXS truth variables, CloseBy isolation correction (for all analyses)
233  # For PhysLite, must run CloseBy BEFORE running analysis sequences to be able to 'pass through' to the shallow copy the added isolation values
234  # Here we only run the augmentation algs
235  # These do not need to be run if PhysLite is run from Phys (i.e. not from 'StreamAOD')
236  if 'StreamAOD' in flags.Input.ProcessingTags:
237  # running from AOD
238 
239  from DerivationFrameworkHiggs.HiggsPhysContent import HiggsAugmentationAlgsCfg
240  acc.merge(HiggsAugmentationAlgsCfg(flags))
241 
242 
243  from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
244  acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite = True))
245 
246  #==============================================================================
247  # Analysis-level variables
248  #==============================================================================
249 
250  # Needed in principle to support MET association when running PHYS->PHYSLITE,
251  # but since this doesn't work for PHYS->PHYSLITE anyway, commenting for now
252  #if 'StreamDAOD_PHYS' in flags.Input.ProcessingTags
253  # from AtlasGeoModel.GeoModelConfig import GeoModelCfg
254  # acc.merge(GeoModelCfg(flags))
255 
256  # add CP algorithms to job
257  acc.merge(CPAlgorithmsCfg(flags))
258 
259  # Build MET from our analysis objects
260  if 'StreamAOD' in flags.Input.ProcessingTags:
261  from METReconstruction.METAssocCfg import AssocConfig, METAssocConfig
262  from METReconstruction.METAssociatorCfg import getAssocCA
263  associators = [AssocConfig('PFlowJet', 'AnalysisJets'),
264  AssocConfig('Muon', 'AnalysisMuons'),
265  AssocConfig('Ele', 'AnalysisElectrons'),
266  AssocConfig('Gamma', 'AnalysisPhotons'),
267  AssocConfig('Tau', 'AnalysisTauJets'),
268  AssocConfig('Soft', '')]
269  PHYSLITE_cfg = METAssocConfig('AnalysisMET',
270  flags,
271  associators,
272  doPFlow=True,
273  usePFOLinks=True)
274  components_PHYSLITE_cfg = getAssocCA(PHYSLITE_cfg,METName='AnalysisMET')
275  acc.merge(components_PHYSLITE_cfg)
276  elif 'StreamDAOD_PHYS' in flags.Input.ProcessingTags:
277  from DerivationFrameworkJetEtMiss.METCommonConfig import METRemappingCfg
278 
279  METRemap_cfg = METRemappingCfg(flags)
280  acc.merge(METRemap_cfg)
281 
282  # The derivation kernel itself
283  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
284  acc.addEventAlgo(DerivationKernel(name, ThinningTools = thinningTools))
285 
286  return acc
287 
288 
python.METCommonConfig.METRemappingCfg
def METRemappingCfg(ConfigFlags)
Definition: METCommonConfig.py:88
python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun2Cfg
def TriggerMatchingCommonRun2Cfg(flags, name, **kwargs)
Definition: TriggerMatchingCommonConfig.py:91
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.GoodRunsListsDictionary.getGoodRunsLists
def getGoodRunsLists()
Definition: GoodRunsListsDictionary.py:3
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.PHYSLITE.CPAlgorithmsCfg
def CPAlgorithmsCfg(flags)
Definition: PHYSLITE.py:17
python.PhysCommonThinningConfig.PhysCommonThinningCfg
def PhysCommonThinningCfg(flags, StreamName="StreamDAOD_PHYS", **kwargs)
Definition: PhysCommonThinningConfig.py:9
python.PHYSLITE.PHYSLITECfg
def PHYSLITECfg(flags)
Definition: PHYSLITE.py:289
IsolationSelectionConfig.IsoCloseByAlgsCfg
def IsoCloseByAlgsCfg(flags, suff="", isPhysLite=False, containerNames=["Muons", "Electrons", "Photons"], stream_name="", ttva_wp="Nonprompt_All_MaxWeight", useSelTools=False)
Definition: IsolationSelectionConfig.py:146
python.PHYSLITE.PHYSLITEKernelCfg
def PHYSLITEKernelCfg(flags, name='PHYSLITEKernel', **kwargs)
Definition: PHYSLITE.py:191
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
METAssociatorCfg.getAssocCA
def getAssocCA(config, METName='')
Definition: METAssociatorCfg.py:78
python.MuonsCommonConfig.MuonVariablesCfg
def MuonVariablesCfg(flags)
Definition: MuonsCommonConfig.py:89
python.HiggsPhysContent.HiggsAugmentationAlgsCfg
def HiggsAugmentationAlgsCfg(flags)
Definition: HiggsPhysContent.py:4
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.HiggsPhysContent.setupHiggsSlimmingVariables
def setupHiggsSlimmingVariables(ConfigFlags, slimmingHelper)
Definition: HiggsPhysContent.py:13
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
python.HFClassificationCommonConfig.HFClassificationCommonCfg
def HFClassificationCommonCfg(flags)
Definition: HFClassificationCommonConfig.py:114
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:66