ATLAS Offline Software
InDetConversionFinderToolsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 # Configuration of InDetConversionFinderTools package
3 
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 
7 
8 def ConversionPostSelectorCfg(flags, name="ConversionPostSelector", **kwargs):
10 
11  kwargs.setdefault("MaxPhiVtxTrk",
12  flags.Egamma.PhotonConv.SecVtxPost.MaxPhiVtxTrk)
13  kwargs.setdefault("MinRadius",
14  flags.Egamma.PhotonConv.SecVtxPost.MinRadius)
15 
16  kwargs.setdefault("MaxChi2Vtx", [50., 50., 50.])
17  kwargs.setdefault("MaxInvariantMass", [10000., 10000., 10000.])
18  kwargs.setdefault("MinFitMomentum", [0., 0., 0.])
19  kwargs.setdefault("MinPt", 0.)
20  kwargs.setdefault("MaxdR", -250.) # off
21 
22  acc.setPrivateTools(CompFactory.InDet.ConversionPostSelector(name, **kwargs))
23  return acc
24 
26  flags, name="SingleTrackConversionTool", **kwargs):
27  acc = ComponentAccumulator()
28 
29  kwargs.setdefault("MaxBLayerHits",
30  flags.Egamma.PhotonConv.SingleTrk.MaxBLayerHits)
31  kwargs.setdefault("MinInitialHitRadius",
32  flags.Egamma.PhotonConv.SingleTrk.MinInitialHitRadius)
33  kwargs.setdefault("MinInitialHitRadius_noBlay",
34  flags.Egamma.PhotonConv.SingleTrk.MinInitialHitRadius_noBlay)
35  kwargs.setdefault("MinRatioOfHLhits",
36  flags.Egamma.PhotonConv.SingleTrk.MinRatioOfHLhits)
37 
38  acc.setPrivateTools(
39  CompFactory.InDet.SingleTrackConversionTool(name, **kwargs))
40  return acc
41 
42 def TrackPairsSelectorCfg(flags, name="TrackPairsSelector", **kwargs):
43  acc = ComponentAccumulator()
44 
45  kwargs.setdefault("MaxDistBetweenTracks",
46  flags.Egamma.PhotonConv.TrkPairSel.MaxDistBetweenTracks)
47  kwargs.setdefault("MaxEta",
48  flags.Egamma.PhotonConv.TrkPairSel.MaxEta)
49  kwargs.setdefault("MinTrackAngle",
50  flags.Egamma.PhotonConv.TrkPairSel.MinTrackAngle)
51 
52  # hacky way to determine if TRT only of SI
53  kwargs.setdefault("MaxFirstHitRadius", 500)
54  kwargs.setdefault("MaxInitDistance", [10000.0, 10000.0, 10000.0])
55 
56  acc.setPrivateTools(CompFactory.InDet.TrackPairsSelector(name, **kwargs))
57  return acc
58 
59 def VertexPointEstimatorCfg(flags, name="VertexPointEstimator", **kwargs):
60  acc = ComponentAccumulator()
61 
62  kwargs.setdefault("MinDeltaR", flags.Egamma.PhotonConv.VtxPt.MinDeltaR)
63  kwargs.setdefault("MaxDeltaR", flags.Egamma.PhotonConv.VtxPt.MaxDeltaR)
64  kwargs.setdefault("MaxPhi", flags.Egamma.PhotonConv.VtxPt.MaxPhi)
65 
66  acc.setPrivateTools(CompFactory.InDet.VertexPointEstimator(name, **kwargs))
67  return acc
68 
70  flags, name="BPHY_VertexPointEstimator", **kwargs):
71  acc = ComponentAccumulator()
72 
73  kwargs.setdefault("MinDeltaR", [-10000., -10000., -10000.])
74  kwargs.setdefault("MaxDeltaR", [ 10000., 10000., 10000.])
75  kwargs.setdefault("MaxPhi", [ 10000., 10000., 10000.])
76 
77  acc.setPrivateTools(CompFactory.InDet.VertexPointEstimator(name, **kwargs))
78  return acc
79 
81  flags, name="InDetV0VertexPointEstimator", **kwargs):
82  kwargs.setdefault("MaxTrkXYDiffAtVtx", [ 20., 20., 20.])
83  kwargs.setdefault("MaxTrkZDiffAtVtx", [ 100., 100., 100.])
84  kwargs.setdefault("MaxTrkXYValue", [ 400., 400., 400.])
85  kwargs.setdefault("MinArcLength", [-800., -800., -800.])
86  kwargs.setdefault("MaxArcLength", [ 800., 800., 800.])
87  return BPHY_VertexPointEstimatorCfg(flags, name, **kwargs)
88 
89 def InDetConversionFinderToolsCfg(flags, name="ConversionFinderTool", **kwargs):
90  """Configures InDet::InDetConversionFinderTools """
91 
92  acc = ComponentAccumulator()
93 
94  if "PostSelector" not in kwargs:
95  kwargs.setdefault("PostSelector", acc.popToolsAndMerge(
97 
98  if "SingleTrackConversionTool" not in kwargs:
99  kwargs.setdefault("SingleTrackConversionTool", acc.popToolsAndMerge(
101 
102  if "TrackPairsSelector" not in kwargs:
103  kwargs.setdefault("TrackPairsSelector", acc.popToolsAndMerge(
104  TrackPairsSelectorCfg(flags)))
105 
106  if "VertexPointEstimator" not in kwargs:
107  kwargs.setdefault("VertexPointEstimator", acc.popToolsAndMerge(
108  VertexPointEstimatorCfg(flags)))
109 
110  if "TrackSelectorTool" not in kwargs:
111  from InDetConfig.InDetTrackSelectorToolConfig import (
112  InDetConversionTrackSelectorToolCfg)
113  kwargs.setdefault("TrackSelectorTool", acc.popToolsAndMerge(
115 
116  if "VertexFitterTool" not in kwargs:
117  from TrkConfig.TrkVKalVrtFitterConfig import (
118  Conversion_TrkVKalVrtFitterCfg)
119  kwargs.setdefault("VertexFitterTool", acc.popToolsAndMerge(
121 
122  kwargs.setdefault("IsConversion", True)
123 
124  kwargs.setdefault("MaxDistVtxHit",
125  flags.Egamma.PhotonConv.Finder.MaxDistVtxHit)
126  kwargs.setdefault("MinDistVtxHit",
127  flags.Egamma.PhotonConv.Finder.MinDistVtxHit)
128  kwargs.setdefault("MinFlightAngle",
129  flags.Egamma.PhotonConv.Finder.MinFlightAngle)
130  kwargs.setdefault("MinInitVtxR",
131  flags.Egamma.PhotonConv.Finder.MinInitVtxR)
132  kwargs.setdefault("RemoveTrtTracks",
133  flags.Egamma.PhotonConv.Finder.RemoveTrtTracks)
134 
135  acc.setPrivateTools(
136  CompFactory.InDet.InDetConversionFinderTools(name, **kwargs))
137  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.InDetConversionFinderToolsConfig.InDetConversionFinderToolsCfg
def InDetConversionFinderToolsCfg(flags, name="ConversionFinderTool", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:89
python.InDetConversionFinderToolsConfig.SingleTrackConversionToolCfg
def SingleTrackConversionToolCfg(flags, name="SingleTrackConversionTool", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:25
python.InDetConversionFinderToolsConfig.TrackPairsSelectorCfg
def TrackPairsSelectorCfg(flags, name="TrackPairsSelector", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:42
python.TrkVKalVrtFitterConfig.Conversion_TrkVKalVrtFitterCfg
def Conversion_TrkVKalVrtFitterCfg(flags, name="Conversion_TrkVKalVrtFitter", **kwargs)
Definition: TrkVKalVrtFitterConfig.py:20
python.InDetConversionFinderToolsConfig.ConversionPostSelectorCfg
def ConversionPostSelectorCfg(flags, name="ConversionPostSelector", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:8
python.InDetTrackSelectorToolConfig.InDetConversionTrackSelectorToolCfg
def InDetConversionTrackSelectorToolCfg(flags, name="TrackSelector", **kwargs)
Definition: InDetTrackSelectorToolConfig.py:8
python.InDetConversionFinderToolsConfig.VertexPointEstimatorCfg
def VertexPointEstimatorCfg(flags, name="VertexPointEstimator", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:59
python.InDetConversionFinderToolsConfig.BPHY_VertexPointEstimatorCfg
def BPHY_VertexPointEstimatorCfg(flags, name="BPHY_VertexPointEstimator", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:69
python.InDetConversionFinderToolsConfig.V0VertexPointEstimatorCfg
def V0VertexPointEstimatorCfg(flags, name="InDetV0VertexPointEstimator", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:80