CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TransientTrackInGroupOfTracks.h
Go to the documentation of this file.
1 #ifndef TRANSIENTTRACKINGROUPOFTRACKS_H
2 #define TRANSIENTTRACKINGROUPOFTRACKS_H
3 
5 #include <vector>
6 
7 // class to find out if a TransientTrack is in a group of TransientTracks
8 
10 
11 public:
12 
14 
16 
17  static bool isInGroup ( const reco::TransientTrack & aTrack ,
18  const std::vector<reco::TransientTrack> groupOfTracks ) {
19  bool trackFound = false;
20  for( std::vector<reco::TransientTrack>::const_iterator itT = groupOfTracks.begin() ;
21  itT != groupOfTracks.end() ; itT++ ) {
22  //if ( aTrack.sameAddress(*itT) ) trackFound = true ;
23  //std::cout<<"a,b: "<<(aTrack.impactPointState().signedInverseMomentum())<<","<<((*itT).impactPointState().signedInverseMomentum())<<std::endl;
24  if (aTrack == *itT) {
25  trackFound = true;
26  // std::cout<<"found!\n";
27  }
28  // else std::cout<<"not found!\n";
29  }
30  // if(!trackFound) std::cout<<"NOT FOUND!\n";
31  return trackFound ;
32  }
33 
34 };
35 #endif
static bool isInGroup(const reco::TransientTrack &aTrack, const std::vector< reco::TransientTrack > groupOfTracks)