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