CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TransientTrackInVertices.h
Go to the documentation of this file.
1 #ifndef TRANSIENTTRACKINVERTICES_H
2 #define TRANSIENTTRACKINVERTICES_H
3 
7 #include <vector>
8 
9 // class to find out if a TransientTrack is in a (group of) vertices
10 
12 
13 public:
14 
17 
18  static bool isInVertex (const reco::TransientTrack & aTrack ,
19  const TransientVertex & aVertex ) {
20  return TransientTrackInGroupOfTracks::isInGroup ( aTrack , aVertex.originalTracks() );
21  }
22 
23  static bool isInVertex ( const reco::TransientTrack & aTrack ,
24  const std::vector<TransientVertex> vertices ) {
25  bool isInVertices = false ;
26  for(std::vector<TransientVertex>::const_iterator itV = vertices.begin();
27  itV != vertices.end() ; itV++ ) {
28  if ( isInVertex ( aTrack , *itV ) ) isInVertices = true ;
29  }
30  return isInVertices ;
31  }
32 
33 };
34 
35 #endif
36 
static bool isInVertex(const reco::TransientTrack &aTrack, const std::vector< TransientVertex > vertices)
static bool isInGroup(const reco::TransientTrack &aTrack, const std::vector< reco::TransientTrack > groupOfTracks)
std::vector< reco::TransientTrack > originalTracks() const
static bool isInVertex(const reco::TransientTrack &aTrack, const TransientVertex &aVertex)