ATLAS Offline Software
Loading...
Searching...
No Matches
HIGG1D1CustomVertexConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
7 flags, name="HIGG1D1_ZeeVertexRefitterTool", **kwargs):
8 """ PV refitting after removing Z->ee tracks, for vertex studies """
9 acc = ComponentAccumulator()
10
11 import AthenaCommon.SystemOfUnits as Units
12
13 if "PrimaryVertexRefitterTool" not in kwargs:
14 from JpsiUpsilonTools.JpsiUpsilonToolsConfig import (
15 PrimaryVertexRefittingToolCfg)
16 kwargs.setdefault("PrimaryVertexRefitterTool", acc.popToolsAndMerge(
17 PrimaryVertexRefittingToolCfg(flags)))
18
19 kwargs.setdefault("ObjectRequirements", (
20 "(Electrons.DFCommonElectronsLHMedium) && (Electrons.pt > 19.*GeV)"))
21 kwargs.setdefault("LowMassCut", 50*Units.GeV)
22 kwargs.setdefault("RefittedPVContainerName", "ZeeRefittedPrimaryVertices")
23 kwargs.setdefault("MCSamples", [361106, 601189])
24
25 acc.setPrivateTools(
26 CompFactory.DerivationFramework.ZeeVertexRefittingTool(name, **kwargs))
27 return acc
28
29def ZeeVertexRefitterCfg(flags, name="ZeeVertexRefitKernel"):
30 """ PV refitting after removing Z->ee tracks, for vertex studies """
31
32 # Creates a vertex container (ZeeRefittedPrimaryVertices) where the type=1 vertex is refitted
33 # after removing tracks that are associated with Z->ee decay candidates
34 # Tool runs only for data and Zee MC samples (must be defined in the MCSamples list)
35
36 acc = ComponentAccumulator()
37 ZeeVertexRefittingTool = acc.popToolsAndMerge(
39 acc.addPublicTool(ZeeVertexRefittingTool)
40 acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
41 name, AugmentationTools=[ZeeVertexRefittingTool]))
42 return acc
43
44def DiphotonVertexDecoratorCfg(flags, **kwargs):
45 acc = ComponentAccumulator()
46 if "PhotonVertexSelectionTool" not in kwargs:
47 from PhotonVertexSelection.PhotonVertexSelectionConfig import (
48 PhotonVertexSelectionToolCfg)
49 kwargs.setdefault("PhotonVertexSelectionTool", acc.popToolsAndMerge(
50 PhotonVertexSelectionToolCfg(flags)))
51 acc.setPrivateTools(
52 CompFactory.DerivationFramework.DiphotonVertexDecorator(**kwargs))
53 return acc
54
55def DiPhotonVertexDecoratorKernelCfg(flags, name="DiphotonVertexKernel"):
56 """ Diphoton vertex decoration tool """
57
58 # Decorator creates a shallow copy of PrimaryVertices (HggPrimaryVertices) for diphoton events
59 # Must be created before the jetalg in the sequence as it is input to the modified PFlow jets
60
61 acc = ComponentAccumulator()
62 DiphotonVertexDecorator = acc.popToolsAndMerge(
64 acc.addPublicTool(DiphotonVertexDecorator)
65 acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
66 name,AugmentationTools=[DiphotonVertexDecorator]))
67 return acc
68
70 from DerivationFrameworkEGamma.EGammaToolsConfig import (
71 PhotonVertexSelectionWrapperKernelCfg)
72 acc = PhotonVertexSelectionWrapperKernelCfg(flags)
73 acc.merge(DiPhotonVertexDecoratorKernelCfg(flags))
74 return acc
DiPhotonVertexDecoratorKernelCfg(flags, name="DiphotonVertexKernel")
ZeeVertexRefitterCfg(flags, name="ZeeVertexRefitKernel")
ZeeVertexRefittingToolCfg(flags, name="HIGG1D1_ZeeVertexRefitterTool", **kwargs)