Go to the documentation of this file.00001 #ifndef RecoParticleFlow_Benchmark_PFJetBenchmark_h
00002 #define RecoParticleFlow_Benchmark_PFJetBenchmark_h
00003
00004 #include "RecoParticleFlow/Benchmark/interface/PFBenchmarkAlgo.h"
00005
00006 #include "DataFormats/JetReco/interface/PFJetCollection.h"
00007 #include "DataFormats/JetReco/interface/PFJet.h"
00008 #include "DataFormats/JetReco/interface/GenJetCollection.h"
00009 #include "DataFormats/JetReco/interface/GenJet.h"
00010 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
00011 #include "DataFormats/JetReco/interface/BasicJetCollection.h"
00012 #include "DataFormats/Candidate/interface/Candidate.h"
00013 #include "DataFormats/Candidate/interface/CandidateFwd.h"
00014 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00015 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
00016 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00017 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00018
00019 #include "DQMServices/Core/interface/DQMStore.h"
00020 #include "DQMServices/Core/interface/MonitorElement.h"
00021
00022
00023 #include "CommonTools/UtilAlgos/interface/TFileService.h"
00024 #include "TH1F.h"
00025 #include "TH2F.h"
00026 #include <string>
00027 #include <TFile.h>
00028 #include <vector>
00029
00030
00031 class PFJetBenchmark;
00032
00033 class TH1F;
00034 class TH2F;
00035
00036
00037
00038 class PFJetBenchmark {
00039
00040 public:
00041
00042 PFJetBenchmark();
00043 virtual ~PFJetBenchmark();
00044
00045 void setup(
00046 std::string Filename,
00047 bool debug,
00048 bool plotAgainstReco=0,
00049 bool onlyTwoJets=1,
00050 double deltaRMax=0.1,
00051 std::string benchmarkLabel_ = "ParticleFlow",
00052 double recPt = -1,
00053 double maxEta = -1,
00054 DQMStore * dbe_store = NULL
00055 );
00056 void process(const reco::PFJetCollection& , const reco::GenJetCollection& );
00057 void gettrue (const reco::GenJet* truth, double& true_ChargedHadEnergy,
00058 double& true_NeutralHadEnergy, double& true_NeutralEmEnergy);
00059 void printPFJet (const reco::PFJet*);
00060 void printGenJet (const reco::GenJet*);
00061 double resPtMax() const {return resPtMax_;};
00062 double resChargedHadEnergyMax() const {return resChargedHadEnergyMax_;};
00063 double resNeutralHadEnergyMax() const {return resNeutralHadEnergyMax_;};
00064 double resNeutralEmEnergyMax() const {return resNeutralEmEnergyMax_;};
00065
00066 void write();
00067
00068 private:
00069
00070 TFile *file_;
00071
00072
00073
00074 TH1F *hNjets;
00075 TH1F *hjetsPt;
00076 TH1F *hjetsEta;
00077 TH2F *hRPtvsEta ;
00078 TH2F *hDEtavsEta ;
00079 TH2F *hDPhivsEta ;
00080 TH2F *hRNeutvsEta ;
00081 TH2F *hRNEUTvsEta ;
00082 TH2F *hRNONLvsEta ;
00083 TH2F *hRHCALvsEta ;
00084 TH2F *hRHONLvsEta ;
00085 TH2F *hRCHEvsEta ;
00086 TH2F *hNCHvsEta;
00087 TH2F* hNCH0vsEta;
00088 TH2F* hNCH1vsEta;
00089 TH2F* hNCH2vsEta;
00090 TH2F* hNCH3vsEta;
00091 TH2F* hNCH4vsEta;
00092 TH2F* hNCH5vsEta;
00093 TH2F* hNCH6vsEta;
00094
00095
00096 TH1F *hBRPt;
00097 TH1F *hBRPt20_40;
00098 TH1F *hBRPt40_60;
00099 TH1F *hBRPt60_80;
00100 TH1F *hBRPt80_100;
00101 TH1F *hBRPt100_150;
00102 TH1F *hBRPt150_200;
00103 TH1F *hBRPt200_250;
00104 TH1F *hBRPt250_300;
00105 TH1F *hBRPt300_400;
00106 TH1F *hBRPt400_500;
00107 TH1F *hBRPt500_750;
00108 TH1F *hBRPt750_1250;
00109 TH1F *hBRPt1250_2000;
00110 TH1F *hBRPt2000_5000;
00111 TH1F *hBRCHE;
00112 TH1F *hBRNHE;
00113 TH1F *hBRNEE;
00114 TH1F *hBRneut;
00115 TH2F *hBRPtvsPt ;
00116 TH2F *hBRCHEvsPt ;
00117 TH2F *hBRNHEvsPt;
00118 TH2F *hBRNEEvsPt;
00119 TH2F *hBRneutvsPt;
00120 TH2F *hBRNEUTvsP;
00121 TH2F *hBRNONLvsP;
00122 TH2F *hBRHCALvsP;
00123 TH2F *hBRHONLvsP;
00124 TH2F *hBDEtavsPt;
00125 TH2F *hBDPhivsPt;
00126 TH2F *hBNCHvsPt;
00127 TH1F *hBNCH;
00128 TH2F* hBNCH0vsPt;
00129 TH2F* hBNCH1vsPt;
00130 TH2F* hBNCH2vsPt;
00131 TH2F* hBNCH3vsPt;
00132 TH2F* hBNCH4vsPt;
00133 TH2F* hBNCH5vsPt;
00134 TH2F* hBNCH6vsPt;
00135
00136
00137 TH1F *hERPt ;
00138 TH1F *hERPt20_40;
00139 TH1F *hERPt40_60;
00140 TH1F *hERPt60_80;
00141 TH1F *hERPt80_100;
00142 TH1F *hERPt100_150;
00143 TH1F *hERPt150_200;
00144 TH1F *hERPt200_250;
00145 TH1F *hERPt250_300;
00146 TH1F *hERPt300_400;
00147 TH1F *hERPt400_500;
00148 TH1F *hERPt500_750;
00149 TH1F *hERPt750_1250;
00150 TH1F *hERPt1250_2000;
00151 TH1F *hERPt2000_5000;
00152 TH1F *hERCHE;
00153 TH1F *hERNHE;
00154 TH1F *hERNEE;
00155 TH1F *hERneut;
00156 TH2F *hERPtvsPt ;
00157 TH2F *hERCHEvsPt;
00158 TH2F *hERNHEvsPt ;
00159 TH2F *hERNEEvsPt;
00160 TH2F *hERneutvsPt;
00161 TH2F *hERNEUTvsP;
00162 TH2F *hERNONLvsP;
00163 TH2F *hERHCALvsP;
00164 TH2F *hERHONLvsP;
00165 TH2F *hEDEtavsPt;
00166 TH2F *hEDPhivsPt;
00167 TH2F *hENCHvsPt;
00168 TH1F *hENCH;
00169 TH2F* hENCH0vsPt;
00170 TH2F* hENCH1vsPt;
00171 TH2F* hENCH2vsPt;
00172 TH2F* hENCH3vsPt;
00173 TH2F* hENCH4vsPt;
00174 TH2F* hENCH5vsPt;
00175 TH2F* hENCH6vsPt;
00176
00177
00178 TH1F *hFRPt ;
00179 TH1F *hFRPt20_40;
00180 TH1F *hFRPt40_60;
00181 TH1F *hFRPt60_80;
00182 TH1F *hFRPt80_100;
00183 TH1F *hFRPt100_150;
00184 TH1F *hFRPt150_200;
00185 TH1F *hFRPt200_250;
00186 TH1F *hFRPt250_300;
00187 TH1F *hFRPt300_400;
00188 TH1F *hFRPt400_500;
00189 TH1F *hFRPt500_750;
00190 TH1F *hFRPt750_1250;
00191 TH1F *hFRPt1250_2000;
00192 TH1F *hFRPt2000_5000;
00193 TH1F *hFRCHE;
00194 TH1F *hFRNHE;
00195 TH1F *hFRNEE;
00196 TH1F *hFRneut;
00197 TH2F *hFRPtvsPt ;
00198 TH2F *hFRCHEvsPt;
00199 TH2F *hFRNHEvsPt ;
00200 TH2F *hFRNEEvsPt;
00201 TH2F *hFRneutvsPt;
00202 TH2F *hFRNEUTvsP;
00203 TH2F *hFRNONLvsP;
00204 TH2F *hFRHCALvsP;
00205 TH2F *hFRHONLvsP;
00206 TH2F *hFDEtavsPt;
00207 TH2F *hFDPhivsPt;
00208 TH2F *hFNCHvsPt;
00209 TH1F *hFNCH;
00210 TH2F* hFNCH0vsPt;
00211 TH2F* hFNCH1vsPt;
00212 TH2F* hFNCH2vsPt;
00213 TH2F* hFNCH3vsPt;
00214 TH2F* hFNCH4vsPt;
00215 TH2F* hFNCH5vsPt;
00216 TH2F* hFNCH6vsPt;
00217
00218 std::string outputFile_;
00219 protected:
00220
00221 PFBenchmarkAlgo *algo_;
00222 bool debug_;
00223 bool plotAgainstReco_;
00224 bool onlyTwoJets_;
00225 double deltaRMax_;
00226 double resPtMax_;
00227 double resChargedHadEnergyMax_;
00228 double resNeutralHadEnergyMax_;
00229 double resNeutralEmEnergyMax_;
00230 double recPt_cut;
00231 double maxEta_cut;
00232 unsigned int entry_;
00233 DQMStore *dbe_;
00234 };
00235
00236 #endif // RecoParticleFlow_Benchmark_PFJetBenchmark_h