Commit 4a47a8eb authored by Vladimir Lyubushkin's avatar Vladimir Lyubushkin
Browse files

update TrigMultiTrkHypo alg due to change of the Magnetic Field Svc usage in...

update TrigMultiTrkHypo alg due to change of the Magnetic Field Svc usage in TrkVKalVrtFitter (ATR-21340, ATR-21379)
parent 64d10d48
......@@ -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(
......
......@@ -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.;
}
......
......@@ -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"};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment