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 
218  jetList = [AntiKt4PV0Track]
219  for jd in jetList:
220  acc.merge(JetRecCfg(flags, jd))
221 
222  # Common augmentations
223  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
224 
225  acc.merge(
227  flags, TriggerListsHelper=kwargs["TriggerListsHelper"]
228  )
229  )
230 
231  # EGAM1 augmentations
232  augmentationTools = []
233 
234  # ====================================================================
235  # ee and egamma invariant masses
236  # ====================================================================
237  EGAM1ZeeMassTool1 = acc.popToolsAndMerge(EGAM1ZeeMassTool1Cfg(flags))
238  acc.addPublicTool(EGAM1ZeeMassTool1)
239  augmentationTools.append(EGAM1ZeeMassTool1)
240 
241  EGAM1ZeeMassTool2 = acc.popToolsAndMerge(EGAM1ZeeMassTool2Cfg(flags))
242  acc.addPublicTool(EGAM1ZeeMassTool2)
243  augmentationTools.append(EGAM1ZeeMassTool2)
244 
245  EGAM1ZeeMassTool3 = acc.popToolsAndMerge(EGAM1ZeeMassTool3Cfg(flags))
246  acc.addPublicTool(EGAM1ZeeMassTool3)
247  augmentationTools.append(EGAM1ZeeMassTool3)
248 
249  EGAM1ZegMassTool = acc.popToolsAndMerge(EGAM1ZegMassToolCfg(flags))
250  acc.addPublicTool(EGAM1ZegMassTool)
251  augmentationTools.append(EGAM1ZegMassTool)
252 
253  # ====================================================================
254  # Common calo decoration tools
255  # ====================================================================
256  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
257  CaloDecoratorKernelCfg)
258  acc.merge(CaloDecoratorKernelCfg(flags))
259 
260  # thinning tools
261  thinningTools = []
262  streamName = kwargs["StreamName"]
263 
264  # Track thinning
265  if flags.Derivation.Egamma.doTrackThinning:
266  from DerivationFrameworkInDet.InDetToolsConfig import (
267  TrackParticleThinningCfg,
268  MuonTrackParticleThinningCfg,
269  TauTrackParticleThinningCfg,
270  )
271 
272  TrackThinningKeepElectronTracks = True
273  TrackThinningKeepPhotonTracks = True
274  TrackThinningKeepAllElectronTracks = True
275  TrackThinningKeepJetTracks = False
276  TrackThinningKeepMuonTracks = False
277  TrackThinningKeepTauTracks = False
278  TrackThinningKeepPVTracks = True
279 
280  # Tracks associated with Electrons
281  if TrackThinningKeepElectronTracks:
282  EGAM1ElectronTPThinningTool = (
283  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
284  name="EGAM1ElectronTPThinningTool",
285  StreamName=streamName,
286  SGKey="Electrons",
287  GSFTrackParticlesKey="GSFTrackParticles",
288  InDetTrackParticlesKey="InDetTrackParticles",
289  SelectionString="Electrons.pt > 0*GeV",
290  BestMatchOnly=True,
291  ConeSize=0.3,
292  )
293  )
294  acc.addPublicTool(EGAM1ElectronTPThinningTool)
295  thinningTools.append(EGAM1ElectronTPThinningTool)
296 
297  # Tracks associated with Electrons (all tracks, large cone, for track
298  # isolation studies of the selected electrons)
299  if TrackThinningKeepAllElectronTracks:
300  EGAM1ElectronTPThinningTool2 = (
301  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
302  name="EGAM1ElectronTPThinningTool2",
303  StreamName=streamName,
304  SGKey="Electrons",
305  GSFTrackParticlesKey="GSFTrackParticles",
306  InDetTrackParticlesKey="InDetTrackParticles",
307  SelectionString="Electrons.pt > 4*GeV",
308  BestMatchOnly=False,
309  ConeSize=0.6,
310  )
311  )
312  acc.addPublicTool(EGAM1ElectronTPThinningTool2)
313  thinningTools.append(EGAM1ElectronTPThinningTool2)
314 
315  # Tracks associated with Photons
316  if TrackThinningKeepPhotonTracks:
317  EGAM1PhotonTPThinningTool = (
318  CompFactory.DerivationFramework.EgammaTrackParticleThinning(
319  name="EGAM1PhotonTPThinningTool",
320  StreamName=streamName,
321  SGKey="Photons",
322  GSFTrackParticlesKey="GSFTrackParticles",
323  InDetTrackParticlesKey="InDetTrackParticles",
324  GSFConversionVerticesKey="GSFConversionVertices",
325  SelectionString="Photons.pt > 0*GeV",
326  BestMatchOnly=True,
327  ConeSize=0.3,
328  )
329  )
330  acc.addPublicTool(EGAM1PhotonTPThinningTool)
331  thinningTools.append(EGAM1PhotonTPThinningTool)
332 
333  # Tracks associated with Jets
334  if TrackThinningKeepJetTracks:
335  EGAM1JetTPThinningTool = (
336  CompFactory.DerivationFramework.JetTrackParticleThinning(
337  name="EGAM1JetTPThinningTool",
338  StreamName=streamName,
339  JetKey="AntiKt4EMPFlowJets",
340  InDetTrackParticlesKey="InDetTrackParticles",
341  )
342  )
343  acc.addPublicTool(EGAM1JetTPThinningTool)
344  thinningTools.append(EGAM1JetTPThinningTool)
345 
346  # Tracks associated with Muons
347  if TrackThinningKeepMuonTracks:
348  EGAM1MuonTPThinningTool = acc.getPrimaryAndMerge(
350  flags,
351  name="EGAM1MuonTPThinningTool",
352  StreamName=streamName,
353  MuonKey="Muons",
354  InDetTrackParticlesKey="InDetTrackParticles",
355  )
356  )
357  thinningTools.append(EGAM1MuonTPThinningTool)
358 
359  # Tracks associated with Taus
360  if TrackThinningKeepTauTracks:
361  EGAM1TauTPThinningTool = acc.getPrimaryAndMerge(
363  flags,
364  name="EGAM1TauTPThinningTool",
365  StreamName=streamName,
366  TauKey="TauJets",
367  ConeSize=0.6,
368  InDetTrackParticlesKey="InDetTrackParticles",
369  DoTauTracksThinning=True,
370  TauTracksKey="TauTracks",
371  )
372  )
373  thinningTools.append(EGAM1TauTPThinningTool)
374 
375  # Tracks from primary vertex
376  thinning_expression = " && ".join(
377  [
378  "(InDetTrackParticles.DFCommonTightPrimary)",
379  "(abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta)<3*mm)",
380  "(InDetTrackParticles.pt>10*GeV)",
381  ]
382  )
383  if TrackThinningKeepPVTracks:
384  EGAM1TPThinningTool = acc.getPrimaryAndMerge(
386  flags,
387  name="EGAM1TPThinningTool",
388  StreamName=streamName,
389  SelectionString=thinning_expression,
390  InDetTrackParticlesKey="InDetTrackParticles",
391  )
392  )
393  thinningTools.append(EGAM1TPThinningTool)
394 
395  # keep topoclusters around electrons
396  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
397  CaloClusterThinningCfg,
398  )
399 
400  EGAM1CCTCThinningTool = acc.getPrimaryAndMerge(
402  flags,
403  name="EGAM1CCTCThinningTool",
404  StreamName=streamName,
405  SGKey="Electrons",
406  SelectionString="Electrons.pt>4*GeV",
407  TopoClCollectionSGKey="CaloCalTopoClusters",
408  ConeSize=0.5,
409  )
410  )
411  thinningTools.append(EGAM1CCTCThinningTool)
412 
413  # truth thinning
414  if flags.Input.isMC:
415  # W, Z and Higgs
416  truth_cond_WZH = " && ".join(
417  ["(abs(TruthParticles.pdgId) >= 23)", "(abs(TruthParticles.pdgId) <= 25)"]
418  )
419  # Leptons
420  truth_cond_lep = " && ".join(
421  ["(abs(TruthParticles.pdgId) >= 11)", "(abs(TruthParticles.pdgId) <= 16)"]
422  )
423  # Top quark
424  truth_cond_top = "(abs(TruthParticles.pdgId) == 6)"
425  # Photon
426  truth_cond_gam = " && ".join(
427  ["(abs(TruthParticles.pdgId) == 22)", "(TruthParticles.pt > 1*GeV)"]
428  )
429  # stable particles
430  truth_cond_finalState = " && ".join(
431  ["(TruthParticles.status == 1)", "(TruthParticles.barcode < 200000)"]
432  )
433  truth_expression = (
434  "( "
435  + truth_cond_WZH
436  + " ) || "
437  + "( "
438  + truth_cond_lep
439  + " ) || "
440  + "( "
441  + truth_cond_top
442  + " ) || "
443  + "( "
444  + truth_cond_gam
445  + " ) || "
446  + "( "
447  + truth_cond_finalState
448  + " )"
449  )
450  print("EGAM1 truth thinning expression: ", truth_expression)
451 
452  EGAM1TruthThinningTool = CompFactory.DerivationFramework.GenericTruthThinning(
453  name="EGAM1TruthThinningTool",
454  StreamName=streamName,
455  ParticleSelectionString=truth_expression,
456  PreserveDescendants=False,
457  PreserveGeneratorDescendants=True,
458  PreserveAncestors=True,
459  )
460  acc.addPublicTool(EGAM1TruthThinningTool)
461  thinningTools.append(EGAM1TruthThinningTool)
462 
463  # skimming
464  skimmingTool = acc.popToolsAndMerge(EGAM1SkimmingToolCfg(flags))
465  acc.addPublicTool(skimmingTool)
466 
467  # setup the kernel
468  acc.addEventAlgo(
469  CompFactory.DerivationFramework.DerivationKernel(
470  name,
471  SkimmingTools=[skimmingTool],
472  AugmentationTools=augmentationTools,
473  ThinningTools=thinningTools,
474  )
475  )
476 
477  return acc
478 
479 
480 def EGAM1Cfg(flags):
481  acc = ComponentAccumulator()
482 
483  # Get the lists of triggers needed for trigger matching.
484  # This is needed at this scope (for the slimming) and further down
485  # in the config chain for actually configuring the matching, so we create
486  # it here and pass it down
487  # TODO: this should ideally be called higher up to avoid it being run
488  # multiple times in a train
489 
490  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
491 
492  EGAM1TriggerListsHelper = TriggerListsHelper(flags)
493 
494  # configure skimming/thinning/augmentation tools
495  acc.merge(
497  flags,
498  name="EGAM1Kernel",
499  StreamName="StreamDAOD_EGAM1",
500  TriggerListsHelper=EGAM1TriggerListsHelper,
501  )
502  )
503 
504  # configure slimming
505  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
506  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
507  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
508 
509  EGAM1SlimmingHelper = SlimmingHelper(
510  "EGAM1SlimmingHelper",
511  NamesAndTypes=flags.Input.TypedCollections,
512  flags=flags,
513  )
514 
515  # ------------------------------------------
516  # containers for which we save all variables
517  # -------------------------------------------
518 
519  # baseline
520  EGAM1SlimmingHelper.AllVariables = [
521  "Electrons",
522  "GSFTrackParticles",
523  "egammaClusters",
524  "CaloCalTopoClusters",
525  ]
526 
527  # for trigger studies we also add trigger containers
528  MenuType = None
529  if flags.Trigger.EDMVersion == 2:
530  MenuType = "Run2"
531  elif flags.Trigger.EDMVersion == 3:
532  MenuType = "Run3"
533  else:
534  MenuType = ""
535  EGAM1SlimmingHelper.AllVariables += ExtraContainersTrigger[MenuType]
536  EGAM1SlimmingHelper.AllVariables += ExtraContainersElectronTrigger[MenuType]
537 
538  # and on MC we also add:
539  if flags.Input.isMC:
540  EGAM1SlimmingHelper.AllVariables += [
541  "TruthEvents",
542  "TruthParticles",
543  "TruthVertices",
544  "egammaTruthParticles",
545  ]
546 
547  # -------------------------------------------
548  # containers that we slim
549  # -------------------------------------------
550 
551  # first add variables from smart-slimming
552  # adding only also those for which we add all variables since
553  # the XXXCPContent.py files also bring in some extra variables
554  # for other collections
555  EGAM1SlimmingHelper.SmartCollections = [
556  "Electrons",
557  "Photons",
558  "Muons",
559  "TauJets",
560  "PrimaryVertices",
561  "InDetTrackParticles",
562  "AntiKt4EMPFlowJets",
563  "BTagging_AntiKt4EMPFlow",
564  "MET_Baseline_AntiKt4EMPFlow",
565  ]
566  if flags.Input.isMC:
567  EGAM1SlimmingHelper.SmartCollections += [
568  "AntiKt4TruthJets",
569  "AntiKt4TruthDressedWZJets",
570  ]
571 
572  # then add extra variables:
573 
574  # muons
575  EGAM1SlimmingHelper.ExtraVariables += [
576  "Muons.ptcone20.ptcone30.ptcone40.etcone20.etcone30.etcone40"
577  ]
578 
579  # conversion vertices
580  EGAM1SlimmingHelper.ExtraVariables += [
581  "GSFConversionVertices.x.y.z.px.py.pz.pt1.pt2.etaAtCalo.phiAtCalo",
582  "GSFConversionVertices.trackParticleLinks",
583  ]
584 
585  # primary vertices
586  EGAM1SlimmingHelper.ExtraVariables += ["PrimaryVertices.sumPt2"]
587 
588  # track jets
589  EGAM1SlimmingHelper.ExtraVariables += [
590  "AntiKt4PV0TrackJets.pt.eta.phi.e.m.btaggingLink.constituentLinks"
591  ]
592 
593  # energy density
594  EGAM1SlimmingHelper.ExtraVariables += [
595  "TopoClusterIsoCentralEventShape.Density",
596  "TopoClusterIsoForwardEventShape.Density",
597  "NeutralParticleFlowIsoCentralEventShape.Density",
598  "NeutralParticleFlowIsoForwardEventShape.Density",
599  ]
600 
601  from DerivationFrameworkEGamma import EGammaIsoConfig
602 
603  (
604  pflowIsoVar,
605  densityList,
606  densityDict,
607  acc1,
608  ) = EGammaIsoConfig.makeEGammaCommonIsoCfg(flags)
609  acc.merge(acc1)
610  EGAM1SlimmingHelper.AppendToDictionary.update(densityDict)
611  EGAM1SlimmingHelper.ExtraVariables += densityList
612 
613  # photons: detailed shower shape variables
614  EGAM1SlimmingHelper.ExtraVariables += PhotonsCPDetailedContent
615 
616  # photons: gain and cluster energy per layer
617  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
618  getGainDecorations,
619  getClusterEnergyPerLayerDecorations,
620  )
621 
622  gainDecorations = getGainDecorations(acc, flags, "EGAM1Kernel")
623  print("EGAM1 gain decorations: ", gainDecorations)
624  EGAM1SlimmingHelper.ExtraVariables.extend(gainDecorations)
625  clusterEnergyDecorations = getClusterEnergyPerLayerDecorations(acc, "EGAM1Kernel")
626  print("EGAM1 cluster energy decorations: ", clusterEnergyDecorations)
627  EGAM1SlimmingHelper.ExtraVariables.extend(clusterEnergyDecorations)
628 
629  # truth
630  if flags.Input.isMC:
631  EGAM1SlimmingHelper.ExtraVariables += [
632  "MuonTruthParticles.e.px.py.pz.status.pdgId.truthOrigin.truthType"
633  ]
634 
635  EGAM1SlimmingHelper.ExtraVariables += [
636  "Photons.truthOrigin.truthType.truthParticleLink"
637  ]
638 
639  # Add event info
640  if flags.Derivation.Egamma.doEventInfoSlimming:
641  EGAM1SlimmingHelper.SmartCollections.append("EventInfo")
642  else:
643  EGAM1SlimmingHelper.AllVariables += ["EventInfo"]
644 
645  # Add egamma trigger objects
646  EGAM1SlimmingHelper.IncludeEGammaTriggerContent = True
647 
648  # Trigger matching
649  # Run 2
650  if flags.Trigger.EDMVersion == 2:
651  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
652  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = EGAM1SlimmingHelper,
653  OutputContainerPrefix = "TrigMatch_",
654  TriggerList = EGAM1TriggerListsHelper.Run2TriggerNamesNoTau)
655  # Run 3, or Run 2 with navigation conversion
656  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
657  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
659 
660  # Add full CellContainer
661  EGAM1SlimmingHelper.StaticContent = [
662  "CaloCellContainer#AllCalo",
663  "CaloClusterCellLinkContainer#egammaClusters_links",
664  ]
665 
666  EGAM1ItemList = EGAM1SlimmingHelper.GetItemList()
667  acc.merge(
669  flags,
670  "DAOD_EGAM1",
671  ItemList=EGAM1ItemList,
672  AcceptAlgs=["EGAM1Kernel"],
673  )
674  )
675  acc.merge(
677  flags,
678  "DAOD_EGAM1",
679  AcceptAlgs=["EGAM1Kernel"],
680  createMetadata=[
681  MetadataCategory.CutFlowMetaData,
682  MetadataCategory.TruthMetaData,
683  ],
684  )
685  )
686 
687  return acc
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
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:458
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
python.EGAM1.EGAM1Cfg
def EGAM1Cfg(flags)
Definition: EGAM1.py:480
python.JetRecConfig.JetRecCfg
def JetRecCfg(flags, jetdef, returnConfiguredDef=False)
Top level functions returning ComponentAccumulator out of JetDefinition.
Definition: JetRecConfig.py:36
python.EGAM1.EGAM1ZeeMassTool3Cfg
def EGAM1ZeeMassTool3Cfg(flags)
Definition: EGAM1.py:125
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.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: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
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
python.EGAM1.EGAM1ZeeMassTool1Cfg
def EGAM1ZeeMassTool1Cfg(flags)
Definition: EGAM1.py:48