CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoTracker/TkSeedingLayers/src/HitExtractorSTRP.h

Go to the documentation of this file.
00001 #ifndef RecoTracker_TkSeedingLayers_HitExtractorSTRP_H
00002 #define RecoTracker_TkSeedingLayers_HitExtractorSTRP_H
00003 
00004 #include "RecoTracker/TkSeedingLayers/interface/SeedingLayer.h"
00005 #include "FWCore/Utilities/interface/InputTag.h"
00006 #include "HitExtractor.h"
00007 
00008 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h"
00009 
00010 #include <vector>
00011 class DetLayer;
00012 
00013 
00014 namespace ctfseeding {
00015 
00016 class HitExtractorSTRP : public HitExtractor {
00017 
00018 public:
00019   typedef SiStripRecHit2D::ClusterRef SiStripClusterRef;
00020 
00021   HitExtractorSTRP( const DetLayer* detLayer,  SeedingLayer::Side & side, int idLayer);
00022   virtual ~HitExtractorSTRP(){}
00023 
00024   virtual HitExtractor::Hits hits( const SeedingLayer & sl, const edm::Event& , const edm::EventSetup& ) const;
00025   virtual HitExtractorSTRP * clone() const { return new HitExtractorSTRP(*this); }
00026 
00027   void useMatchedHits( const edm::InputTag & m) { hasMatchedHits = true; theMatchedHits = m; }
00028   void useRPhiHits(    const edm::InputTag & m) { hasRPhiHits    = true; theRPhiHits = m; }
00029   void useStereoHits(  const edm::InputTag & m) { hasStereoHits = true; theStereoHits = m; }
00030   void useRingSelector(int minRing, int maxRing);
00031   void useSimpleRphiHitsCleaner(bool use) {hasSimpleRphiHitsCleaner = use;}
00032 
00033   void cleanedOfClusters( const edm::Event& ev, HitExtractor::Hits & hits, bool matched) const;
00034   bool skipThis(TransientTrackingRecHit::ConstRecHitPointer & ptr,edm::Handle<edmNew::DetSetVector<SiStripClusterRef> > & stripClusterRefs,
00035                 TransientTrackingRecHit::ConstRecHitPointer & replaceMe) const;
00036   bool skipThis(const SiStripRecHit2D * hit,edm::Handle<edmNew::DetSetVector<SiStripClusterRef> > & stripClusterRefs) const;
00037   void project(TransientTrackingRecHit::ConstRecHitPointer & ptr,
00038                const SiStripRecHit2D * hit,
00039                TransientTrackingRecHit::ConstRecHitPointer & replaceMe) const;
00040   void setNoProjection() const {failProjection=true;};
00041 private:
00042   bool ringRange(int ring) const;
00043 private:
00044   const DetLayer * theLayer;
00045   SeedingLayer::Side theSide;
00046   mutable const SeedingLayer * theSLayer;
00047   int theIdLayer;
00048   bool hasMatchedHits; edm::InputTag theMatchedHits;
00049   bool hasRPhiHits;    edm::InputTag theRPhiHits;
00050   bool hasStereoHits;  edm::InputTag theStereoHits;
00051   bool hasRingSelector; int theMinRing, theMaxRing; 
00052   bool hasSimpleRphiHitsCleaner;
00053   mutable bool failProjection;
00054 };
00055 
00056 }
00057 #endif