Go to the documentation of this file.00001 #ifndef RecoParticleFlow_Benchmark_PFMETBenchmark_h
00002 #define RecoParticleFlow_Benchmark_PFMETBenchmark_h
00003
00004 #include "RecoParticleFlow/Benchmark/interface/PFBenchmarkAlgo.h"
00005
00006 #include "DataFormats/METReco/interface/PFMETCollection.h"
00007 #include "DataFormats/METReco/interface/PFMET.h"
00008 #include "DataFormats/METReco/interface/METCollection.h"
00009 #include "DataFormats/METReco/interface/MET.h"
00010 #include "DataFormats/METReco/interface/GenMETCollection.h"
00011 #include "DataFormats/METReco/interface/GenMET.h"
00012 #include "DataFormats/METReco/interface/CaloMETCollection.h"
00013 #include "DataFormats/METReco/interface/CaloMET.h"
00014 #include "DataFormats/Candidate/interface/Candidate.h"
00015 #include "DataFormats/Candidate/interface/CandidateFwd.h"
00016 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00017 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
00018 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00019 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00020 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
00021
00022 #include "DQMServices/Core/interface/DQMStore.h"
00023 #include "DQMServices/Core/interface/MonitorElement.h"
00024
00025
00026 #include "CommonTools/UtilAlgos/interface/TFileService.h"
00027 #include "TH1F.h"
00028 #include "TH2F.h"
00029 #include <string>
00030 #include <TFile.h>
00031
00032
00033 class PFMETBenchmark;
00034
00035 class TH1F;
00036 class TH2F;
00037
00038
00039
00040 class PFMETBenchmark {
00041
00042 public:
00043
00044 PFMETBenchmark();
00045 virtual ~PFMETBenchmark();
00046
00047 void setup(
00048 std::string Filename,
00049 bool debug,
00050 bool plotAgainstReco=0,
00051 std::string benchmarkLabel_ = "ParticleFlow",
00052 DQMStore * dbe_store = NULL
00053 );
00054 void process(const reco::PFMETCollection& ,
00055 const reco::GenParticleCollection&,
00056 const reco::CaloMETCollection&,
00057 const reco::METCollection& );
00058 void calculateQuantities(const reco::PFMETCollection&,
00059 const reco::GenParticleCollection&,
00060 const reco::CaloMETCollection&,
00061 const reco::METCollection&);
00062 void calculateQuantities(const reco::PFMETCollection&,
00063 const reco::GenParticleCollection&,
00064 const reco::CaloMETCollection&,
00065 const reco::METCollection&,
00066 const std::vector<reco::CaloJet>,
00067 const std::vector<reco::CaloJet>);
00068 float getTrueMET(){return true_met;}
00069 float getTruePhi(){return true_phi;}
00070 float getTrueSET(){return true_set;}
00071 float getPFMET(){return rec_met;}
00072 float getPFMEX(){return rec_mex-true_mex;}
00073 float getPFMEY(){return rec_mey-true_mey;}
00074 float getPFPhi(){return rec_phi;}
00075 float getPFSET(){return rec_set;}
00076 float getCaloMET(){return calo_met;}
00077 float getCaloMEX(){return calo_mex-true_mex;}
00078 float getCaloMEY(){return calo_mey-true_mey;}
00079 float getCaloPhi(){return calo_phi;}
00080 float getCaloSET(){return calo_set;}
00081 float getTCMET(){return tc_met;}
00082 float getTCMEX(){return tc_mex-true_mex;}
00083 float getTCMEY(){return tc_mey-true_mey;}
00084 float getTCPhi(){return tc_phi;}
00085 float getTCSET(){return tc_set;}
00086 float getDeltaPFMET(){return rec_met - true_met;}
00087 float getDeltaPFPhi(){return mpi_pi(rec_phi - true_phi);}
00088 float getDeltaPFSET(){return rec_set - true_set;}
00089 float getDeltaCaloMET(){return calo_met - true_met;}
00090 float getDeltaCaloPhi(){return mpi_pi(calo_phi - true_phi);}
00091 float getDeltaCaloSET(){return calo_set - true_set;}
00092 float getDeltaTCMET(){return tc_met - true_met;}
00093 float getDeltaTCPhi(){return mpi_pi(tc_phi - true_phi);}
00094 float getDeltaTCSET(){return tc_set - true_set;}
00095 double mpi_pi(double angle);
00096 void analyse();
00097
00098 void write();
00099
00100 private:
00101
00102 TFile *file_;
00103
00104
00105
00106 TProfile* profileSETvsSETresp;
00107 TProfile* profileMETvsMETresp;
00108 TH2F* hSETvsDeltaSET;
00109 TH2F* hSETvsDeltaMET;
00110 TH1F* hMEX;
00111 TH1F* hDeltaMEX;
00112 TH1F* hDeltaMET;
00113 TH1F* hDeltaPhi;
00114 TH1F* hDeltaSET;
00115
00116 TH2F* hDeltaPFMETvstrueMET;
00117 TH2F* hDeltaCaloMETvstrueMET;
00118 TH2F* hDeltaPFPhivstrueMET;
00119 TH2F* hDeltaCaloPhivstrueMET;
00120 TH2F* hCaloMETvstrueMET;
00121 TH2F* hPFMETvstrueMET;
00122 TH2F* hDeltaCaloMEXvstrueSET;
00123 TH2F* hDeltaPFMEXvstrueSET;
00124 TH1F* hTrueMET;
00125 TH1F* hCaloMET;
00126 TH1F* hPFMET;
00127 TH1F* hTCMET;
00128 TH2F* hDeltaTCMETvstrueMET;
00129 TH2F* hDeltaTCPhivstrueMET;
00130
00131 TProfile* profileCaloSETvsCaloSETresp;
00132 TProfile* profileCaloMETvsCaloMETresp;
00133 TH2F* hCaloSETvsDeltaCaloSET;
00134 TH2F* hCaloSETvsDeltaCaloMET;
00135 TH1F* hCaloMEX;
00136 TH1F* hDeltaCaloMEX;
00137 TH1F* hDeltaCaloMET;
00138 TH1F* hDeltaCaloPhi;
00139 TH1F* hDeltaCaloSET;
00140
00141 TProfile* profileTCSETvsTCSETresp;
00142 TProfile* profileTCMETvsTCMETresp;
00143 TH2F* hTCSETvsDeltaTCSET;
00144 TH2F* hTCSETvsDeltaTCMET;
00145 TH1F* hTCMEX;
00146 TH1F* hDeltaTCMEX;
00147 TH1F* hDeltaTCMET;
00148 TH1F* hDeltaTCPhi;
00149 TH1F* hDeltaTCSET;
00150
00151 TH2F* hDeltaTCMEXvstrueSET;
00152 TH2F* hTCMETvstrueMET;
00153
00154
00155
00156
00157
00158
00159
00160
00161 std::string outputFile_;
00162
00163 double true_set;
00164 double true_met;
00165 double true_mex;
00166 double true_mey;
00167 double true_phi;
00168 double rec_met;
00169 double rec_mex;
00170 double rec_mey;
00171 double rec_phi;
00172 double rec_set;
00173 double calo_met;
00174 double calo_mex;
00175 double calo_mey;
00176 double calo_phi;
00177 double calo_set;
00178 double tc_met;
00179 double tc_mex;
00180 double tc_mey;
00181 double tc_phi;
00182 double tc_set;
00183
00184 protected:
00185
00186 PFBenchmarkAlgo *algo_;
00187 bool debug_;
00188 bool plotAgainstReco_;
00189 DQMStore *dbe_;
00190 };
00191
00192 #endif // RecoParticleFlow_Benchmark_PFMETBenchmark_h