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  subConfig.setOptionValue ('.fixDAODTruthRecord', False)
40  configSeq += subConfig
41 
42  # Disable expert-mode warnings
43  import warnings
44  from AnalysisAlgorithmsConfig.ConfigAccumulator import ExpertModeWarning
45  warnings.simplefilter('ignore', ExpertModeWarning)
46 
47  # Create a pile-up analysis config
48  if flags.Input.isMC:
49  # setup config and lumicalc files for pile-up tool
50  configSeq += factory.makeConfig ('PileupReweighting')
51 
52  # Set up the GRL decoration analysis config
53  configSeq += factory.makeConfig ('EventCleaning')
54  configSeq.setOptionValue ('.noFilter', True)
55  configSeq.setOptionValue ('.GRLDict', getGoodRunsLists())
56 
57  # set up the muon analysis algorithm config (must come before electrons and photons to allow FSR collection):
58 
59  logPLCPAlgCfg.info('Do Muons')
60 
61  subConfig = factory.makeConfig ('Muons')
62  subConfig.setOptionValue ('.containerName', 'AnalysisMuons')
63  configSeq += subConfig
64  subConfig = factory.makeConfig ('Muons.WorkingPoint')
65  subConfig.setOptionValue ('.containerName', 'AnalysisMuons')
66  subConfig.setOptionValue ('.selectionName', 'loose')
67  subConfig.setOptionValue ('.trackSelection', False)
68  subConfig.setOptionValue ('.quality', 'Loose')
69  subConfig.setOptionValue ('.isolation', 'NonIso')
70  configSeq += subConfig
71  subConfig = factory.makeConfig ('Thinning')
72  subConfig.setOptionValue ('.containerName', 'AnalysisMuons')
73  subConfig.setOptionValue ('.selectionName', 'loose')
74  subConfig.setOptionValue ('.deepCopy', True)
75  subConfig.setOptionValue ('.sortPt', True)
76  subConfig.setOptionValue ('.noUniformSelection', True)
77  configSeq += subConfig
78 
79  # set up the electron analysis config (For SiHits electrons, use: LooseLHElectronSiHits.NonIso):
80 
81  logPLCPAlgCfg.info('Do Electrons')
82 
83  subConfig = factory.makeConfig ('Electrons')
84  subConfig.setOptionValue ('.containerName', 'AnalysisElectrons')
85  subConfig.setOptionValue ('.forceFullSimConfigForIso', forceEGammaFullSimConfig)
86  subConfig.setOptionValue ('.isolationCorrection', True)
87  subConfig.setOptionValue ('.minPt', 0.)
88  subConfig.setOptionValue ('.decorateSamplingPattern', True)
89  subConfig.setOptionValue ('.decorateEmva', True)
90  configSeq += subConfig
91  subConfig = factory.makeConfig ('Electrons.WorkingPoint')
92  subConfig.setOptionValue ('.containerName', 'AnalysisElectrons')
93  subConfig.setOptionValue ('.selectionName', 'looseLH')
94  subConfig.setOptionValue ('.trackSelection', False)
95  subConfig.setOptionValue ('.identificationWP', 'LooseLH')
96  subConfig.setOptionValue ('.addSelectionToPreselection', False)
97  subConfig.setOptionValue ('.isolationWP', 'NonIso')
98  subConfig.setOptionValue ('.doFSRSelection', True)
99  subConfig.setOptionValue ('.noEffSF', True)
100  configSeq += subConfig
101  subConfig = factory.makeConfig ('Electrons.WorkingPoint')
102  subConfig.setOptionValue ('.containerName', 'AnalysisElectrons')
103  subConfig.setOptionValue ('.selectionName', 'looseDNN')
104  subConfig.setOptionValue ('.trackSelection', False)
105  subConfig.setOptionValue ('.identificationWP', 'LooseDNN')
106  subConfig.setOptionValue ('.addSelectionToPreselection', False)
107  subConfig.setOptionValue ('.isolationWP', 'NonIso')
108  subConfig.setOptionValue ('.doFSRSelection', True)
109  subConfig.setOptionValue ('.noEffSF', True)
110  configSeq += subConfig
111  subConfig = factory.makeConfig ('Thinning')
112  subConfig.setOptionValue ('.containerName', 'AnalysisElectrons')
113  subConfig.setOptionValue ('.selectionName', 'looseLH||looseDNN')
114  subConfig.setOptionValue ('.deepCopy', True)
115  subConfig.setOptionValue ('.sortPt', True)
116  subConfig.setOptionValue ('.noUniformSelection', True)
117  configSeq += subConfig
118 
119  # So SiHit electrons - should come after the standard selection in order to avoid keeping the same electrons twice
120  subConfig = factory.makeConfig ('Electrons')
121  subConfig.setOptionValue ('.containerName', 'AnalysisSiHitElectrons')
122  subConfig.setOptionValue ('.forceFullSimConfigForIso', forceEGammaFullSimConfig)
123  subConfig.setOptionValue ('.isolationCorrection', True)
124  subConfig.setOptionValue ('.minPt', 0.)
125  subConfig.setOptionValue ('.postfix', 'SiHit')
126  subConfig.setOptionValue ('.decorateEmva', True)
127  configSeq += subConfig
128  subConfig = factory.makeConfig ('Electrons.WorkingPoint')
129  subConfig.setOptionValue ('.containerName', 'AnalysisSiHitElectrons')
130  subConfig.setOptionValue ('.selectionName', 'SiHits')
131  subConfig.setOptionValue ('.trackSelection', False)
132  subConfig.setOptionValue ('.identificationWP', 'SiHitElectron')
133  subConfig.setOptionValue ('.isolationWP', 'NonIso')
134  subConfig.setOptionValue ('.doFSRSelection', True) # needed to veto FSR electrons
135  subConfig.setOptionValue ('.noEffSF', True)
136  subConfig.setOptionValue ('.postfix', 'SiHit')
137  configSeq += subConfig
138  subConfig = factory.makeConfig ('Thinning')
139  subConfig.setOptionValue ('.containerName', 'AnalysisSiHitElectrons')
140  subConfig.setOptionValue ('.selectionName', 'SiHits')
141  subConfig.setOptionValue ('.deepCopy', True)
142  subConfig.setOptionValue ('.sortPt', True)
143  subConfig.setOptionValue ('.noUniformSelection', True)
144  configSeq += subConfig
145 
146  # set up the photon analysis config:
147 
148  logPLCPAlgCfg.info('Do Photons')
149 
150  subConfig = factory.makeConfig ('Photons')
151  subConfig.setOptionValue ('.containerName', 'AnalysisPhotons')
152  subConfig.setOptionValue ('.forceFullSimConfigForIso', forceEGammaFullSimConfig)
153  subConfig.setOptionValue ('.recomputeIsEM', False)
154  subConfig.setOptionValue ('.minPt', 0.)
155  subConfig.setOptionValue ('.decorateEmva', True)
156  configSeq += subConfig
157  subConfig = factory.makeConfig ('Photons.WorkingPoint')
158  subConfig.setOptionValue ('.containerName', 'AnalysisPhotons')
159  subConfig.setOptionValue ('.selectionName', 'loose')
160  subConfig.setOptionValue ('.qualityWP', 'Loose')
161  subConfig.setOptionValue ('.isolationWP', 'NonIso')
162  subConfig.setOptionValue ('.doFSRSelection', True)
163  subConfig.setOptionValue ('.recomputeIsEM', False)
164  subConfig.setOptionValue ('.noEffSFForID', True)
165  subConfig.setOptionValue ('.noEffSFForIso', True)
166  configSeq += subConfig
167  subConfig = factory.makeConfig ('Thinning')
168  subConfig.setOptionValue ('.containerName', 'AnalysisPhotons')
169  subConfig.setOptionValue ('.selectionName', 'loose')
170  subConfig.setOptionValue ('.deepCopy', True)
171  subConfig.setOptionValue ('.sortPt', True)
172  subConfig.setOptionValue ('.noUniformSelection', True)
173  configSeq += subConfig
174 
175 
176 
177  # set up the tau analysis algorithm config:
178  # Commented for now due to use of public tools
179  subConfig = factory.makeConfig ('TauJets')
180  subConfig.setOptionValue ('.containerName', 'AnalysisTauJets')
181  configSeq += subConfig
182  subConfig = factory.makeConfig ('TauJets.WorkingPoint')
183  subConfig.setOptionValue ('.containerName', 'AnalysisTauJets')
184  subConfig.setOptionValue ('.selectionName', 'baseline')
185  subConfig.setOptionValue ('.quality', 'Baseline')
186  configSeq += subConfig
187  subConfig = factory.makeConfig ('Thinning')
188  subConfig.setOptionValue ('.containerName', 'AnalysisTauJets')
189  subConfig.setOptionValue ('.selectionName', 'baseline')
190  subConfig.setOptionValue ('.deepCopy', True)
191  subConfig.setOptionValue ('.sortPt', True)
192  subConfig.setOptionValue ('.noUniformSelection', True)
193  configSeq += subConfig
194 
195  # set up the jet analysis algorithm config:
196  jetContainer = 'AntiKt4EMPFlowJets'
197  subConfig = factory.makeConfig ('Jets', containerName='AnalysisJets',
198  jetCollection=jetContainer)
199  subConfig.setOptionValue ('.runFJvtSelection', False)
200  subConfig.setOptionValue ('.runJvtSelection', False)
201  configSeq += subConfig
202  subConfig = factory.makeConfig ('Thinning')
203  subConfig.setOptionValue ('.containerName', 'AnalysisJets')
204  subConfig.setOptionValue ('.deepCopy', True)
205  subConfig.setOptionValue ('.sortPt', True)
206  subConfig.setOptionValue ('.noUniformSelection', True)
207  configSeq += subConfig
208 
209  largeRjetContainer='AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets'
210  subConfig = factory.makeConfig ('Jets', containerName='AnalysisLargeRJets',
211  jetCollection=largeRjetContainer)
212  subConfig.setOptionValue ('.runGhostMuonAssociation', False)
213  # Disable kinematic selections on large-R jets
214  subConfig.setOptionValue ('.minPt', 0.)
215  subConfig.setOptionValue ('.maxPt', 0.)
216  subConfig.setOptionValue ('.maxRapidity', 0.)
217  subConfig.setOptionValue ('.minMass', 0.)
218  subConfig.setOptionValue ('.maxMass', 0.)
219  configSeq += subConfig
220  subConfig = factory.makeConfig ('Thinning')
221  subConfig.setOptionValue ('.containerName', 'AnalysisLargeRJets')
222  subConfig.setOptionValue ('.deepCopy', True)
223  subConfig.setOptionValue ('.sortPt', True)
224  subConfig.setOptionValue ('.noUniformSelection', True)
225  configSeq += subConfig
226 
227  from AnalysisAlgorithmsConfig.ConfigAccumulator import ConfigAccumulator
228  configAccumulator = ConfigAccumulator (dataType=None, algSeq=None,
229  autoconfigFromFlags=flags, noSysSuffix=True, noSystematics=True)
230  configSeq.fullConfigure (configAccumulator)
231  return configAccumulator.CA
232 
233 
234 
235 # Main algorithm config

◆ PHYSLITECfg()

def python.PHYSLITE.PHYSLITECfg (   flags)

Definition at line 334 of file PHYSLITE.py.

334 def PHYSLITECfg(flags):
335 
336  acc = ComponentAccumulator()
337 
338  # Get the lists of triggers needed for trigger matching.
339  # This is needed at this scope (for the slimming) and further down in the config chain
340  # for actually configuring the matching, so we create it here and pass it down
341  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
342  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
343  PHYSLITETriggerListsHelper = TriggerListsHelper(flags)
344 
345  # Set the stream name - varies depending on whether the input is AOD or DAOD_PHYS
346  streamName = 'StreamDAOD_PHYSLITE' if 'StreamAOD' in flags.Input.ProcessingTags else 'StreamD2AOD_PHYSLITE'
347 
348  # Common augmentations
349  acc.merge(PHYSLITEKernelCfg(flags, name="PHYSLITEKernel", StreamName = streamName, TriggerListsHelper = PHYSLITETriggerListsHelper))
350 
351  # ============================
352  # Define contents of the format
353  # =============================
354  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
355  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
356  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
357 
358  PHYSLITESlimmingHelper = SlimmingHelper("PHYSLITESlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
359  PHYSLITESlimmingHelper.ExtraVariables = []
360  # Trigger content
361  PHYSLITESlimmingHelper.IncludeTriggerNavigation = False
362  PHYSLITESlimmingHelper.IncludeJetTriggerContent = False
363  PHYSLITESlimmingHelper.IncludeMuonTriggerContent = False
364  PHYSLITESlimmingHelper.IncludeEGammaTriggerContent = False
365  PHYSLITESlimmingHelper.IncludeTauTriggerContent = False
366  PHYSLITESlimmingHelper.IncludeEtMissTriggerContent = False
367  PHYSLITESlimmingHelper.IncludeBJetTriggerContent = False
368  PHYSLITESlimmingHelper.IncludeBPhysTriggerContent = False
369  PHYSLITESlimmingHelper.IncludeMinBiasTriggerContent = False
370 
371  # Trigger matching
372  # Run 2
373  if flags.Trigger.EDMVersion == 2:
374  # Need to re-run matching so that new Analysis<X> containers are matched to triggers
375  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2Cfg
376  acc.merge(TriggerMatchingCommonRun2Cfg(flags,
377  name = "PHYSLITETrigMatchNoTau",
378  OutputContainerPrefix = "AnalysisTrigMatch_",
379  ChainNames = PHYSLITETriggerListsHelper.Run2TriggerNamesNoTau,
380  InputElectrons = "AnalysisElectrons",
381  InputPhotons = "AnalysisPhotons",
382  InputMuons = "AnalysisMuons",
383  InputTaus = "AnalysisTauJets"))
384  acc.merge(TriggerMatchingCommonRun2Cfg(flags,
385  name = "PHYSLITETrigMatchTau",
386  OutputContainerPrefix = "AnalysisTrigMatch_",
387  ChainNames = PHYSLITETriggerListsHelper.Run2TriggerNamesTau,
388  DRThreshold = 0.2,
389  InputElectrons = "AnalysisElectrons",
390  InputPhotons = "AnalysisPhotons",
391  InputMuons = "AnalysisMuons",
392  InputTaus = "AnalysisTauJets"))
393  # Now add the resulting decorations to the output
394  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
395  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSLITESlimmingHelper,
396  OutputContainerPrefix = "AnalysisTrigMatch_",
397  TriggerList = PHYSLITETriggerListsHelper.Run2TriggerNamesTau)
398  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSLITESlimmingHelper,
399  OutputContainerPrefix = "AnalysisTrigMatch_",
400  TriggerList = PHYSLITETriggerListsHelper.Run2TriggerNamesNoTau)
401 
402  # Run 3, or Run 2 with navigation conversion
403  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
404  # No need to run matching: just keep navigation so matching can be done by analysts
405  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
407 
408  # Event content
409  PHYSLITESlimmingHelper.AppendToDictionary.update({
410  'TruthEvents':'xAOD::TruthEventContainer','TruthEventsAux':'xAOD::TruthEventAuxContainer',
411  'MET_Truth':'xAOD::MissingETContainer','MET_TruthAux':'xAOD::MissingETAuxContainer',
412  'TruthElectrons':'xAOD::TruthParticleContainer','TruthElectronsAux':'xAOD::TruthParticleAuxContainer',
413  'TruthMuons':'xAOD::TruthParticleContainer','TruthMuonsAux':'xAOD::TruthParticleAuxContainer',
414  'TruthPhotons':'xAOD::TruthParticleContainer','TruthPhotonsAux':'xAOD::TruthParticleAuxContainer',
415  'TruthTaus':'xAOD::TruthParticleContainer','TruthTausAux':'xAOD::TruthParticleAuxContainer',
416  'TruthNeutrinos':'xAOD::TruthParticleContainer','TruthNeutrinosAux':'xAOD::TruthParticleAuxContainer',
417  'TruthBSM':'xAOD::TruthParticleContainer','TruthBSMAux':'xAOD::TruthParticleAuxContainer',
418  'TruthBoson':'xAOD::TruthParticleContainer','TruthBosonAux':'xAOD::TruthParticleAuxContainer',
419  'TruthTop':'xAOD::TruthParticleContainer','TruthTopAux':'xAOD::TruthParticleAuxContainer',
420  'TruthForwardProtons':'xAOD::TruthParticleContainer','TruthForwardProtonsAux':'xAOD::TruthParticleAuxContainer',
421  'BornLeptons':'xAOD::TruthParticleContainer','BornLeptonsAux':'xAOD::TruthParticleAuxContainer',
422  'TruthBosonsWithDecayParticles':'xAOD::TruthParticleContainer','TruthBosonsWithDecayParticlesAux':'xAOD::TruthParticleAuxContainer',
423  'TruthBosonsWithDecayVertices':'xAOD::TruthVertexContainer','TruthBosonsWithDecayVerticesAux':'xAOD::TruthVertexAuxContainer',
424  'TruthBSMWithDecayParticles':'xAOD::TruthParticleContainer','TruthBSMWithDecayParticlesAux':'xAOD::TruthParticleAuxContainer',
425  'TruthBSMWithDecayVertices':'xAOD::TruthVertexContainer','TruthBSMWithDecayVerticesAux':'xAOD::TruthVertexAuxContainer',
426  'TruthPrimaryVertices':'xAOD::TruthVertexContainer','TruthPrimaryVerticesAux':'xAOD::TruthVertexAuxContainer',
427  'AnalysisElectrons':'xAOD::ElectronContainer', 'AnalysisElectronsAux':'xAOD::ElectronAuxContainer',
428  'AnalysisSiHitElectrons':'xAOD::ElectronContainer', 'AnalysisSiHitElectronsAux':'xAOD::ElectronAuxContainer',
429  'AnalysisMuons':'xAOD::MuonContainer', 'AnalysisMuonsAux':'xAOD::MuonAuxContainer',
430  'AnalysisJets':'xAOD::JetContainer','AnalysisJetsAux':'xAOD::AuxContainerBase',
431  'AnalysisPhotons':'xAOD::PhotonContainer', 'AnalysisPhotonsAux':'xAOD::PhotonAuxContainer',
432  'AnalysisTauJets':'xAOD::TauJetContainer', 'AnalysisTauJetsAux':'xAOD::TauJetAuxContainer',
433  'MET_Core_AnalysisMET':'xAOD::MissingETContainer', 'MET_Core_AnalysisMETAux':'xAOD::MissingETAuxContainer',
434  'METAssoc_AnalysisMET':'xAOD::MissingETAssociationMap', 'METAssoc_AnalysisMETAux':'xAOD::MissingETAuxAssociationMap',
435  'AnalysisLargeRJets':'xAOD::JetContainer','AnalysisLargeRJetsAux':'xAOD::AuxContainerBase'
436  })
437 
438  PHYSLITESlimmingHelper.SmartCollections = [
439  'EventInfo',
440  'InDetTrackParticles',
441  'PrimaryVertices',
442  ]
443 
444  from DerivationFrameworkMuons.MuonsCommonConfig import MuonVariablesCfg
445 
446  # add in extra values for Higgs
447  from DerivationFrameworkHiggs.HiggsPhysContent import setupHiggsSlimmingVariables
448  setupHiggsSlimmingVariables(flags, PHYSLITESlimmingHelper)
449 
450  if flags.Input.isMC:
451  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
452  addTruth3ContentToSlimmerTool(PHYSLITESlimmingHelper)
453  from DerivationFrameworkMCTruth.HFClassificationCommonConfig import HFClassificationCommonCfg
454  acc.merge(HFClassificationCommonCfg(flags))
455 
456  # Save the extra variables which aren't included by other means
457  btag_variables = [f'GN2v01_p{x}' for x in ['b', 'c', 'u', 'tau']]
458  PHYSLITESlimmingHelper.ExtraVariables += [
459  '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.E_mva_only',
460  '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.E_mva_only',
461  '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.E_mva_only',
462  'GSFTrackParticles.chiSquared.phi.d0.theta.qOverP.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.z0.vz.charge.vertexLink.numberOfPixelHits.numberOfSCTHits.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfInnermostPixelLayerHits.numberOfNextToInnermostPixelLayerHits.originalTrackParticle',
463  'GSFConversionVertices.trackParticleLinks.x.y.z.px.py.pz.pt1.pt2.neutralParticleLinks.minRfirstHit',
464  'egammaClusters.calE.calEta.calPhi.calM.e_sampl.eta_sampl.ETACALOFRAME.PHICALOFRAME.ETA2CALOFRAME.PHI2CALOFRAME.constituentClusterLinks.samplingPattern',
465  "AnalysisMuons.{var_string}".format(var_string = ".".join(MuonVariablesCfg(flags))),
466  'CombinedMuonTrackParticles.qOverP.d0.z0.vz.phi.theta.truthOrigin.truthType.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.numberOfPixelDeadSensors.numberOfPixelHits.numberOfPixelHoles.numberOfSCTDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfTRTHits.numberOfTRTOutliers.chiSquared.numberDoF',
467  'ExtrapolatedMuonTrackParticles.d0.z0.vz.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.truthOrigin.truthType.qOverP.theta.phi',
468  'MuonSpectrometerTrackParticles.phi.d0.z0.vz.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag.vertexLink.theta.qOverP',
469  'InDetForwardTrackParticles.vz.truthType.truthOrigin.numberDoF.numberOfTRTHits.numberOfSCTHoles.theta.numberOfTRTOutliers.numberOfPrecisionLayers.numberOfSCTDeadSensors.numberOfPixelHoles.numberOfSCTHits.numberOfPrecisionHoleLayers.numberOfPixelDeadSensors.phi.numberOfPixelHits.z0.d0.qOverP.chiSquared.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag',
470  'AnalysisTauJets.pt.eta.phi.m.ptFinalCalib.etaFinalCalib.ptTauEnergyScale.etaTauEnergyScale.charge.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',
471  '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.{btag_var_string}'.format(btag_var_string = ".".join(btag_variables)),
472  'TruthPrimaryVertices.t.x.y.z',
473  'MET_Core_AnalysisMET.name.mpx.mpy.sumet.source',
474  'METAssoc_AnalysisMET.',
475  'InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.numberOfTRTHits.numberOfTRTOutliers',
476  '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())),
477  'Kt4EMPFlowEventShape.Density',
478  'Kt4EMPFlowNeutEventShape.Density',
479  'TauTracks.flagSet.trackLinks',
480  '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',
481  ]
482 
483  # Output stream
484  PHYSLITEItemList = PHYSLITESlimmingHelper.GetItemList()
485 
486  formatString = 'D2AOD_PHYSLITE' if 'StreamDAOD_PHYS' in flags.Input.ProcessingTags else 'DAOD_PHYSLITE'
487  acc.merge(OutputStreamCfg(flags, formatString, ItemList=PHYSLITEItemList, AcceptAlgs=["PHYSLITEKernel"]))
488  acc.merge(SetupMetaDataForStreamCfg(flags, formatString, AcceptAlgs=["PHYSLITEKernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
489 
490  return acc
491 

◆ PHYSLITEKernelCfg()

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

Definition at line 236 of file PHYSLITE.py.

236 def PHYSLITEKernelCfg(flags, name='PHYSLITEKernel', **kwargs):
237  """Configure the derivation framework driving algorithm (kernel) for PHYSLITE"""
238  acc = ComponentAccumulator()
239 
240  # This block does the common physics augmentation which isn't needed (or possible) for PHYS->PHYSLITE
241  # Ensure block only runs for AOD input
242  if 'StreamAOD' in flags.Input.ProcessingTags:
243  # Common augmentations
244  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
245  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
246 
247  # Thinning tools
248  # These are set up in PhysCommonThinningConfig. Only thing needed here the list of tools to schedule
249  # This differs depending on whether the input is AOD or PHYS
250  # These are needed whatever the input since they are not applied in PHYS
251  thinningToolsArgs = {
252  'ElectronCaloClusterThinningToolName' : "PHYSLITEElectronCaloClusterThinningTool",
253  'PhotonCaloClusterThinningToolName' : "PHYSLITEPhotonCaloClusterThinningTool",
254  'ElectronGSFTPThinningToolName' : "PHYSLITEElectronGSFTPThinningTool",
255  'PhotonGSFTPThinningToolName' : "PHYSLITEPhotonGSFTPThinningTool"
256  }
257  # whereas these are only needed if the input is AOD since they are applied already in PHYS
258  if 'StreamAOD' in flags.Input.ProcessingTags:
259  thinningToolsArgs.update({
260  'TrackParticleThinningToolName' : "PHYSLITETrackParticleThinningTool",
261  'MuonTPThinningToolName' : "PHYSLITEMuonTPThinningTool",
262  'TauJetThinningToolName' : "PHYSLITETauJetThinningTool",
263  'TauJets_MuonRMThinningToolName' : "PHYSLITETauJets_MuonRMThinningTool",
264  'DiTauTPThinningToolName' : "PHYSLITEDiTauTPThinningTool",
265  'DiTauLowPtThinningToolName' : "PHYSLITEDiTauLowPtThinningTool",
266  'DiTauLowPtTPThinningToolName' : "PHYSLITEDiTauLowPtTPThinningTool",
267  })
268  # Configure the thinning tools
269  from DerivationFrameworkPhys.PhysCommonThinningConfig import PhysCommonThinningCfg
270  acc.merge(PhysCommonThinningCfg(flags, StreamName = kwargs['StreamName'], **thinningToolsArgs))
271  # Get them from the CA so they can be added to the kernel
272  thinningTools = []
273  for key in thinningToolsArgs:
274  thinningTools.append(acc.getPublicTool(thinningToolsArgs[key]))
275 
276 
277  # Higgs augmentations - 4l vertex, Higgs STXS truth variables, CloseBy isolation correction (for all analyses)
278  # For PhysLite, must run CloseBy BEFORE running analysis sequences to be able to 'pass through' to the shallow copy the added isolation values
279  # Here we only run the augmentation algs
280  # These do not need to be run if PhysLite is run from Phys (i.e. not from 'StreamAOD')
281  if 'StreamAOD' in flags.Input.ProcessingTags:
282  # running from AOD
283 
284  from DerivationFrameworkHiggs.HiggsPhysContent import HiggsAugmentationAlgsCfg
285  acc.merge(HiggsAugmentationAlgsCfg(flags))
286 
287 
288  from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
289  acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite = True))
290 
291  #==============================================================================
292  # Analysis-level variables
293  #==============================================================================
294 
295  # Needed in principle to support MET association when running PHYS->PHYSLITE,
296  # but since this doesn't work for PHYS->PHYSLITE anyway, commenting for now
297  #if 'StreamDAOD_PHYS' in flags.Input.ProcessingTags
298  # from AtlasGeoModel.GeoModelConfig import GeoModelCfg
299  # acc.merge(GeoModelCfg(flags))
300 
301  # add CP algorithms to job
302  acc.merge(CPAlgorithmsCfg(flags))
303 
304  # Build MET from our analysis objects
305  if 'StreamAOD' in flags.Input.ProcessingTags:
306  from METReconstruction.METAssocCfg import AssocConfig, METAssocConfig
307  from METReconstruction.METAssociatorCfg import getAssocCA
308  associators = [AssocConfig('PFlowJet', 'AnalysisJets'),
309  AssocConfig('Muon', 'AnalysisMuons'),
310  AssocConfig('Ele', 'AnalysisElectrons'),
311  AssocConfig('Gamma', 'AnalysisPhotons'),
312  AssocConfig('Tau', 'AnalysisTauJets'),
313  AssocConfig('Soft', '')]
314  PHYSLITE_cfg = METAssocConfig('AnalysisMET',
315  flags,
316  associators,
317  doPFlow=True,
318  usePFOLinks=True)
319  components_PHYSLITE_cfg = getAssocCA(PHYSLITE_cfg,METName='AnalysisMET')
320  acc.merge(components_PHYSLITE_cfg)
321  elif 'StreamDAOD_PHYS' in flags.Input.ProcessingTags:
322  from DerivationFrameworkJetEtMiss.METCommonConfig import METRemappingCfg
323 
324  METRemap_cfg = METRemappingCfg(flags)
325  acc.merge(METRemap_cfg)
326 
327  # The derivation kernel itself
328  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
329  acc.addEventAlgo(DerivationKernel(name, ThinningTools = thinningTools))
330 
331  return acc
332 
333 
python.METCommonConfig.METRemappingCfg
def METRemappingCfg(ConfigFlags)
Definition: METCommonConfig.py:88
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=None, MetadataItemList=None, disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, keepProvenanceTagsRegEx=None, AcceptAlgs=None, HelperTools=None)
Definition: OutputStreamConfig.py:13
python.TriggerMatchingCommonConfig.TriggerMatchingCommonRun2Cfg
def TriggerMatchingCommonRun2Cfg(flags, name, **kwargs)
Definition: TriggerMatchingCommonConfig.py:91
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:99
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.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:334
python.PHYSLITE.PHYSLITEKernelCfg
def PHYSLITEKernelCfg(flags, name='PHYSLITEKernel', **kwargs)
Definition: PHYSLITE.py:236
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:480
python.HiggsPhysContent.setupHiggsSlimmingVariables
def setupHiggsSlimmingVariables(ConfigFlags, slimmingHelper)
Definition: HiggsPhysContent.py:13
IsolationSelectionConfig.IsoCloseByAlgsCfg
def IsoCloseByAlgsCfg(flags, suff="", isPhysLite=False, containerNames=["Muons", "Electrons", "Photons"], stream_name="", ttva_wp="Nonprompt_All_MaxWeight", useSelTools=False, isoDecSuffix="CloseByCorr", caloDecSuffix="", hasLRT=False)
Definition: IsolationSelectionConfig.py:146
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:13
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
python.HFClassificationCommonConfig.HFClassificationCommonCfg
def HFClassificationCommonCfg(flags)
Definition: HFClassificationCommonConfig.py:115
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