00001 #ifndef CSCSegmentValidation_h 00002 #define CSCSegmentValidation_h 00003 00004 #include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h" 00005 #include "DataFormats/CSCRecHit/interface/CSCSegment.h" 00006 #include "Geometry/CSCGeometry/interface/CSCLayer.h" 00007 #include "DQMServices/Core/interface/DQMStore.h" 00008 #include "DQMServices/Core/interface/MonitorElement.h" 00009 00010 class CSCSegmentValidation : public CSCBaseValidation 00011 { 00012 public: 00013 CSCSegmentValidation(DQMStore* dbe, const edm::InputTag & inputTag); 00014 00015 virtual ~CSCSegmentValidation() {} 00016 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00017 00018 private: 00019 void plotResolution(const PSimHit & simHit, const CSCSegment & recHit, 00020 const CSCLayer * layer, int chamberType); 00021 00022 bool hasSegment(int chamberId) const; 00023 static int whatChamberType(int detId); 00024 00025 // map to count how many layers are hit. First index is chamber detId, second is layers 00026 // that have hits 00027 typedef std::map<int, std::vector<int> > ChamberHitMap; 00028 ChamberHitMap theLayerHitsPerChamber; 00029 void fillLayerHitsPerChamber(); 00030 void fillEfficiencyPlots(); 00031 // decide which SimHit to use for the direction 00032 const PSimHit * keyHit(int chamberId) const; 00033 00034 typedef std::map<int, std::vector<CSCSegment> > ChamberSegmentMap; 00035 ChamberSegmentMap theChamberSegmentMap; 00036 // the number of hits in a chamber to make it a shower 00037 int theShowerThreshold; 00038 00039 MonitorElement* theNPerEventPlot; 00040 MonitorElement* theNRecHitsPlot; 00041 MonitorElement* theNPerChamberTypePlot; 00042 MonitorElement* theRdPhiResolutionPlots[10]; 00043 MonitorElement* theRdPhiPullPlots[10]; 00044 MonitorElement* theThetaResolutionPlots[10]; 00045 MonitorElement* theThetaPullPlots[10]; 00046 MonitorElement* thedXdZResolutionPlots[10]; 00047 MonitorElement* thedXdZPullPlots[10]; 00048 MonitorElement* thedYdZResolutionPlots[10]; 00049 MonitorElement* thedYdZPullPlots[10]; 00050 00051 00052 00053 MonitorElement* theTypePlot4HitsNoShower; 00054 MonitorElement* theTypePlot4HitsNoShowerSeg; 00055 MonitorElement* theTypePlot4HitsShower; 00056 MonitorElement* theTypePlot4HitsShowerSeg; 00057 MonitorElement* theTypePlot5HitsNoShower; 00058 MonitorElement* theTypePlot5HitsNoShowerSeg; 00059 MonitorElement* theTypePlot5HitsShower; 00060 MonitorElement* theTypePlot5HitsShowerSeg; 00061 MonitorElement* theTypePlot6HitsNoShower; 00062 MonitorElement* theTypePlot6HitsNoShowerSeg; 00063 MonitorElement* theTypePlot6HitsShower; 00064 MonitorElement* theTypePlot6HitsShowerSeg; 00065 00066 00067 }; 00068 00069 #endif 00070