4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from TrigEDMConfig.TriggerEDM
import recordable
8 trigTauJetOutputContainer =
recordable(f
'HLT_TrigTauRecMerged_{name}')
9 trigTauTrackOutputContainer =
recordable(f
'HLT_tautrack_{name}')
20 from TrigTauRec.TrigTauToolsConfig
import trigTauVertexFinderCfg, trigTauTrackFinderCfg, tauVertexVariablesCfg
21 from AthenaConfiguration.ComponentFactory
import CompFactory
27 tools_beforetf.append(CompFactory.TauAxisSetter(name=
'TrigTau_TauAxis', VertexCorrection=
False))
30 tftools.append(acc.popToolsAndMerge(
trigTauTrackFinderCfg(flags, name=
'TrigTauTightDZ_TauTrackFinder', TrackParticlesContainer=tracks)))
33 tools.append(CompFactory.TauClusterFinder(name=
'TrigTau_TauClusterFinder', UseOriginalCluster=
False))
34 tools.append(CompFactory.TauVertexedClusterDecorator(name=
'TrigTau_TauVertexedClusterDecorator', SeedJet=
''))
37 tools.append(CompFactory.TauCellVariables(name=
'TrigTau_CellVariables', VertexCorrection=
False))
40 tools.append(CompFactory.MvaTESVariableDecorator(name=
'TrigTau_MvaTESVariableDecorator', Key_vertexInputContainer=
'', EventShapeKey=
'', VertexCorrection=
False))
41 acc.addPublicTool(tools[-1])
42 tools.append(CompFactory.MvaTESEvaluator(name=
'TrigTau_MvaTESEvaluator', WeightFileName=flags.Trigger.Offline.Tau.MvaTESConfig))
43 acc.addPublicTool(tools[-1])
49 idtools.append(CompFactory.TauCommonCalcVars(name=
'TrigTau_TauCommonCalcVars'))
52 idtools.append(CompFactory.TauSubstructureVariables(name=
'TrigTau_TauSubstructure', VertexCorrection=
False))
55 if name
in [
'MVA',
'LLP',
'LRT']:
57 use_LLP_ID = name
in [
'LLP',
'LRT']
59 from TrigTauRec.TrigTauToolsConfig
import trigTauJetRNNEvaluatorCfg, trigTauWPDecoratorJetRNNCfg
63 acc.addPublicTool(idtools[-1])
67 acc.addPublicTool(idtools[-1])
69 raise ValueError(f
'Invalid configuration: {name}')
71 for tool
in vftools + tools_beforetf + tftools + tools + vvtools + idtools:
73 tool.calibFolder = flags.Trigger.Offline.Tau.tauRecToolsCVMFSPath
76 from TrigTauRec.TrigTauRecMonitoring
import tauMonitoringPrecisionMVA
78 alg = CompFactory.TrigTauRecMerged(f
'TrigTauRecMerged_TauPrecision_Precision{name}',
79 VertexFinderTools = vftools,
80 CommonToolsBeforeTF = tools_beforetf,
81 TrackFinderTools = tftools,
83 VertexVarsTools = vvtools,
86 InputRoIs = inputRoIs,
87 InputCaloClusterContainer =
'',
88 InputVertexContainer = flags.Tracking.ActiveConfig.vertex,
89 InputTauTrackContainer =
'HLT_tautrack_dummy',
90 InputTauJetContainer =
'HLT_TrigTauRecMerged_CaloMVAOnly',
91 OutputTauTrackContainer = trigTauTrackOutputContainer,
92 OutputTauJetContainer = trigTauJetOutputContainer,
102 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
108 from AthenaConfiguration.ComponentFactory
import CompFactory
111 tools.append(CompFactory.JetSeedBuilder())
114 tools.append(CompFactory.TauAxisSetter(ClusterCone=0.2, VertexCorrection=
False))
117 tools.append(CompFactory.TauClusterFinder(UseOriginalCluster=
False))
118 tools.append(CompFactory.TauVertexedClusterDecorator(SeedJet=
''))
122 tools.append(CompFactory.TauCellVariables(StripEthreshold=0.2*GeV, CellCone=0.2, VertexCorrection =
False))
125 tools.append(CompFactory.MvaTESVariableDecorator(Key_vertexInputContainer=
'', EventShapeKey=
'', VertexCorrection=
False))
126 acc.addPublicTool(tools[-1])
127 tools.append(CompFactory.MvaTESEvaluator(WeightFileName=flags.Trigger.Offline.Tau.MvaTESConfig))
128 acc.addPublicTool(tools[-1])
131 tool.inTrigger =
True
132 tool.calibFolder = flags.Trigger.Offline.Tau.tauRecToolsCVMFSPath
135 from TrigEDMConfig.TriggerEDM
import recordable
136 from TrigTauRec.TrigTauRecMonitoring
import tauMonitoringCaloOnlyMVA
138 alg = CompFactory.TrigTauRecMerged(
"TrigTauRecMerged_TauCaloOnlyMVA",
141 InputRoIs =
'UpdatedCaloRoI',
142 InputCaloClusterContainer =
'HLT_TopoCaloClustersLC',
143 InputVertexContainer =
'',
144 InputTauTrackContainer =
'',
145 InputTauJetContainer =
'',
146 OutputTauTrackContainer =
'HLT_tautrack_dummy',
147 OutputTauJetContainer =
'HLT_TrigTauRecMerged_CaloMVAOnly',
151 acc.addEventAlgo(alg)
157 if __name__ ==
'__main__':
158 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
159 from AthenaConfiguration.TestDefaults
import defaultTestFiles
161 flags.Input.Files = defaultTestFiles.RAW_RUN2
165 acc.printConfig(withDetails=
True, summariseProps=
True)