38 #include "CLHEP/Vector/LorentzVector.h"
39 #include "CLHEP/Vector/ThreeVector.h"
40 #include "CLHEP/Geometry/Vector3D.h"
61 #define InDetImprovedJetFitterVxFinder_DEBUGAddOns
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() );
236 std::sort( trackCollection.begin(),
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>