Go to the documentation of this file.00001 #ifndef MeasurementTrackerImpl_H
00002 #define MeasurementTrackerImpl_H
00003
00004 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.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 MeasurementTrackerImpl : public MeasurementTracker {
00041 public:
00042 enum QualityFlags { BadModules=1,
00043 BadAPVFibers=2, BadStrips=4, MaskBad128StripBlocks=8,
00044 BadROCs=2 };
00045
00046 MeasurementTrackerImpl(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 ~MeasurementTrackerImpl();
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 void setClusterToSkip(const edm::InputTag & cluster, const edm::Event& event) const;
00083 void unsetClusterToSkip() const;
00084
00085 protected:
00086 const edm::ParameterSet& pset_;
00087 const std::string name_;
00088
00089 mutable DetContainer theDetMap;
00090 mutable std::vector<TkStripMeasurementDet*> theStripDets;
00091 mutable std::vector<TkPixelMeasurementDet*> thePixelDets;
00092 mutable std::vector<TkGluedMeasurementDet*> theGluedDets;
00093
00094 const PixelClusterParameterEstimator* thePixelCPE;
00095 const StripClusterParameterEstimator* theStripCPE;
00096 const SiStripRecHitMatcher* theHitMatcher;
00097 const SiPixelFedCabling* thePixelCabling;
00098
00099 const std::vector<edm::InputTag> theInactivePixelDetectorLabels;
00100 const std::vector<edm::InputTag> theInactiveStripDetectorLabels;
00101
00102 bool isRegional_;
00103 bool selfUpdateSkipClusters_;
00104
00105 void initialize() const;
00106
00107 void addStripDet( const GeomDet* gd,
00108 const StripClusterParameterEstimator* cpe) const;
00109 void addPixelDet( const GeomDet* gd,
00110 const PixelClusterParameterEstimator* cpe) const;
00111
00112 void addGluedDet( const GluedGeomDet* gd, const SiStripRecHitMatcher* matcher) const;
00113
00114 void addPixelDets( const TrackingGeometry::DetContainer& dets) const;
00115
00116 void addStripDets( const TrackingGeometry::DetContainer& dets) const;
00117
00118 void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags) const;
00119
00120 void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags) const;
00121
00122 void getInactiveStrips(const edm::Event& event,std::vector<uint32_t> & rawInactiveDetIds) const;
00123 };
00124
00125 #endif