CMS 3D CMS Logo

SiStripRecHitConverterAlgorithm.h

Go to the documentation of this file.
00001 #ifndef SiStripRecHitConverterAlgorithm_h
00002 #define SiStripRecHitConverterAlgorithm_h
00003 # // -*-C++-*-
00004 
00014 #include <string>
00015 
00016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00017 
00018 #include "RecoLocalTracker/SiStripRecHitConverter/interface/SiStripRecHitMatcher.h"
00019 #include "RecoLocalTracker/ClusterParameterEstimator/interface/StripClusterParameterEstimator.h"
00020 
00021 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
00022 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
00023 #include "DataFormats/SiStripCluster/interface/SiStripClusterCollection.h"
00024 #include "DataFormats/Common/interface/DetSetVector.h"
00025 #include "DataFormats/Common/interface/DetSetVectorNew.h"
00026 #include "DataFormats/Common/interface/RefGetter.h"
00027 
00028 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00029 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00030 
00031 #include "MagneticField/Engine/interface/MagneticField.h"
00032 
00033 #include "DataFormats/Common/interface/Handle.h"
00034 #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h"
00035 
00036 class SiStripRecHitConverterAlgorithm 
00037 {
00038  public:
00039   
00040   SiStripRecHitConverterAlgorithm(const edm::ParameterSet& conf);
00041   ~SiStripRecHitConverterAlgorithm();
00042   
00043 
00045 
00046     void run(edm::Handle<edmNew::DetSetVector<SiStripCluster> >  input,SiStripMatchedRecHit2DCollection & outmatched,SiStripRecHit2DCollection & outrphi, SiStripRecHit2DCollection & outstereo,const TrackerGeometry& tracker,const StripClusterParameterEstimator &stripcpe, const SiStripRecHitMatcher &clustermatch_, const SiStripQuality *quality = 0);
00047     void run(edm::Handle<edmNew::DetSetVector<SiStripCluster> >  input, SiStripMatchedRecHit2DCollection&  output, SiStripRecHit2DCollection&  outrphi,SiStripRecHit2DCollection&  outstereo,const TrackerGeometry & tracker,const StripClusterParameterEstimator &stripcpe ,const SiStripRecHitMatcher &clustermatch_, LocalVector trackdirection, const SiStripQuality *quality = 0);
00048     void run(edm::Handle<edm::RefGetter<SiStripCluster> >  input1, edm::Handle<edm::LazyGetter<SiStripCluster> > input2, SiStripMatchedRecHit2DCollection & outmatched,SiStripRecHit2DCollection & outrphi, SiStripRecHit2DCollection & outstereo,const TrackerGeometry& tracker,const StripClusterParameterEstimator &parameterestimator, const SiStripRecHitMatcher & matcher, const SiStripQuality *quality = 0);
00049 
00050  private:
00051 
00052     //void convert(const SiStripCluster& cluster,SiStripRecHit2DCollection & outrphi, SiStripRecHit2DCollection & outstereo,const TrackerGeometry& tracker,const StripClusterParameterEstimator &parameterestimator);
00053     
00054     void match(SiStripMatchedRecHit2DCollection & outmatched,SiStripRecHit2DCollection & outrphi, SiStripRecHit2DCollection & outstereo,const TrackerGeometry& tracker, const SiStripRecHitMatcher & matcher,LocalVector trackdirection) const;
00055       
00056   edm::ParameterSet conf_;
00057 
00058     inline bool isMasked(const SiStripCluster &cluster, bool bad128StripBlocks[6]) const {
00059         if ( bad128StripBlocks[cluster.firstStrip() >> 7] ) {
00060             if ( bad128StripBlocks[(cluster.firstStrip()+cluster.amplitudes().size())  >> 7] ||
00061                  bad128StripBlocks[static_cast<int32_t>(cluster.barycenter()-0.499999) >> 7] ) {
00062                 return true;
00063             }
00064         } else {
00065             if ( bad128StripBlocks[(cluster.firstStrip()+cluster.amplitudes().size())  >> 7] &&
00066                  bad128StripBlocks[static_cast<int32_t>(cluster.barycenter()-0.499999) >> 7] ) {
00067                 return true;
00068             }
00069         }
00070         return false;
00071     }
00072     void   fillBad128StripBlocks(const SiStripQuality &quality, const uint32_t &detid, bool bad128StripBlocks[6]) const ;
00073     
00074 };
00075 
00076 #endif

Generated on Tue Jun 9 17:44:00 2009 for CMSSW by  doxygen 1.5.4