CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/Validation/RecoJets/plugins/CaloJetTester.h

Go to the documentation of this file.
00001 #ifndef ValidationRecoJetsCaloJetTester_h
00002 #define ValidationRecoJetsCaloJetTester_h
00003 
00004 // Producer for validation histograms for CaloJet objects
00005 // F. Ratnikov, Sept. 7, 2006
00006 // Modified by J F Novak July 10, 2008
00007 // $Id: CaloJetTester.h,v 1.26 2013/04/06 06:50:11 kovitang Exp $
00008 
00009 #include <string>
00010 
00011 #include "FWCore/Framework/interface/EDAnalyzer.h"
00012 #include "DQMServices/Core/interface/MonitorElement.h"
00013 #include "JetMETCorrections/Objects/interface/JetCorrector.h"
00014 #include "DataFormats/VertexReco/interface/Vertex.h"
00015 
00016 namespace reco {
00017   class CaloJet;
00018   class GenJet;
00019 }
00020 
00021 class MonitorElement;
00022 
00023 class CaloJetTester : public edm::EDAnalyzer {
00024 public:
00025 
00026   CaloJetTester (const edm::ParameterSet&);
00027   ~CaloJetTester();
00028 
00029   virtual void analyze(const edm::Event&, const edm::EventSetup&);
00030   virtual void beginJob() ;
00031   virtual void endJob() ;
00032  
00033 private:
00034 
00035  
00036 
00037   void fillMatchHists (const reco::GenJet& fGenJet, const reco::CaloJet& fCaloJet, std::vector<reco::Vertex> goodVertices);
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   // CaloJet specific
00164   MonitorElement* mMaxEInEmTowers;
00165   MonitorElement* mMaxEInHadTowers;
00166   MonitorElement* mHadEnergyInHO;
00167   MonitorElement* mHadEnergyInHB;
00168   MonitorElement* mHadEnergyInHF;
00169   MonitorElement* mHadEnergyInHE;
00170   MonitorElement* mHadEnergyInHO_80;
00171   MonitorElement* mHadEnergyInHB_80;
00172   MonitorElement* mHadEnergyInHE_80;
00173   MonitorElement* mHadEnergyInHO_3000;
00174   MonitorElement* mHadEnergyInHB_3000;
00175   MonitorElement* mHadEnergyInHE_3000;
00176   MonitorElement* mEmEnergyInEB;
00177   MonitorElement* mEmEnergyInEE;
00178   MonitorElement* mEmEnergyInHF;
00179   MonitorElement* mEmEnergyInEB_80;
00180   MonitorElement* mEmEnergyInEE_80;
00181   MonitorElement* mEmEnergyInEB_3000;
00182   MonitorElement* mEmEnergyInEE_3000;
00183   MonitorElement* mEnergyFractionHadronic_B;
00184   MonitorElement* mEnergyFractionHadronic_E;
00185   MonitorElement* mEnergyFractionHadronic_F;
00186   MonitorElement* mEnergyFractionEm_B;
00187   MonitorElement* mEnergyFractionEm_E;
00188   MonitorElement* mEnergyFractionEm_F;
00189   MonitorElement* mHFTotal;
00190   MonitorElement* mHFTotal_80;
00191   MonitorElement* mHFTotal_3000;
00192   MonitorElement* mHFLong;
00193   MonitorElement* mHFLong_80;
00194   MonitorElement* mHFLong_3000;
00195   MonitorElement* mHFShort;
00196   MonitorElement* mHFShort_80;
00197   MonitorElement* mHFShort_3000;
00198   MonitorElement* mN90;
00199 
00200   // pthat
00201   MonitorElement* mPthat_80;
00202   MonitorElement* mPthat_3000;
00203 
00204   // GenJet Generic Jet Parameters
00205   MonitorElement* mGenEta;
00206   MonitorElement* mGenPhi;
00207   MonitorElement* mGenPt;
00208   MonitorElement* mGenPt_80;
00209   MonitorElement* mGenPt_3000;
00210 
00211   // GenJet Leading Jet Parameters
00212   MonitorElement* mGenEtaFirst;
00213   MonitorElement* mGenPhiFirst;
00214 
00215   // CaloJet<->GenJet matching
00216   MonitorElement* mAllGenJetsPt;
00217   MonitorElement* mMatchedGenJetsPt;
00218   MonitorElement* mAllGenJetsEta;
00219   MonitorElement* mMatchedGenJetsEta;
00220   MonitorElement* mGenJetMatchEnergyFraction;
00221   MonitorElement* mReverseMatchEnergyFraction;
00222   MonitorElement* mRMatch;
00223   MonitorElement* mDeltaEta;
00224   MonitorElement* mDeltaPhi;
00225   MonitorElement* mEScale;
00226   MonitorElement* mlinEScale;  //new
00227   MonitorElement* mDeltaE;
00228 
00229   MonitorElement* mEScale_pt10;  //new
00230   MonitorElement* mEScaleFineBin;  //new
00231 
00232   MonitorElement* mpTScaleB_s;
00233   MonitorElement* mpTScaleE_s;
00234   MonitorElement* mpTScaleF_s;
00235   MonitorElement* mpTScaleB_d;
00236   MonitorElement* mpTScaleE_d;
00237   MonitorElement* mpTScaleF_d;
00238   MonitorElement* mpTScalePhiB_d;
00239   MonitorElement* mpTScalePhiE_d;
00240   MonitorElement* mpTScalePhiF_d;
00241 
00242   MonitorElement* mpTScale_30_200_s;
00243   MonitorElement* mpTScale_200_600_s;
00244   MonitorElement* mpTScale_600_1500_s;
00245   MonitorElement* mpTScale_1500_3500_s;
00246 
00247   MonitorElement* mpTScale_30_200_d;
00248   MonitorElement* mpTScale_200_600_d;
00249   MonitorElement* mpTScale_600_1500_d;
00250   MonitorElement* mpTScale_1500_3500_d;
00251 
00252   MonitorElement* mpTScale1DB_30_200;
00253   MonitorElement* mpTScale1DE_30_200;
00254   MonitorElement* mpTScale1DF_30_200;
00255   MonitorElement* mpTScale1DB_200_600;
00256   MonitorElement* mpTScale1DE_200_600;
00257   MonitorElement* mpTScale1DF_200_600;
00258   MonitorElement* mpTScale1DB_600_1500;
00259   MonitorElement* mpTScale1DE_600_1500;
00260   MonitorElement* mpTScale1DF_600_1500;
00261   MonitorElement* mpTScale1DB_1500_3500;
00262   MonitorElement* mpTScale1DE_1500_3500;
00263   MonitorElement* mpTScale1DF_1500_3500;
00264   MonitorElement* mpTScale1D_30_200;
00265   MonitorElement* mpTScale1D_200_600;
00266   MonitorElement* mpTScale1D_600_1500;
00267   MonitorElement* mpTScale1D_1500_3500;
00268 
00269   MonitorElement* mDelEta;
00270   MonitorElement* mDelPhi;
00271   MonitorElement* mDelPt;
00272 
00273   // Matching parameters
00274   double mMatchGenPtThreshold;
00275   double mGenEnergyFractionThreshold;
00276   double mReverseEnergyFractionThreshold;
00277   double mRThreshold;
00278 
00279   std::string JetCorrectionService;
00280 
00281   // Switch on/off unimportant histogram
00282   std::string  mTurnOnEverything;
00283 
00284   // Energy Profiles
00285   MonitorElement* mHadEnergyProfile;
00286   MonitorElement* mEmEnergyProfile;
00287   MonitorElement* mJetEnergyProfile;
00288   MonitorElement* mHadJetEnergyProfile;
00289   MonitorElement* mEMJetEnergyProfile;
00290 
00291   // CaloMET
00292   MonitorElement* mCaloMEx;
00293   MonitorElement* mCaloMEx_3000;
00294   MonitorElement* mCaloMEy;
00295   MonitorElement* mCaloMEy_3000;
00296   MonitorElement* mCaloMET;
00297   MonitorElement* mCaloMET_3000;
00298   MonitorElement* mCaloMETPhi;
00299   MonitorElement* mCaloSumET;
00300   MonitorElement* mCaloSumET_3000;
00301   MonitorElement* mCaloMETSig;
00302   MonitorElement* mCaloMETSig_3000;
00303 
00304   // RecHits
00305   MonitorElement* mHBEne;
00306   MonitorElement* mHBTime;
00307   MonitorElement* mHEEne;
00308   MonitorElement* mHETime;
00309   MonitorElement* mHOEne;
00310   MonitorElement* mHOTime;
00311   MonitorElement* mHFEne;
00312   MonitorElement* mHFTime;
00313   MonitorElement* mEBEne;
00314   MonitorElement* mEBTime;
00315   MonitorElement* mEEEne;
00316   MonitorElement* mEETime;
00317 
00318   //Correction
00319   bool doJetCorrection;
00320 };
00321 #endif