CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/RecoParticleFlow/Benchmark/interface/PFTauElecRejectionBenchmark.h

Go to the documentation of this file.
00001 #ifndef RecoParticleFlow_Benchmark_PFTauElecRejectionBenchmark_h
00002 #define RecoParticleFlow_Benchmark_PFTauElecRejectionBenchmark_h
00003 
00004 #include "DataFormats/TauReco/interface/PFTau.h"
00005 #include "DataFormats/TauReco/interface/PFTauDiscriminator.h"
00006 #include "DataFormats/TauReco/interface/PFTauDiscriminatorByIsolation.h"
00007 #include "DataFormats/TauReco/interface/PFTauTagInfo.h"
00008 #include "RecoTauTag/TauTagTools/interface/PFTauElementsOperators.h"
00009 #include "RecoTauTag/TauTagTools/interface/TauTagTools.h"
00010 
00011 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00012 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00013 
00014 #include "Math/GenVector/VectorUtil.h"
00015 #include "Math/GenVector/PxPyPzE4D.h"
00016 #include "TLorentzVector.h"
00017 
00018 #include "CommonTools/UtilAlgos/interface/TFileService.h"
00019 #include "TH1F.h"
00020 #include "TH2F.h"
00021 #include <string>
00022 #include <TFile.h>
00023 
00024 #include "DQMServices/Core/interface/DQMStore.h"
00025 #include "DQMServices/Core/interface/MonitorElement.h"
00026 
00027 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
00028 
00029 class PFTauElecRejectionBenchmark;
00030 
00031 class TH1F;
00032 class TH2F;
00033 
00034 //class DQMStore; // CMSSW_2_X_X not needed here?
00035 
00036 class PFTauElecRejectionBenchmark {
00037         
00038  public:
00039   
00040   PFTauElecRejectionBenchmark();
00041   virtual ~PFTauElecRejectionBenchmark();
00042   
00043   void setup(
00044              std::string Filename,
00045              std::string benchmarkLabel,
00046              double maxDeltaR, 
00047              double minRecoPt, 
00048              double maxRecoAbsEta, 
00049              double minMCPt, 
00050              double maxMCAbsEta, 
00051              std::string sGenMatchObjectLabel,
00052              bool applyEcalCrackCut,
00053              DQMStore * db_store);
00054   void process(edm::Handle<edm::HepMCProduct> mcevt, edm::Handle<reco::PFTauCollection> pfTaus, 
00055                edm::Handle<reco::PFTauDiscriminator> pfTauIsoDiscr, 
00056                edm::Handle<reco::PFTauDiscriminator> pfTauElecDiscr);
00057   void write();
00058         
00059  private:
00060                 
00061   bool isInEcalCrack(double eta) const;
00062 
00063   TFile *file_;
00064   std::string outputFile_;      
00065   std::string benchmarkLabel_;
00066   double maxDeltaR_;
00067   double minMCPt_;
00068   double maxMCAbsEta_;
00069   double minRecoPt_;
00070   double maxRecoAbsEta_;
00071   std::string sGenMatchObjectLabel_;
00072   bool applyEcalCrackCut_;
00073 
00074   // histograms
00075   TH1F *hEoverP;
00076   TH1F *hHoverP;
00077   TH1F *hEmfrac;
00078 
00079   TH1F *hEoverP_barrel;
00080   TH1F *hHoverP_barrel;
00081   TH1F *hEmfrac_barrel;
00082 
00083   TH1F *hEoverP_endcap;
00084   TH1F *hHoverP_endcap;
00085   TH1F *hEmfrac_endcap;
00086 
00087   TH1F *hEoverP_preid0;
00088   TH1F *hHoverP_preid0;
00089   TH1F *hEmfrac_preid0;
00090 
00091   TH1F *hEoverP_preid1;
00092   TH1F *hHoverP_preid1;
00093   TH1F *hEmfrac_preid1;
00094 
00095   TH1F *hElecPreID;
00096   TH1F *hElecMVA;
00097   TH1F *hTauElecDiscriminant;
00098 
00099   TH2F *hHoPvsEoP;
00100   TH2F *hHoPvsEoP_preid0;
00101   TH2F *hHoPvsEoP_preid1;
00102 
00103   TH2F *hEmfracvsEoP;
00104   TH2F *hEmfracvsEoP_preid0;
00105   TH2F *hEmfracvsEoP_preid1;
00106 
00107   TH1F *hpfcand_deltaEta;
00108   TH1F *hpfcand_deltaEta_weightE;
00109   TH1F *hpfcand_deltaPhiOverQ;
00110   TH1F *hpfcand_deltaPhiOverQ_weightE;
00111 
00112   TH1F *hleadTk_pt;
00113   TH1F *hleadTk_eta;
00114   TH1F *hleadTk_phi;
00115 
00116   // to be filled yet!
00117   TH1F *hleadGsfTk_pt;
00118   TH1F *hleadGsfTk_eta;
00119   TH1F *hleadGsfTk_phi;
00120 
00121         
00122   std::vector<TLorentzVector> _GenObjects;
00123 
00124  protected:
00125                 
00126   DQMStore *db_;
00127 };
00128 
00129 #endif // RecoParticleFlow_Benchmark_PFTauElecRejectionBenchmark_h