ATLAS Offline Software
EGAM1.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 # ====================================================================
3 # EGAM1.py
4 # This defines DAOD_EGAM1, a skimmed DAOD format for Run 3.
5 # Z->ee reduction for central electrons - for electron ID and calibration
6 # It requires the flag EGAM1 in Derivation_tf.py
7 # ====================================================================
8 
9 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
10 from AthenaConfiguration.ComponentFactory import CompFactory
11 from AthenaConfiguration.Enums import MetadataCategory
12 
13 from AthenaCommon.SystemOfUnits import MeV
14 
15 from DerivationFrameworkEGamma.PhotonsCPDetailedContent import (
16  PhotonsCPDetailedContent,
17 )
18 
19 from DerivationFrameworkEGamma.TriggerContent import (
20  ExtraContainersTrigger,
21  ExtraContainersElectronTrigger,
22 )
23 
24 
26  """Configure the EGAM1 skimming tool"""
27  acc = ComponentAccumulator()
28 
29  expression = " || ".join(
30  [
31  "(count( EGAM1_DiElectronMass1 > 50.0*GeV ) >= 1)",
32  "(count( EGAM1_DiElectronMass2 > 50.0*GeV ) >= 1)",
33  "(count( EGAM1_DiElectronMass3 > 50.0*GeV ) >= 1)",
34  "(count( EGAM1_ElectronPhotonMass > 50.0*GeV )>=1)",
35  ]
36  )
37  print("EGAM1 skimming expression: ", expression)
38 
39  acc.setPrivateTools(
40  CompFactory.DerivationFramework.xAODStringSkimmingTool(
41  name="EGAM1SkimmingTool", expression=expression
42  )
43  )
44 
45  return acc
46 
47 
49  """Configure the EGAM1 ee invariant mass augmentation tool 1"""
50  acc = ComponentAccumulator()
51 
52  # ====================================================================
53  # 1. di-electron invariant mass for events passing the Z->ee
54  # selection for the e-gamma calibration, based on single e trigger
55  #
56  # 1 tight e, central, pT>25 GeV
57  # 1 medium e, pT>20 GeV
58  # opposite-sign
59  # mee>50 GeV (cut applied in skimming step later)
60  # ====================================================================
61 
62  requirement_tag = " && ".join(
63  ["(Electrons.DFCommonElectronsLHTight)", "(Electrons.pt > 24.5*GeV)"]
64  )
65 
66  requirement_probe = " && ".join(
67  ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 19.5*GeV)"]
68  )
69 
70  acc.setPrivateTools(
71  CompFactory.DerivationFramework.EGInvariantMassTool(
72  name="EGAM1_ZEEMassTool1",
73  Object1Requirements=requirement_tag,
74  Object2Requirements=requirement_probe,
75  StoreGateEntryName="EGAM1_DiElectronMass1",
76  Mass1Hypothesis=0.511 * MeV,
77  Mass2Hypothesis=0.511 * MeV,
78  Container1Name="Electrons",
79  Container2Name="Electrons",
80  CheckCharge=True,
81  DoTransverseMass=False,
82  MinDeltaR=0.0,
83  )
84  )
85 
86  return acc
87 
88 
90  """Configure the EGAM1 ee invariant mass augmentation tool 2"""
91  acc = ComponentAccumulator()
92 
93  # ====================================================================
94  # 2. di-electron invariant mass for events passing the Z->e selection
95  # for the e-gamma calibration, based on di-electron triggers
96  #
97  # 2 medium e, central, pT>20 GeV
98  # opposite-sign
99  # mee>50 GeV (cut applied in skimming step later)
100  # ====================================================================
101 
102  requirement = " && ".join(
103  ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 19.5*GeV)"]
104  )
105 
106  acc.setPrivateTools(
107  CompFactory.DerivationFramework.EGInvariantMassTool(
108  name="EGAM1_ZEEMassTool2",
109  Object1Requirements=requirement,
110  Object2Requirements=requirement,
111  StoreGateEntryName="EGAM1_DiElectronMass2",
112  Mass1Hypothesis=0.511 * MeV,
113  Mass2Hypothesis=0.511 * MeV,
114  Container1Name="Electrons",
115  Container2Name="Electrons",
116  CheckCharge=True,
117  DoTransverseMass=False,
118  MinDeltaR=0.0,
119  )
120  )
121 
122  return acc
123 
124 
126  """Configure the EGAM1 ee invariant mass augmentation tool 3"""
127  acc = ComponentAccumulator()
128 
129  # ====================================================================
130  # 3. di-electron invariant mass for events passing the Z->ee
131  # selection for the e efficiencies with tag and probe.
132  # Based on single e trigger, for reco (central) and ID SF(central)
133  #
134  # 1 tight e, central, pT>25 GeV
135  # 1 e, central, pT>4 GeV
136  # opposite-sign + same-sign
137  # mee>50 GeV (cut applied in skimming step later)
138  # ====================================================================
139 
140  requirement_tag = " && ".join(
141  ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 24.5*GeV)"]
142  )
143 
144  requirement_probe = "Electrons.pt > 4*GeV"
145 
146  acc.setPrivateTools(
147  CompFactory.DerivationFramework.EGInvariantMassTool(
148  name="EGAM1_ZEEMassTool3",
149  Object1Requirements=requirement_tag,
150  Object2Requirements=requirement_probe,
151  StoreGateEntryName="EGAM1_DiElectronMass3",
152  Mass1Hypothesis=0.511 * MeV,
153  Mass2Hypothesis=0.511 * MeV,
154  Container1Name="Electrons",
155  Container2Name="Electrons",
156  CheckCharge=False,
157  DoTransverseMass=False,
158  MinDeltaR=0.0,
159  )
160  )
161 
162  return acc
163 
164 
166  """Configure the EGAM1 e+photon mass augmentation tool"""
167  acc = ComponentAccumulator()
168 
169  # ====================================================================
170  # 4. Z->eg selection based on single e trigger, for reco SF (central)
171  # for tag and probe
172  #
173  # 1 tight e, central, pT>25 GeV
174  # note: use medium instead of tight for early data upon electron
175  # group request
176  # 1 gamma, pT>15 GeV, central
177  # opposite sign + same sign
178  # mey>50 GeV (cut applied in skimming step later)
179  # ====================================================================
180 
181  requirement_tag = " && ".join(
182  ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 24.5*GeV)"]
183  )
184 
185  requirement_probe = "DFCommonPhotons_et > 14.5*GeV"
186 
187  acc.setPrivateTools(
188  CompFactory.DerivationFramework.EGInvariantMassTool(
189  name="EGAM1_ZEGMassTool",
190  Object1Requirements=requirement_tag,
191  Object2Requirements=requirement_probe,
192  StoreGateEntryName="EGAM1_ElectronPhotonMass",
193  Mass1Hypothesis=0.511 * MeV,
194  Mass2Hypothesis=0.511 * MeV,
195  Container1Name="Electrons",
196  Container2Name="Photons",
197  Pt2BranchName="DFCommonPhotons_et",
198  Eta2BranchName="DFCommonPhotons_eta",
199  Phi2BranchName="DFCommonPhotons_phi",
200  CheckCharge=False,
201  DoTransverseMass=False,
202  MinDeltaR=0.0,
203  )
204  )
205  return acc
206 
207 
208 # Main algorithm config
209 def EGAM1KernelCfg(flags, name="EGAM1Kernel", **kwargs):
210  """Configure the derivation framework driving algorithm (kernel)
211  for EGAM1"""
212  acc = ComponentAccumulator()
213 
214  # Schedule extra jets collections
215  from JetRecConfig.StandardSmallRJets import AntiKt4PV0Track
216  from JetRecConfig.JetRecConfig import JetRecCfg
217  from JetRecConfig.JetConfigFlags import jetInternalFlags
218 
219  jetList = [AntiKt4PV0Track]
220  jetInternalFlags.isRecoJob = True
221  for jd in jetList:
222  acc.merge(JetRecCfg(flags, jd))
223 
224  # Common augmentations
225  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
226 
227  acc.merge(
229  flags, TriggerListsHelper=kwargs["TriggerListsHelper"]
230  )
231  )
232 
233  # EGAM1 augmentations
234  augmentationTools = []
235 
236  # ====================================================================
237  # ee and egamma invariant masses
238  # ====================================================================
239  EGAM1ZeeMassTool1 = acc.popToolsAndMerge(EGAM1ZeeMassTool1Cfg(flags))
240  acc.addPublicTool(EGAM1ZeeMassTool1)
241  augmentationTools.append(EGAM1ZeeMassTool1)
242 
243  EGAM1ZeeMassTool2 = acc.popToolsAndMerge(EGAM1ZeeMassTool2Cfg(flags))
244  acc.addPublicTool(EGAM1ZeeMassTool2)
245  augmentationTools.append(EGAM1ZeeMassTool2)
246 
247  EGAM1ZeeMassTool3 = acc.popToolsAndMerge(EGAM1ZeeMassTool3Cfg(flags))
248  acc.addPublicTool(EGAM1ZeeMassTool3)
249  augmentationTools.append(EGAM1ZeeMassTool3)
250 
251  EGAM1ZegMassTool = acc.popToolsAndMerge(EGAM1ZegMassToolCfg(flags))
252  acc.addPublicTool(EGAM1ZegMassTool)
253  augmentationTools.append(EGAM1ZegMassTool)
254 
255  # ====================================================================
256  # Common calo decoration tools
257  # ====================================================================
258  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
259  CaloDecoratorKernelCfg)
260  acc.merge(CaloDecoratorKernelCfg(flags))
261 
262  # thinning tools
263  thinningTools = []
264  streamName = kwargs["StreamName"]
265 
266  # Track thinning
267  if flags.Derivation.Egamma.doTrackThinning:
268  from DerivationFrameworkInDet.InDetToolsConfig import (
269  TrackParticleThinningCfg,
270  MuonTrackParticleThinningCfg,
271  TauTrackParticleThinningCfg,
272  )
273 
274  TrackThinningKeepElectronTracks = True
275  TrackThinningKeepPhotonTracks = True
276  TrackThinningKeepAllElectronTracks = True
277  TrackThinningKeepJetTracks = False
278  TrackThinningKeepMuonTracks = False
279  TrackThinningKeepTauTracks = False
280  TrackThinningKeepPVTracks = True
281 
282  # Tracks associated with Electrons
283  if TrackThinningKeepElectronTracks:
284  EGAM1ElectronTPThinningTool = (
285  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
286  name="EGAM1ElectronTPThinningTool",
287  StreamName=streamName,
288  SGKey="Electrons",
289  GSFTrackParticlesKey="GSFTrackParticles",
290  InDetTrackParticlesKey="InDetTrackParticles",
291  SelectionString="Electrons.pt > 0*GeV",
292  BestMatchOnly=True,
293  ConeSize=0.3,
294  )
295  )
296  acc.addPublicTool(EGAM1ElectronTPThinningTool)
297  thinningTools.append(EGAM1ElectronTPThinningTool)
298 
299  # Tracks associated with Electrons (all tracks, large cone, for track
300  # isolation studies of the selected electrons)
301  if TrackThinningKeepAllElectronTracks:
302  EGAM1ElectronTPThinningTool2 = (
303  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
304  name="EGAM1ElectronTPThinningTool2",
305  StreamName=streamName,
306  SGKey="Electrons",
307  GSFTrackParticlesKey="GSFTrackParticles",
308  InDetTrackParticlesKey="InDetTrackParticles",
309  SelectionString="Electrons.pt > 4*GeV",
310  BestMatchOnly=False,
311  ConeSize=0.6,
312  )
313  )
314  acc.addPublicTool(EGAM1ElectronTPThinningTool2)
315  thinningTools.append(EGAM1ElectronTPThinningTool2)
316 
317  # Tracks associated with Photons
318  if TrackThinningKeepPhotonTracks:
319  EGAM1PhotonTPThinningTool = (
320  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
321  name="EGAM1PhotonTPThinningTool",
322  StreamName=streamName,
323  SGKey="Photons",
324  GSFTrackParticlesKey="GSFTrackParticles",
325  InDetTrackParticlesKey="InDetTrackParticles",
326  GSFConversionVerticesKey="GSFConversionVertices",
327  SelectionString="Photons.pt > 0*GeV",
328  BestMatchOnly=True,
329  ConeSize=0.3,
330  )
331  )
332  acc.addPublicTool(EGAM1PhotonTPThinningTool)
333  thinningTools.append(EGAM1PhotonTPThinningTool)
334 
335  # Tracks associated with Jets
336  if TrackThinningKeepJetTracks:
337  EGAM1JetTPThinningTool = (
338  CompFactory.DerivationFramework.JetTrackParticleThinning(
339  name="EGAM1JetTPThinningTool",
340  StreamName=streamName,
341  JetKey="AntiKt4EMPFlowJets",
342  InDetTrackParticlesKey="InDetTrackParticles",
343  )
344  )
345  acc.addPublicTool(EGAM1JetTPThinningTool)
346  thinningTools.append(EGAM1JetTPThinningTool)
347 
348  # Tracks associated with Muons
349  if TrackThinningKeepMuonTracks:
350  EGAM1MuonTPThinningTool = acc.getPrimaryAndMerge(
352  flags,
353  name="EGAM1MuonTPThinningTool",
354  StreamName=streamName,
355  MuonKey="Muons",
356  InDetTrackParticlesKey="InDetTrackParticles",
357  )
358  )
359  thinningTools.append(EGAM1MuonTPThinningTool)
360 
361  # Tracks associated with Taus
362  if TrackThinningKeepTauTracks:
363  EGAM1TauTPThinningTool = acc.getPrimaryAndMerge(
365  flags,
366  name="EGAM1TauTPThinningTool",
367  StreamName=streamName,
368  TauKey="TauJets",
369  ConeSize=0.6,
370  InDetTrackParticlesKey="InDetTrackParticles",
371  DoTauTracksThinning=True,
372  TauTracksKey="TauTracks",
373  )
374  )
375  thinningTools.append(EGAM1TauTPThinningTool)
376 
377  # Tracks from primary vertex
378  thinning_expression = " && ".join(
379  [
380  "(InDetTrackParticles.DFCommonTightPrimary)",
381  "(abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta)<3*mm)",
382  "(InDetTrackParticles.pt>10*GeV)",
383  ]
384  )
385  if TrackThinningKeepPVTracks:
386  EGAM1TPThinningTool = acc.getPrimaryAndMerge(
388  flags,
389  name="EGAM1TPThinningTool",
390  StreamName=streamName,
391  SelectionString=thinning_expression,
392  InDetTrackParticlesKey="InDetTrackParticles",
393  )
394  )
395  thinningTools.append(EGAM1TPThinningTool)
396 
397  # keep topoclusters around electrons
398  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
399  CaloClusterThinningCfg,
400  )
401 
402  EGAM1CCTCThinningTool = acc.getPrimaryAndMerge(
404  flags,
405  name="EGAM1CCTCThinningTool",
406  StreamName=streamName,
407  SGKey="Electrons",
408  SelectionString="Electrons.pt>4*GeV",
409  TopoClCollectionSGKey="CaloCalTopoClusters",
410  ConeSize=0.5,
411  )
412  )
413  thinningTools.append(EGAM1CCTCThinningTool)
414 
415  # truth thinning
416  if flags.Input.isMC:
417  # W, Z and Higgs
418  truth_cond_WZH = " && ".join(
419  ["(abs(TruthParticles.pdgId) >= 23)", "(abs(TruthParticles.pdgId) <= 25)"]
420  )
421  # Leptons
422  truth_cond_lep = " && ".join(
423  ["(abs(TruthParticles.pdgId) >= 11)", "(abs(TruthParticles.pdgId) <= 16)"]
424  )
425  # Top quark
426  truth_cond_top = "(abs(TruthParticles.pdgId) == 6)"
427  # Photon
428  truth_cond_gam = " && ".join(
429  ["(abs(TruthParticles.pdgId) == 22)", "(TruthParticles.pt > 1*GeV)"]
430  )
431  # stable particles
432  truth_cond_finalState = " && ".join(
433  ["(TruthParticles.status == 1)", "(TruthParticles.barcode < 200000)"]
434  )
435  truth_expression = (
436  "( "
437  + truth_cond_WZH
438  + " ) || "
439  + "( "
440  + truth_cond_lep
441  + " ) || "
442  + "( "
443  + truth_cond_top
444  + " ) || "
445  + "( "
446  + truth_cond_gam
447  + " ) || "
448  + "( "
449  + truth_cond_finalState
450  + " )"
451  )
452  print("EGAM1 truth thinning expression: ", truth_expression)
453 
454  EGAM1TruthThinningTool = CompFactory.DerivationFramework.GenericTruthThinning(
455  name="EGAM1TruthThinningTool",
456  StreamName=streamName,
457  ParticleSelectionString=truth_expression,
458  PreserveDescendants=False,
459  PreserveGeneratorDescendants=True,
460  PreserveAncestors=True,
461  )
462  acc.addPublicTool(EGAM1TruthThinningTool)
463  thinningTools.append(EGAM1TruthThinningTool)
464 
465  # skimming
466  skimmingTool = acc.popToolsAndMerge(EGAM1SkimmingToolCfg(flags))
467  acc.addPublicTool(skimmingTool)
468 
469  # setup the kernel
470  acc.addEventAlgo(
471  CompFactory.DerivationFramework.DerivationKernel(
472  name,
473  SkimmingTools=[skimmingTool],
474  AugmentationTools=augmentationTools,
475  ThinningTools=thinningTools,
476  )
477  )
478 
479  return acc
480 
481 
482 def EGAM1Cfg(flags):
483  acc = ComponentAccumulator()
484 
485  # Get the lists of triggers needed for trigger matching.
486  # This is needed at this scope (for the slimming) and further down
487  # in the config chain for actually configuring the matching, so we create
488  # it here and pass it down
489  # TODO: this should ideally be called higher up to avoid it being run
490  # multiple times in a train
491 
492  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
493 
494  EGAM1TriggerListsHelper = TriggerListsHelper(flags)
495 
496  # configure skimming/thinning/augmentation tools
497  acc.merge(
499  flags,
500  name="EGAM1Kernel",
501  StreamName="StreamDAOD_EGAM1",
502  TriggerListsHelper=EGAM1TriggerListsHelper,
503  )
504  )
505 
506  # configure slimming
507  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
508  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
509  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
510 
511  EGAM1SlimmingHelper = SlimmingHelper(
512  "EGAM1SlimmingHelper",
513  NamesAndTypes=flags.Input.TypedCollections,
514  flags=flags,
515  )
516 
517  # ------------------------------------------
518  # containers for which we save all variables
519  # -------------------------------------------
520 
521  # baseline
522  EGAM1SlimmingHelper.AllVariables = [
523  "Electrons",
524  "GSFTrackParticles",
525  "egammaClusters",
526  "CaloCalTopoClusters",
527  ]
528 
529  # for trigger studies we also add trigger containers
530  MenuType = None
531  if flags.Trigger.EDMVersion == 2:
532  MenuType = "Run2"
533  elif flags.Trigger.EDMVersion == 3:
534  MenuType = "Run3"
535  else:
536  MenuType = ""
537  EGAM1SlimmingHelper.AllVariables += ExtraContainersTrigger[MenuType]
538  EGAM1SlimmingHelper.AllVariables += ExtraContainersElectronTrigger[MenuType]
539 
540  # and on MC we also add:
541  if flags.Input.isMC:
542  EGAM1SlimmingHelper.AllVariables += [
543  "TruthEvents",
544  "TruthParticles",
545  "TruthVertices",
546  "egammaTruthParticles",
547  ]
548 
549  # -------------------------------------------
550  # containers that we slim
551  # -------------------------------------------
552 
553  # first add variables from smart-slimming
554  # adding only also those for which we add all variables since
555  # the XXXCPContent.py files also bring in some extra variables
556  # for other collections
557  EGAM1SlimmingHelper.SmartCollections = [
558  "Electrons",
559  "Photons",
560  "Muons",
561  "TauJets",
562  "PrimaryVertices",
563  "InDetTrackParticles",
564  "AntiKt4EMPFlowJets",
565  "BTagging_AntiKt4EMPFlow",
566  "MET_Baseline_AntiKt4EMPFlow",
567  ]
568  if flags.Input.isMC:
569  EGAM1SlimmingHelper.SmartCollections += [
570  "AntiKt4TruthJets",
571  "AntiKt4TruthDressedWZJets",
572  ]
573 
574  # then add extra variables:
575 
576  # muons
577  EGAM1SlimmingHelper.ExtraVariables += [
578  "Muons.ptcone20.ptcone30.ptcone40.etcone20.etcone30.etcone40"
579  ]
580 
581  # conversion vertices
582  EGAM1SlimmingHelper.ExtraVariables += [
583  "GSFConversionVertices.x.y.z.px.py.pz.pt1.pt2.etaAtCalo.phiAtCalo",
584  "GSFConversionVertices.trackParticleLinks",
585  ]
586 
587  # primary vertices
588  EGAM1SlimmingHelper.ExtraVariables += ["PrimaryVertices.sumPt2"]
589 
590  # track jets
591  EGAM1SlimmingHelper.ExtraVariables += [
592  "AntiKt4PV0TrackJets.pt.eta.phi.e.m.btaggingLink.constituentLinks"
593  ]
594 
595  # energy density
596  EGAM1SlimmingHelper.ExtraVariables += [
597  "TopoClusterIsoCentralEventShape.Density",
598  "TopoClusterIsoForwardEventShape.Density",
599  "NeutralParticleFlowIsoCentralEventShape.Density",
600  "NeutralParticleFlowIsoForwardEventShape.Density",
601  ]
602 
603  from DerivationFrameworkEGamma import EGammaIsoConfig
604 
605  (
606  pflowIsoVar,
607  densityList,
608  densityDict,
609  acc1,
610  ) = EGammaIsoConfig.makeEGammaCommonIsoCfg(flags)
611  acc.merge(acc1)
612  EGAM1SlimmingHelper.AppendToDictionary.update(densityDict)
613  EGAM1SlimmingHelper.ExtraVariables += densityList
614 
615  # photons: detailed shower shape variables
616  EGAM1SlimmingHelper.ExtraVariables += PhotonsCPDetailedContent
617 
618  # photons: gain and cluster energy per layer
619  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
620  getGainDecorations,
621  getClusterEnergyPerLayerDecorations,
622  )
623 
624  gainDecorations = getGainDecorations(acc, flags, "EGAM1Kernel")
625  print("EGAM1 gain decorations: ", gainDecorations)
626  EGAM1SlimmingHelper.ExtraVariables.extend(gainDecorations)
627  clusterEnergyDecorations = getClusterEnergyPerLayerDecorations(acc, "EGAM1Kernel")
628  print("EGAM1 cluster energy decorations: ", clusterEnergyDecorations)
629  EGAM1SlimmingHelper.ExtraVariables.extend(clusterEnergyDecorations)
630 
631  # truth
632  if flags.Input.isMC:
633  EGAM1SlimmingHelper.ExtraVariables += [
634  "MuonTruthParticles.e.px.py.pz.status.pdgId.truthOrigin.truthType"
635  ]
636 
637  EGAM1SlimmingHelper.ExtraVariables += [
638  "Photons.truthOrigin.truthType.truthParticleLink"
639  ]
640 
641  # Add event info
642  if flags.Derivation.Egamma.doEventInfoSlimming:
643  EGAM1SlimmingHelper.SmartCollections.append("EventInfo")
644  else:
645  EGAM1SlimmingHelper.AllVariables += ["EventInfo"]
646 
647  # Add egamma trigger objects
648  EGAM1SlimmingHelper.IncludeEGammaTriggerContent = True
649 
650  # Add trigger matching info
651  # Run 2
652  if flags.Trigger.EDMVersion == 2:
653  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import (
654  AddRun2TriggerMatchingToSlimmingHelper,
655  )
656 
658  SlimmingHelper=EGAM1SlimmingHelper,
659  OutputContainerPrefix="TrigMatch_",
660  TriggerList=EGAM1TriggerListsHelper.Run2TriggerNamesNoTau,
661  )
662  # Run 3
663  if flags.Trigger.EDMVersion == 3:
664  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import (
665  AddRun3TrigNavSlimmingCollectionsToSlimmingHelper,
666  )
667 
669  # Run 2 is added here temporarily to allow testing/comparison/debugging
670  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import (
671  AddRun2TriggerMatchingToSlimmingHelper,
672  )
673 
675  SlimmingHelper=EGAM1SlimmingHelper,
676  OutputContainerPrefix="TrigMatch_",
677  TriggerList=EGAM1TriggerListsHelper.Run3TriggerNamesNoTau,
678  )
679 
680  # Add full CellContainer
681  EGAM1SlimmingHelper.StaticContent = [
682  "CaloCellContainer#AllCalo",
683  "CaloClusterCellLinkContainer#egammaClusters_links",
684  ]
685 
686  EGAM1ItemList = EGAM1SlimmingHelper.GetItemList()
687  acc.merge(
689  flags,
690  "DAOD_EGAM1",
691  ItemList=EGAM1ItemList,
692  AcceptAlgs=["EGAM1Kernel"],
693  )
694  )
695  acc.merge(
697  flags,
698  "DAOD_EGAM1",
699  AcceptAlgs=["EGAM1Kernel"],
700  createMetadata=[
701  MetadataCategory.CutFlowMetaData,
702  MetadataCategory.TruthMetaData,
703  ],
704  )
705  )
706 
707  return acc
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:97
SystemOfUnits
DerivationFrameworkCaloConfig.CaloClusterThinningCfg
def CaloClusterThinningCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:99
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.EGAM1.EGAM1ZegMassToolCfg
def EGAM1ZegMassToolCfg(flags)
Definition: EGAM1.py:165
python.EGAM1.EGAM1KernelCfg
def EGAM1KernelCfg(flags, name="EGAM1Kernel", **kwargs)
Definition: EGAM1.py:209
python.InDetToolsConfig.TrackParticleThinningCfg
def TrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:424
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:30
python.EGAM1.EGAM1Cfg
def EGAM1Cfg(flags)
Definition: EGAM1.py:482
python.JetRecConfig.JetRecCfg
def JetRecCfg(flags, jetdef, returnConfiguredDef=False)
Top level functions returning ComponentAccumulator out of JetDefinition.
Definition: JetRecConfig.py:37
python.EGAM1.EGAM1ZeeMassTool3Cfg
def EGAM1ZeeMassTool3Cfg(flags)
Definition: EGAM1.py:125
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:494
python.InDetToolsConfig.TauTrackParticleThinningCfg
def TauTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:505
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.EGAM1.EGAM1SkimmingToolCfg
def EGAM1SkimmingToolCfg(flags)
Definition: EGAM1.py:25
python.EGAM1.EGAM1ZeeMassTool2Cfg
def EGAM1ZeeMassTool2Cfg(flags)
Definition: EGAM1.py:89
DerivationFrameworkCaloConfig.CaloDecoratorKernelCfg
def CaloDecoratorKernelCfg(flags, name="CaloDecoratorKernel", **kwargs)
Definition: DerivationFrameworkCaloConfig.py:77
DerivationFrameworkCaloConfig.getClusterEnergyPerLayerDecorations
def getClusterEnergyPerLayerDecorations(acc, kernel)
Definition: DerivationFrameworkCaloConfig.py:154
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
DerivationFrameworkCaloConfig.getGainDecorations
def getGainDecorations(acc, flags, kernel, collections=None, info=["E", "nCells"])
Definition: DerivationFrameworkCaloConfig.py:122
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:216
SlimmingHelper
Definition: SlimmingHelper.py:1
python.EGAM1.EGAM1ZeeMassTool1Cfg
def EGAM1ZeeMassTool1Cfg(flags)
Definition: EGAM1.py:48