00001 #ifndef ValidationRecoJetsJPTJetTester_h 00002 #define ValidationRecoJetsJPTJetTester_h 00003 00004 // Producer for validation histograms for JPTJet objects 00005 // F. Ratnikov, Sept. 7, 2006 00006 // Modified by J F Novak July 10, 2008 00007 // $Id: JPTJetTester.h,v 1.11 2012/02/15 21:41:52 kovitang Exp $ 00008 00009 #include <string> 00010 00011 #include "FWCore/Framework/interface/EDAnalyzer.h" 00012 #include "DQMServices/Core/interface/MonitorElement.h" 00013 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00014 #include "JetMETCorrections/Objects/interface/JetCorrector.h" 00015 #include "DataFormats/VertexReco/interface/Vertex.h" 00016 00017 namespace reco { 00018 class JPTJet; 00019 class GenJet; 00020 } 00021 00022 class MonitorElement; 00023 00024 class JPTJetTester : public edm::EDAnalyzer { 00025 public: 00026 00027 JPTJetTester (const edm::ParameterSet&); 00028 ~JPTJetTester(); 00029 00030 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00031 virtual void beginJob() ; 00032 virtual void endJob() ; 00033 00034 private: 00035 00036 void fillMatchHists (const reco::GenJet& fGenJet, const reco::JPTJet& fJPTJet, std::vector<reco::Vertex> goodVertices); 00037 double getSumPt (const reco::TrackRefVector& tracks); 00038 00039 edm::InputTag mInputCollection; 00040 edm::InputTag mInputGenCollection; 00041 std::string mOutputFile; 00042 edm::InputTag inputMETLabel_; 00043 std::string METType_; 00044 std::string inputGenMETLabel_; 00045 std::string inputCaloMETLabel_; 00046 00047 // count number of events 00048 MonitorElement* numberofevents; 00049 00050 // Generic Jet Parameters 00051 MonitorElement* mEta; 00052 MonitorElement* mEtaFineBin; 00053 MonitorElement* mEtaFineBin1p; 00054 MonitorElement* mEtaFineBin2p; 00055 MonitorElement* mEtaFineBin3p; 00056 MonitorElement* mEtaFineBin1m; 00057 MonitorElement* mEtaFineBin2m; 00058 MonitorElement* mEtaFineBin3m; 00059 MonitorElement* mPhi; 00060 MonitorElement* mPhiFineBin; 00061 MonitorElement* mE; 00062 MonitorElement* mE_80; 00063 MonitorElement* mE_3000; 00064 MonitorElement* mP; 00065 MonitorElement* mP_80; 00066 MonitorElement* mP_3000; 00067 MonitorElement* mPt; 00068 MonitorElement* mPt_80; 00069 MonitorElement* mPt_3000; 00070 MonitorElement* mMass; 00071 MonitorElement* mMass_80; 00072 MonitorElement* mMass_3000; 00073 // MonitorElement* mConstituents; 00074 // MonitorElement* mConstituents_80; 00075 // MonitorElement* mConstituents_3000; 00076 MonitorElement* mHadTiming; 00077 MonitorElement* mEmTiming; 00078 00079 //Corr jets 00080 MonitorElement* mCorrJetPt; 00081 MonitorElement* mCorrJetPt_80; 00082 MonitorElement* mCorrJetPt_3000; 00083 MonitorElement* mCorrJetEta; 00084 MonitorElement* mCorrJetPhi; 00085 MonitorElement* mpTRatio; 00086 MonitorElement* mpTRatioB_d; 00087 MonitorElement* mpTRatioE_d; 00088 MonitorElement* mpTRatioF_d; 00089 MonitorElement* mpTRatio_30_200_d; 00090 MonitorElement* mpTRatio_200_600_d; 00091 MonitorElement* mpTRatio_600_1500_d; 00092 MonitorElement* mpTRatio_1500_3500_d; 00093 MonitorElement* mpTResponse; 00094 MonitorElement* mpTResponseB_d; 00095 MonitorElement* mpTResponseE_d; 00096 MonitorElement* mpTResponseF_d; 00097 MonitorElement* mpTResponse_30_200_d; 00098 MonitorElement* mpTResponse_200_600_d; 00099 MonitorElement* mpTResponse_600_1500_d; 00100 MonitorElement* mpTResponse_1500_3500_d; 00101 MonitorElement* mpTResponse_30_d; 00102 MonitorElement* mjetArea; 00103 00104 // nvtx 00105 MonitorElement* nvtx_0_30; 00106 MonitorElement* nvtx_0_60; 00107 MonitorElement* mpTResponse_nvtx_0_5; 00108 MonitorElement* mpTResponse_nvtx_5_10; 00109 MonitorElement* mpTResponse_nvtx_10_15; 00110 MonitorElement* mpTResponse_nvtx_15_20; 00111 MonitorElement* mpTResponse_nvtx_20_30; 00112 MonitorElement* mpTResponse_nvtx_30_inf; 00113 MonitorElement* mpTScale_a_nvtx_0_5; 00114 MonitorElement* mpTScale_b_nvtx_0_5; 00115 MonitorElement* mpTScale_c_nvtx_0_5; 00116 MonitorElement* mpTScale_a_nvtx_5_10; 00117 MonitorElement* mpTScale_b_nvtx_5_10; 00118 MonitorElement* mpTScale_c_nvtx_5_10; 00119 MonitorElement* mpTScale_a_nvtx_10_15; 00120 MonitorElement* mpTScale_b_nvtx_10_15; 00121 MonitorElement* mpTScale_c_nvtx_10_15; 00122 MonitorElement* mpTScale_a_nvtx_15_20; 00123 MonitorElement* mpTScale_b_nvtx_15_20; 00124 MonitorElement* mpTScale_c_nvtx_15_20; 00125 MonitorElement* mpTScale_a_nvtx_20_30; 00126 MonitorElement* mpTScale_b_nvtx_20_30; 00127 MonitorElement* mpTScale_c_nvtx_20_30; 00128 MonitorElement* mpTScale_a_nvtx_30_inf; 00129 MonitorElement* mpTScale_b_nvtx_30_inf; 00130 MonitorElement* mpTScale_c_nvtx_30_inf; 00131 MonitorElement* mpTScale_nvtx_0_5; 00132 MonitorElement* mpTScale_nvtx_5_10; 00133 MonitorElement* mpTScale_nvtx_10_15; 00134 MonitorElement* mpTScale_nvtx_15_20; 00135 MonitorElement* mpTScale_nvtx_20_30; 00136 MonitorElement* mpTScale_nvtx_30_inf; 00137 MonitorElement* mNJetsEtaF_30; 00138 MonitorElement* mpTScale_a; 00139 MonitorElement* mpTScale_b; 00140 MonitorElement* mpTScale_c; 00141 MonitorElement* mpTScale_pT; 00142 00143 // Leading Jet Parameters 00144 MonitorElement* mEtaFirst; 00145 MonitorElement* mPhiFirst; 00146 MonitorElement* mEFirst; 00147 MonitorElement* mEFirst_80; 00148 MonitorElement* mEFirst_3000; 00149 MonitorElement* mPtFirst; 00150 MonitorElement* mPtFirst_80; 00151 MonitorElement* mPtFirst_3000; 00152 00153 MonitorElement* mNJetsEtaC; 00154 MonitorElement* mNJetsEtaF; 00155 00156 MonitorElement* mNJets1; 00157 MonitorElement* mNJets2; 00158 00159 // DiJet Parameters 00160 MonitorElement* mMjj; 00161 MonitorElement* mMjj_3000; 00162 00163 // JPTJet specific 00164 MonitorElement* mPtFractionPionInVertexInCalo; 00165 MonitorElement* mPtFractionPionInVertexOutCalo; 00166 MonitorElement* mPtFractionPionOutVertexInCalo; 00167 00168 MonitorElement* mPtFractionMuonInVertexInCalo; 00169 MonitorElement* mPtFractionMuonInVertexOutCalo; 00170 MonitorElement* mPtFractionMuonOutVertexInCalo; 00171 00172 MonitorElement* mPtFractionElecInVertexInCalo; 00173 MonitorElement* mPtFractionElecInVertexOutCalo; 00174 MonitorElement* mPtFractionElecOutVertexInCalo; 00175 00176 // 00177 MonitorElement* mMultiplicityPionInVertexInCalo; 00178 MonitorElement* mMultiplicityPionInVertexOutCalo; 00179 MonitorElement* mMultiplicityPionOutVertexInCalo; 00180 00181 MonitorElement* mMultiplicityMuonInVertexInCalo; 00182 MonitorElement* mMultiplicityMuonInVertexOutCalo; 00183 MonitorElement* mMultiplicityMuonOutVertexInCalo; 00184 00185 MonitorElement* mMultiplicityElecInVertexInCalo; 00186 MonitorElement* mMultiplicityElecInVertexOutCalo; 00187 MonitorElement* mMultiplicityElecOutVertexInCalo; 00188 /* 00189 MonitorElement* mMaxEInEmTowers; 00190 MonitorElement* mMaxEInHadTowers; 00191 MonitorElement* mHadEnergyInHO; 00192 MonitorElement* mHadEnergyInHB; 00193 MonitorElement* mHadEnergyInHF; 00194 MonitorElement* mHadEnergyInHE; 00195 MonitorElement* mHadEnergyInHO_80; 00196 MonitorElement* mHadEnergyInHB_80; 00197 MonitorElement* mHadEnergyInHE_80; 00198 MonitorElement* mHadEnergyInHO_3000; 00199 MonitorElement* mHadEnergyInHB_3000; 00200 MonitorElement* mHadEnergyInHE_3000; 00201 MonitorElement* mEmEnergyInEB; 00202 MonitorElement* mEmEnergyInEE; 00203 MonitorElement* mEmEnergyInHF; 00204 MonitorElement* mEmEnergyInEB_80; 00205 MonitorElement* mEmEnergyInEE_80; 00206 MonitorElement* mEmEnergyInEB_3000; 00207 MonitorElement* mEmEnergyInEE_3000; 00208 MonitorElement* mEnergyFractionHadronic; 00209 MonitorElement* mEnergyFractionEm; 00210 MonitorElement* mHFTotal; 00211 MonitorElement* mHFTotal_80; 00212 MonitorElement* mHFTotal_3000; 00213 MonitorElement* mHFLong; 00214 MonitorElement* mHFLong_80; 00215 MonitorElement* mHFLong_3000; 00216 MonitorElement* mHFShort; 00217 MonitorElement* mHFShort_80; 00218 MonitorElement* mHFShort_3000; 00219 MonitorElement* mN90; 00220 */ 00221 00222 // pthat 00223 MonitorElement* mPthat_80; 00224 MonitorElement* mPthat_3000; 00225 00226 // GenJet Generic Jet Parameters 00227 MonitorElement* mGenEta; 00228 MonitorElement* mGenPhi; 00229 MonitorElement* mGenPt; 00230 MonitorElement* mGenPt_80; 00231 MonitorElement* mGenPt_3000; 00232 00233 // GenJet Leading Jet Parameters 00234 MonitorElement* mGenEtaFirst; 00235 MonitorElement* mGenPhiFirst; 00236 00237 // JPTJet<->GenJet matching 00238 MonitorElement* mAllGenJetsPt; 00239 MonitorElement* mMatchedGenJetsPt; 00240 MonitorElement* mAllGenJetsEta; 00241 MonitorElement* mMatchedGenJetsEta; 00242 MonitorElement* mGenJetMatchEnergyFraction; 00243 MonitorElement* mReverseMatchEnergyFraction; 00244 MonitorElement* mRMatch; 00245 MonitorElement* mDeltaEta; 00246 MonitorElement* mDeltaPhi; 00247 MonitorElement* mEScale; 00248 MonitorElement* mlinEScale; //new 00249 MonitorElement* mDeltaE; 00250 00251 MonitorElement* mEScale_pt10; //new 00252 MonitorElement* mEScaleFineBin; //new 00253 00254 MonitorElement* mpTScaleB_s; 00255 MonitorElement* mpTScaleE_s; 00256 MonitorElement* mpTScaleF_s; 00257 MonitorElement* mpTScaleB_d; 00258 MonitorElement* mpTScaleE_d; 00259 MonitorElement* mpTScaleF_d; 00260 MonitorElement* mpTScalePhiB_d; 00261 MonitorElement* mpTScalePhiE_d; 00262 MonitorElement* mpTScalePhiF_d; 00263 00264 MonitorElement* mpTScale_30_200_s; 00265 MonitorElement* mpTScale_200_600_s; 00266 MonitorElement* mpTScale_600_1500_s; 00267 MonitorElement* mpTScale_1500_3500_s; 00268 00269 MonitorElement* mpTScale_30_200_d; 00270 MonitorElement* mpTScale_200_600_d; 00271 MonitorElement* mpTScale_600_1500_d; 00272 MonitorElement* mpTScale_1500_3500_d; 00273 00274 MonitorElement* mpTScale1DB_30_200; 00275 MonitorElement* mpTScale1DE_30_200; 00276 MonitorElement* mpTScale1DF_30_200; 00277 MonitorElement* mpTScale1DB_200_600; 00278 MonitorElement* mpTScale1DE_200_600; 00279 MonitorElement* mpTScale1DF_200_600; 00280 MonitorElement* mpTScale1DB_600_1500; 00281 MonitorElement* mpTScale1DE_600_1500; 00282 MonitorElement* mpTScale1DF_600_1500; 00283 MonitorElement* mpTScale1DB_1500_3500; 00284 MonitorElement* mpTScale1DE_1500_3500; 00285 MonitorElement* mpTScale1DF_1500_3500; 00286 MonitorElement* mpTScale1D_30_200; 00287 MonitorElement* mpTScale1D_200_600; 00288 MonitorElement* mpTScale1D_600_1500; 00289 MonitorElement* mpTScale1D_1500_3500; 00290 00291 MonitorElement* mDelEta; 00292 MonitorElement* mDelPhi; 00293 MonitorElement* mDelPt; 00294 00295 // Matching parameters 00296 double mMatchGenPtThreshold; 00297 double mGenEnergyFractionThreshold; 00298 double mReverseEnergyFractionThreshold; 00299 double mRThreshold; 00300 00301 std::string JetCorrectionService; 00302 00303 // Switch on/off unimportant histogram 00304 std::string mTurnOnEverything; 00305 00306 // Energy Profiles 00307 MonitorElement* mHadEnergyProfile; 00308 MonitorElement* mEmEnergyProfile; 00309 MonitorElement* mJetEnergyProfile; 00310 /* 00311 MonitorElement* mHadJetEnergyProfile; 00312 MonitorElement* mEMJetEnergyProfile; 00313 */ 00314 00315 // CaloMET 00316 MonitorElement* mCaloMEx; 00317 MonitorElement* mCaloMEx_3000; 00318 MonitorElement* mCaloMEy; 00319 MonitorElement* mCaloMEy_3000; 00320 MonitorElement* mCaloMET; 00321 MonitorElement* mCaloMET_3000; 00322 MonitorElement* mCaloMETPhi; 00323 MonitorElement* mCaloSumET; 00324 MonitorElement* mCaloSumET_3000; 00325 MonitorElement* mCaloMETSig; 00326 MonitorElement* mCaloMETSig_3000; 00327 00328 // RecHits 00329 MonitorElement* mHBEne; 00330 MonitorElement* mHBTime; 00331 MonitorElement* mHEEne; 00332 MonitorElement* mHETime; 00333 MonitorElement* mHOEne; 00334 MonitorElement* mHOTime; 00335 MonitorElement* mHFEne; 00336 MonitorElement* mHFTime; 00337 MonitorElement* mEBEne; 00338 MonitorElement* mEBTime; 00339 MonitorElement* mEEEne; 00340 MonitorElement* mEETime; 00341 00342 00343 }; 00344 #endif