3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
11 TauVertexFinder = CompFactory.TauVertexFinder(name=name,
13 AssociatedTracks =
"GhostTrack",
14 InDetTrackSelectionToolForTJVA =
"",
15 Key_trackPartInputContainer =
"",
16 Key_vertexInputContainer =
"",
20 acc.setPrivateTools(TauVertexFinder)
26 from TrkConfig.TrkVertexFitterUtilsConfig
import (
27 AtlasTrackToVertexIPEstimatorCfg)
28 AtlasTrackToVertexIPEstimator = acc.popToolsAndMerge(
31 from TrackToVertex.TrackToVertexConfig
import TrackToVertexCfg
34 from TrackToCalo.TrackToCaloConfig
import ParticleCaloExtensionToolCfg
35 ParticleCaloExtensionTool = acc.popToolsAndMerge(
38 from InDetConfig.InDetTrackSelectorToolConfig
import (
39 TrigTauInDetTrackSelectorToolCfg)
40 TrigTauInDetTrackSelectorTool = acc.popToolsAndMerge(
44 TauTrackFinder = CompFactory.TauTrackFinder(name=name,
47 TrackSelectorToolTau = TrigTauInDetTrackSelectorTool,
48 TrackToVertexTool = TrackToVertexTool,
49 Key_trackPartInputContainer = TrackParticlesContainer,
50 maxDeltaZ0wrtLeadTrk = 0.75*mm,
51 removeTracksOutsideZ0wrtLeadTrk =
True,
52 ParticleCaloExtensionTool = ParticleCaloExtensionTool,
53 BypassSelector =
False,
54 BypassExtrapolator =
True,
55 tauParticleCache =
"",
56 TrackToVertexIPEstimator = AtlasTrackToVertexIPEstimator,
60 acc.setPrivateTools(TauTrackFinder)
66 from TrkConfig.TrkVertexFittersConfig
import TauAdaptiveVertexFitterCfg
67 TauAdaptiveVertexFitter = acc.popToolsAndMerge(
70 from TrkConfig.TrkVertexSeedFinderToolsConfig
import (
71 CrossDistancesSeedFinderCfg)
72 CrossDistancesSeedFinder = acc.popToolsAndMerge(
75 TauVertexVariables = CompFactory.TauVertexVariables(name=name,
76 VertexFitter = TauAdaptiveVertexFitter ,
77 SeedFinder = CrossDistancesSeedFinder )
78 acc.setPrivateTools(TauVertexVariables)
85 name +=
'_LLP' if LLP
else ''
87 (NetworkFile0P, NetworkFile1P, NetworkFile3P) = \
88 flags.Trigger.Offline.Tau.TauJetRNNConfigLLP
if LLP \
89 else flags.Trigger.Offline.Tau.TauJetRNNConfig
92 MyTauJetRNNEvaluator = CompFactory.TauJetRNNEvaluator(name = name,
93 NetworkFile0P = NetworkFile0P,
94 NetworkFile1P = NetworkFile1P,
95 NetworkFile3P = NetworkFile3P,
96 OutputVarname =
"RNNJetScore",
100 VertexCorrection =
False,
101 TrackClassification =
False,
102 InputLayerScalar =
"scalar",
103 InputLayerTracks =
"tracks",
104 InputLayerClusters =
"clusters",
105 OutputLayer =
"rnnid_output",
106 OutputNode =
"sig_prob")
109 acc.setPrivateTools(MyTauJetRNNEvaluator)
113 import PyUtils.RootUtils
as ru
114 ROOT = ru.import_root()
116 cppyy.load_library(
'libxAODTau_cDict')
119 name +=
'_LLP' if LLP
else ''
124 (flatteningFile0Prong, flatteningFile1Prong, flatteningFile3Prong) = \
125 flags.Trigger.Offline.Tau.TauJetRNNWPConfigLLP
if LLP \
126 else flags.Trigger.Offline.Tau.TauJetRNNWPConfig
128 (targetEff0Prong, targetEff1Prong, targetEff3Prong) = \
129 flags.Trigger.Offline.Tau.TauJetRNNLLPTargetEff
if LLP \
130 else flags.Trigger.Offline.Tau.TauJetRNNTargetEff
132 MyTauWPDecorator =CompFactory.TauWPDecorator( name=name,
133 flatteningFile0Prong = flatteningFile0Prong,
134 flatteningFile1Prong = flatteningFile1Prong,
135 flatteningFile3Prong = flatteningFile3Prong,
137 [ ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigVeryLoose, ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigLoose,
138 ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigMedium, ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigTight ],
139 SigEff0P = targetEff0Prong,
140 SigEff1P = targetEff1Prong,
141 SigEff3P = targetEff3Prong,
142 ScoreName =
"RNNJetScore",
143 NewScoreName =
"RNNJetScoreSigTrans",
146 acc.setPrivateTools(MyTauWPDecorator)