00001 #ifndef TRANSIENTTRACKINVERTICES_H 00002 #define TRANSIENTTRACKINVERTICES_H 00003 00004 #include "RecoVertex/TertiaryTracksVertexFinder/interface/TransientTrackInGroupOfTracks.h" 00005 #include "RecoVertex/VertexPrimitives/interface/TransientVertex.h" 00006 #include "TrackingTools/TransientTrack/interface/TransientTrack.h" 00007 #include <vector> 00008 00009 // class to find out if a TransientTrack is in a (group of) vertices 00010 00011 class TransientTrackInVertices { 00012 00013 public: 00014 00015 TransientTrackInVertices () {} 00016 ~TransientTrackInVertices () {} 00017 00018 static bool isInVertex (const reco::TransientTrack & aTrack , 00019 const TransientVertex & aVertex ) { 00020 return TransientTrackInGroupOfTracks::isInGroup ( aTrack , aVertex.originalTracks() ); 00021 } 00022 00023 static bool isInVertex ( const reco::TransientTrack & aTrack , 00024 const std::vector<TransientVertex> vertices ) { 00025 bool isInVertices = false ; 00026 for(std::vector<TransientVertex>::const_iterator itV = vertices.begin(); 00027 itV != vertices.end() ; itV++ ) { 00028 if ( isInVertex ( aTrack , *itV ) ) isInVertices = true ; 00029 } 00030 return isInVertices ; 00031 } 00032 00033 }; 00034 00035 #endif 00036