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()

python.EGAM1.EGAM1Cfg ( flags)

Definition at line 478 of file EGAM1.py.

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

◆ EGAM1KernelCfg()

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

Definition at line 209 of file EGAM1.py.

209def 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(
226 PhysCommonAugmentationsCfg(
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(
349 MuonTrackParticleThinningCfg(
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(
362 TauTrackParticleThinningCfg(
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(
385 TrackParticleThinningCfg(
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(
401 CaloClusterThinningCfg(
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 = "(TruthParticles.isGenStable)"
431 truth_expression = (
432 "( "
433 + truth_cond_WZH
434 + " ) || "
435 + "( "
436 + truth_cond_lep
437 + " ) || "
438 + "( "
439 + truth_cond_top
440 + " ) || "
441 + "( "
442 + truth_cond_gam
443 + " ) || "
444 + "( "
445 + truth_cond_finalState
446 + " )"
447 )
448 print("EGAM1 truth thinning expression: ", truth_expression)
449
450 EGAM1TruthThinningTool = CompFactory.DerivationFramework.GenericTruthThinning(
451 name="EGAM1TruthThinningTool",
452 StreamName=streamName,
453 ParticleSelectionString=truth_expression,
454 PreserveDescendants=False,
455 PreserveGeneratorDescendants=True,
456 PreserveAncestors=True,
457 )
458 acc.addPublicTool(EGAM1TruthThinningTool)
459 thinningTools.append(EGAM1TruthThinningTool)
460
461 # skimming
462 skimmingTool = acc.popToolsAndMerge(EGAM1SkimmingToolCfg(flags))
463 acc.addPublicTool(skimmingTool)
464
465 # setup the kernel
466 acc.addEventAlgo(
467 CompFactory.DerivationFramework.DerivationKernel(
468 name,
469 SkimmingTools=[skimmingTool],
470 AugmentationTools=augmentationTools,
471 ThinningTools=thinningTools,
472 )
473 )
474
475 return acc
476
477

◆ EGAM1SkimmingToolCfg()

python.EGAM1.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 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 skimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(
40 name="EGAM1SkimmingTool", expression=expression)
41 if flags.Trigger.EDMVersion < 0:
42 skimmingTool.TrigDecisionTool=None
43
44 acc.setPrivateTools(skimmingTool)
45 return acc
46
47

◆ EGAM1ZeeMassTool1Cfg()

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

Definition at line 48 of file EGAM1.py.

48def EGAM1ZeeMassTool1Cfg(flags):
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

◆ EGAM1ZeeMassTool2Cfg()

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

Definition at line 89 of file EGAM1.py.

89def EGAM1ZeeMassTool2Cfg(flags):
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

◆ EGAM1ZeeMassTool3Cfg()

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

Definition at line 125 of file EGAM1.py.

125def EGAM1ZeeMassTool3Cfg(flags):
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

◆ EGAM1ZegMassToolCfg()

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

Definition at line 165 of file EGAM1.py.

165def EGAM1ZegMassToolCfg(flags):
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