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 00038 #include "GlobalVariables.h" 00039 00040 00041 class JetAnalyzer : public JetAnalyzerBase { 00042 public: 00043 00045 // JetAnalyzer(const edm::ParameterSet&, JetServiceProxy *theService); 00046 JetAnalyzer(const edm::ParameterSet&); 00047 00049 virtual ~JetAnalyzer(); 00050 00052 void beginJob(DQMStore * dbe); 00053 00055 void endJob(); 00056 00058 void analyze(const edm::Event&, const edm::EventSetup&, 00059 const reco::CaloJetCollection& caloJets, 00060 const int numPV); 00061 00062 void setSource(std::string source) { 00063 _source = source; 00064 } 00065 00066 void setLeadJetFlag(int flag) { 00067 _leadJetFlag = flag; 00068 } 00069 int getLeadJetFlag() { 00070 return _leadJetFlag; 00071 } 00072 void setJetLoPass(int pass) { 00073 _JetLoPass = pass; 00074 } 00075 00076 void setJetHiPass(int pass) { 00077 _JetHiPass = pass; 00078 } 00079 00080 private: 00081 // ----------member data --------------------------- 00082 00083 edm::ParameterSet parameters; 00084 // Switch for verbosity 00085 std::string jetname; 00086 std::string _source; 00087 // Calo Jet Label 00088 edm::InputTag theCaloJetCollectionLabel; 00089 00090 int _JetLoPass; 00091 int _JetHiPass; 00092 int _leadJetFlag; 00093 int _theend; 00094 double _ptThreshold; 00095 00096 double _asymmetryThirdJetCut; 00097 double _balanceThirdJetCut; 00098 00099 int makedijetselection; 00100 00101 //JID cuts 00102 double _fHPDMax; 00103 double _resEMFMin; 00104 int _n90HitsMin; 00105 // 00106 int fillJIDPassFrac; 00107 double _fHPDMaxLoose; 00108 double _resEMFMinLoose; 00109 int _n90HitsMinLoose; 00110 double _fHPDMaxTight; 00111 double _resEMFMinTight; 00112 int _n90HitsMinTight; 00113 double _sigmaEtaMinTight; 00114 double _sigmaPhiMinTight; 00115 00116 //histo binning parameters 00117 int etaBin; 00118 double etaMin; 00119 double etaMax; 00120 00121 int phiBin; 00122 double phiMin; 00123 double phiMax; 00124 00125 int ptBin; 00126 double ptMin; 00127 double ptMax; 00128 00129 int eBin; 00130 double eMin; 00131 double eMax; 00132 00133 int pBin; 00134 double pMin; 00135 double pMax; 00136 00137 //the histos 00138 MonitorElement* jetME; 00139 00140 // JetID helper 00141 reco::helper::JetIDHelper *jetID; 00142 00143 // Calo Jets 00144 00145 // std::vector<MonitorElement*> etaCaloJet; 00146 // std::vector<MonitorElement*> phiCaloJet; 00147 // std::vector<MonitorElement*> ptCaloJet; 00148 // std::vector<MonitorElement*> qGlbTrack; 00149 00150 // MonitorElement* etaCaloJet; 00151 // MonitorElement* phiCaloJet; 00152 // MonitorElement* ptCaloJet; 00153 00154 // Generic Jet Parameters 00155 00156 // --- Used for Data Certification 00157 MonitorElement* mPt; 00158 MonitorElement* mPt_1; 00159 MonitorElement* mPt_2; 00160 MonitorElement* mPt_3; 00161 MonitorElement* mEta; 00162 MonitorElement* mPhi; 00163 MonitorElement* mConstituents; 00164 MonitorElement* mHFrac; 00165 MonitorElement* mEFrac; 00166 MonitorElement* mPhiVSEta; 00167 00168 MonitorElement* mPt_Barrel; 00169 MonitorElement* mPhi_Barrel; 00170 00171 MonitorElement* mPt_EndCap; 00172 MonitorElement* mPhi_EndCap; 00173 00174 MonitorElement* mPt_Forward; 00175 MonitorElement* mPhi_Forward; 00176 00177 //MonitorElement* mPt_Barrel_Lo; 00178 //MonitorElement* mPhi_Barrel_Lo; 00179 MonitorElement* mConstituents_Barrel; 00180 MonitorElement* mHFrac_Barrel; 00181 MonitorElement* mEFrac_Barrel; 00182 //MonitorElement* mPt_EndCap_Lo; 00183 //MonitorElement* mPhi_EndCap_Lo; 00184 MonitorElement* mConstituents_EndCap; 00185 MonitorElement* mHFrac_EndCap; 00186 MonitorElement* mEFrac_EndCap; 00187 //MonitorElement* mPt_Forward_Lo; 00188 //MonitorElement* mPhi_Forward_Lo; 00189 MonitorElement* mConstituents_Forward; 00190 MonitorElement* mHFrac_Forward; 00191 MonitorElement* mEFrac_Forward; 00192 00193 MonitorElement* mPt_Barrel_Hi; 00194 MonitorElement* mPhi_Barrel_Hi; 00195 MonitorElement* mConstituents_Barrel_Hi; 00196 MonitorElement* mHFrac_Barrel_Hi; 00197 MonitorElement* mPt_EndCap_Hi; 00198 MonitorElement* mPhi_EndCap_Hi; 00199 MonitorElement* mConstituents_EndCap_Hi; 00200 MonitorElement* mHFrac_EndCap_Hi; 00201 MonitorElement* mPt_Forward_Hi; 00202 MonitorElement* mPhi_Forward_Hi; 00203 MonitorElement* mConstituents_Forward_Hi; 00204 MonitorElement* mHFrac_Forward_Hi; 00205 // --- 00206 00207 00208 //MonitorElement* mE_Barrel; 00209 //MonitorElement* mE_EndCap; 00210 //MonitorElement* mE_Forward; 00211 00212 //MonitorElement* mE; 00213 //MonitorElement* mP; 00214 // MonitorElement* mMass; 00215 MonitorElement* mNJets; 00216 MonitorElement* mDPhi; 00217 00218 // Leading Jet Parameters 00219 MonitorElement* mEtaFirst; 00220 MonitorElement* mPhiFirst; 00221 //MonitorElement* mEFirst; 00222 MonitorElement* mPtFirst; 00223 00224 00225 // CaloJet specific 00226 MonitorElement* mMaxEInEmTowers; 00227 MonitorElement* mMaxEInHadTowers; 00228 MonitorElement* mHadEnergyInHO; 00229 MonitorElement* mHadEnergyInHB; 00230 MonitorElement* mHadEnergyInHF; 00231 MonitorElement* mHadEnergyInHE; 00232 MonitorElement* mEmEnergyInEB; 00233 MonitorElement* mEmEnergyInEE; 00234 MonitorElement* mEmEnergyInHF; 00235 // MonitorElement* mEnergyFractionHadronic; 00236 // MonitorElement* mEnergyFractionEm; 00237 MonitorElement* mN90Hits; 00238 MonitorElement* mfHPD; 00239 MonitorElement* mfRBX; 00240 MonitorElement* mresEMF; 00241 // MonitorElement* msigmaEta; 00242 // MonitorElement* msigmaPhi; 00243 MonitorElement* mLooseJIDPassFractionVSeta; 00244 MonitorElement* mLooseJIDPassFractionVSpt; 00245 MonitorElement* mTightJIDPassFractionVSeta; 00246 MonitorElement* mTightJIDPassFractionVSpt; 00247 00248 // Events passing the jet triggers 00249 //MonitorElement* mEta_Lo; 00250 MonitorElement* mPhi_Lo; 00251 MonitorElement* mPt_Lo; 00252 00253 MonitorElement* mEta_Hi; 00254 MonitorElement* mPhi_Hi; 00255 MonitorElement* mPt_Hi; 00256 00257 //dijet analysis quantities 00258 MonitorElement* mDijetBalance; 00259 MonitorElement* mDijetAsymmetry; 00260 00261 00262 // NPV profiles 00263 //---------------------------------------------------------------------------- 00264 MonitorElement* mNJets_profile; 00265 MonitorElement* mPt_profile; 00266 MonitorElement* mEta_profile; 00267 MonitorElement* mPhi_profile; 00268 MonitorElement* mConstituents_profile; 00269 MonitorElement* mHFrac_profile; 00270 MonitorElement* mEFrac_profile; 00271 }; 00272 00273 00274 #endif