diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY10.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY10.py index 97cfa67d4037dbc6eba0de5f33ab6d4480b8539d..6290a5876fa1013b6f842716e883eaec9e129f6d 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY10.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY10.py @@ -86,7 +86,6 @@ def BPHY10Cfg(flags): ExcludeCrossJpsiTracks = False, #setting this to False rejects the muons from J/psi candidate TrkVertexFitterTool = vkalvrt, TrackSelectorTool = trackselect, - VertexPointEstimator = vpest, UseMassConstraint = True, Chi2Cut = 10.0, DiTrackPt = 500., diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY5.py index 0df05bdd36e8954c5e9d6824a18109dfdffe1bab..cc2885fedfe7769251c4c98435ab2770bfbdc9e7 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY5.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY5.py @@ -120,7 +120,6 @@ def BPHY5Kernel(flags, Decays="BsB+BdKstBpipiX"): MuonsUsedInJpsi = mainMuonInput, TrkVertexFitterTool = vkalvrt, TrackSelectorTool = trackselect, - VertexPointEstimator = vpest, UseMassConstraint = True) acc.addPublicTool(BPHY5BsJpsiKK ) BPHY5BdJpsiKst = CompFactory.Analysis.JpsiPlus2Tracks( @@ -139,7 +138,6 @@ def BPHY5Kernel(flags, Decays="BsB+BdKstBpipiX"): ExcludeCrossJpsiTracks = False, #setting this to False rejects the muons from J/psi candidate TrkVertexFitterTool = vkalvrt, TrackSelectorTool = trackselect, - VertexPointEstimator = vpest, UseMassConstraint = True, Chi2Cut = 15.0, TrkQuadrupletMassLower = 3500.0, @@ -160,7 +158,6 @@ def BPHY5Kernel(flags, Decays="BsB+BdKstBpipiX"): JpsiContainerKey = JpsiContainerName, TrackParticleCollection = mainIDInput, MuonsUsedInJpsi = mainMuonInput, - VertexPointEstimator = vpest, TrkVertexFitterTool = vkalvrt, TrackSelectorTool = trackselect, UseMassConstraint = True, @@ -183,7 +180,6 @@ def BPHY5Kernel(flags, Decays="BsB+BdKstBpipiX"): JpsiContainerKey = JpsiContainerName, TrackParticleCollection = mainIDInput, MuonsUsedInJpsi = mainMuonInput, - VertexPointEstimator = vpest, TrkVertexFitterTool = vkalvrt, TrackSelectorTool = trackselect, UseMassConstraint = True, diff --git a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus1Track.h b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus1Track.h index ea9efb857dcd837a42987e969e1d094b857c9c54..5b37f2f468c91787bc3d12803304d4419dc4e019 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus1Track.h +++ b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus1Track.h @@ -73,7 +73,6 @@ namespace Analysis { bool m_excludeCrossJpsiTracks; //Added by Matteo Bedognetti ToolHandle < Trk::IVertexFitter > m_iVertexFitter; ToolHandle < Trk::ITrackSelectorTool > m_trkSelector; - ToolHandle < InDet::VertexPointEstimator > m_vertexEstimator; Trk::TrkVKalVrtFitter* m_VKVFitter; bool m_useMassConst; double m_altMassConst; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus2Tracks.h b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus2Tracks.h index 5cf513e40b92842b7db2abf14ede98059bd24d7f..1c85c17bb291d64cefea84e3ebfc6fbf1eaa9914 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus2Tracks.h +++ b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus2Tracks.h @@ -85,7 +85,6 @@ namespace Analysis { bool m_excludeCrossJpsiTracks; //Added by Matteo Bedognetti ToolHandle < Trk::IVertexFitter > m_iVertexFitter; ToolHandle < Trk::ITrackSelectorTool > m_trkSelector; - ToolHandle < InDet::VertexPointEstimator > m_vertexEstimator; Trk::TrkVKalVrtFitter* m_VKVFitter; bool m_useMassConst; double m_altMassConst; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus1Track.cxx b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus1Track.cxx index cefc80ebf00896e9c7ecaebd092aecc24cf15129..990e66c6a487993e39aa24e6b4069979cc7c214c 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus1Track.cxx +++ b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus1Track.cxx @@ -43,7 +43,6 @@ namespace Analysis { ATH_CHECK( m_trkSelector.retrieve()); // Get the vertex point estimator tool from ToolSvc - ATH_CHECK(m_vertexEstimator.retrieve()); ATH_CHECK(m_jpsiCollectionKey.initialize()); ATH_CHECK(m_TrkParticleCollection.initialize()); if(m_MuonsUsedInJpsi.key() == "NONE") m_MuonsUsedInJpsi = "";//for backwards compatability @@ -86,7 +85,6 @@ namespace Analysis { m_excludeCrossJpsiTracks(false), m_iVertexFitter("Trk::TrkVKalVrtFitter"), m_trkSelector("InDet::TrackSelectorTool"), - m_vertexEstimator("InDet::VertexPointEstimator"), m_useMassConst(true), m_altMassConst(-1.0), m_chi2cut(-1.0), @@ -116,7 +114,6 @@ namespace Analysis { declareProperty("TrackSelectorTool", m_trkSelector); declareProperty("UseMassConstraint", m_useMassConst); declareProperty("AlternativeMassConstraint",m_altMassConst); - declareProperty("VertexPointEstimator", m_vertexEstimator); // additional cuts by Daniel Scheirich copied from 2Tracks by Adam Barton declareProperty("Chi2Cut",m_chi2cut); @@ -439,13 +436,11 @@ namespace Analysis { } // Do the fit itself....... - // Starting point (use the J/psi position) - const Trk::Perigee& aPerigee1 = inputTracks[0]->perigeeParameters(); - const Trk::Perigee& aPerigee2 = inputTracks[1]->perigeeParameters(); - int sflag = 0; - int errorcode = 0; - Amg::Vector3D startingPoint = m_vertexEstimator->getCirclesIntersectionPoint(&aPerigee1,&aPerigee2,sflag,errorcode); - if (errorcode != 0) {startingPoint(0) = 0.0; startingPoint(1) = 0.0; startingPoint(2) = 0.0;} + Amg::Vector3D startingPoint(0,0,0); + StatusCode sc=m_VKVFitter->VKalVrtFitFast(inputTracks, startingPoint, *state); + if(sc.isFailure()){ + startingPoint = Amg::Vector3D(0,0,0); + } xAOD::Vertex* theResult = m_VKVFitter->fit(inputTracks, startingPoint, *state); // Added by ASC diff --git a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus2Tracks.cxx b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus2Tracks.cxx index dc15d54659f7ec8d9f2a880b5d33ffb292395fe1..d8a5009b06e262c2d69e4af5e0f507c35f4e4b74 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus2Tracks.cxx +++ b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus2Tracks.cxx @@ -40,8 +40,6 @@ namespace Analysis { // Get the track selector tool from ToolSvc ATH_CHECK(m_trkSelector.retrieve()); - // Get the vertex point estimator tool from ToolSvc - ATH_CHECK(m_vertexEstimator.retrieve()); ATH_CHECK(m_jpsiCollectionKey.initialize()); ATH_CHECK(m_TrkParticleCollection.initialize()); @@ -107,7 +105,6 @@ namespace Analysis { m_excludeCrossJpsiTracks(false), m_iVertexFitter("Trk::TrkVKalVrtFitter"), m_trkSelector("InDet::TrackSelectorTool"), - m_vertexEstimator("InDet::VertexPointEstimator"), m_useMassConst(true), m_altMassConst(-1.0), m_diTrackMassUpper(-1.0), @@ -148,7 +145,6 @@ namespace Analysis { declareProperty("AlternativeMassConstraint",m_altMassConst); declareProperty("DiTrackMassUpper",m_diTrackMassUpper); declareProperty("DiTrackMassLower",m_diTrackMassLower); - declareProperty("VertexPointEstimator", m_vertexEstimator); // additional cuts by Daniel Scheirich declareProperty("Chi2Cut",m_chi2cut); declareProperty("DiTrackPt",m_diTrackPt); @@ -452,12 +448,11 @@ namespace Analysis { // Do the fit itself....... // Starting point (use the J/psi position) - const Trk::Perigee& aPerigee1 = inputTracks[0]->perigeeParameters(); - const Trk::Perigee& aPerigee2 = inputTracks[1]->perigeeParameters(); - int sflag = 0; - int errorcode = 0; - Amg::Vector3D startingPoint = m_vertexEstimator->getCirclesIntersectionPoint(&aPerigee1,&aPerigee2,sflag,errorcode); - if (errorcode != 0) {startingPoint(0) = 0.0; startingPoint(1) = 0.0; startingPoint(2) = 0.0;} + Amg::Vector3D startingPoint(0,0,0); + StatusCode sc=m_VKVFitter->VKalVrtFitFast(inputTracks, startingPoint, *state); + if(sc.isFailure()){ + startingPoint = Amg::Vector3D(0,0,0); + } xAOD::Vertex* theResult = m_VKVFitter->fit(inputTracks, startingPoint, *state); // Added by ASC