From 9ac0a7683b02fe659406d1c81272da6a62ffff07 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Fri, 24 Jul 2020 16:53:50 +0200 Subject: [PATCH] do not remake trajectories if no mtdhits were added --- RecoMTD/TrackExtender/plugins/TrackExtenderWithMTD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoMTD/TrackExtender/plugins/TrackExtenderWithMTD.cc b/RecoMTD/TrackExtender/plugins/TrackExtenderWithMTD.cc index 0bdecb6578ca0..d037f00ab1acb 100644 --- a/RecoMTD/TrackExtender/plugins/TrackExtenderWithMTD.cc +++ b/RecoMTD/TrackExtender/plugins/TrackExtenderWithMTD.cc @@ -678,7 +678,7 @@ void TrackExtenderWithMTDT::produce(edm::Event& ev, const edm:: thits.swap(mtdthits); } - const auto& trajwithmtd = theTransformer->transform(ttrack, thits); + const auto& trajwithmtd = mtdthits.empty() ? trajs : theTransformer->transform(ttrack, thits); float pMap = 0.f, betaMap = 0.f, t0Map = 0.f, sigmat0Map = -1.f, pathLengthMap = -1.f, tmtdMap = 0.f, sigmatmtdMap = -1.f; int iMap = -1;