ATLAS Offline Software
Loading...
Searching...
No Matches
python.EGAM1 Namespace Reference

Functions

 EGAM1SkimmingToolCfg (flags)
 EGAM1ZeeMassTool1Cfg (flags)
 EGAM1ZeeMassTool2Cfg (flags)
 EGAM1ZeeMassTool3Cfg (flags)
 EGAM1ZegMassToolCfg (flags)
 EGAM1KernelCfg (flags, name="EGAM1Kernel", **kwargs)
 EGAM1Cfg (flags)

Function Documentation

◆ EGAM1Cfg()

EGAM1Cfg ( flags)

Definition at line 468 of file EGAM1.py.

468def EGAM1Cfg(flags):
469 acc = ComponentAccumulator()
470
471 # Get the lists of triggers needed for trigger matching.
472 # This is needed at this scope (for the slimming) and further down
473 # in the config chain for actually configuring the matching, so we create
474 # it here and pass it down
475 # TODO: this should ideally be called higher up to avoid it being run
476 # multiple times in a train
477
478 from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
479 EGAM1TriggerListsHelper = TriggerListsHelper(flags)
480
481 # configure skimming/thinning/augmentation tools
482 acc.merge(
483 EGAM1KernelCfg(
484 flags,
485 name="EGAM1Kernel",
486 StreamName="StreamDAOD_EGAM1",
487 TriggerListsHelper=EGAM1TriggerListsHelper,
488 )
489 )
490
491 # configure slimming
492 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
493 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
494 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
495
496 EGAM1SlimmingHelper = SlimmingHelper(
497 "EGAM1SlimmingHelper",
498 NamesAndTypes=flags.Input.TypedCollections,
499 flags=flags,
500 )
501
502 # ------------------------------------------
503 # containers for which we save all variables
504 # -------------------------------------------
505
506 # baseline
507 EGAM1SlimmingHelper.AllVariables = [
508 "Electrons",
509 "GSFTrackParticles",
510 "egammaClusters",
511 "CaloCalTopoClusters",
512 ]
513
514 # for trigger studies we also add trigger containers
515 MenuType = ""
516 if flags.Trigger.EDMVersion == 2:
517 MenuType = "Run2"
518 elif flags.Trigger.EDMVersion == 3:
519 MenuType = "Run3"
520 if MenuType:
521 EGAM1SlimmingHelper.AllVariables += ExtraContainersTrigger[MenuType]
522 EGAM1SlimmingHelper.AllVariables += ExtraContainersElectronTrigger[MenuType]
523
524 # and on MC we also add:
525 if flags.Input.isMC:
526 EGAM1SlimmingHelper.AllVariables += [
527 "TruthEvents",
528 "TruthParticles",
529 "TruthVertices",
530 "egammaTruthParticles",
531 ]
532
533 # -------------------------------------------
534 # containers that we slim
535 # -------------------------------------------
536
537 # first add variables from smart-slimming
538 # adding only also those for which we add all variables since
539 # the XXXCPContent.py files also bring in some extra variables
540 # for other collections
541 EGAM1SlimmingHelper.SmartCollections = [
542 "Electrons",
543 "Photons",
544 "Muons",
545 "TauJets",
546 "PrimaryVertices",
547 "InDetTrackParticles",
548 "AntiKt4EMPFlowJets",
549
550 "MET_Baseline_AntiKt4EMPFlow",
551 ]
552 if flags.Input.isMC:
553 EGAM1SlimmingHelper.SmartCollections += [
554 "AntiKt4TruthJets",
555 "AntiKt4TruthDressedWZJets",
556 ]
557
558 # then add extra variables:
559
560 # muons
561 EGAM1SlimmingHelper.ExtraVariables += [
562 "Muons.ptcone20.ptcone30.ptcone40.etcone20.etcone30.etcone40"
563 ]
564
565 # conversion vertices
566 EGAM1SlimmingHelper.ExtraVariables += [
567 "GSFConversionVertices.x.y.z.px.py.pz.pt1.pt2.etaAtCalo.phiAtCalo",
568 "GSFConversionVertices.trackParticleLinks",
569 ]
570
571 # primary vertices
572 EGAM1SlimmingHelper.ExtraVariables += ["PrimaryVertices.sumPt2"]
573
574 # track jets
575 EGAM1SlimmingHelper.ExtraVariables += [
576 "AntiKt4PV0TrackJets.pt.eta.phi.e.m.btaggingLink.constituentLinks"
577 ]
578
579 # energy density
580 EGAM1SlimmingHelper.ExtraVariables += [
581 "TopoClusterIsoCentralEventShape.Density",
582 "TopoClusterIsoForwardEventShape.Density",
583 "NeutralParticleFlowIsoCentralEventShape.Density",
584 "NeutralParticleFlowIsoForwardEventShape.Density",
585 ]
586
587 from DerivationFrameworkEGamma import EGammaIsoConfig
588
589 (
590 pflowIsoVar,
591 densityList,
592 densityDict,
593 acc1,
594 ) = EGammaIsoConfig.makeEGammaCommonIsoCfg(flags)
595 acc.merge(acc1)
596 EGAM1SlimmingHelper.AppendToDictionary.update(densityDict)
597 EGAM1SlimmingHelper.ExtraVariables += densityList
598
599 # photons: detailed shower shape variables
600 EGAM1SlimmingHelper.ExtraVariables += PhotonsCPDetailedContent
601
602 # photons: gain and cluster energy per layer
603 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
604 getGainDecorations,
605 getClusterEnergyPerLayerDecorations,
606 )
607
608 gainDecorations = getGainDecorations(acc, flags, "EGAM1Kernel")
609 print("EGAM1 gain decorations: ", gainDecorations)
610 EGAM1SlimmingHelper.ExtraVariables.extend(gainDecorations)
611 clusterEnergyDecorations = getClusterEnergyPerLayerDecorations(acc, "EGAM1Kernel")
612 print("EGAM1 cluster energy decorations: ", clusterEnergyDecorations)
613 EGAM1SlimmingHelper.ExtraVariables.extend(clusterEnergyDecorations)
614
615 # truth
616 if flags.Input.isMC:
617 EGAM1SlimmingHelper.ExtraVariables += [
618 "MuonTruthParticles.e.px.py.pz.status.pdgId.truthClassification.truthOrigin.truthType"
619 ]
620
621 EGAM1SlimmingHelper.ExtraVariables += [
622 "Photons.truthClassification.truthOrigin.truthType.truthParticleLink"
623 ]
624
625 # Add event info
626 if flags.Derivation.Egamma.doEventInfoSlimming:
627 EGAM1SlimmingHelper.SmartCollections.append("EventInfo")
628 else:
629 EGAM1SlimmingHelper.AllVariables += ["EventInfo"]
630
631 # Add egamma trigger objects
632 EGAM1SlimmingHelper.IncludeEGammaTriggerContent = True
633
634 # Trigger matching
635 # Run 2
636 if flags.Trigger.EDMVersion == 2:
637 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
638 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = EGAM1SlimmingHelper,
639 OutputContainerPrefix = "TrigMatch_",
640 TriggerList = EGAM1TriggerListsHelper.Run2TriggerNamesNoTau)
641 # Run 3, or Run 2 with navigation conversion
642 if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
643 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
644 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(EGAM1SlimmingHelper)
645
646 # Add full CellContainer
647 EGAM1SlimmingHelper.StaticContent = [
648 "CaloCellContainer#AllCalo",
649 "CaloClusterCellLinkContainer#egammaClusters_links",
650 ]
651
652 # PLIT variables
653 if flags.Derivation.Egamma.addPLITInputs:
654 from LeptonTaggers.LeptonTaggersConfig import DecorateImprovedPromptLeptonAlgsCfg, GetExtraImprovedPromptVariablesForDxAOD
655 acc.merge(DecorateImprovedPromptLeptonAlgsCfg(flags))
656 EGAM1SlimmingHelper.ExtraVariables += [ item for item in GetExtraImprovedPromptVariablesForDxAOD() if item.startswith("Electrons")]
657 if flags.Derivation.Egamma.addPLITOutputs:
658 from LeptonTaggers.LeptonTaggersConfig import DecoratePLITAlgsCfg, GetExtraPLITVariablesForDxAOD
659 acc.merge(DecoratePLITAlgsCfg(flags))
660 EGAM1SlimmingHelper.ExtraVariables += [ item for item in GetExtraPLITVariablesForDxAOD() if item.startswith("Electrons")]
661
662 EGAM1ItemList = EGAM1SlimmingHelper.GetItemList()
663 acc.merge(
664 OutputStreamCfg(
665 flags,
666 "DAOD_EGAM1",
667 ItemList=EGAM1ItemList,
668 AcceptAlgs=["EGAM1Kernel"],
669 )
670 )
671 acc.merge(
672 SetupMetaDataForStreamCfg(
673 flags,
674 "DAOD_EGAM1",
675 AcceptAlgs=["EGAM1Kernel"],
676 createMetadata=[
677 MetadataCategory.CutFlowMetaData,
678 MetadataCategory.TruthMetaData,
679 ],
680 )
681 )
682
683 return acc
void print(char *figname, TCanvas *c1)

◆ EGAM1KernelCfg()

EGAM1KernelCfg ( flags,
name = "EGAM1Kernel",
** kwargs )
Configure the derivation framework driving algorithm (kernel)
for EGAM1

Definition at line 204 of file EGAM1.py.

204def EGAM1KernelCfg(flags, name="EGAM1Kernel", **kwargs):
205 """Configure the derivation framework driving algorithm (kernel)
206 for EGAM1"""
207 acc = ComponentAccumulator()
208
209 # Schedule extra jets collections
210 from JetRecConfig.StandardSmallRJets import AntiKt4PV0Track
211 from JetRecConfig.JetRecConfig import JetRecCfg
212
213 jetList = [AntiKt4PV0Track]
214 for jd in jetList:
215 acc.merge(JetRecCfg(flags, jd))
216
217 # Common augmentations
218 from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
219
220 acc.merge(
221 PhysCommonAugmentationsCfg(
222 flags, TriggerListsHelper=kwargs["TriggerListsHelper"]
223 )
224 )
225
226 # EGAM1 augmentations
227 augmentationTools = []
228
229 # ====================================================================
230 # ee and egamma invariant masses
231 # ====================================================================
232 EGAM1ZeeMassTool1 = acc.popToolsAndMerge(EGAM1ZeeMassTool1Cfg(flags))
233 acc.addPublicTool(EGAM1ZeeMassTool1)
234 augmentationTools.append(EGAM1ZeeMassTool1)
235
236 EGAM1ZeeMassTool2 = acc.popToolsAndMerge(EGAM1ZeeMassTool2Cfg(flags))
237 acc.addPublicTool(EGAM1ZeeMassTool2)
238 augmentationTools.append(EGAM1ZeeMassTool2)
239
240 EGAM1ZeeMassTool3 = acc.popToolsAndMerge(EGAM1ZeeMassTool3Cfg(flags))
241 acc.addPublicTool(EGAM1ZeeMassTool3)
242 augmentationTools.append(EGAM1ZeeMassTool3)
243
244 EGAM1ZegMassTool = acc.popToolsAndMerge(EGAM1ZegMassToolCfg(flags))
245 acc.addPublicTool(EGAM1ZegMassTool)
246 augmentationTools.append(EGAM1ZegMassTool)
247
248 # ====================================================================
249 # Common calo decoration tools
250 # ====================================================================
251 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
252 CaloDecoratorKernelCfg)
253 acc.merge(CaloDecoratorKernelCfg(flags))
254
255 # thinning tools
256 thinningTools = []
257 streamName = kwargs["StreamName"]
258
259 # Track thinning
260 if flags.Derivation.Egamma.doTrackThinning:
261 from DerivationFrameworkInDet.InDetToolsConfig import (
262 TrackParticleThinningCfg,
263 MuonTrackParticleThinningCfg,
264 TauTrackParticleThinningCfg,
265 )
266
267 TrackThinningKeepElectronTracks = True
268 TrackThinningKeepPhotonTracks = True
269 TrackThinningKeepAllElectronTracks = True
270 TrackThinningKeepJetTracks = False
271 TrackThinningKeepMuonTracks = False
272 TrackThinningKeepTauTracks = False
273 TrackThinningKeepPVTracks = True
274
275 # Tracks associated with Electrons
276 if TrackThinningKeepElectronTracks:
277 EGAM1ElectronTPThinningTool = (
278 CompFactory.DerivationFramework.EgammaTrackParticleThinning(
279 name="EGAM1ElectronTPThinningTool",
280 StreamName=streamName,
281 SGKey="Electrons",
282 GSFTrackParticlesKey="GSFTrackParticles",
283 InDetTrackParticlesKey="InDetTrackParticles",
284 SelectionString="Electrons.pt > 0*GeV",
285 BestMatchOnly=True,
286 ConeSize=0.3,
287 )
288 )
289 acc.addPublicTool(EGAM1ElectronTPThinningTool)
290 thinningTools.append(EGAM1ElectronTPThinningTool)
291
292 # Tracks associated with Electrons (all tracks, large cone, for track
293 # isolation studies of the selected electrons)
294 if TrackThinningKeepAllElectronTracks:
295 EGAM1ElectronTPThinningTool2 = (
296 CompFactory.DerivationFramework.EgammaTrackParticleThinning(
297 name="EGAM1ElectronTPThinningTool2",
298 StreamName=streamName,
299 SGKey="Electrons",
300 GSFTrackParticlesKey="GSFTrackParticles",
301 InDetTrackParticlesKey="InDetTrackParticles",
302 SelectionString="Electrons.pt > 4*GeV",
303 BestMatchOnly=False,
304 ConeSize=0.6,
305 )
306 )
307 acc.addPublicTool(EGAM1ElectronTPThinningTool2)
308 thinningTools.append(EGAM1ElectronTPThinningTool2)
309
310 # Tracks associated with Photons
311 if TrackThinningKeepPhotonTracks:
312 EGAM1PhotonTPThinningTool = (
313 CompFactory.DerivationFramework.EgammaTrackParticleThinning(
314 name="EGAM1PhotonTPThinningTool",
315 StreamName=streamName,
316 SGKey="Photons",
317 GSFTrackParticlesKey="GSFTrackParticles",
318 InDetTrackParticlesKey="InDetTrackParticles",
319 GSFConversionVerticesKey="GSFConversionVertices",
320 SelectionString="Photons.pt > 0*GeV",
321 BestMatchOnly=True,
322 ConeSize=0.3,
323 )
324 )
325 acc.addPublicTool(EGAM1PhotonTPThinningTool)
326 thinningTools.append(EGAM1PhotonTPThinningTool)
327
328 # Tracks associated with Jets
329 if TrackThinningKeepJetTracks:
330 EGAM1JetTPThinningTool = (
331 CompFactory.DerivationFramework.JetTrackParticleThinning(
332 name="EGAM1JetTPThinningTool",
333 StreamName=streamName,
334 JetKey="AntiKt4EMPFlowJets",
335 InDetTrackParticlesKey="InDetTrackParticles",
336 )
337 )
338 acc.addPublicTool(EGAM1JetTPThinningTool)
339 thinningTools.append(EGAM1JetTPThinningTool)
340
341 # Tracks associated with Muons
342 if TrackThinningKeepMuonTracks:
343 EGAM1MuonTPThinningTool = acc.getPrimaryAndMerge(
344 MuonTrackParticleThinningCfg(
345 flags,
346 name="EGAM1MuonTPThinningTool",
347 StreamName=streamName,
348 MuonKey="Muons",
349 InDetTrackParticlesKey="InDetTrackParticles",
350 )
351 )
352 thinningTools.append(EGAM1MuonTPThinningTool)
353
354 # Tracks associated with Taus
355 if TrackThinningKeepTauTracks:
356 EGAM1TauTPThinningTool = acc.getPrimaryAndMerge(
357 TauTrackParticleThinningCfg(
358 flags,
359 name="EGAM1TauTPThinningTool",
360 StreamName=streamName,
361 TauKey="TauJets",
362 ConeSize=0.6,
363 InDetTrackParticlesKey="InDetTrackParticles",
364 DoTauTracksThinning=True,
365 TauTracksKey="TauTracks",
366 )
367 )
368 thinningTools.append(EGAM1TauTPThinningTool)
369
370 # Tracks from primary vertex
371 thinning_expression = " && ".join(
372 [
373 "(InDetTrackParticles.DFCommonTightPrimary)",
374 "(abs(InDetTrackParticles.DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta)<3*mm)",
375 "(InDetTrackParticles.pt>10*GeV)",
376 ]
377 )
378 if TrackThinningKeepPVTracks:
379 EGAM1TPThinningTool = acc.getPrimaryAndMerge(
380 TrackParticleThinningCfg(
381 flags,
382 name="EGAM1TPThinningTool",
383 StreamName=streamName,
384 SelectionString=thinning_expression,
385 InDetTrackParticlesKey="InDetTrackParticles",
386 )
387 )
388 thinningTools.append(EGAM1TPThinningTool)
389
390 # keep topoclusters around electrons
391 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
392 CaloClusterThinningCfg,
393 )
394
395 EGAM1CCTCThinningTool = acc.getPrimaryAndMerge(
396 CaloClusterThinningCfg(
397 flags,
398 name="EGAM1CCTCThinningTool",
399 StreamName=streamName,
400 SGKey="Electrons",
401 SelectionString="Electrons.pt>4*GeV",
402 TopoClCollectionSGKey="CaloCalTopoClusters",
403 ConeSize=0.5,
404 )
405 )
406 thinningTools.append(EGAM1CCTCThinningTool)
407
408 # truth thinning
409 if flags.Input.isMC:
410 # W, Z and Higgs
411 truth_cond_WZH = "(TruthParticles.isW || TruthParticles.isZ || TruthParticles.isHiggs)"
412 # Leptons
413 truth_cond_lep = "(TruthParticles.isLepton)"
414 # Top quark
415 truth_cond_top = "(TruthParticles.isTop)"
416 # Photon
417 truth_cond_gam = " && ".join(
418 ["(TruthParticles.isPhoton)", "(TruthParticles.pt > 1*GeV)"]
419 )
420 # stable particles
421 truth_cond_finalState = "(TruthParticles.isGenStable)"
422 truth_expression = (
423 "( "
424 + truth_cond_WZH
425 + " ) || "
426 + "( "
427 + truth_cond_lep
428 + " ) || "
429 + "( "
430 + truth_cond_top
431 + " ) || "
432 + "( "
433 + truth_cond_gam
434 + " ) || "
435 + "( "
436 + truth_cond_finalState
437 + " )"
438 )
439 print("EGAM1 truth thinning expression: ", truth_expression)
440
441 EGAM1TruthThinningTool = CompFactory.DerivationFramework.GenericTruthThinning(
442 name="EGAM1TruthThinningTool",
443 StreamName=streamName,
444 ParticleSelectionString=truth_expression,
445 PreserveDescendants=False,
446 PreserveGeneratorDescendants=True,
447 PreserveAncestors=True,
448 )
449 acc.addPublicTool(EGAM1TruthThinningTool)
450 thinningTools.append(EGAM1TruthThinningTool)
451
452 # skimming
453 skimmingTool = acc.getPrimaryAndMerge(EGAM1SkimmingToolCfg(flags))
454
455 # setup the kernel
456 acc.addEventAlgo(
457 CompFactory.DerivationFramework.DerivationKernel(
458 name,
459 SkimmingTools=[skimmingTool],
460 AugmentationTools=augmentationTools,
461 ThinningTools=thinningTools,
462 )
463 )
464
465 return acc
466
467

◆ EGAM1SkimmingToolCfg()

EGAM1SkimmingToolCfg ( flags)
Configure the EGAM1 skimming tool

Definition at line 25 of file EGAM1.py.

25def EGAM1SkimmingToolCfg(flags):
26 """Configure the EGAM1 skimming tool"""
27 expression = " || ".join(
28 [
29 "(count( EGAM1_DiElectronMass1 > 50.0*GeV ) >= 1)",
30 "(count( EGAM1_DiElectronMass2 > 50.0*GeV ) >= 1)",
31 "(count( EGAM1_DiElectronMass3 > 50.0*GeV ) >= 1)",
32 "(count( EGAM1_ElectronPhotonMass > 50.0*GeV )>=1)",
33 ]
34 )
35 print("EGAM1 skimming expression: ", expression)
36
37 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import (
38 xAODStringSkimmingToolCfg)
39 return xAODStringSkimmingToolCfg(
40 flags, name = "EGAM1SkimmingTool", expression = expression)
41
42

◆ EGAM1ZeeMassTool1Cfg()

EGAM1ZeeMassTool1Cfg ( flags)
Configure the EGAM1 ee invariant mass augmentation tool 1

Definition at line 43 of file EGAM1.py.

43def EGAM1ZeeMassTool1Cfg(flags):
44 """Configure the EGAM1 ee invariant mass augmentation tool 1"""
45 acc = ComponentAccumulator()
46
47 # ====================================================================
48 # 1. di-electron invariant mass for events passing the Z->ee
49 # selection for the e-gamma calibration, based on single e trigger
50 #
51 # 1 tight e, central, pT>25 GeV
52 # 1 medium e, pT>20 GeV
53 # opposite-sign
54 # mee>50 GeV (cut applied in skimming step later)
55 # ====================================================================
56
57 requirement_tag = " && ".join(
58 ["(Electrons.DFCommonElectronsLHTight)", "(Electrons.pt > 24.5*GeV)"]
59 )
60
61 requirement_probe = " && ".join(
62 ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 19.5*GeV)"]
63 )
64
65 acc.setPrivateTools(
66 CompFactory.DerivationFramework.EGInvariantMassTool(
67 name="EGAM1_ZEEMassTool1",
68 Object1Requirements=requirement_tag,
69 Object2Requirements=requirement_probe,
70 StoreGateEntryName="EGAM1_DiElectronMass1",
71 Mass1Hypothesis=0.511 * MeV,
72 Mass2Hypothesis=0.511 * MeV,
73 Container1Name="Electrons",
74 Container2Name="Electrons",
75 CheckCharge=True,
76 DoTransverseMass=False,
77 MinDeltaR=0.0,
78 )
79 )
80
81 return acc
82
83

◆ EGAM1ZeeMassTool2Cfg()

EGAM1ZeeMassTool2Cfg ( flags)
Configure the EGAM1 ee invariant mass augmentation tool 2

Definition at line 84 of file EGAM1.py.

84def EGAM1ZeeMassTool2Cfg(flags):
85 """Configure the EGAM1 ee invariant mass augmentation tool 2"""
86 acc = ComponentAccumulator()
87
88 # ====================================================================
89 # 2. di-electron invariant mass for events passing the Z->e selection
90 # for the e-gamma calibration, based on di-electron triggers
91 #
92 # 2 medium e, central, pT>20 GeV
93 # opposite-sign
94 # mee>50 GeV (cut applied in skimming step later)
95 # ====================================================================
96
97 requirement = " && ".join(
98 ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 19.5*GeV)"]
99 )
100
101 acc.setPrivateTools(
102 CompFactory.DerivationFramework.EGInvariantMassTool(
103 name="EGAM1_ZEEMassTool2",
104 Object1Requirements=requirement,
105 Object2Requirements=requirement,
106 StoreGateEntryName="EGAM1_DiElectronMass2",
107 Mass1Hypothesis=0.511 * MeV,
108 Mass2Hypothesis=0.511 * MeV,
109 Container1Name="Electrons",
110 Container2Name="Electrons",
111 CheckCharge=True,
112 DoTransverseMass=False,
113 MinDeltaR=0.0,
114 )
115 )
116
117 return acc
118
119

◆ EGAM1ZeeMassTool3Cfg()

EGAM1ZeeMassTool3Cfg ( flags)
Configure the EGAM1 ee invariant mass augmentation tool 3

Definition at line 120 of file EGAM1.py.

120def EGAM1ZeeMassTool3Cfg(flags):
121 """Configure the EGAM1 ee invariant mass augmentation tool 3"""
122 acc = ComponentAccumulator()
123
124 # ====================================================================
125 # 3. di-electron invariant mass for events passing the Z->ee
126 # selection for the e efficiencies with tag and probe.
127 # Based on single e trigger, for reco (central) and ID SF(central)
128 #
129 # 1 tight e, central, pT>25 GeV
130 # 1 e, central, pT>4 GeV
131 # opposite-sign + same-sign
132 # mee>50 GeV (cut applied in skimming step later)
133 # ====================================================================
134
135 requirement_tag = " && ".join(
136 ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 24.5*GeV)"]
137 )
138
139 requirement_probe = "Electrons.pt > 4*GeV"
140
141 acc.setPrivateTools(
142 CompFactory.DerivationFramework.EGInvariantMassTool(
143 name="EGAM1_ZEEMassTool3",
144 Object1Requirements=requirement_tag,
145 Object2Requirements=requirement_probe,
146 StoreGateEntryName="EGAM1_DiElectronMass3",
147 Mass1Hypothesis=0.511 * MeV,
148 Mass2Hypothesis=0.511 * MeV,
149 Container1Name="Electrons",
150 Container2Name="Electrons",
151 CheckCharge=False,
152 DoTransverseMass=False,
153 MinDeltaR=0.0,
154 )
155 )
156
157 return acc
158
159

◆ EGAM1ZegMassToolCfg()

EGAM1ZegMassToolCfg ( flags)
Configure the EGAM1 e+photon mass augmentation tool

Definition at line 160 of file EGAM1.py.

160def EGAM1ZegMassToolCfg(flags):
161 """Configure the EGAM1 e+photon mass augmentation tool"""
162 acc = ComponentAccumulator()
163
164 # ====================================================================
165 # 4. Z->eg selection based on single e trigger, for reco SF (central)
166 # for tag and probe
167 #
168 # 1 tight e, central, pT>25 GeV
169 # note: use medium instead of tight for early data upon electron
170 # group request
171 # 1 gamma, pT>15 GeV, central
172 # opposite sign + same sign
173 # mey>50 GeV (cut applied in skimming step later)
174 # ====================================================================
175
176 requirement_tag = " && ".join(
177 ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 24.5*GeV)"]
178 )
179
180 requirement_probe = "DFCommonPhotons_et > 14.5*GeV"
181
182 acc.setPrivateTools(
183 CompFactory.DerivationFramework.EGInvariantMassTool(
184 name="EGAM1_ZEGMassTool",
185 Object1Requirements=requirement_tag,
186 Object2Requirements=requirement_probe,
187 StoreGateEntryName="EGAM1_ElectronPhotonMass",
188 Mass1Hypothesis=0.511 * MeV,
189 Mass2Hypothesis=0.511 * MeV,
190 Container1Name="Electrons",
191 Container2Name="Photons",
192 Pt2BranchName="DFCommonPhotons_et",
193 Eta2BranchName="DFCommonPhotons_eta",
194 Phi2BranchName="DFCommonPhotons_phi",
195 CheckCharge=False,
196 DoTransverseMass=False,
197 MinDeltaR=0.0,
198 )
199 )
200 return acc
201
202
203# Main algorithm config