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 class ParameterSet;
00016 class RefGetter;
00017
00018 class SiStripRecHitConverterAlgorithm
00019 {
00020
00021 public:
00022
00023 struct products {
00024 std::auto_ptr<SiStripMatchedRecHit2DCollection> matched;
00025 std::auto_ptr<SiStripRecHit2DCollection> rphi, stereo, rphiUnmatched, stereoUnmatched;
00026 products()
00027 : matched(new SiStripMatchedRecHit2DCollection),
00028 rphi(new SiStripRecHit2DCollection),
00029 stereo(new SiStripRecHit2DCollection),
00030 rphiUnmatched(new SiStripRecHit2DCollection),
00031 stereoUnmatched(new SiStripRecHit2DCollection) {}
00032 };
00033
00034 SiStripRecHitConverterAlgorithm(const edm::ParameterSet&);
00035 void initialize(const edm::EventSetup&);
00036 void run(edm::Handle<edmNew::DetSetVector<SiStripCluster> > input, products& output);
00037 void run(edm::Handle<edmNew::DetSetVector<SiStripCluster> > input, products& output, LocalVector trackdirection);
00038 void run(edm::Handle<edm::RefGetter<SiStripCluster> >, edm::Handle<edm::LazyGetter<SiStripCluster> >, products&);
00039
00040 private:
00041
00042 void match(products& output, LocalVector trackdirection) const;
00043 void fillBad128StripBlocks(const uint32_t detid, bool bad128StripBlocks[6]) const;
00044 bool isMasked(const SiStripCluster &cluster, bool bad128StripBlocks[6]) const;
00045 bool useModule(const uint32_t id) const;
00046
00047 bool useQuality, maskBad128StripBlocks;
00048 uint32_t tracker_cache_id, cpe_cache_id, quality_cache_id;
00049 edm::ESInputTag cpeTag, matcherTag, qualityTag;
00050 edm::ESHandle<TrackerGeometry> tracker;
00051 edm::ESHandle<StripClusterParameterEstimator> parameterestimator;
00052 edm::ESHandle<SiStripRecHitMatcher> matcher;
00053 edm::ESHandle<SiStripQuality> quality;
00054
00055 typedef SiStripRecHit2DCollection::FastFiller Collector;
00056
00057 };
00058
00059 #endif