ATLAS Offline Software
Functions
python.EGAM3 Namespace Reference

Functions

def EGAM3SkimmingToolCfg (flags)
 
def EGAM3eeMassTool1Cfg (flags)
 
def EGAM3eeMassTool2Cfg (flags)
 
def EGAM3eeMassTool3Cfg (flags)
 
def EGAM3KernelCfg (flags, name="EGAM3Kernel", **kwargs)
 
def EGAM3Cfg (flags)
 

Function Documentation

◆ EGAM3Cfg()

def python.EGAM3.EGAM3Cfg (   flags)

Definition at line 415 of file EGAM3.py.

415 def EGAM3Cfg(flags):
416  acc = ComponentAccumulator()
417 
418  # Get the lists of triggers needed for trigger matching.
419  # This is needed at this scope (for the slimming) and further down
420  # in the config chain for actually configuring the matching, so we create
421  # it here and pass it down
422  # TODO: this should ideally be called higher up to avoid it being run
423  # multiple times in a train
424  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
425 
426  EGAM3TriggerListsHelper = TriggerListsHelper(flags)
427 
428  # configure skimming/thinning/augmentation tools
429  acc.merge(
431  flags,
432  name="EGAM3Kernel",
433  StreamName="StreamDAOD_EGAM3",
434  TriggerListsHelper=EGAM3TriggerListsHelper,
435  )
436  )
437 
438  # configure slimming
439  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
440  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
441  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
442 
443  EGAM3SlimmingHelper = SlimmingHelper(
444  "EGAM3SlimmingHelper",
445  NamesAndTypes=flags.Input.TypedCollections,
446  flags=flags,
447  )
448 
449  # ------------------------------------------
450  # containers for which we save all variables
451  # -------------------------------------------
452 
453  # baseline
454  EGAM3SlimmingHelper.AllVariables = [
455  "Photons",
456  "GSFTrackParticles",
457  "egammaClusters",
458  "ForwardElectrons",
459  "ForwardElectronClusters",
460  ]
461 
462  # for trigger studies we also add:
463  MenuType = None
464  if flags.Trigger.EDMVersion == 2:
465  MenuType = "Run2"
466  elif flags.Trigger.EDMVersion == 3:
467  MenuType = "Run3"
468  else:
469  MenuType = ""
470  EGAM3SlimmingHelper.AllVariables += ExtraContainersTrigger[MenuType]
471  EGAM3SlimmingHelper.AllVariables += ExtraContainersPhotonTrigger[MenuType]
472  EGAM3SlimmingHelper.AllVariables += ExtraContainersElectronTrigger[MenuType]
473  if not flags.Input.isMC:
474  EGAM3SlimmingHelper.AllVariables += ExtraContainersTriggerDataOnly[MenuType]
475 
476  # and on MC we also add:
477  if flags.Input.isMC:
478  EGAM3SlimmingHelper.AllVariables += [
479  "TruthEvents",
480  "TruthParticles",
481  "TruthVertices",
482  "egammaTruthParticles",
483  "MuonTruthParticles",
484  ]
485 
486  # -------------------------------------------
487  # containers that we slim
488  # -------------------------------------------
489 
490  # first add variables from smart-slimming
491  # adding only also those for which we add all variables since
492  # the XXXCPContent.py files also bring in some extra variables
493  # for other collections
494  EGAM3SlimmingHelper.SmartCollections = [
495  "Electrons",
496  "Photons",
497  "Muons",
498  "TauJets",
499  "PrimaryVertices",
500  "InDetTrackParticles",
501  "AntiKt4EMPFlowJets",
502  "BTagging_AntiKt4EMPFlow",
503  "MET_Baseline_AntiKt4EMPFlow",
504  ]
505  if flags.Input.isMC:
506  EGAM3SlimmingHelper.SmartCollections += [
507  "AntiKt4TruthJets",
508  "AntiKt4TruthDressedWZJets",
509  ]
510  if flags.Derivation.Egamma.addHLTJets:
511  EGAM3SlimmingHelper.SmartCollections += [
512  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf",
513  ]
514 
515  # then add extra variables:
516 
517  # electrons
518  EGAM3SlimmingHelper.ExtraVariables += ["Electrons.Loose.Medium.Tight"]
519 
520  # muons
521  EGAM3SlimmingHelper.ExtraVariables += [
522  "Muons.ptcone20.ptcone30.ptcone40.etcone20.etcone30.etcone40"
523  ]
524 
525  # conversion vertices
526  EGAM3SlimmingHelper.ExtraVariables += [
527  "GSFConversionVertices.x.y.z.px.py.pz.pt1.pt2.etaAtCalo.phiAtCalo",
528  "GSFConversionVertices.trackParticleLinks",
529  ]
530 
531  # primary vertices
532  EGAM3SlimmingHelper.ExtraVariables += ["PrimaryVertices.x.y.sumPt2"]
533 
534  # energy density
535  EGAM3SlimmingHelper.ExtraVariables += [
536  "TopoClusterIsoCentralEventShape.Density",
537  "TopoClusterIsoForwardEventShape.Density",
538  "NeutralParticleFlowIsoCentralEventShape.Density",
539  "NeutralParticleFlowIsoForwardEventShape.Density",
540  ]
541 
542  from DerivationFrameworkEGamma import EGammaIsoConfig
543 
544  (
545  pflowIsoVar,
546  densityList,
547  densityDict,
548  acc1,
549  ) = EGammaIsoConfig.makeEGammaCommonIsoCfg(flags)
550  acc.merge(acc1)
551  EGAM3SlimmingHelper.AppendToDictionary.update(densityDict)
552  EGAM3SlimmingHelper.ExtraVariables += densityList
553 
554  # To have ptcone40
555  from IsolationAlgs.DerivationTrackIsoConfig import DerivationTrackIsoCfg
556 
557  acc.merge(
559  flags, object_types=("Photons",), ptCuts=(500, 1000), postfix="Extra"
560  )
561  )
562 
563  # electrons: detailed shower shape and track variables
564  EGAM3SlimmingHelper.ExtraVariables += ElectronsCPDetailedContent
565  EGAM3SlimmingHelper.ExtraVariables += GSFTracksCPDetailedContent
566 
567  # photons and electrons: gain and cluster energy per layer
568  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
569  getGainDecorations,
570  getClusterEnergyPerLayerDecorations,
571  )
572 
573  gainDecorations = getGainDecorations(acc, flags, "EGAM3Kernel")
574  print("EGAM3 gain decorations: ", gainDecorations)
575  EGAM3SlimmingHelper.ExtraVariables.extend(gainDecorations)
576  clusterEnergyDecorations = getClusterEnergyPerLayerDecorations(acc, "EGAM3Kernel")
577  print("EGAM3 cluster energy decorations: ", clusterEnergyDecorations)
578  EGAM3SlimmingHelper.ExtraVariables.extend(clusterEnergyDecorations)
579 
580  # photon HLT variables
581  EGAM3SlimmingHelper.ExtraVariables += ExtraVariablesHLTPhotons[MenuType]
582 
583  # truth
584  if flags.Input.isMC:
585  EGAM3SlimmingHelper.ExtraVariables += [
586  "Electrons.truthOrigin.truthType.truthParticleLink"
587  ]
588 
589  # Add event info
590  if flags.Derivation.Egamma.doEventInfoSlimming:
591  EGAM3SlimmingHelper.SmartCollections.append("EventInfo")
592  else:
593  EGAM3SlimmingHelper.AllVariables += ["EventInfo"]
594 
595  # Add egamma trigger objects
596  EGAM3SlimmingHelper.IncludeEGammaTriggerContent = True
597 
598  # Trigger matching
599  # Run 2
600  if flags.Trigger.EDMVersion == 2:
601  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
602  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = EGAM3SlimmingHelper,
603  OutputContainerPrefix = "TrigMatch_",
604  TriggerList = EGAM3TriggerListsHelper.Run2TriggerNamesNoTau)
605  # Run 3, or Run 2 with navigation conversion
606  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
607  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
609 
610  # Add full CellContainer
611  EGAM3SlimmingHelper.StaticContent = [
612  "CaloCellContainer#AllCalo",
613  "CaloClusterCellLinkContainer#egammaClusters_links",
614  ]
615 
616  EGAM3ItemList = EGAM3SlimmingHelper.GetItemList()
617  acc.merge(
619  flags,
620  "DAOD_EGAM3",
621  ItemList=EGAM3ItemList,
622  AcceptAlgs=["EGAM3Kernel"],
623  )
624  )
625  acc.merge(
627  flags,
628  "DAOD_EGAM3",
629  AcceptAlgs=["EGAM3Kernel"],
630  createMetadata=[
631  MetadataCategory.CutFlowMetaData,
632  MetadataCategory.TruthMetaData,
633  ],
634  )
635  )
636 
637  return acc

◆ EGAM3eeMassTool1Cfg()

def python.EGAM3.EGAM3eeMassTool1Cfg (   flags)
Configure the EGAM3 ee invariant mass augmentation tool 1

Definition at line 91 of file EGAM3.py.

91 def EGAM3eeMassTool1Cfg(flags):
92  """Configure the EGAM3 ee invariant mass augmentation tool 1"""
93  acc = ComponentAccumulator()
94 
95  # ====================================================================
96  # 1. ee invariant mass of events passing eegamma or eee selection for
97  # photon efficiency studies, di-electron triggers
98  #
99  # two opposite-sign medium el, pT>10 GeV, |eta|<2.5, mee>40 GeV
100  # eegamma: one reco photon, ET>10 GeV< |eta|<2.5
101  # eee: 3 electrons, pT>10 GeV, mee>40 GeV
102  # if skim size too large either require tight electrons (at least one)
103  # or raise electron pT threshold (at least one)
104  # ====================================================================
105 
106  requirementElectrons = " && ".join(
107  ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 9.5*GeV)"]
108  )
109 
110  acc.setPrivateTools(
111  CompFactory.DerivationFramework.EGInvariantMassTool(
112  name="EGAM3_EEMassTool11",
113  Object1Requirements=requirementElectrons,
114  Object2Requirements=requirementElectrons,
115  StoreGateEntryName="EGAM3_DiElectronMass1",
116  Mass1Hypothesis=0.511 * MeV,
117  Mass2Hypothesis=0.511 * MeV,
118  Container1Name="Electrons",
119  Container2Name="Electrons",
120  CheckCharge=True,
121  DoTransverseMass=False,
122  MinDeltaR=0.0,
123  )
124  )
125 
126  return acc
127 
128 

◆ EGAM3eeMassTool2Cfg()

def python.EGAM3.EGAM3eeMassTool2Cfg (   flags)
Configure the EGAM3 ee invariant mass augmentation tool 2

Definition at line 129 of file EGAM3.py.

129 def EGAM3eeMassTool2Cfg(flags):
130  """Configure the EGAM3 ee invariant mass augmentation tool 2"""
131  acc = ComponentAccumulator()
132 
133  # ====================================================================
134  # 2. dielectron invariant mass for eegamma selection for low-pT
135  # electron studies with T&P
136  #
137  # tag e: tight, |eta|<2.5, pT>25 GeV
138  # probe e: reco, ET>7 GeV, central electron
139  # gamma: tight, ET>10 GeV
140  # ====================================================================
141  # asymmetric electron cuts/single e trigger, low pT cut for subleading
142  # e (for e calibration studies at low pT)
143 
144  requirementElectron1 = " && ".join(
145  ["(Electrons.DFCommonElectronsLHTight)", "(Electrons.pt > 24.5*GeV)"]
146  )
147  requirementElectron2 = "(Electrons.pt > 6.5*GeV)"
148 
149  acc.setPrivateTools(
150  CompFactory.DerivationFramework.EGInvariantMassTool(
151  name="EGAM3_ZEEMassTool2",
152  Object1Requirements=requirementElectron1,
153  Object2Requirements=requirementElectron2,
154  StoreGateEntryName="EGAM3_DiElectronMass2",
155  Mass1Hypothesis=0.511 * MeV,
156  Mass2Hypothesis=0.511 * MeV,
157  Container1Name="Electrons",
158  Container2Name="Electrons",
159  CheckCharge=True,
160  DoTransverseMass=False,
161  MinDeltaR=0.0,
162  )
163  )
164 
165  return acc
166 
167 

◆ EGAM3eeMassTool3Cfg()

def python.EGAM3.EGAM3eeMassTool3Cfg (   flags)
Configure the EGAM3 ee invariant mass augmentation tool 3

Definition at line 168 of file EGAM3.py.

168 def EGAM3eeMassTool3Cfg(flags):
169  """Configure the EGAM3 ee invariant mass augmentation tool 3"""
170  acc = ComponentAccumulator()
171 
172  # ====================================================================
173  # 3. eegamma selection for low-pT electron studies with T&P
174  # tag e: tight, |eta|<2.5, pT>25 GeV
175  # probe e: reco, ET>7 GeV, forward electron
176  # gamma: tight, ET>10 GeV
177  # ====================================================================
178 
179  requirementElectron1 = " && ".join(
180  ["(Electrons.DFCommonElectronsLHTight)", "(Electrons.pt > 24.5*GeV)"]
181  )
182  requirementElectron2 = "(ForwardElectrons.pt > 6.5*GeV)"
183 
184  acc.setPrivateTools(
185  CompFactory.DerivationFramework.EGInvariantMassTool(
186  name="EGAM3_EEMassTool3",
187  Object1Requirements=requirementElectron1,
188  Object2Requirements=requirementElectron2,
189  StoreGateEntryName="EGAM3_DiElectronMass3",
190  Mass1Hypothesis=0.511 * MeV,
191  Mass2Hypothesis=0.511 * MeV,
192  Container1Name="Electrons",
193  Container2Name="ForwardElectrons",
194  CheckCharge=True,
195  DoTransverseMass=False,
196  MinDeltaR=0.0,
197  )
198  )
199 
200  return acc
201 
202 
203 # Main algorithm config

◆ EGAM3KernelCfg()

def python.EGAM3.EGAM3KernelCfg (   flags,
  name = "EGAM3Kernel",
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel)
for EGAM3

Definition at line 204 of file EGAM3.py.

204 def EGAM3KernelCfg(flags, name="EGAM3Kernel", **kwargs):
205  """Configure the derivation framework driving algorithm (kernel)
206  for EGAM3"""
207  acc = ComponentAccumulator()
208 
209  # Common augmentations
210  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
211 
212  acc.merge(
214  flags, TriggerListsHelper=kwargs["TriggerListsHelper"]
215  )
216  )
217 
218  # EGAM3 augmentations
219  augmentationTools = []
220 
221  # ====================================================================
222  # ee and egamma invariant masses
223  # ====================================================================
224  EGAM3eeMassTool1 = acc.popToolsAndMerge(EGAM3eeMassTool1Cfg(flags))
225  acc.addPublicTool(EGAM3eeMassTool1)
226  augmentationTools.append(EGAM3eeMassTool1)
227 
228  EGAM3eeMassTool2 = acc.popToolsAndMerge(EGAM3eeMassTool2Cfg(flags))
229  acc.addPublicTool(EGAM3eeMassTool2)
230  augmentationTools.append(EGAM3eeMassTool2)
231 
232  EGAM3eeMassTool3 = acc.popToolsAndMerge(EGAM3eeMassTool3Cfg(flags))
233  acc.addPublicTool(EGAM3eeMassTool3)
234  augmentationTools.append(EGAM3eeMassTool3)
235 
236  # ====================================================================
237  # Common calo decoration tools
238  # ====================================================================
239  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
240  CaloDecoratorKernelCfg)
241  acc.merge(CaloDecoratorKernelCfg(flags))
242 
243  # thinning tools
244  thinningTools = []
245  streamName = kwargs["StreamName"]
246 
247  # Track thinning
248  if flags.Derivation.Egamma.doTrackThinning:
249  from DerivationFrameworkInDet.InDetToolsConfig import (
250  TrackParticleThinningCfg,
251  MuonTrackParticleThinningCfg,
252  TauTrackParticleThinningCfg,
253  )
254 
255  TrackThinningKeepElectronTracks = True
256  TrackThinningKeepAllElectronTracks = False
257  TrackThinningKeepPhotonTracks = True
258  TrackThinningKeepAllPhotonTracks = True
259  TrackThinningKeepJetTracks = False
260  TrackThinningKeepMuonTracks = False
261  TrackThinningKeepTauTracks = False
262  TrackThinningKeepPVTracks = True
263 
264  # Tracks associated with Electrons
265  if TrackThinningKeepElectronTracks:
266  EGAM3ElectronTPThinningTool = (
267  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
268  name="EGAM3ElectronTPThinningTool",
269  StreamName=streamName,
270  SGKey="Electrons",
271  GSFTrackParticlesKey="GSFTrackParticles",
272  InDetTrackParticlesKey="InDetTrackParticles",
273  SelectionString="Electrons.pt > 0*GeV",
274  BestMatchOnly=True,
275  ConeSize=0.3,
276  )
277  )
278  acc.addPublicTool(EGAM3ElectronTPThinningTool)
279  thinningTools.append(EGAM3ElectronTPThinningTool)
280 
281  # Tracks associated with Electrons (all tracks, large cone, for track
282  # isolation studies of the selected electrons)
283  if TrackThinningKeepAllElectronTracks:
284  EGAM3ElectronTPThinningTool2 = (
285  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
286  name="EGAM3ElectronTPThinningTool2",
287  StreamName=streamName,
288  SGKey="Electrons",
289  GSFTrackParticlesKey="GSFTrackParticles",
290  InDetTrackParticlesKey="InDetTrackParticles",
291  SelectionString="Electrons.pt > 4*GeV",
292  BestMatchOnly=False,
293  ConeSize=0.6,
294  )
295  )
296  acc.addPublicTool(EGAM3ElectronTPThinningTool2)
297  thinningTools.append(EGAM3ElectronTPThinningTool2)
298 
299  # Tracks associated with Photons
300  if TrackThinningKeepPhotonTracks:
301  EGAM3PhotonTPThinningTool = (
302  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
303  name="EGAM3PhotonTPThinningTool",
304  StreamName=streamName,
305  SGKey="Photons",
306  GSFTrackParticlesKey="GSFTrackParticles",
307  InDetTrackParticlesKey="InDetTrackParticles",
308  GSFConversionVerticesKey="GSFConversionVertices",
309  SelectionString="Photons.pt > 0*GeV",
310  BestMatchOnly=True,
311  ConeSize=0.3,
312  )
313  )
314  acc.addPublicTool(EGAM3PhotonTPThinningTool)
315  thinningTools.append(EGAM3PhotonTPThinningTool)
316 
317  # Tracks associated with Photons (all tracks, large cone,
318  # for track isolation studies of the selected photons)
319  if TrackThinningKeepAllPhotonTracks:
320  EGAM3PhotonTPThinningTool2 = (
321  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
322  name="EGAM3PhotonTPThinningTool2",
323  StreamName=streamName,
324  SGKey="Photons",
325  GSFTrackParticlesKey="GSFTrackParticles",
326  InDetTrackParticlesKey="InDetTrackParticles",
327  GSFConversionVerticesKey="GSFConversionVertices",
328  SelectionString="Photons.pt > 9.5*GeV",
329  BestMatchOnly=False,
330  ConeSize=0.6,
331  )
332  )
333  acc.addPublicTool(EGAM3PhotonTPThinningTool2)
334  thinningTools.append(EGAM3PhotonTPThinningTool2)
335 
336  # Tracks associated with Jets
337  if TrackThinningKeepJetTracks:
338  EGAM3JetTPThinningTool = (
339  CompFactory.DerivationFramework.JetTrackParticleThinning(
340  name="EGAM3JetTPThinningTool",
341  StreamName=streamName,
342  JetKey="AntiKt4EMPFlowJets",
343  InDetTrackParticlesKey="InDetTrackParticles",
344  )
345  )
346  acc.addPublicTool(EGAM3JetTPThinningTool)
347  thinningTools.append(EGAM3JetTPThinningTool)
348 
349  # Tracks associated with Muons
350  if TrackThinningKeepMuonTracks:
351  EGAM3MuonTPThinningTool = acc.getPrimaryAndMerge(
353  flags,
354  name="EGAM3MuonTPThinningTool",
355  StreamName=streamName,
356  MuonKey="Muons",
357  InDetTrackParticlesKey="InDetTrackParticles",
358  )
359  )
360  thinningTools.append(EGAM3MuonTPThinningTool)
361 
362  # Tracks associated with Taus
363  if TrackThinningKeepTauTracks:
364  EGAM3TauTPThinningTool = acc.getPrimaryAndMerge(
366  flags,
367  name="EGAM3TauTPThinningTool",
368  StreamName=streamName,
369  TauKey="TauJets",
370  ConeSize=0.6,
371  InDetTrackParticlesKey="InDetTrackParticles",
372  DoTauTracksThinning=True,
373  TauTracksKey="TauTracks",
374  )
375  )
376  thinningTools.append(EGAM3TauTPThinningTool)
377 
378  # Tracks from primary vertex
379  thinning_expression = " && ".join(
380  [
381  "(InDetTrackParticles.DFCommonTightPrimary)",
382  "(abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta)<3*mm)",
383  "(InDetTrackParticles.pt>10*GeV)",
384  ]
385  )
386  if TrackThinningKeepPVTracks:
387  EGAM3TPThinningTool = acc.getPrimaryAndMerge(
389  flags,
390  name="EGAM3TPThinningTool",
391  StreamName=streamName,
392  SelectionString=thinning_expression,
393  InDetTrackParticlesKey="InDetTrackParticles",
394  )
395  )
396  thinningTools.append(EGAM3TPThinningTool)
397 
398  # skimming
399  skimmingTool = acc.popToolsAndMerge(EGAM3SkimmingToolCfg(flags))
400  acc.addPublicTool(skimmingTool)
401 
402  # setup the kernel
403  acc.addEventAlgo(
404  CompFactory.DerivationFramework.DerivationKernel(
405  name,
406  SkimmingTools=[skimmingTool],
407  AugmentationTools=augmentationTools,
408  ThinningTools=thinningTools,
409  )
410  )
411 
412  return acc
413 
414 

◆ EGAM3SkimmingToolCfg()

def python.EGAM3.EGAM3SkimmingToolCfg (   flags)
Configure the EGAM3 skimming tool

Definition at line 29 of file EGAM3.py.

29 def EGAM3SkimmingToolCfg(flags):
30  """Configure the EGAM3 skimming tool"""
31  acc = ComponentAccumulator()
32 
33  # eegamma or eee selection for photon efficiency studies, ee triggers
34  expression1a = " && ".join(
35  [
36  "(count(DFCommonPhotons_et>9.5*GeV)>=1)",
37  "(count(EGAM3_DiElectronMass1 > 40.0*GeV)>=1)",
38  ]
39  )
40  expression1b = " && ".join(
41  [
42  "(count(Electrons.pt>9.5*GeV)>=3)",
43  "(count(EGAM3_DiElectronMass1 > 40.0*GeV)>=1)",
44  ]
45  )
46 
47  # eegamma selection for low-pT central electron studies with T&P
48  expression2 = " && ".join(
49  [
50  "(count(DFCommonPhotons_et>9.5*GeV && "
51  + "Photons.DFCommonPhotonsIsEMTight)>=1)",
52  "(count(EGAM3_DiElectronMass2 > 40.0*GeV)>=1)",
53  ]
54  )
55 
56  # eegamma selection for low-pT forward electron studies with T&P
57  expression3 = " && ".join(
58  [
59  "(count(DFCommonPhotons_et>9.5*GeV && "
60  + "Photons.DFCommonPhotonsIsEMTight)>=1)",
61  "(count(EGAM3_DiElectronMass3 > 40.0*GeV)>=1)",
62  ]
63  )
64 
65  # take OR of previous selections
66  expression = (
67  "( "
68  + expression1a
69  + " ) || "
70  + "( "
71  + expression1b
72  + " ) || "
73  + "( "
74  + expression2
75  + " ) || "
76  + "( "
77  + expression3
78  + " )"
79  )
80  print("EGAM3 skimming expression: ", expression)
81 
82  acc.setPrivateTools(
83  CompFactory.DerivationFramework.xAODStringSkimmingTool(
84  name="EGAM3SkimmingTool", expression=expression
85  )
86  )
87 
88  return acc
89 
90 
python.EGAM3.EGAM3SkimmingToolCfg
def EGAM3SkimmingToolCfg(flags)
Definition: EGAM3.py:29
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.EGAM3.EGAM3eeMassTool2Cfg
def EGAM3eeMassTool2Cfg(flags)
Definition: EGAM3.py:129
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.InDetToolsConfig.TrackParticleThinningCfg
def TrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:458
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
python.EGAM3.EGAM3eeMassTool3Cfg
def EGAM3eeMassTool3Cfg(flags)
Definition: EGAM3.py:168
python.EGAM3.EGAM3eeMassTool1Cfg
def EGAM3eeMassTool1Cfg(flags)
Definition: EGAM3.py:91
python.EGAM3.EGAM3Cfg
def EGAM3Cfg(flags)
Definition: EGAM3.py:415
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:528
python.InDetToolsConfig.TauTrackParticleThinningCfg
def TauTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:539
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.EGAM3.EGAM3KernelCfg
def EGAM3KernelCfg(flags, name="EGAM3Kernel", **kwargs)
Definition: EGAM3.py:204
DerivationFrameworkCaloConfig.CaloDecoratorKernelCfg
def CaloDecoratorKernelCfg(flags, name="CaloDecoratorKernel", **kwargs)
Definition: DerivationFrameworkCaloConfig.py:77
DerivationFrameworkCaloConfig.getClusterEnergyPerLayerDecorations
def getClusterEnergyPerLayerDecorations(acc, kernel)
Definition: DerivationFrameworkCaloConfig.py:159
DerivationFrameworkCaloConfig.getGainDecorations
def getGainDecorations(acc, flags, kernel, collections=None, info=["E", "nCells"])
Definition: DerivationFrameworkCaloConfig.py:127
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
DerivationTrackIsoConfig.DerivationTrackIsoCfg
def DerivationTrackIsoCfg(flags, **jwarg)
Definition: DerivationTrackIsoConfig.py:11
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:219
SlimmingHelper
Definition: SlimmingHelper.py:1