00001 #ifndef EFFICIENCYANALYZER_H 00002 #define EFFICIENCYANALYZER_H 00003 00011 /* Base Class Headers */ 00012 #include <memory> 00013 #include <fstream> 00014 #include "FWCore/Framework/interface/Frameworkfwd.h" 00015 #include "DQMOffline/Muon/src/MuonAnalyzerBase.h" 00016 #include "FWCore/Framework/interface/Event.h" 00017 #include "FWCore/Framework/interface/EDAnalyzer.h" 00018 #include "FWCore/Framework/interface/MakerMacros.h" 00019 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00020 #include "FWCore/Utilities/interface/InputTag.h" 00021 #include "FWCore/ServiceRegistry/interface/Service.h" 00022 #include "DQMServices/Core/interface/DQMStore.h" 00023 #include "DQMServices/Core/interface/MonitorElement.h" 00024 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h" 00025 #include "DataFormats/VertexReco/interface/Vertex.h" 00026 00027 00028 class EfficiencyAnalyzer : public MuonAnalyzerBase { 00029 00030 public: 00031 /* Constructor */ 00032 EfficiencyAnalyzer(const edm::ParameterSet& pset, MuonServiceProxy *theService); 00033 00034 /* Destructor */ 00035 virtual ~EfficiencyAnalyzer() ; 00036 00037 /* Operations */ 00038 void beginJob (DQMStore *dbe); 00039 void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); 00040 // void endJob (); 00041 00042 protected: 00043 edm::ParameterSet parameters; 00044 00045 // Switch for verbosity 00046 std::string metname; 00047 00048 // STA Label 00049 edm::InputTag theSTACollectionLabel; 00050 edm::InputTag theMuonCollectionLabel; 00051 edm::InputTag theTrackCollectionLabel; 00052 00053 //Vertex requirements 00054 bool _doPVCheck; 00055 edm::InputTag vertexTag; 00056 edm::InputTag bsTag; 00057 00058 //histo binning parameters 00059 int etaBin_; 00060 int phiBin_; 00061 int ptBin_; 00062 00063 double ptMin_; 00064 double ptMax_; 00065 00066 double etaMin_; 00067 double etaMax_; 00068 00069 double phiMin_; 00070 double phiMax_; 00071 00072 int vtxBin_; 00073 double vtxMin_; 00074 double vtxMax_; 00075 00076 MonitorElement* h_passProbes_TightMu_pt; 00077 MonitorElement* h_passProbes_TightMu_EB_pt; 00078 MonitorElement* h_passProbes_TightMu_EE_pt; 00079 MonitorElement* h_passProbes_TightMu_eta; 00080 MonitorElement* h_passProbes_TightMu_hp_eta; 00081 MonitorElement* h_passProbes_TightMu_phi; 00082 MonitorElement* h_passProbes_detIsoTightMu_pt; 00083 MonitorElement* h_passProbes_EB_detIsoTightMu_pt; 00084 MonitorElement* h_passProbes_EE_detIsoTightMu_pt; 00085 MonitorElement* h_passProbes_pfIsoTightMu_pt; 00086 MonitorElement* h_passProbes_EB_pfIsoTightMu_pt; 00087 MonitorElement* h_passProbes_EE_pfIsoTightMu_pt; 00088 MonitorElement* h_passProbes_detIsoTightMu_nVtx; 00089 MonitorElement* h_passProbes_pfIsoTightMu_nVtx; 00090 MonitorElement* h_passProbes_EB_detIsoTightMu_nVtx; 00091 MonitorElement* h_passProbes_EE_detIsoTightMu_nVtx; 00092 MonitorElement* h_passProbes_EB_pfIsoTightMu_nVtx; 00093 MonitorElement* h_passProbes_EE_pfIsoTightMu_nVtx; 00094 00095 MonitorElement* h_failProbes_TightMu_pt; 00096 MonitorElement* h_failProbes_TightMu_eta; 00097 MonitorElement* h_failProbes_TightMu_phi; 00098 00099 MonitorElement* h_allProbes_pt; 00100 MonitorElement* h_allProbes_EB_pt; 00101 MonitorElement* h_allProbes_EE_pt; 00102 MonitorElement* h_allProbes_eta; 00103 MonitorElement* h_allProbes_hp_eta; 00104 MonitorElement* h_allProbes_phi; 00105 MonitorElement* h_allProbes_TightMu_pt; 00106 MonitorElement* h_allProbes_EB_TightMu_pt; 00107 MonitorElement* h_allProbes_EE_TightMu_pt; 00108 MonitorElement* h_allProbes_TightMu_nVtx; 00109 MonitorElement* h_allProbes_EB_TightMu_nVtx; 00110 MonitorElement* h_allProbes_EE_TightMu_nVtx; 00111 00112 00113 MonitorElement* test_TightMu_Minv; 00114 00115 // Apply deltaBeta PU corrections to the PF isolation eficiencies. 00116 MonitorElement* h_passProbes_pfIsodBTightMu_pt; 00117 MonitorElement* h_passProbes_EB_pfIsodBTightMu_pt; 00118 MonitorElement* h_passProbes_EE_pfIsodBTightMu_pt; 00119 MonitorElement* h_passProbes_pfIsodBTightMu_nVtx; 00120 MonitorElement* h_passProbes_EB_pfIsodBTightMu_nVtx; 00121 MonitorElement* h_passProbes_EE_pfIsodBTightMu_nVtx; 00122 00123 00124 int _numPV; 00125 00126 }; 00127 #endif 00128