ATLAS Offline Software
Functions
python.SUSY20 Namespace Reference

Functions

def SUSY20KernelCfg (flags, name="SUSY20Kernel", **kwargs)
 
def SUSY20Cfg (flags)
 

Function Documentation

◆ SUSY20Cfg()

def python.SUSY20.SUSY20Cfg (   flags)

Definition at line 329 of file SUSY20.py.

329 def SUSY20Cfg(flags):
330 
331  stream_name = 'StreamDAOD_SUSY20'
332  acc = ComponentAccumulator()
333 
334  # Get the lists of triggers needed for trigger matching.
335  # This is needed at this scope (for the slimming) and further down in the config chain
336  # for actually configuring the matching, so we create it here and pass it down
337  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
338  SUSY20TriggerListsHelper = TriggerListsHelper(flags)
339 
340  # SUSY20 augmentations
341  acc.merge(SUSY20KernelCfg(flags, name = "SUSY20Kernel", StreamName = stream_name, TriggerListsHelper = SUSY20TriggerListsHelper))
342 
343 
345  from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
346  acc.merge(IsoCloseByAlgsCfg(flags, suff = "_SUSY20", isPhysLite = False, stream_name = stream_name))
347 
348  # =============================
349  # Define contents of the format
350  # =============================
351  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
352  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
353  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
354 
355  SUSY20SlimmingHelper = SlimmingHelper("SUSY20SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
356 
357  # Containers that we slim
358  SUSY20SlimmingHelper.SmartCollections = [
359  "EventInfo",
360  "Electrons",
361  "Photons",
362  "Muons",
363  "InDetTrackParticles",
364  "PrimaryVertices",
365  "TauJets",
366  "AntiKt4EMTopoJets",
367  "AntiKt4EMPFlowJets",
368  "BTagging_AntiKt4EMPFlow",
369  "MET_Baseline_AntiKt4EMPFlow",
370  ]
371 
372  # Extra content
373  # Commented out variables not needed by current analyses but still included in r21 SUSY20_DAODs
374  SUSY20SlimmingHelper.ExtraVariables += [
375  "EventInfo.DFCommonJets_eventClean_TightBad.DFCommonJets_jetClean_TightBad",
376  "AntiKt4EMPFlowJets.DFCommonJets_jetClean_LooseBad.DFCommonJets_jetClean_TightBad",
377  "Electrons.DFCommonElectronsLHVeryLoose.DFCommonElectronsLHLoose.DFCommonElectronsLHLooseBL.DFCommonElectronsLHMedium.DFCommonElectronsLHTight.DFCommonElectronsLHVeryLooseIsEMValue.DFCommonElectronsLHLooseIsEMValue.DFCommonElectronsLHLooseBLIsEMValue.DFCommonElectronsLHMediumIsEMValue.DFCommonElectronsLHTightIsEMValue",
378  #"Electrons.SUSY20_topoetcone20.SUSY20_topoetcone30.SUSY20_topoetcone40.SUSY20_topoetcone20NonCoreCone.SUSY20_topoetcone30NonCoreCone.SUSY20_topoetcone40NonCoreCone",
379  "Muons.ptcone40.ptcone30.ptcone20.charge.quality.InnerDetectorPt.MuonSpectrometerPt.CaloLRLikelihood.CaloMuonIDTag.eta_sampl.phi_sampl",
380  #"Muons.SUSY20_topoetcone20.SUSY20_topoetcone30.SUSY20_topoetcone40.SUSY20_topoetcone20NonCoreCone.SUSY20_topoetcone30NonCoreCone.SUSY20_topoetcone40NonCoreCone",
381  "Photons.DFCommonPhotonsIsEMLoose.DFCommonPhotonsIsEMTight",
382  #"Photons.SUSY20_topoetcone20.SUSY20_topoetcone30.SUSY20_topoetcone40.SUSY20_topoetcone20NonCoreCone.SUSY20_topoetcone30NonCoreCone.SUSY20_topoetcone40NonCoreCone",
383  "InDetTrackParticles.TRTdEdx.TRTdEdxUsedHits.hitPattern.numberOfContribPixelLayers.numberOfGangedFlaggedFakes.numberOfIBLOverflowsdEdx.numberOfPixelOutliers.numberOfPixelSplitHits.numberOfPixelSpoiltHits.numberOfSCTOutliers.numberOfSCTSpoiltHits.numberOfTRTDeadStraws.numberOfTRTHits.numberOfTRTHoles.numberOfTRTOutliers.numberOfTRTSharedHits.numberOfUsedHitsdEdx.pixeldEdx",
384  "InDetTrackParticles.chiSquared.d0.definingParametersCovMatrix.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberDoF.numberOfInnermostPixelLayerHits.numberOfNextToInnermostPixelLayerHits.numberOfPixelDeadSensors.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfSCTDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.phi.qOverP.theta.z0",
385  "InDetTrackParticles.numberOfInnermostPixelLayerOutliers.numberOfInnermostPixelLayerSharedHits.numberOfInnermostPixelLayerSplitHits.numberOfNextToInnermostPixelLayerOutliers.numberOfNextToInnermostPixelLayerSharedHits.numberOfNextToInnermostPixelLayerSplitHits.numberOfGangedPixels.numberOfSCTDoubleHoles.numberOfTRTHighThresholdHits.numberOfTRTHighThresholdHitsTotal.numberOfTRTHighThresholdOutliers.numberOfTRTTubeHits.numberOfTRTXenonHits.numberOfOutliersOnTrack.standardDeviationOfChi2OS.eProbabilityHT.eProbabilityComb.TRTTrackOccupancy",
386  "InDetTrackParticles.SUSY20_ptcone20.SUSY20_ptcone30.SUSY20_ptcone40",
387  #"InDetTrackParticles.SUSY20_ptvarcone20.SUSY20_ptvarcone30.SUSY20_ptvarcone40",
388  "InDetTrackParticles.SUSY20_topoetcone20.SUSY20_topoetcone30.SUSY20_topoetcone40.SUSY20_topoetcone20NonCoreCone.SUSY20_topoetcone30NonCoreCone.SUSY20_topoetcone40NonCoreCone",
389  "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights",
390  "InDetTrackParticles.vertexLink.vz",
391  #"InDetTrackParticles.trackCaloClusEta.trackCaloClusPhi.trackCaloSampleE.trackCaloSampleNumber",
392  #"InDetTrackParticles.SUSY20_trackCaloClusEta_ele.SUSY20_trackCaloClusPhi_ele.SUSY20_trackCaloClusE_ele.SUSY20_trackCaloSampleE_ele.SUSY20_trackCaloSampleNumber_ele",
393  ]
394 
395  # Truth content
396  if flags.Input.isMC:
397 
398  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTauAndDownstreamParticlesCfg
399  acc.merge(AddTauAndDownstreamParticlesCfg(flags, generations = 2))
400 
401  SUSY20SlimmingHelper.AllVariables += [
402  'MET_Truth',
403  'TruthEvents',
404  'TruthParticles',
405  'TruthVertices',
406  'TruthElectrons',
407  'TruthMuons',
408  'TruthPhotons',
409  'TruthTaus',
410  'TruthNeutrinos',
411  'TruthBSM',
412  'TruthBosonsWithDecayParticles',
413  'TruthBosonsWithDecayVertices',
414  'TruthBSMWithDecayParticles',
415  'TruthBSMWithDecayVertices',
416  'TruthTausWithDecayParticles',
417  'TruthTausWithDecayVertices',
418  'AntiKt4TruthJets',
419  ]
420  SUSY20SlimmingHelper.ExtraVariables += [
421  "Electrons.TruthLink",
422  "Muons.TruthLink",
423  "Photons.TruthLink",
424  "TruthEvents.Q.XF1.XF2.PDGID1.PDGID2.PDFID1.PDFID2.X1.X2.crossSection",
425  "InDetTrackParticles.TruthLink.truthMatchProbability.truthOrigin.truthType.truthParticleLink"
426  ]
427 
428  StaticContent = []
429 
430  # V0 content
431  for containerName in ["SUSY20RecoV0Candidates","SUSY20RecoKshortCandidates","SUSY20RecoLambdaCandidates","SUSY20RecoLambdabarCandidates"]:
432  StaticContent += [
433  "xAOD::VertexContainer#%s"%containerName,
434  "xAOD::VertexAuxContainer#%sAux"%containerName
435  + ".-vxTrackAtVertex"
436  + ".-vertexType"
437  + ".-neutralParticleLinks"
438  + ".-neutralWeights"
439  + ".-KshortLink"
440  + ".-LambdaLink"
441  + ".-LambdabarLink"
442  + ".-gamma_fit"
443  + ".-gamma_mass"
444  + ".-gamma_massError"
445  + ".-gamma_probability",
446  ]
447 
448  # VSI content
449  VSITrackVars = ["is_selected", "is_associated", "is_svtrk_final", "pt_wrtSV", "eta_wrtSV", "phi_wrtSV", "d0_wrtSV", "z0_wrtSV", "errP_wrtSV", "errd0_wrtSV", "errz0_wrtSV", "chi2_toSV"]
450  SUSY20SlimmingHelper.ExtraVariables += ["InDetTrackParticles." + ".".join( VSITrackVars )]
451 
452  StaticContent += [
453  'xAOD::VertexContainer#VrtSecInclusive_SecondaryVertices',
454  'xAOD::VertexAuxContainer#VrtSecInclusive_SecondaryVerticesAux'
455  + '.-vxTrackAtVertex'
456  + '.-vertexType'
457  + '.-neutralParticleLinks'
458  + '.-trackParticleLinks'
459  + '.-neutralWeights'
460  ]
461 
462  SUSY20SlimmingHelper.StaticContent = StaticContent
463 
464 
465  from IsolationSelection.IsolationSelectionConfig import setupIsoCloseBySlimmingVariables
466  setupIsoCloseBySlimmingVariables(SUSY20SlimmingHelper)
467 
468  # Trigger content
469  SUSY20SlimmingHelper.IncludeTriggerNavigation = False
470  SUSY20SlimmingHelper.IncludeMuonTriggerContent = False
471  SUSY20SlimmingHelper.IncludeEGammaTriggerContent = False
472  SUSY20SlimmingHelper.IncludeEtMissTriggerContent = False
473  SUSY20SlimmingHelper.IncludeJetTriggerContent = False
474  SUSY20SlimmingHelper.IncludeBJetTriggerContent = False
475  SUSY20SlimmingHelper.IncludeBPhysTriggerContent = False
476  SUSY20SlimmingHelper.IncludeTauTriggerContent = False
477  SUSY20SlimmingHelper.IncludeMinBiasTriggerContent = False
478 
479  # Trigger matching
480  # Run 2
481  if flags.Trigger.EDMVersion == 2:
482  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
484  SlimmingHelper = SUSY20SlimmingHelper,
485  OutputContainerPrefix = "TrigMatch_",
486  TriggerList = SUSY20TriggerListsHelper.Run2TriggerNamesTau
487  )
489  SlimmingHelper = SUSY20SlimmingHelper,
490  OutputContainerPrefix = "TrigMatch_",
491  TriggerList = SUSY20TriggerListsHelper.Run2TriggerNamesNoTau
492  )
493  # Run 3, or Run 2 with navigation conversion
494  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
495  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
497 
498  # Output stream
499  SUSY20ItemList = SUSY20SlimmingHelper.GetItemList()
500  acc.merge(OutputStreamCfg(flags, "DAOD_SUSY20", ItemList = SUSY20ItemList, AcceptAlgs = ["SUSY20Kernel"]))
501  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_SUSY20", AcceptAlgs = ["SUSY20Kernel"], createMetadata = [MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
502 
503  return acc

◆ SUSY20KernelCfg()

def python.SUSY20.SUSY20KernelCfg (   flags,
  name = "SUSY20Kernel",
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for SUSY20

Definition at line 13 of file SUSY20.py.

13 def SUSY20KernelCfg(flags, name = "SUSY20Kernel", **kwargs):
14 
15  """Configure the derivation framework driving algorithm (kernel) for SUSY20"""
16 
17  acc = ComponentAccumulator()
18 
19  #
20  # SUSY20 augmentations
21  #
22  augmentationTools = []
23 
24  # V0Finder Tool
25  # Details here: https://gitlab.cern.ch/atlas/athena/-/blob/main/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/V0ToolConfig.py
26  from DerivationFrameworkBPhys.V0ToolConfig import BPHY_Reco_V0FinderCfg as Reco_V0Finder
27  SUSY20_RecoV0_Finder = acc.popToolsAndMerge(Reco_V0Finder(
28  flags,
29  derivation = "SUSY20",
30  suffix = "DT",
31  V0ContainerName = "SUSY20RecoV0Candidates",
32  KshortContainerName = "SUSY20RecoKshortCandidates",
33  LambdaContainerName = "SUSY20RecoLambdaCandidates",
34  LambdabarContainerName = "SUSY20RecoLambdabarCandidates",
35  CheckVertexContainers = ["PrimaryVertices"]
36  ))
37  acc.addPublicTool(SUSY20_RecoV0_Finder)
38  augmentationTools.append(SUSY20_RecoV0_Finder)
39 
40  # VrtSecInclusiveTool
41  from VrtSecInclusive.VrtSecInclusiveConfig import VrtSecInclusiveCfg
42  acc.merge(VrtSecInclusiveCfg(
43  flags,
44  name = "SUSY20_VrtSecInclusiveTool",
45  CutSctHits = 1,
46  TrkA0ErrCut = 200000,
47  TrkZErrCut = 200000,
48  TrkPtCut = 300,
49  TrkChi2Cut = 5.0,
50  SelTrkMaxCutoff = 2000,
51  a0TrkPVDstMinCut = 0.0,
52  SelVrtChi2Cut = 4.5,
53  CutSharedHits = 5,
54  TruthTrkLen = 1,
55  DoSAloneTRT = False,
56  DoTruth = flags.Input.isMC,
57  doAugmentDVimpactParametersToMuons = True,
58  doAugmentDVimpactParametersToElectrons = True
59  ))
60 
61  # Track isolation
62  from xAODPrimitives.xAODIso import xAODIso as isoPar
63  deco_ptcones = [isoPar.ptcone40, isoPar.ptcone30, isoPar.ptcone20, isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20]
64  deco_ptcones_suffix = ["ptcone40", "ptcone30", "ptcone20", "topoetcone40", "topoetcone30", "topoetcone20"]
65  deco_prefix = 'SUSY20_'
66 
67  from IsolationAlgs.IsoToolsConfig import TrackIsolationToolCfg
68  SUSY20TrackIsoTool = acc.popToolsAndMerge(TrackIsolationToolCfg(
69  flags,
70  name = "SUSY20TrackIsoTool",
71  ))
72  SUSY20TrackIsoTool.TrackSelectionTool.maxZ0SinTheta = 1.5
73  SUSY20TrackIsoTool.TrackSelectionTool.maxD0 = 1.5
74  SUSY20TrackIsoTool.TrackSelectionTool.minPt = 1000
75  SUSY20TrackIsoTool.TrackSelectionTool.CutLevel = "TightPrimary"
76  acc.addPublicTool(SUSY20TrackIsoTool)
77 
78  from IsolationAlgs.IsoToolsConfig import CaloIsolationToolCfg
79  from CaloIdentifier import SUBCALO
80  SUSY20CaloIsoTool = acc.popToolsAndMerge(CaloIsolationToolCfg(
81  flags,
82  name = "SUSY20CaloIsoTool",
83  EMCaloNums = [SUBCALO.LAREM],
84  HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE],
85  UseEMScale = True,
86  UseCaloExtensionCaching = False,
87  saveOnlyRequestedCorrections = True
88  ))
89  acc.addPublicTool(SUSY20CaloIsoTool)
90 
91  from DerivationFrameworkInDet.InDetToolsConfig import IsolationTrackDecoratorCfg
92  SUSY20IDTrackDecoratorTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(
93  flags,
94  name = "SUSY20IDTrackDecoratorTool",
95  TrackIsolationTool = SUSY20TrackIsoTool,
96  CaloIsolationTool = SUSY20CaloIsoTool,
97  TargetContainer = "InDetTrackParticles",
98  SelectionString = "InDetTrackParticles.pt > 0.5*GeV",
99  iso = deco_ptcones,
100  isoSuffix = deco_ptcones_suffix,
101  Prefix = deco_prefix,
102  ))
103  acc.addPublicTool(SUSY20IDTrackDecoratorTool)
104  augmentationTools.append(SUSY20IDTrackDecoratorTool)
105 
106  # Commented out calo isolation, not needed by current analyses but still included in r21 SUSY20_DAODs
107  '''# Electron TrackParticles isolation
108  SUSY20ElectronDecorator = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(
109  flags,
110  name = "SUSY20ElectronDecoratorTool",
111  TrackIsolationTool = SUSY20TrackIsoTool,
112  CaloIsolationTool = SUSY20CaloIsoTool,
113  TargetContainer = "Electrons",
114  iso = [isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
115  isoSuffix = ["topoetcone40", "topoetcone30", "topoetcone20"],
116  Prefix = deco_prefix,
117  ))
118  acc.addPublicTool(SUSY20ElectronDecorator)
119  augmentationTools.append(SUSY20ElectronDecorator)
120 
121  # Muon TrackParticles isolation
122  SUSY20MuonDecorator = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(
123  flags,
124  name = "SUSY20MuonDecoratorTool",
125  TrackIsolationTool = SUSY20TrackIsoTool,
126  CaloIsolationTool = SUSY20CaloIsoTool,
127  TargetContainer = "Muons",
128  iso = [isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
129  isoSuffix = ["topoetcone40", "topoetcone30", "topoetcone20"],
130  Prefix = deco_prefix,
131  ))
132  acc.addPublicTool(SUSY20MuonDecorator)
133  augmentationTools.append(SUSY20MuonDecorator)
134 
135  # Photon TrackParticles isolation
136  SUSY20PhotonDecorator = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(
137  flags,
138  name = "SUSY20PhotonDecoratorTool",
139  TrackIsolationTool = SUSY20TrackIsoTool,
140  CaloIsolationTool = SUSY20CaloIsoTool,
141  TargetContainer = "Photons",
142  iso = [isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
143  isoSuffix = ["topoetcone40", "topoetcone30", "topoetcone20"],
144  Prefix = deco_prefix,
145  ))
146  acc.addPublicTool(SUSY20PhotonDecorator)
147  augmentationTools.append(SUSY20PhotonDecorator)'''
148 
149  # PHYS common augmentations
150  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
151  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
152 
153  # EvtCleaning: instantiate our own version of EventCleaningAlg to
154  # add TightBad flags to EventInfo and AntiKt4EMTopoJets collections
155  from DerivationFrameworkSUSY.SUSYToolsConfig import SUSY20EventCleaningToolCfg
156  acc.merge(SUSY20EventCleaningToolCfg(flags, cleaningLevel = "TightBad"))
157 
158  # CloseByIsolation correction augmentation
159  from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
160  contNames = ["Muons", "Electrons", "Photons"]
161  acc.merge(IsoCloseByAlgsCfg(flags,
162  suff = "_SUSY20",
163  isPhysLite = False,
164  containerNames = contNames,
165  useSelTools = True,
166  stream_name = kwargs['StreamName']
167  ))
168 
169  # Re-tag PFlow jets so they have b-tagging info
170  from DerivationFrameworkFlavourTag.FtagDerivationConfig import FtagJetCollectionsCfg
171  acc.merge(FtagJetCollectionsCfg(flags, ['AntiKt4EMPFlowJets']))
172 
173  # Track selection augmentation need for InDetTrackParticles thinning
174  from DerivationFrameworkInDet.InDetToolsConfig import InDetTrackSelectionToolWrapperCfg
175  SUSY20TrackSelection = acc.getPrimaryAndMerge(InDetTrackSelectionToolWrapperCfg(
176  flags,
177  name = "SUSY20TrackSelection",
178  ContainerName = "InDetTrackParticles",
179  DecorationName = "DFLoose"
180  ))
181  SUSY20TrackSelection.TrackSelectionTool.CutLevel = "Loose"
182  acc.addPublicTool(SUSY20TrackSelection)
183  augmentationTools.append(SUSY20TrackSelection)
184 
185  #
186  # Thinning tools
187  #
188  thinningTools = []
189  thinningExpression = "InDetTrackParticles.DFLoose && (InDetTrackParticles.pt > 0.5*GeV) && (abs( DFCommonInDetTrackZ0AtPV*sin(InDetTrackParticles.theta) ) < 3.0*mm)"
190 
191  # TrackParticles directly
192  from DerivationFrameworkInDet.InDetToolsConfig import TrackParticleThinningCfg
193  SUSY20TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
194  flags,
195  name = "SUSY20TrackParticleThinningTool",
196  StreamName = kwargs['StreamName'],
197  SelectionString = thinningExpression,
198  InDetTrackParticlesKey = "InDetTrackParticles"
199  ))
200  acc.addPublicTool(SUSY20TrackParticleThinningTool)
201  thinningTools.append(SUSY20TrackParticleThinningTool)
202 
203  # TrackParticles associated with Muons
204  from DerivationFrameworkInDet.InDetToolsConfig import MuonTrackParticleThinningCfg
205  SUSY20MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
206  flags,
207  name = "SUSY20MuonTPThinningTool",
208  StreamName = kwargs['StreamName'],
209  MuonKey = "Muons",
210  InDetTrackParticlesKey = "InDetTrackParticles"
211  ))
212  acc.addPublicTool(SUSY20MuonTPThinningTool)
213  thinningTools.append(SUSY20MuonTPThinningTool)
214 
215  # TrackParticles associated with Electrons
216  from DerivationFrameworkInDet.InDetToolsConfig import EgammaTrackParticleThinningCfg
217  SUSY20ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
218  flags,
219  name = "SUSY20ElectronTPThinningTool",
220  StreamName = kwargs['StreamName'],
221  SGKey = "Electrons",
222  InDetTrackParticlesKey = "InDetTrackParticles"
223  ))
224  acc.addPublicTool(SUSY20ElectronTPThinningTool)
225  thinningTools.append(SUSY20ElectronTPThinningTool)
226 
227  # Photon thinning
228  from DerivationFrameworkTools.DerivationFrameworkToolsConfig import GenericObjectThinningCfg
229  SUSY20PhotonThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(
230  flags,
231  name = "SUSY20PhotonThinningTool",
232  StreamName = kwargs['StreamName'],
233  ContainerName = "Photons",
234  SelectionString = "Photons.pt > 10*GeV"
235  ))
236  acc.addPublicTool(SUSY20PhotonThinningTool)
237  thinningTools.append(SUSY20PhotonThinningTool)
238 
239  # TrackParticles associated with photons
240  SUSY20PhotonTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
241  flags,
242  name = "SUSY20PhotonTPThinningTool",
243  StreamName = kwargs['StreamName'],
244  SGKey = "Photons",
245  InDetTrackParticlesKey = "InDetTrackParticles",
246  GSFConversionVerticesKey = "GSFConversionVertices"
247  ))
248  acc.addPublicTool(SUSY20PhotonTPThinningTool)
249  thinningTools.append(SUSY20PhotonTPThinningTool)
250 
251  # Truth thinning
252  if flags.Input.isMC:
253  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import MenuTruthThinningCfg
254  SUSY20TruthThinningTool = acc.getPrimaryAndMerge(MenuTruthThinningCfg(
255  flags,
256  name = "SUSY20TruthThinningTool",
257  WritePartons = False,
258  WriteHadrons = True,
259  WriteBHadrons = True,
260  WriteGeant = False,
261  GeantPhotonPtThresh = 20000,
262  WriteTauHad = True,
263  PartonPtThresh = -1.0,
264  WriteBSM = True,
265  WriteBosons = True,
266  WriteBosonProducts = False,
267  WriteBSMProducts = True,
268  WriteTopAndDecays = True,
269  WriteEverything = False,
270  WriteAllLeptons = True,
271  WriteLeptonsNotFromHadrons = False,
272  WriteNotPhysical = False,
273  WriteFirstN = 10,
274  PreserveAncestors = True,
275  PreserveGeneratorDescendants = True
276  ))
277  acc.addPublicTool(SUSY20TruthThinningTool)
278  thinningTools.append(SUSY20TruthThinningTool)
279 
280  #
281  # Skimming
282  #
283  skimmingTools = []
284 
285  # DT-specific trigger skimming
286  from DerivationFrameworkSUSY.SUSYToolsConfig import SUSY20DTTriggerSkimmingToolCfg
287  SUSY20TriggerSkimmingTool_DT = acc.getPrimaryAndMerge(SUSY20DTTriggerSkimmingToolCfg(
288  flags,
289  name = "SUSY20TriggerSkimmingTool"
290  ))
291  acc.addPublicTool(SUSY20TriggerSkimmingTool_DT)
292 
293  # DT-specific jet skimming
294  jetRequirements_DT = "AntiKt4EMPFlowJets.pt > 200*GeV && abs(AntiKt4EMPFlowJets.eta) < 2.8"
295  jetSelection_DT = "(count(" + jetRequirements_DT + ") >= 1)"
296 
297  from DerivationFrameworkTools.DerivationFrameworkToolsConfig import xAODStringSkimmingToolCfg
298  SUSY20JetSkimmingTool_DT = acc.getPrimaryAndMerge(xAODStringSkimmingToolCfg(
299  flags,
300  name = "SUSY20JetSkimmingTool_DT",
301  expression = jetSelection_DT
302  ))
303  acc.addPublicTool(SUSY20JetSkimmingTool_DT)
304 
305  # DT-specific final skim selection, with trigger selection AND jet selection
306  from DerivationFrameworkTools.DerivationFrameworkToolsConfig import FilterCombinationANDCfg
307  SUSY20xAODSkimmingTool_DT = acc.getPrimaryAndMerge(FilterCombinationANDCfg(
308  flags,
309  name = "SUSY20SkimmingTool_DT",
310  FilterList = [SUSY20JetSkimmingTool_DT, SUSY20TriggerSkimmingTool_DT]
311  ))
312  acc.addPublicTool(SUSY20xAODSkimmingTool_DT)
313  skimmingTools.append(SUSY20xAODSkimmingTool_DT)
314 
315  #
316  # The kernel algorithm itself
317  #
318  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
319  acc.addEventAlgo(DerivationKernel(
320  name,
321  SkimmingTools = skimmingTools,
322  ThinningTools = thinningTools,
323  AugmentationTools = augmentationTools,
324  RunSkimmingFirst = True
325  ))
326 
327  return acc
328 
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.InDetToolsConfig.InDetTrackSelectionToolWrapperCfg
def InDetTrackSelectionToolWrapperCfg(flags, name, CutLevel="TightPrimary", **kwargs)
Definition: InDetToolsConfig.py:426
python.FtagDerivationConfig.FtagJetCollectionsCfg
def FtagJetCollectionsCfg(cfgFlags, jet_cols, pv_cols=None, trackAugmenterPrefix=None)
Definition: FtagDerivationConfig.py:33
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
IsolationSelectionConfig.setupIsoCloseBySlimmingVariables
def setupIsoCloseBySlimmingVariables(slimmingHelper, isLLP1=False)
Definition: IsolationSelectionConfig.py:178
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.MCTruthCommonConfig.AddTauAndDownstreamParticlesCfg
def AddTauAndDownstreamParticlesCfg(flags, generations=-1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:263
python.DerivationFrameworkToolsConfig.FilterCombinationANDCfg
def FilterCombinationANDCfg(ConfigFlags, name, **kwargs)
Definition: DerivationFrameworkToolsConfig.py:59
python.TruthDerivationToolsConfig.MenuTruthThinningCfg
def MenuTruthThinningCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:369
VrtSecInclusiveConfig.VrtSecInclusiveCfg
def VrtSecInclusiveCfg(flags, name="VrtSecInclusive", **kwargs)
Definition: VrtSecInclusiveConfig.py:10
python.InDetToolsConfig.TrackParticleThinningCfg
def TrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:458
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
python.SUSYToolsConfig.SUSY20DTTriggerSkimmingToolCfg
def SUSY20DTTriggerSkimmingToolCfg(flags, name, **kwargs)
Definition: SUSYToolsConfig.py:52
python.SUSY20.SUSY20Cfg
def SUSY20Cfg(flags)
Definition: SUSY20.py:329
python.DerivationFrameworkToolsConfig.xAODStringSkimmingToolCfg
def xAODStringSkimmingToolCfg(ConfigFlags, name, **kwargs)
Definition: DerivationFrameworkToolsConfig.py:29
python.SUSYToolsConfig.SUSY20EventCleaningToolCfg
def SUSY20EventCleaningToolCfg(flags, cleaningLevel="TightBad")
Definition: SUSYToolsConfig.py:11
python.DerivationFrameworkToolsConfig.GenericObjectThinningCfg
def GenericObjectThinningCfg(ConfigFlags, name, **kwargs)
Definition: DerivationFrameworkToolsConfig.py:20
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:528
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
IsoToolsConfig.CaloIsolationToolCfg
def CaloIsolationToolCfg(flags, **kwargs)
Definition: IsoToolsConfig.py:25
python.TrackIsolationDecoratorConfig.TrackIsolationToolCfg
def TrackIsolationToolCfg(ConfigFlags, name="TrackIsolationTool", **kwargs)
Definition: TrackIsolationDecoratorConfig.py:12
python.InDetToolsConfig.EgammaTrackParticleThinningCfg
def EgammaTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:579
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
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
python.InDetToolsConfig.IsolationTrackDecoratorCfg
def IsolationTrackDecoratorCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:447
python.SUSY20.SUSY20KernelCfg
def SUSY20KernelCfg(flags, name="SUSY20Kernel", **kwargs)
Definition: SUSY20.py:13