CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/RecoVertex/MultiVertexFit/interface/LinTrackCache.h

Go to the documentation of this file.
00001 #ifndef _LinTrackCache_H_
00002 #define _LinTrackCache_H_
00003 
00004 #include <map>
00005 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00006 #include "RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h"
00007 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
00008 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00009 
00010 class LinTrackCache
00011 {
00012 private:
00013   struct Comparer
00014   {
00015     bool operator() ( const GlobalPoint &, const GlobalPoint & );
00016   };
00017 
00018   struct Vicinity
00019   {
00020     bool operator() ( const GlobalPoint &, const GlobalPoint & );
00021   };
00022 
00023 public:
00024 
00025   typedef ReferenceCountingPointer<LinearizedTrackState<5> > RefCountedLinearizedTrackState;
00026 
00031   RefCountedLinearizedTrackState linTrack ( const GlobalPoint &, const reco::TransientTrack & );
00032   ~LinTrackCache();
00033   void clear();
00034 
00035 private:
00036   typedef std::map < reco::TransientTrack, RefCountedLinearizedTrackState > LinTrkMap;
00037   typedef std::map < reco::TransientTrack, bool > HasLinTrkMap;
00038   std::map < GlobalPoint, LinTrkMap, Vicinity > theLinTracks;
00039   std::map < GlobalPoint, HasLinTrkMap, Vicinity > theHasLinTrack;
00040 };
00041 
00042 #endif