CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h

Go to the documentation of this file.
00001 #ifndef TkSeedingLayers_SeedingHitSet_H
00002 #define TkSeedingLayers_SeedingHitSet_H
00003 
00004 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00005 
00006 class SeedingHitSet {
00007 public:
00008 
00009   typedef  TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer;
00010 
00011   static ConstRecHitPointer nullPtr() { return ConstRecHitPointer();}
00012 
00013   SeedingHitSet(ConstRecHitPointer const & one, ConstRecHitPointer const & two) 
00014   // : theRecHits{{one,two,ConstRecHitPointer()}}
00015   {
00016     theRecHits[0]=one;
00017     theRecHits[1]=two;
00018   }
00019   SeedingHitSet(ConstRecHitPointer const & one, ConstRecHitPointer const & two, 
00020                 ConstRecHitPointer const & three) 
00021   // : theRecHits{{one,two,three}},
00022   {
00023     theRecHits[0]=one;
00024     theRecHits[1]=two;
00025     theRecHits[2]=three;
00026   }
00027   
00028   ~SeedingHitSet(){}
00029   
00030   
00031   unsigned int size() const { return theRecHits[2].get() ? 3 : 2; }
00032   
00033   ConstRecHitPointer const &  get(unsigned int i) const { return theRecHits[i]; }
00034   ConstRecHitPointer const & operator[](unsigned int i) const { return theRecHits[i]; }
00035   
00036   
00037 private:
00038   ConstRecHitPointer theRecHits[3];
00039 };
00040 
00041 
00042 #endif