CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/RecoEgamma/PhotonIdentification/plugins/PhotonIDSimpleAnalyzer.h

Go to the documentation of this file.
00001 #ifndef RecoEgamma_PhotonIdentification_PhotonIDSimpleAnalyzer_H
00002 #define RecoEgamma_PhotonIdentification_PhotonIDSimpleAnalyzer_H
00003 
00011 //
00012 
00013 //
00014 
00015 // system include files
00016 #include <memory>
00017 
00018 // user include files
00019 #include "FWCore/Framework/interface/Frameworkfwd.h"
00020 #include "FWCore/Framework/interface/EDAnalyzer.h"
00021 
00022 #include "FWCore/Framework/interface/Event.h"
00023 #include "FWCore/Framework/interface/MakerMacros.h"
00024 
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 
00027 #include <string>
00028 #include "TH1.h"
00029 #include "TTree.h"
00030 
00031 
00032 class TFile;
00033 
00034 //
00035 // class declaration
00036 //
00037 class PhotonIDSimpleAnalyzer : public edm::EDAnalyzer {
00038    public:
00039       explicit PhotonIDSimpleAnalyzer( const edm::ParameterSet& );
00040       ~PhotonIDSimpleAnalyzer();
00041 
00042 
00043       virtual void analyze( const edm::Event&, const edm::EventSetup& );
00044       virtual void beginJob();
00045       virtual void endJob();
00046  private:
00047 
00048       std::string outputFile_;   // output file
00049       double minPhotonEt_;       // minimum photon Et
00050       double minPhotonAbsEta_;   // min and
00051       double maxPhotonAbsEta_;   // max abs(eta)
00052       double minPhotonR9_;       // minimum R9 = E(3x3)/E(SuperCluster)
00053       double maxPhotonHoverE_;   // maximum HCAL / ECAL 
00054       bool   createPhotonTTree_; // Create a TTree of photon variables
00055 
00056       // Will be used for creating TTree of photons.
00057       // These names did not have to match those from a phtn->...
00058       // but do match for clarity.
00059       struct struct_recPhoton {
00060         float isolationEcalRecHit;
00061         float isolationHcalRecHit;
00062         float isolationSolidTrkCone;
00063         float isolationHollowTrkCone;
00064         float nTrkSolidCone;
00065         float nTrkHollowCone;
00066         float isEBEtaGap;
00067         float isEBPhiGap;
00068         float isEERingGap;
00069         float isEEDeeGap;
00070         float isEBEEGap;
00071         float r9;
00072         float et;
00073         float eta;
00074         float phi;
00075         float hadronicOverEm;
00076       } ;
00077       struct_recPhoton recPhoton;
00078 
00079       // root file to store histograms
00080       TFile*  rootFile_;
00081 
00082       // data members for histograms to be filled
00083 
00084       // PhotonID Histograms
00085       TH1F* h_isoEcalRecHit_;
00086       TH1F* h_isoHcalRecHit_;
00087       TH1F* h_trk_pt_solid_;
00088       TH1F* h_trk_pt_hollow_;
00089       TH1F* h_ntrk_solid_;
00090       TH1F* h_ntrk_hollow_;
00091       TH1F* h_ebetagap_;
00092       TH1F* h_ebphigap_;
00093       TH1F* h_eeringGap_;
00094       TH1F* h_eedeeGap_;
00095       TH1F* h_ebeeGap_;
00096       TH1F* h_r9_;
00097 
00098       // Photon Histograms
00099       TH1F* h_photonEt_;
00100       TH1F* h_photonEta_;
00101       TH1F* h_photonPhi_;
00102       TH1F* h_hadoverem_;
00103 
00104       // Photon's SuperCluster Histograms
00105       TH1F* h_photonScEt_;       
00106       TH1F* h_photonScEta_;      
00107       TH1F* h_photonScPhi_;
00108       TH1F* h_photonScEtaWidth_;
00109 
00110       // Composite or Other Histograms
00111       TH1F* h_photonInAnyGap_;
00112       TH1F* h_nPassingPho_;
00113       TH1F* h_nPassEM_;
00114       TH1F* h_nPho_;
00115 
00116       // TTree
00117       TTree* tree_PhotonAll_;
00118 };
00119 #endif