CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/RecoVertex/TertiaryTracksVertexFinder/interface/TransientTrackInGroupOfTracks.h

Go to the documentation of this file.
00001 #ifndef TRANSIENTTRACKINGROUPOFTRACKS_H  
00002 #define TRANSIENTTRACKINGROUPOFTRACKS_H 
00003 
00004 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00005 #include <vector>
00006 
00007 // class to find out if a TransientTrack is in a group of TransientTracks 
00008 
00009 class TransientTrackInGroupOfTracks {
00010 
00011 public:
00012 
00013   TransientTrackInGroupOfTracks() {}
00014 
00015   ~TransientTrackInGroupOfTracks() {}
00016   
00017   static bool isInGroup ( const reco::TransientTrack & aTrack , 
00018     const std::vector<reco::TransientTrack> groupOfTracks ) {
00019     bool trackFound = false;
00020     for( std::vector<reco::TransientTrack>::const_iterator itT = groupOfTracks.begin() ; 
00021       itT != groupOfTracks.end() ; itT++ ) {
00022       //if ( aTrack.sameAddress(*itT) ) trackFound = true ;
00023       //std::cout<<"a,b: "<<(aTrack.impactPointState().signedInverseMomentum())<<","<<((*itT).impactPointState().signedInverseMomentum())<<std::endl;
00024       if (aTrack == *itT) { 
00025         trackFound = true;
00026         //        std::cout<<"found!\n";
00027       }
00028       //      else std::cout<<"not found!\n";
00029     }
00030     //    if(!trackFound) std::cout<<"NOT FOUND!\n";
00031     return trackFound ;
00032   }
00033   
00034 };
00035 #endif