00001 #ifndef JetAnalyzer_H 00002 #define JetAnalyzer_H 00003 00004 00015 #include <memory> 00016 #include <fstream> 00017 #include "FWCore/Framework/interface/Frameworkfwd.h" 00018 #include "DQMOffline/JetMET/interface/JetAnalyzerBase.h" 00019 #include "FWCore/Framework/interface/Event.h" 00020 #include "FWCore/Framework/interface/MakerMacros.h" 00021 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00022 #include "FWCore/ServiceRegistry/interface/Service.h" 00023 #include "DQMServices/Core/interface/DQMStore.h" 00024 #include "DQMServices/Core/interface/MonitorElement.h" 00025 #include "DataFormats/JetReco/interface/CaloJetCollection.h" 00026 #include "DataFormats/JetReco/interface/CaloJet.h" 00027 // 00028 #include "DataFormats/HLTReco/interface/TriggerObject.h" 00029 #include "DataFormats/Common/interface/TriggerResults.h" 00030 #include "DataFormats/HLTReco/interface/TriggerEvent.h" 00031 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h" 00032 00033 #include "RecoJets/JetProducers/interface/JetIDHelper.h" 00034 00035 #include <string> 00036 00037 class JetAnalyzer : public JetAnalyzerBase { 00038 public: 00039 00041 // JetAnalyzer(const edm::ParameterSet&, JetServiceProxy *theService); 00042 JetAnalyzer(const edm::ParameterSet&); 00043 00045 virtual ~JetAnalyzer(); 00046 00048 void beginJob(DQMStore * dbe); 00049 00051 void endJob(); 00052 00054 void analyze(const edm::Event&, const edm::EventSetup&, 00055 const reco::CaloJetCollection& caloJets); 00056 00057 void setSource(std::string source) { 00058 _source = source; 00059 } 00060 00061 void setLeadJetFlag(int flag) { 00062 _leadJetFlag = flag; 00063 } 00064 int getLeadJetFlag() { 00065 return _leadJetFlag; 00066 } 00067 void setJetLoPass(int pass) { 00068 _JetLoPass = pass; 00069 } 00070 00071 void setJetHiPass(int pass) { 00072 _JetHiPass = pass; 00073 } 00074 00075 private: 00076 // ----------member data --------------------------- 00077 00078 edm::ParameterSet parameters; 00079 // Switch for verbosity 00080 std::string jetname; 00081 std::string _source; 00082 // Calo Jet Label 00083 edm::InputTag theCaloJetCollectionLabel; 00084 00085 int _JetLoPass; 00086 int _JetHiPass; 00087 int _leadJetFlag; 00088 int _theend; 00089 double _ptThreshold; 00090 00091 int makedijetselection; 00092 00093 //JID cuts 00094 double _fHPDMax; 00095 double _resEMFMin; 00096 int _n90HitsMin; 00097 // 00098 int fillJIDPassFrac; 00099 double _fHPDMaxLoose; 00100 double _resEMFMinLoose; 00101 int _n90HitsMinLoose; 00102 double _fHPDMaxTight; 00103 double _resEMFMinTight; 00104 int _n90HitsMinTight; 00105 double _sigmaEtaMinTight; 00106 double _sigmaPhiMinTight; 00107 00108 //histo binning parameters 00109 int etaBin; 00110 double etaMin; 00111 double etaMax; 00112 00113 int phiBin; 00114 double phiMin; 00115 double phiMax; 00116 00117 int ptBin; 00118 double ptMin; 00119 double ptMax; 00120 00121 int eBin; 00122 double eMin; 00123 double eMax; 00124 00125 int pBin; 00126 double pMin; 00127 double pMax; 00128 00129 //the histos 00130 MonitorElement* jetME; 00131 00132 // JetID helper 00133 reco::helper::JetIDHelper *jetID; 00134 00135 // Calo Jets 00136 00137 // std::vector<MonitorElement*> etaCaloJet; 00138 // std::vector<MonitorElement*> phiCaloJet; 00139 // std::vector<MonitorElement*> ptCaloJet; 00140 // std::vector<MonitorElement*> qGlbTrack; 00141 00142 // MonitorElement* etaCaloJet; 00143 // MonitorElement* phiCaloJet; 00144 // MonitorElement* ptCaloJet; 00145 00146 // Generic Jet Parameters 00147 00148 // --- Used for Data Certification 00149 MonitorElement* mPt; 00150 MonitorElement* mPt_1; 00151 MonitorElement* mPt_2; 00152 MonitorElement* mPt_3; 00153 MonitorElement* mEta; 00154 MonitorElement* mPhi; 00155 MonitorElement* mConstituents; 00156 MonitorElement* mHFrac; 00157 MonitorElement* mEFrac; 00158 MonitorElement* mPhiVSEta; 00159 00160 MonitorElement* mPt_Barrel; 00161 MonitorElement* mPhi_Barrel; 00162 00163 MonitorElement* mPt_EndCap; 00164 MonitorElement* mPhi_EndCap; 00165 00166 MonitorElement* mPt_Forward; 00167 MonitorElement* mPhi_Forward; 00168 00169 MonitorElement* mPt_Barrel_Lo; 00170 MonitorElement* mPhi_Barrel_Lo; 00171 MonitorElement* mConstituents_Barrel_Lo; 00172 MonitorElement* mHFrac_Barrel_Lo; 00173 MonitorElement* mPt_EndCap_Lo; 00174 MonitorElement* mPhi_EndCap_Lo; 00175 MonitorElement* mConstituents_EndCap_Lo; 00176 MonitorElement* mHFrac_EndCap_Lo; 00177 MonitorElement* mPt_Forward_Lo; 00178 MonitorElement* mPhi_Forward_Lo; 00179 MonitorElement* mConstituents_Forward_Lo; 00180 MonitorElement* mHFrac_Forward_Lo; 00181 00182 MonitorElement* mPt_Barrel_Hi; 00183 MonitorElement* mPhi_Barrel_Hi; 00184 MonitorElement* mConstituents_Barrel_Hi; 00185 MonitorElement* mHFrac_Barrel_Hi; 00186 MonitorElement* mPt_EndCap_Hi; 00187 MonitorElement* mPhi_EndCap_Hi; 00188 MonitorElement* mConstituents_EndCap_Hi; 00189 MonitorElement* mHFrac_EndCap_Hi; 00190 MonitorElement* mPt_Forward_Hi; 00191 MonitorElement* mPhi_Forward_Hi; 00192 MonitorElement* mConstituents_Forward_Hi; 00193 MonitorElement* mHFrac_Forward_Hi; 00194 // --- 00195 00196 00197 MonitorElement* mE_Barrel; 00198 MonitorElement* mE_EndCap; 00199 MonitorElement* mE_Forward; 00200 00201 MonitorElement* mE; 00202 MonitorElement* mP; 00203 MonitorElement* mMass; 00204 MonitorElement* mNJets; 00205 MonitorElement* mDPhi; 00206 00207 // Leading Jet Parameters 00208 MonitorElement* mEtaFirst; 00209 MonitorElement* mPhiFirst; 00210 MonitorElement* mEFirst; 00211 MonitorElement* mPtFirst; 00212 00213 00214 // CaloJet specific 00215 MonitorElement* mMaxEInEmTowers; 00216 MonitorElement* mMaxEInHadTowers; 00217 MonitorElement* mHadEnergyInHO; 00218 MonitorElement* mHadEnergyInHB; 00219 MonitorElement* mHadEnergyInHF; 00220 MonitorElement* mHadEnergyInHE; 00221 MonitorElement* mEmEnergyInEB; 00222 MonitorElement* mEmEnergyInEE; 00223 MonitorElement* mEmEnergyInHF; 00224 // MonitorElement* mEnergyFractionHadronic; 00225 // MonitorElement* mEnergyFractionEm; 00226 MonitorElement* mN90Hits; 00227 MonitorElement* mfHPD; 00228 MonitorElement* mfRBX; 00229 MonitorElement* mresEMF; 00230 MonitorElement* msigmaEta; 00231 MonitorElement* msigmaPhi; 00232 MonitorElement* mLooseJIDPassFractionVSeta; 00233 MonitorElement* mLooseJIDPassFractionVSpt; 00234 MonitorElement* mTightJIDPassFractionVSeta; 00235 MonitorElement* mTightJIDPassFractionVSpt; 00236 00237 // Events passing the jet triggers 00238 MonitorElement* mEta_Lo; 00239 MonitorElement* mPhi_Lo; 00240 MonitorElement* mPt_Lo; 00241 00242 MonitorElement* mEta_Hi; 00243 MonitorElement* mPhi_Hi; 00244 MonitorElement* mPt_Hi; 00245 00246 }; 00247 #endif