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 double _asymmetryThirdJetCut; 00092 double _balanceThirdJetCut; 00093 00094 int makedijetselection; 00095 00096 //JID cuts 00097 double _fHPDMax; 00098 double _resEMFMin; 00099 int _n90HitsMin; 00100 // 00101 int fillJIDPassFrac; 00102 double _fHPDMaxLoose; 00103 double _resEMFMinLoose; 00104 int _n90HitsMinLoose; 00105 double _fHPDMaxTight; 00106 double _resEMFMinTight; 00107 int _n90HitsMinTight; 00108 double _sigmaEtaMinTight; 00109 double _sigmaPhiMinTight; 00110 00111 //histo binning parameters 00112 int etaBin; 00113 double etaMin; 00114 double etaMax; 00115 00116 int phiBin; 00117 double phiMin; 00118 double phiMax; 00119 00120 int ptBin; 00121 double ptMin; 00122 double ptMax; 00123 00124 int eBin; 00125 double eMin; 00126 double eMax; 00127 00128 int pBin; 00129 double pMin; 00130 double pMax; 00131 00132 //the histos 00133 MonitorElement* jetME; 00134 00135 // JetID helper 00136 reco::helper::JetIDHelper *jetID; 00137 00138 // Calo Jets 00139 00140 // std::vector<MonitorElement*> etaCaloJet; 00141 // std::vector<MonitorElement*> phiCaloJet; 00142 // std::vector<MonitorElement*> ptCaloJet; 00143 // std::vector<MonitorElement*> qGlbTrack; 00144 00145 // MonitorElement* etaCaloJet; 00146 // MonitorElement* phiCaloJet; 00147 // MonitorElement* ptCaloJet; 00148 00149 // Generic Jet Parameters 00150 00151 // --- Used for Data Certification 00152 MonitorElement* mPt; 00153 MonitorElement* mPt_1; 00154 MonitorElement* mPt_2; 00155 MonitorElement* mPt_3; 00156 MonitorElement* mEta; 00157 MonitorElement* mPhi; 00158 MonitorElement* mConstituents; 00159 MonitorElement* mHFrac; 00160 MonitorElement* mEFrac; 00161 MonitorElement* mPhiVSEta; 00162 00163 MonitorElement* mPt_Barrel; 00164 MonitorElement* mPhi_Barrel; 00165 00166 MonitorElement* mPt_EndCap; 00167 MonitorElement* mPhi_EndCap; 00168 00169 MonitorElement* mPt_Forward; 00170 MonitorElement* mPhi_Forward; 00171 00172 //MonitorElement* mPt_Barrel_Lo; 00173 //MonitorElement* mPhi_Barrel_Lo; 00174 MonitorElement* mConstituents_Barrel; 00175 MonitorElement* mHFrac_Barrel; 00176 MonitorElement* mEFrac_Barrel; 00177 //MonitorElement* mPt_EndCap_Lo; 00178 //MonitorElement* mPhi_EndCap_Lo; 00179 MonitorElement* mConstituents_EndCap; 00180 MonitorElement* mHFrac_EndCap; 00181 MonitorElement* mEFrac_EndCap; 00182 //MonitorElement* mPt_Forward_Lo; 00183 //MonitorElement* mPhi_Forward_Lo; 00184 MonitorElement* mConstituents_Forward; 00185 MonitorElement* mHFrac_Forward; 00186 MonitorElement* mEFrac_Forward; 00187 00188 MonitorElement* mPt_Barrel_Hi; 00189 MonitorElement* mPhi_Barrel_Hi; 00190 MonitorElement* mConstituents_Barrel_Hi; 00191 MonitorElement* mHFrac_Barrel_Hi; 00192 MonitorElement* mPt_EndCap_Hi; 00193 MonitorElement* mPhi_EndCap_Hi; 00194 MonitorElement* mConstituents_EndCap_Hi; 00195 MonitorElement* mHFrac_EndCap_Hi; 00196 MonitorElement* mPt_Forward_Hi; 00197 MonitorElement* mPhi_Forward_Hi; 00198 MonitorElement* mConstituents_Forward_Hi; 00199 MonitorElement* mHFrac_Forward_Hi; 00200 // --- 00201 00202 00203 //MonitorElement* mE_Barrel; 00204 //MonitorElement* mE_EndCap; 00205 //MonitorElement* mE_Forward; 00206 00207 //MonitorElement* mE; 00208 //MonitorElement* mP; 00209 // MonitorElement* mMass; 00210 MonitorElement* mNJets; 00211 MonitorElement* mDPhi; 00212 00213 // Leading Jet Parameters 00214 MonitorElement* mEtaFirst; 00215 MonitorElement* mPhiFirst; 00216 //MonitorElement* mEFirst; 00217 MonitorElement* mPtFirst; 00218 00219 00220 // CaloJet specific 00221 MonitorElement* mMaxEInEmTowers; 00222 MonitorElement* mMaxEInHadTowers; 00223 MonitorElement* mHadEnergyInHO; 00224 MonitorElement* mHadEnergyInHB; 00225 MonitorElement* mHadEnergyInHF; 00226 MonitorElement* mHadEnergyInHE; 00227 MonitorElement* mEmEnergyInEB; 00228 MonitorElement* mEmEnergyInEE; 00229 MonitorElement* mEmEnergyInHF; 00230 // MonitorElement* mEnergyFractionHadronic; 00231 // MonitorElement* mEnergyFractionEm; 00232 MonitorElement* mN90Hits; 00233 MonitorElement* mfHPD; 00234 MonitorElement* mfRBX; 00235 MonitorElement* mresEMF; 00236 // MonitorElement* msigmaEta; 00237 // MonitorElement* msigmaPhi; 00238 MonitorElement* mLooseJIDPassFractionVSeta; 00239 MonitorElement* mLooseJIDPassFractionVSpt; 00240 MonitorElement* mTightJIDPassFractionVSeta; 00241 MonitorElement* mTightJIDPassFractionVSpt; 00242 00243 // Events passing the jet triggers 00244 //MonitorElement* mEta_Lo; 00245 MonitorElement* mPhi_Lo; 00246 MonitorElement* mPt_Lo; 00247 00248 MonitorElement* mEta_Hi; 00249 MonitorElement* mPhi_Hi; 00250 MonitorElement* mPt_Hi; 00251 00252 //dijet analysis quantities 00253 MonitorElement* mDijetBalance; 00254 MonitorElement* mDijetAsymmetry; 00255 }; 00256 #endif