CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoLocalTracker/SiStripRecHitConverter/interface/SiStripRecHitConverterAlgorithm.h

Go to the documentation of this file.
00001 #ifndef SiStripRecHitConverterAlgorithm_h
00002 #define SiStripRecHitConverterAlgorithm_h
00003 
00004 #include "FWCore/Framework/interface/ESHandle.h"
00005 #include "DataFormats/Common/interface/Handle.h"
00006 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
00007 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
00008 #include "DataFormats/GeometryVector/interface/LocalVector.h"
00009 
00010 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00011 #include "RecoLocalTracker/SiStripRecHitConverter/interface/SiStripRecHitMatcher.h"
00012 #include "RecoLocalTracker/ClusterParameterEstimator/interface/StripClusterParameterEstimator.h"
00013 #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h"
00014 
00015 namespace edm {
00016    class ParameterSet;
00017    template<typename T> class RefGetter;
00018    class EventSetup;
00019 }
00020 
00021 class SiStripRecHitConverterAlgorithm 
00022 {
00023 
00024  public:
00025   
00026   struct products {
00027     std::auto_ptr<SiStripMatchedRecHit2DCollection> matched;
00028     std::auto_ptr<SiStripRecHit2DCollection> rphi, stereo, rphiUnmatched, stereoUnmatched;
00029     products() 
00030       :  matched(new SiStripMatchedRecHit2DCollection),
00031          rphi(new SiStripRecHit2DCollection),
00032          stereo(new SiStripRecHit2DCollection),
00033          rphiUnmatched(new SiStripRecHit2DCollection),
00034          stereoUnmatched(new SiStripRecHit2DCollection) {}
00035   };
00036   
00037   SiStripRecHitConverterAlgorithm(const edm::ParameterSet&);
00038   void initialize(const edm::EventSetup&);  
00039   void run(edm::Handle<edmNew::DetSetVector<SiStripCluster> > input, products& output);
00040   void run(edm::Handle<edmNew::DetSetVector<SiStripCluster> > input, products& output, LocalVector trackdirection);
00041   void run(edm::Handle<edm::RefGetter<SiStripCluster> >, edm::Handle<edm::LazyGetter<SiStripCluster> >, products&);
00042   
00043  private:
00044   
00045   void match(products& output, LocalVector trackdirection) const;
00046   void fillBad128StripBlocks(const uint32_t detid, bool bad128StripBlocks[6]) const;
00047   bool isMasked(const SiStripCluster &cluster, bool bad128StripBlocks[6]) const;
00048   bool useModule(const uint32_t id) const;
00049   
00050   bool useQuality, maskBad128StripBlocks;
00051   uint32_t tracker_cache_id, cpe_cache_id, quality_cache_id;
00052   edm::ESInputTag cpeTag, matcherTag, qualityTag;
00053   edm::ESHandle<TrackerGeometry> tracker;
00054   edm::ESHandle<StripClusterParameterEstimator> parameterestimator;
00055   edm::ESHandle<SiStripRecHitMatcher> matcher;
00056   edm::ESHandle<SiStripQuality> quality;
00057   
00058   typedef SiStripRecHit2DCollection::FastFiller Collector;
00059 
00060 };
00061 
00062 #endif