CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/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 namespace edm {
00014   template< typename T> class ContainerMask;
00015 }
00016 
00017 namespace ctfseeding {
00018 
00019 class HitExtractorSTRP : public HitExtractor {
00020 
00021 public:
00022   typedef SiStripRecHit2D::ClusterRef SiStripClusterRef;
00023 
00024   HitExtractorSTRP( const DetLayer* detLayer,  SeedingLayer::Side & side, int idLayer);
00025   virtual ~HitExtractorSTRP(){}
00026 
00027   virtual HitExtractor::Hits hits( const SeedingLayer & sl, const edm::Event& , const edm::EventSetup& ) const;
00028   virtual HitExtractorSTRP * clone() const { return new HitExtractorSTRP(*this); }
00029 
00030   void useMatchedHits( const edm::InputTag & m) { hasMatchedHits = true; theMatchedHits = m; }
00031   void useRPhiHits(    const edm::InputTag & m) { hasRPhiHits    = true; theRPhiHits = m; }
00032   void useStereoHits(  const edm::InputTag & m) { hasStereoHits = true; theStereoHits = m; }
00033   void useRingSelector(int minRing, int maxRing);
00034   void useSimpleRphiHitsCleaner(bool use) {hasSimpleRphiHitsCleaner = use;}
00035 
00036   void cleanedOfClusters( const edm::Event& ev, HitExtractor::Hits & hits, bool matched, unsigned int cleanFrom=0) const;
00037 
00038   bool skipThis(TransientTrackingRecHit::ConstRecHitPointer & ptr,edm::Handle<edm::ContainerMask<edmNew::DetSetVector<SiStripCluster> > > & stripClusterMask,
00039                 TransientTrackingRecHit::ConstRecHitPointer & replaceMe) const;
00040 
00041   bool skipThis(OmniClusterRef const& clus, edm::Handle<edm::ContainerMask<edmNew::DetSetVector<SiStripCluster> > > & stripClusterMask) const;
00042 
00043   void project(TransientTrackingRecHit::ConstRecHitPointer & ptr,
00044                const SiStripRecHit2D * hit,
00045                TransientTrackingRecHit::ConstRecHitPointer & replaceMe) const;
00046   void setNoProjection() const {failProjection=true;};
00047 private:
00048   bool ringRange(int ring) const;
00049 private:
00050   const DetLayer * theLayer;
00051   SeedingLayer::Side theSide;
00052   mutable const SeedingLayer * theSLayer;
00053   int theIdLayer;
00054   bool hasMatchedHits; edm::InputTag theMatchedHits;
00055   bool hasRPhiHits;    edm::InputTag theRPhiHits;
00056   bool hasStereoHits;  edm::InputTag theStereoHits;
00057   bool hasRingSelector; int theMinRing, theMaxRing; 
00058   bool hasSimpleRphiHitsCleaner;
00059   mutable bool failProjection;
00060 };
00061 
00062 }
00063 #endif