CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/TrackingTools/RoadSearchHitAccess/interface/DetHitAccess.h

Go to the documentation of this file.
00001 #ifndef RoadSearch_DetHitAccess_h
00002 #define RoadSearch_DetHitAccess_h
00003 
00004 #include <string>
00005 #include <vector>
00006 #include <algorithm>
00007 
00008 #include "DataFormats/Common/interface/Handle.h"
00009 #include "FWCore/Framework/interface/ESHandle.h"
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 #include "FWCore/Framework/interface/EventSetup.h"
00012 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00013 
00014 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
00015 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
00016 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
00017 #include "DataFormats/DetId/interface/DetId.h"
00018 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00019 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
00020 #include "DataFormats/SiStripDetId/interface/TECDetId.h"
00021 
00022 class DetHitAccess {
00023 
00024  public:
00025 
00026   enum accessMode {standard,rphi,rphi_stereo};
00027 
00028   DetHitAccess();
00029 
00030   ~DetHitAccess();
00031 
00032   DetHitAccess(const SiStripRecHit2DCollection* rphiRecHits,
00033                const SiStripRecHit2DCollection* stereoRecHits,
00034                const SiStripMatchedRecHit2DCollection* matchedRecHits,
00035                const SiPixelRecHitCollection* pixelRecHits);
00036    
00037   void setCollections(const SiStripRecHit2DCollection* rphiRecHits,
00038                       const SiStripRecHit2DCollection* stereoRecHits,
00039                       const SiStripMatchedRecHit2DCollection* matchedRecHits,
00040                       const SiPixelRecHitCollection* pixelRecHits);
00041 
00042   std::vector<TrackingRecHit*> getHitVector(const DetId* detid);
00043 
00044   inline void setMode(accessMode input) { accessMode_ = input; }
00045   inline void use_rphiRecHits(bool input) {use_rphiRecHits_ = input;}
00046   inline void use_stereoRecHits(bool input) {use_stereoRecHits_ = input;}
00047 
00048  private:
00049 
00050   accessMode accessMode_;
00051 
00052   bool use_rphiRecHits_;
00053   bool use_stereoRecHits_;
00054 
00055   const SiStripRecHit2DCollection* rphiHits_;
00056   const SiStripRecHit2DCollection* stereoHits_;
00057   const SiStripMatchedRecHit2DCollection * matchedHits_;
00058   const SiPixelRecHitCollection *pixelHits_;
00059 
00060 };
00061 
00062 #endif