CMS 3D CMS Logo

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

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