diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkHypoConfig.py index 5632dd3145d98d3263f0c10c43dfc1c8a4f5c3e9..e70018acaf516d204db396346a7a20e59af61851 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkHypoConfig.py @@ -25,12 +25,13 @@ class TrigMultiTrkHypoConfig(object): except KeyError: log.error('TrigMultiTrkHypo.trigLevel should be L2 or EF, but %s provided.', trigLevel) + from TrkExTools.AtlasExtrapolator import AtlasExtrapolator from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter VertexFitter = Trk__TrkVKalVrtFitter( name = 'TrigBphysFitter_'+trigSequenceName+trigLevel, FirstMeasuredPoint = False, MakeExtendedVertex = False, - Extrapolator = 'Trk::Extrapolator/InDetExtrapolator') + Extrapolator = AtlasExtrapolator()) from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator VertexPointEstimator = InDet__VertexPointEstimator( diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkHypo.cxx index 89389346ad2f628154a30f4198b5b6390a00186a..8b698c4b4d117c2ab7f5e75685c900d18eb57cc1 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkHypo.cxx +++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkHypo.cxx @@ -92,8 +92,6 @@ StatusCode TrigMultiTrkHypo::initialize() { ATH_CHECK( m_trigBphysContainerKey.initialize() ); ATH_CHECK( m_vertexFitter.retrieve() ); - m_vertexFitterState = m_vertexFitter->makeState(); - m_vertexFitter->setMassInputParticles(m_trkMass, *m_vertexFitterState); ATH_CHECK( m_vertexPointEstimator.retrieve() ); ATH_CHECK( m_hypoTools.retrieve() ); @@ -317,7 +315,9 @@ xAOD::TrigBphys* TrigMultiTrkHypo::fit(const std::vector<ElementLink<xAOD::Track if (errorcode != 0) startingPoint = Amg::Vector3D::Zero(3); ATH_MSG_DEBUG( "Starting point: (" << startingPoint(0) << ", " << startingPoint(1) << ", " << startingPoint(2) << ")" ); - xAOD::Vertex* vertex = m_vertexFitter->fit(tracklist, startingPoint, *m_vertexFitterState); + auto fitterState = m_vertexFitter->makeState(); + m_vertexFitter->setMassInputParticles(m_trkMass, *fitterState); + xAOD::Vertex* vertex = m_vertexFitter->fit(tracklist, startingPoint, *fitterState); if (!vertex) { ATH_MSG_DEBUG( "Vertex fit fails" ); return result; @@ -331,7 +331,7 @@ xAOD::TrigBphys* TrigMultiTrkHypo::fit(const std::vector<ElementLink<xAOD::Track double invariantMass = 0.; double invariantMassError = 0.; - if (!m_vertexFitter->VKalGetMassError(invariantMass, invariantMassError, *m_vertexFitterState).isSuccess()) { + if (!m_vertexFitter->VKalGetMassError(invariantMass, invariantMassError, *fitterState).isSuccess()) { ATH_MSG_DEBUG( "Warning from TrkVKalVrtFitter: can not calculate uncertainties" ); invariantMass = -9999.; } diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkHypo.h index 31c66a69da54e78c1db3179b006dc834caeacc18..dbb368538d25bc870e03c309472bcb88f7946384 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkHypo.h +++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkHypo.h @@ -79,7 +79,6 @@ class TrigMultiTrkHypo: public ::HypoBase { ToolHandle<InDet::VertexPointEstimator> m_vertexPointEstimator {this, "VertexPointEstimator", "", "tool to find starting point for the vertex fitter"}; ToolHandle<Trk::TrkVKalVrtFitter> m_vertexFitter {this, "VertexFitter", "", "VKalVrtFitter tool to fit tracks into the common vertex"}; - std::unique_ptr<Trk::IVKalState> m_vertexFitterState; ToolHandleArray<TrigMultiTrkHypoTool> m_hypoTools {this, "HypoTools", {}, "tools to perform selection"}; ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "", "monitoring tool"};