CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoParticleFlow/Benchmark/interface/PFJetBenchmark.h

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 //#include "FWCore/ServiceRegistry/interface/Service.h" 
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 //class DQMStore; // CMSSW_2_X_X not needed here?
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 //  void save();        
00066   void write();
00067         
00068  private:
00069                 
00070   TFile *file_;
00071         
00072   // histograms
00073   // Jets inclusive  distributions  (Pt > 20 GeV)
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   TH2F* hNCH7vsEta;
00095         
00096   // delta Pt or E quantities for Barrel
00097   TH1F *hBRPt;
00098   TH1F *hBRPt20_40;
00099   TH1F *hBRPt40_60;
00100   TH1F *hBRPt60_80;
00101   TH1F *hBRPt80_100;
00102   TH1F *hBRPt100_150;
00103   TH1F *hBRPt150_200;
00104   TH1F *hBRPt200_250;
00105   TH1F *hBRPt250_300;
00106   TH1F *hBRPt300_400;
00107   TH1F *hBRPt400_500;
00108   TH1F *hBRPt500_750;
00109   TH1F *hBRPt750_1250;
00110   TH1F *hBRPt1250_2000;
00111   TH1F *hBRPt2000_5000;
00112   TH1F *hBRCHE;
00113   TH1F *hBRNHE;
00114   TH1F *hBRNEE;
00115   TH1F *hBRneut;
00116   TH2F *hBRPtvsPt ;
00117   TH2F *hBRCHEvsPt ;
00118   TH2F *hBRNHEvsPt;
00119   TH2F *hBRNEEvsPt;
00120   TH2F *hBRneutvsPt;
00121   TH2F *hBRNEUTvsP;
00122   TH2F *hBRNONLvsP;
00123   TH2F *hBRHCALvsP;
00124   TH2F *hBRHONLvsP;
00125   TH2F *hBDEtavsPt;
00126   TH2F *hBDPhivsPt;
00127   TH2F *hBNCHvsPt;
00128   TH1F *hBNCH;
00129   TH2F* hBNCH0vsPt;
00130   TH2F* hBNCH1vsPt;
00131   TH2F* hBNCH2vsPt;
00132   TH2F* hBNCH3vsPt;
00133   TH2F* hBNCH4vsPt;
00134   TH2F* hBNCH5vsPt;
00135   TH2F* hBNCH6vsPt;
00136   TH2F* hBNCH7vsPt;
00137         
00138   // delta Pt or E quantities for Endcap
00139   TH1F *hERPt ;
00140   TH1F *hERPt20_40;
00141   TH1F *hERPt40_60;
00142   TH1F *hERPt60_80;
00143   TH1F *hERPt80_100;
00144   TH1F *hERPt100_150;
00145   TH1F *hERPt150_200;
00146   TH1F *hERPt200_250;
00147   TH1F *hERPt250_300;
00148   TH1F *hERPt300_400;
00149   TH1F *hERPt400_500;
00150   TH1F *hERPt500_750;
00151   TH1F *hERPt750_1250;
00152   TH1F *hERPt1250_2000;
00153   TH1F *hERPt2000_5000;
00154   TH1F *hERCHE;
00155   TH1F *hERNHE;
00156   TH1F *hERNEE;
00157   TH1F *hERneut;
00158   TH2F *hERPtvsPt ;
00159   TH2F *hERCHEvsPt;
00160   TH2F *hERNHEvsPt ;
00161   TH2F *hERNEEvsPt;
00162   TH2F *hERneutvsPt;
00163   TH2F *hERNEUTvsP;
00164   TH2F *hERNONLvsP;
00165   TH2F *hERHCALvsP;
00166   TH2F *hERHONLvsP;
00167   TH2F *hEDEtavsPt;
00168   TH2F *hEDPhivsPt;
00169   TH2F *hENCHvsPt;
00170   TH1F *hENCH;
00171   TH2F* hENCH0vsPt;
00172   TH2F* hENCH1vsPt;
00173   TH2F* hENCH2vsPt;
00174   TH2F* hENCH3vsPt;
00175   TH2F* hENCH4vsPt;
00176   TH2F* hENCH5vsPt;
00177   TH2F* hENCH6vsPt;
00178   TH2F* hENCH7vsPt;
00179         
00180   // delta Pt or E quantities for Forward
00181   TH1F *hFRPt ;
00182   TH1F *hFRPt20_40;
00183   TH1F *hFRPt40_60;
00184   TH1F *hFRPt60_80;
00185   TH1F *hFRPt80_100;
00186   TH1F *hFRPt100_150;
00187   TH1F *hFRPt150_200;
00188   TH1F *hFRPt200_250;
00189   TH1F *hFRPt250_300;
00190   TH1F *hFRPt300_400;
00191   TH1F *hFRPt400_500;
00192   TH1F *hFRPt500_750;
00193   TH1F *hFRPt750_1250;
00194   TH1F *hFRPt1250_2000;
00195   TH1F *hFRPt2000_5000;
00196   TH1F *hFRCHE;
00197   TH1F *hFRNHE;
00198   TH1F *hFRNEE;
00199   TH1F *hFRneut;
00200   TH2F *hFRPtvsPt ;
00201   TH2F *hFRCHEvsPt;
00202   TH2F *hFRNHEvsPt ;
00203   TH2F *hFRNEEvsPt;
00204   TH2F *hFRneutvsPt;
00205   TH2F *hFRNEUTvsP;
00206   TH2F *hFRNONLvsP;
00207   TH2F *hFRHCALvsP;
00208   TH2F *hFRHONLvsP;
00209   TH2F *hFDEtavsPt;
00210   TH2F *hFDPhivsPt;
00211   TH2F *hFNCHvsPt;
00212   TH1F *hFNCH;
00213   TH2F* hFNCH0vsPt;
00214   TH2F* hFNCH1vsPt;
00215   TH2F* hFNCH2vsPt;
00216   TH2F* hFNCH3vsPt;
00217   TH2F* hFNCH4vsPt;
00218   TH2F* hFNCH5vsPt;
00219   TH2F* hFNCH6vsPt;
00220   TH2F* hFNCH7vsPt;
00221         
00222   std::string outputFile_;      
00223  protected:
00224                 
00225   PFBenchmarkAlgo *algo_;
00226   bool debug_;
00227   bool plotAgainstReco_;
00228   bool onlyTwoJets_;
00229   double deltaRMax_;
00230   double resPtMax_;
00231   double resChargedHadEnergyMax_;
00232   double resNeutralHadEnergyMax_;
00233   double resNeutralEmEnergyMax_; 
00234   double recPt_cut;
00235   double maxEta_cut;
00236   unsigned int entry_;
00237   DQMStore *dbe_;
00238 };
00239 
00240 #endif // RecoParticleFlow_Benchmark_PFJetBenchmark_h