CMS 3D CMS Logo

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 "PhysicsTools/UtilAlgos/interface/TFileService.h"
00024 #include "TH1F.h"
00025 #include "TH2F.h"
00026 #include <string>
00027 #include <TFile.h>
00028 
00029 
00030 class PFJetBenchmark;
00031 
00032 class TH1F;
00033 class TH2F;
00034 
00035 //class DQMStore; // CMSSW_2_X_X not needed here?
00036 
00037 class PFJetBenchmark {
00038         
00039  public:
00040         
00041   PFJetBenchmark();
00042   virtual ~PFJetBenchmark();
00043         
00044   void setup(
00045              std::string Filename,
00046              bool debug, 
00047              bool plotAgainstReco=0, 
00048              bool onlyTwoJets=1,
00049              double deltaRMax=0.1,
00050              std::string benchmarkLabel_ = "ParticleFlow", 
00051              double recPt = -1, 
00052              double maxEta = -1,
00053              DQMStore * dbe_store = NULL
00054              );
00055   void process(const reco::PFJetCollection& , const reco::GenJetCollection& );
00056   void gettrue (const reco::GenJet* truth, double& true_ChargedHadEnergy, 
00057                 double& true_NeutralHadEnergy, double& true_NeutralEmEnergy);
00058   void printPFJet (const reco::PFJet*);
00059   void printGenJet (const reco::GenJet*);
00060   double resPtMax() const {return resPtMax_;};
00061   double resChargedHadEnergyMax() const {return resChargedHadEnergyMax_;};
00062   double resNeutralHadEnergyMax() const {return resNeutralHadEnergyMax_;};
00063   double resNeutralEmEnergyMax() const {return resNeutralEmEnergyMax_;};
00064 //  void save();        
00065   void write();
00066         
00067  private:
00068                 
00069   TFile *file_;
00070         
00071   // histograms
00072   // Jets inclusive  distributions  (Pt > 20 GeV)
00073   TH1F *hNjets;
00074   TH1F *hjetsPt;
00075   TH1F *hjetsEta;
00076         
00077   // delta Pt or E quantities for Barrel
00078   TH1F *hBRPt;
00079   TH1F *hBRPt20_40;
00080   TH1F *hBRPt40_60;
00081   TH1F *hBRPt60_80;
00082   TH1F *hBRPt80_100;
00083   TH1F *hBRPt100_150;
00084   TH1F *hBRPt150_200;
00085   TH1F *hBRPt200_250;
00086   TH1F *hBRPt250_300;
00087   TH1F *hBRPt300_400;
00088   TH1F *hBRPt400_500;
00089   TH1F *hBRPt500_750;
00090   TH1F *hBRCHE;
00091   TH1F *hBRNHE;
00092   TH1F *hBRNEE;
00093   TH1F *hBRneut;
00094   TH2F *hBRPtvsPt ;
00095   TH2F *hBRCHEvsPt ;
00096   TH2F *hBRNHEvsPt;
00097   TH2F *hBRNEEvsPt;
00098   TH2F *hBRneutvsPt;
00099         
00100   // delta Pt or E quantities for Endcap
00101   TH1F *hERPt ;
00102   TH1F *hERPt20_40;
00103   TH1F *hERPt40_60;
00104   TH1F *hERPt60_80;
00105   TH1F *hERPt80_100;
00106   TH1F *hERPt100_150;
00107   TH1F *hERPt150_200;
00108   TH1F *hERPt200_250;
00109   TH1F *hERPt250_300;
00110   TH1F *hERPt300_400;
00111   TH1F *hERPt400_500;
00112   TH1F *hERPt500_750;
00113   TH1F *hERCHE;
00114   TH1F *hERNHE;
00115   TH1F *hERNEE;
00116   TH1F *hERneut;
00117   TH2F *hERPtvsPt ;
00118   TH2F *hERCHEvsPt;
00119   TH2F *hERNHEvsPt ;
00120   TH2F *hERNEEvsPt;
00121   TH2F *hERneutvsPt;
00122         
00123   std::string outputFile_;      
00124  protected:
00125                 
00126   PFBenchmarkAlgo *algo_;
00127   bool debug_;
00128   bool plotAgainstReco_;
00129   bool onlyTwoJets_;
00130   double deltaRMax_;
00131   double resPtMax_;
00132   double resChargedHadEnergyMax_;
00133   double resNeutralHadEnergyMax_;
00134   double resNeutralEmEnergyMax_; 
00135   double recPt_cut;
00136   double maxEta_cut;
00137   DQMStore *dbe_;
00138 };
00139 
00140 #endif // RecoParticleFlow_Benchmark_PFJetBenchmark_h

Generated on Tue Jun 9 17:44:37 2009 for CMSSW by  doxygen 1.5.4