CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoTracker/MeasurementDet/interface/MeasurementTracker.h

Go to the documentation of this file.
00001 #ifndef MeasurementTracker_H
00002 #define MeasurementTracker_H
00003 
00004 #include "TrackingTools/MeasurementDet/interface/MeasurementDetSystem.h"
00005 #include "DataFormats/DetId/interface/DetId.h"
00006 #include "RecoLocalTracker/ClusterParameterEstimator/interface/StripClusterParameterEstimator.h"
00007 #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
00008 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00009 #include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h"
00010 #include "CalibTracker/Records/interface/SiStripDetCablingRcd.h"
00011 
00012 #include "FWCore/Framework/interface/EDProducer.h"
00013 #include "FWCore/Framework/interface/Event.h"
00014 #include "DataFormats/Common/interface/Handle.h"
00015 #include "FWCore/Framework/interface/EventSetup.h"
00016 #include "FWCore/Framework/interface/ESHandle.h"
00017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00018 
00019 #include "CondFormats/SiStripObjects/interface/SiStripNoises.h"
00020 #include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h"
00021 #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h"
00022 
00023 #include "CondFormats/SiPixelObjects/interface/SiPixelQuality.h"
00024 
00025 #include <map>
00026 #include <vector>
00027 
00028 class StrictWeakOrdering{
00029  public:
00030   bool operator() ( uint32_t p,const uint32_t& i) const {return p < i;}
00031 };
00032 class TkStripMeasurementDet;
00033 class TkPixelMeasurementDet;
00034 class TkGluedMeasurementDet;
00035 class GeometricSearchTracker;
00036 class SiStripRecHitMatcher;
00037 class GluedGeomDet;
00038 class SiPixelFedCabling;
00039 
00040 class MeasurementTracker : public MeasurementDetSystem {
00041 public:
00042    enum QualityFlags { BadModules=1, // for everybody
00043                        /* Strips: */ BadAPVFibers=2, BadStrips=4, MaskBad128StripBlocks=8, 
00044                        /* Pixels: */ BadROCs=2 }; 
00045 
00046   MeasurementTracker(const edm::ParameterSet&              conf,
00047                      const PixelClusterParameterEstimator* pixelCPE,
00048                      const StripClusterParameterEstimator* stripCPE,
00049                      const SiStripRecHitMatcher*  hitMatcher,
00050                      const TrackerGeometry*  trackerGeom,
00051                      const GeometricSearchTracker* geometricSearchTracker,
00052                      const SiStripQuality *stripQuality,
00053                      int   stripQualityFlags,
00054                      int   stripQualityDebugFlags,
00055                      const SiPixelQuality *pixelQuality,
00056                      const SiPixelFedCabling *pixelCabling,
00057                      int   pixelQualityFlags,
00058                      int   pixelQualityDebugFlags,
00059                      bool  isRegional=false);
00060 
00061   virtual ~MeasurementTracker();
00062  
00063   virtual  void update( const edm::Event&) const;
00064   void updatePixels( const edm::Event&) const;
00065   void updateStrips( const edm::Event&) const;
00066 
00067   const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
00068 
00069   const GeometricSearchTracker* geometricSearchTracker() const {return theGeometricSearchTracker;}
00070 
00072   virtual const MeasurementDet*       idToDet(const DetId& id) const;
00073 
00074   typedef std::map<DetId,MeasurementDet*>   DetContainer;
00075 
00077   const DetContainer& allDets() const {return theDetMap;}
00078   const std::vector<TkStripMeasurementDet*>& stripDets() const {return theStripDets;}
00079   const std::vector<TkPixelMeasurementDet*>& pixelDets() const {return thePixelDets;}
00080   const std::vector<TkGluedMeasurementDet*>& gluedDets() const {return theGluedDets;}
00081 
00082 
00083  protected:
00084   const edm::ParameterSet& pset_;
00085   const std::string name_;
00086 
00087   mutable DetContainer                        theDetMap;
00088   mutable std::vector<TkStripMeasurementDet*> theStripDets;
00089   mutable std::vector<TkPixelMeasurementDet*> thePixelDets;
00090   mutable std::vector<TkGluedMeasurementDet*> theGluedDets;
00091 
00092   const PixelClusterParameterEstimator* thePixelCPE;
00093   const StripClusterParameterEstimator* theStripCPE;
00094   const SiStripRecHitMatcher*           theHitMatcher;
00095   const TrackerGeometry*                theTrackerGeom;
00096   const GeometricSearchTracker*         theGeometricSearchTracker;
00097   const SiPixelFedCabling*              thePixelCabling;
00098 
00099   const std::vector<edm::InputTag>      theInactivePixelDetectorLabels;
00100   const std::vector<edm::InputTag>      theInactiveStripDetectorLabels;
00101 
00102   bool isRegional_;
00103 
00104   void initialize() const;
00105 
00106   void addStripDet( const GeomDet* gd,
00107                     const StripClusterParameterEstimator* cpe) const;
00108   void addPixelDet( const GeomDet* gd,
00109                     const PixelClusterParameterEstimator* cpe) const;
00110 
00111   void addGluedDet( const GluedGeomDet* gd, const SiStripRecHitMatcher* matcher) const;
00112 
00113   void addPixelDets( const TrackingGeometry::DetContainer& dets) const;
00114 
00115   void addStripDets( const TrackingGeometry::DetContainer& dets) const;
00116 
00117   void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags) const;
00118 
00119   void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags) const;
00120 };
00121 
00122 #endif