CMS 3D CMS Logo

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(edm::EventSetup const&);
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 isEBGap;
00067         float isEEGap;
00068         float isEBEEGap;
00069         float r9;
00070         float et;
00071         float eta;
00072         float phi;
00073         float hadronicOverEm;
00074       } ;
00075       struct_recPhoton recPhoton;
00076 
00077       // root file to store histograms
00078       TFile*  rootFile_;
00079 
00080       // data members for histograms to be filled
00081 
00082       // PhotonID Histograms
00083       TH1F* h_isoEcalRecHit_;
00084       TH1F* h_isoHcalRecHit_;
00085       TH1F* h_trk_pt_solid_;
00086       TH1F* h_trk_pt_hollow_;
00087       TH1F* h_ntrk_solid_;
00088       TH1F* h_ntrk_hollow_;
00089       TH1F* h_ebgap_;
00090       TH1F* h_eeGap_;
00091       TH1F* h_ebeeGap_;
00092       TH1F* h_r9_;
00093 
00094       // Photon Histograms
00095       TH1F* h_photonEt_;
00096       TH1F* h_photonEta_;
00097       TH1F* h_photonPhi_;
00098       TH1F* h_hadoverem_;
00099 
00100       // Photon's SuperCluster Histograms
00101       TH1F* h_photonScEt_;       
00102       TH1F* h_photonScEta_;      
00103       TH1F* h_photonScPhi_;
00104       TH1F* h_photonScEtaWidth_;
00105 
00106       // Composite or Other Histograms
00107       TH1F* h_photonInAnyGap_;
00108       TH1F* h_nPassingPho_;
00109       TH1F* h_nPho_;
00110 
00111       // TTree
00112       TTree* tree_PhotonAll_;
00113 };
00114 #endif

Generated on Tue Jun 9 17:43:35 2009 for CMSSW by  doxygen 1.5.4