CMS 3D CMS Logo

PatPhotonSimpleAnalyzer.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_PhotonIdentification_PatPhotonSimpleAnalyzer_H
2 #define RecoEgamma_PhotonIdentification_PatPhotonSimpleAnalyzer_H
3 
11 //
12 
13 //
14 
15 // system include files
16 #include <memory>
17 
18 // user include files
21 
24 
26 
27 #include <string>
28 #include "TH1.h"
29 #include "TTree.h"
30 
31 class TFile;
32 
33 //
34 // class declaration
35 //
37 public:
39  ~PatPhotonSimpleAnalyzer() override;
40 
41  void analyze(const edm::Event&, const edm::EventSetup&) override;
42  void beginJob() override;
43  void endJob() override;
44 
45 private:
46  std::string outputFile_; // output file
47  double minPhotonEt_; // minimum photon Et
48  double minPhotonAbsEta_; // min and
49  double maxPhotonAbsEta_; // max abs(eta)
50  double minPhotonR9_; // minimum R9 = E(3x3)/E(SuperCluster)
51  double maxPhotonHoverE_; // maximum HCAL / ECAL
52  bool createPhotonTTree_; // Create a TTree of photon variables
53 
54  // Will be used for creating TTree of photons.
55  // These names did not have to match those from a phtn->...
56  // but do match for clarity.
64  float isEBGap;
65  float isEEGap;
66  float isEBEEGap;
67  float r9;
68  float et;
69  float eta;
70  float phi;
72  float ecalIso;
73  float hcalIso;
74  float trackIso;
75  };
77 
78  // root file to store histograms
79  TFile* rootFile_;
80 
81  // data members for histograms to be filled
82 
83  // PhotonID Histograms
90  TH1F* h_ebgap_;
91  TH1F* h_eeGap_;
92  TH1F* h_ebeeGap_;
93  TH1F* h_r9_;
94 
95  // Photon Histograms
96  TH1F* h_photonEt_;
97  TH1F* h_photonEta_;
98  TH1F* h_photonPhi_;
99  TH1F* h_hadoverem_;
100 
101  // Photon's SuperCluster Histograms
106 
107  // Composite or Other Histograms
110  TH1F* h_nPho_;
111 
112  // TTree
114 };
115 #endif
PatPhotonSimpleAnalyzer(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override