CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoTracker/TkHitPairs/interface/LayerWithHits.h

Go to the documentation of this file.
00001 #ifndef LayerWithHits_H
00002 #define LayerWithHits_H
00003 
00004 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00005 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
00006 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
00007 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
00008 #include "DataFormats/Common/interface/DetSetVectorNew.h"
00009 #include "DataFormats/Common/interface/DetSetAlgorithm.h"
00010 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00011 
00012 class LayerWithHits
00013 {
00014  public:
00015   LayerWithHits(const DetLayer *dl,std::vector<const TrackingRecHit*> theInputHits):
00016     theDetLayer(dl),theHits(theInputHits){}
00017   
00021   template <typename DSTV, typename SEL>
00022   LayerWithHits(const DetLayer *dl,
00023                 DSTV const & allhits,    
00024                 SEL  const & sel) 
00025   {
00026     theDetLayer = dl;
00027     edmNew::copyDetSetRange(allhits,theHits,sel);
00028   } 
00029 
00030 
00031   //destructor
00032   ~LayerWithHits(){}
00033   
00035   const std::vector<const TrackingRecHit*>& recHits() const {return theHits;}
00036 
00037   //detlayer
00038   const  DetLayer* layer()  const {return theDetLayer;}
00039   
00040  private:
00041   const DetLayer* theDetLayer;
00042   std::vector<const TrackingRecHit*> theHits;
00043 };
00044 #endif
00045