00001 #ifndef RecoLocalMuon_CSCOfflineMonitor_H 00002 #define RecoLocalMuon_CSCOfflineMonitor_H 00003 00020 // user include files 00021 #include "FWCore/Framework/interface/MakerMacros.h" 00022 #include "FWCore/Framework/interface/Frameworkfwd.h" 00023 #include "FWCore/Framework/interface/EDAnalyzer.h" 00024 #include "FWCore/Framework/interface/EDFilter.h" 00025 #include "FWCore/Framework/interface/Event.h" 00026 #include "DataFormats/Common/interface/Handle.h" 00027 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00028 #include "FWCore/Framework/interface/EventSetup.h" 00029 #include "FWCore/Framework/interface/ESHandle.h" 00030 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00031 #include "FWCore/ServiceRegistry/interface/Service.h" 00032 #include <FWCore/ParameterSet/interface/InputTag.h> 00033 00034 #include "DataFormats/CSCDigi/interface/CSCWireDigi.h" 00035 #include "DataFormats/CSCDigi/interface/CSCWireDigiCollection.h" 00036 #include "DataFormats/CSCDigi/interface/CSCStripDigi.h" 00037 #include "DataFormats/CSCDigi/interface/CSCStripDigiCollection.h" 00038 #include "DataFormats/MuonDetId/interface/CSCDetId.h" 00039 #include <DataFormats/CSCRecHit/interface/CSCRecHit2D.h> 00040 #include <DataFormats/CSCRecHit/interface/CSCSegmentCollection.h> 00041 #include "DataFormats/CSCRecHit/interface/CSCRecHit2DCollection.h" 00042 00043 #include "Geometry/CSCGeometry/interface/CSCGeometry.h" 00044 #include "Geometry/CSCGeometry/interface/CSCChamber.h" 00045 #include "Geometry/CSCGeometry/interface/CSCLayer.h" 00046 #include "Geometry/CSCGeometry/interface/CSCLayerGeometry.h" 00047 #include "Geometry/Records/interface/MuonGeometryRecord.h" 00048 00049 #include "DataFormats/GeometryVector/interface/GlobalPoint.h" 00050 #include "DataFormats/GeometryVector/interface/GlobalVector.h" 00051 #include "DataFormats/GeometryVector/interface/LocalPoint.h" 00052 #include "DataFormats/GeometryVector/interface/LocalVector.h" 00053 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h" 00054 00055 #include "CommonTools/Statistics/interface/ChiSquaredProbability.h" 00056 00057 #include "DQMServices/Core/interface/DQMStore.h" 00058 #include "DQMServices/Core/interface/MonitorElement.h" 00059 00060 class CSCOfflineMonitor : public edm::EDAnalyzer { 00061 public: 00063 CSCOfflineMonitor(const edm::ParameterSet& pset); 00064 00066 virtual ~CSCOfflineMonitor(); 00067 00068 // Operations 00069 void beginJob(edm::EventSetup const& iSetup); 00070 void endJob(void); 00071 00073 void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); 00074 00075 00076 protected: 00077 00078 private: 00079 00080 edm::ParameterSet param; 00081 edm::InputTag stripDigiTag_; 00082 edm::InputTag wireDigiTag_; 00083 edm::InputTag cscRecHitTag_; 00084 edm::InputTag cscSegTag_; 00085 00086 00087 // some useful functions 00088 float fitX(HepMatrix sp, HepMatrix ep); 00089 float getTiming(const CSCStripDigiCollection& stripdigis, CSCDetId idRH, int centerStrip); 00090 float getSignal(const CSCStripDigiCollection& stripdigis, CSCDetId idRH, int centerStrip); 00091 int typeIndex(CSCDetId id); 00092 00093 // DQM 00094 DQMStore* dbe; 00095 00096 // Wire digis 00097 MonitorElement *hWireAll; 00098 MonitorElement *hWireTBinAll; 00099 MonitorElement *hWirenGroupsTotal; 00100 MonitorElement *hWireCodeBroad; 00101 std::vector<MonitorElement*> hWireLayer; 00102 std::vector<MonitorElement*> hWireWire; 00103 std::vector<MonitorElement*> hWireCodeNarrow; 00104 00105 // Strip Digis 00106 MonitorElement *hStripAll; 00107 MonitorElement *hStripNFired; 00108 MonitorElement *hStripCodeBroad; 00109 std::vector<MonitorElement*> hStripCodeNarrow; 00110 std::vector<MonitorElement*> hStripLayer; 00111 std::vector<MonitorElement*> hStripStrip; 00112 00113 // Pedestal Noise 00114 MonitorElement *hStripPedAll; 00115 std::vector<MonitorElement*> hStripPed; 00116 //MonitorElement *hPedvsStrip; 00117 00118 // recHits 00119 MonitorElement *hRHCodeBroad; 00120 MonitorElement *hRHnrechits; 00121 std::vector<MonitorElement*> hRHCodeNarrow; 00122 std::vector<MonitorElement*> hRHLayer; 00123 std::vector<MonitorElement*> hRHX; 00124 std::vector<MonitorElement*> hRHY; 00125 //std::vector<MonitorElement*> hRHGlobal; 00126 std::vector<MonitorElement*> hRHResid; 00127 std::vector<MonitorElement*> hSResid; 00128 std::vector<MonitorElement*> hRHSumQ; 00129 std::vector<MonitorElement*> hRHRatioQ; 00130 std::vector<MonitorElement*> hRHTiming; 00131 00132 // Segments 00133 MonitorElement *hSCodeBroad; 00134 std::vector<MonitorElement*> hSCodeNarrow; 00135 std::vector<MonitorElement*> hSnHits; 00136 std::vector<MonitorElement*> hSTheta; 00137 //std::vector<MonitorElement*> hSGlobal; 00138 MonitorElement *hSnhitsAll; 00139 MonitorElement *hSChiSqProb; 00140 MonitorElement *hSGlobalTheta; 00141 MonitorElement *hSGlobalPhi; 00142 MonitorElement *hSnSegments; 00143 00144 // occupancy histos 00145 MonitorElement *hOWires; 00146 MonitorElement *hOStrips; 00147 MonitorElement *hORecHits; 00148 MonitorElement *hOSegments; 00149 00150 00151 00152 }; 00153 #endif