38#include "CLHEP/Vector/LorentzVector.h"
39#include "CLHEP/Vector/ThreeVector.h"
40#include "CLHEP/Geometry/Vector3D.h"
61#define InDetImprovedJetFitterVxFinder_DEBUGAddOns
73 {
return first > other.first; }
83 {
return first > other.first; }
90 declareInterface< ISecVertexInJetFinder >(
this) ;
100 msg(MSG::ERROR) <<
"Could not find TrackSelector tool." <<
endmsg;
101 return StatusCode::FAILURE;
102 }
else msg(MSG::INFO) <<
" JetFitterTrackSelector retrieved" <<
endmsg;
105 msg(MSG::ERROR) <<
"Could not find TwoTrackVtxFinder tool." <<
endmsg;
106 return StatusCode::FAILURE;
107 }
else msg(MSG::INFO) <<
" JetFitterTwoTrackVtxFinder retrieved" <<
endmsg;
110 msg(MSG::ERROR) <<
"Could not find V0Finder tool." <<
endmsg;
111 return StatusCode::FAILURE;
112 }
else msg(MSG::INFO) <<
" JetFitterV0Finder retrieved" <<
endmsg;
115 msg(MSG::ERROR) <<
"Could not find JetFitterMultiStageFit tool." <<
endmsg;
116 return StatusCode::FAILURE;
117 }
else msg(MSG::INFO) <<
" JetFitterMultiStageFit retrieved" <<
endmsg;
119 return StatusCode::SUCCESS;
124 const TLorentzVector & jetMomentum,
125 const std::vector<const xAOD::IParticle*> & inputTracks)
const
136 ATH_MSG_DEBUG(
"the selected tracks now are " << mySelectedTracksInJet );
137 std::vector< const Trk::ITrackLink* > primaryTracks = mySelectedTracksInJet->
getPrimaryTrackLinks();
142 const std::vector< const xAOD::Vertex* > vertexCandidates = twoTrackVertexCandidates->
getTwoTrackVertice();
146 std::vector< const Trk::ITrackLink* > tracksToUseInFirstFit;
147 std::vector< const Trk::ITrackLink* > tracksToUseInSecondFit;
151 tracksToUseInFirstFit, tracksToUseInSecondFit, JFseedDirection );
154 ATH_MSG_DEBUG(
"Sorting track collection (tracksToUseInFirstFit) by pT..." );
156 ATH_MSG_DEBUG(
"Sorting track collection (tracksToUseInSecondFit) by pT..." );
159 delete twoTrackVertexCandidates;
166 primaryVertex.covariancePosition(),
174 tracksToUseInFirstFit,
175 tracksToUseInSecondFit,
179 if (myJetCandidate ==
nullptr) {
189 std::vector<Trk::VxJetCandidate*> myCandidates;
191 myCandidates.push_back(myJetCandidate);
194 myTwoTrackVerticesInJet,
195 mySelectedTracksInJet);
204 const TLorentzVector & ,
205 const std::vector<const Trk::ITrackLink*> & ,
206 const std::vector<const Trk::ITrackLink*> & ,
229 if ( trackCollection.empty() )
return;
232 ( trackCollection.front()->parameters() )->pT() <<
234 ( trackCollection.back()->parameters() )->pT() );
237 trackCollection.end(),
240 return ( (TL1->parameters())->pT() < (TL2->parameters())->pT() );
244 ( trackCollection.front()->parameters() )->pT() <<
246 ( trackCollection.back()->parameters() )->pT() );
253 std::vector<std::string>
virtual Trk::VxSecVertexInfo * findSecVertex(const xAOD::Vertex &primaryVertex, const TLorentzVector &jetMomentum, const std::vector< const xAOD::IParticle * > &inputTracks) const override
InDetImprovedJetFitterVxFinder(const std::string &t, const std::string &n, const IInterface *p)
virtual std::vector< std::string > trackDecorationNames() const override
Return a list of the names of track decorations created by this tool, in order to allow them to be lo...
ToolHandle< JetFitterTrackSelectorTool > m_theTrackSelector
void sortTrackCollectionByPt(std::vector< const Trk::ITrackLink * > &) const
~InDetImprovedJetFitterVxFinder()
ToolHandle< JetFitterMultiStageFit > m_multiStageFitter
virtual StatusCode initialize() override
ToolHandle< JetFitterTwoTrackVtxFinderTool > m_theTwoTrackVtxFinderTool
ToolHandle< JetFitterV0FinderTool > m_theV0FinderTool
void doTheFit(Trk::VxJetCandidate *myJetCandidate, bool performClustering=true) const
An abstract class which is meant to represent an element link to the Trk::Track or Trk::TrackParticle...
Trk::RecVertex inherits from Trk::Vertex.
const std::vector< const ITrackLink * > & getSecondaryTrackLinks() const
Get the secondary tracks (please do not delete the pointers)
const std::vector< const ITrackLink * > & getPrimaryTrackLinks() const
Get the priamry tracks (please do not delete the pointers)
const std::vector< const xAOD::Vertex * > & getTwoTrackVertice() const
Get the two track vertices (please do not delete the pointers)
void setSVOwnership(bool Ownership)
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
float chiSquared() const
Returns the of the vertex fit as float.
const Amg::Vector3D & position() const
Returns the 3-pos.
Eigen::Matrix< double, 3, 1 > Vector3D
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Vertex_v1 Vertex
Define the latest version of the vertex class.
bool operator<(const TrackParticle_pair &other) const
const Trk::TrackParticleBase * second
TrackParticle_pair(double p1, const Trk::TrackParticleBase *p2)
const Trk::Track * second
bool operator<(const Track_pair &other) const
Track_pair(double p1, const Trk::Track *p2)