00001 #ifndef MCPhotonAnalyzer_H 00002 #define MCPhotonAnalyzer_H 00003 #include "RecoEgamma/EgammaMCTools/interface/PhotonMCTruthFinder.h" 00004 00005 #include "SimTracker/TrackAssociation/interface/TrackAssociatorBase.h" 00006 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" 00007 #include "FWCore/Framework/interface/EDAnalyzer.h" 00008 00009 #include <map> 00010 #include <vector> 00011 00012 00013 // forward declarations 00014 class TFile; 00015 class TH1F; 00016 class TH2F; 00017 class TProfile; 00018 class TTree; 00019 class SimVertex; 00020 class SimTrack; 00021 00022 00023 class MCPhotonAnalyzer : public edm::EDAnalyzer 00024 { 00025 00026 public: 00027 00028 // 00029 explicit MCPhotonAnalyzer( const edm::ParameterSet& ) ; 00030 virtual ~MCPhotonAnalyzer(); 00031 00032 00033 virtual void analyze( const edm::Event&, const edm::EventSetup& ) ; 00034 virtual void beginJob( const edm::EventSetup& ) ; 00035 virtual void endJob() ; 00036 00037 private: 00038 00039 00040 float etaTransformation( float a, float b); 00041 float phiNormalization( float& a); 00042 00043 00044 // 00045 PhotonMCTruthFinder* thePhotonMCTruthFinder_; 00046 00047 const TrackerGeometry* trackerGeom; 00048 00049 std::string fOutputFileName_ ; 00050 TFile* fOutputFile_ ; 00051 00052 00053 00054 00055 int nEvt_; 00056 int nMatched_; 00057 00059 00060 double mcPhi_; 00061 double mcEta_; 00062 00063 std::string HepMCLabel; 00064 std::string SimTkLabel; 00065 std::string SimVtxLabel; 00066 std::string SimHitLabel; 00067 00068 00069 // all photons 00070 TH1F* h_MCPhoE_; 00071 TH1F* h_MCPhoEta_; 00072 TH1F* h_MCPhoEta1_; 00073 TH1F* h_MCPhoEta2_; 00074 TH1F* h_MCPhoEta3_; 00075 TH1F* h_MCPhoEta4_; 00076 TH1F* h_MCPhoPhi_; 00077 // Conversion 00078 TH1F* h_MCConvPhoE_; 00079 TH1F* h_MCConvPhoEta_; 00080 TH1F* h_MCConvPhoPhi_; 00081 TH1F* h_MCConvPhoR_; 00082 TH1F* h_MCConvPhoREta1_; 00083 TH1F* h_MCConvPhoREta2_; 00084 TH1F* h_MCConvPhoREta3_; 00085 TH1F* h_MCConvPhoREta4_; 00086 TH1F* h_convFracEta1_; 00087 TH1F* h_convFracEta2_; 00088 TH1F* h_convFracEta3_; 00089 TH1F* h_convFracEta4_; 00090 00091 00093 TH1F* h_MCConvPhoTwoTracksE_; 00094 TH1F* h_MCConvPhoTwoTracksEta_; 00095 TH1F* h_MCConvPhoTwoTracksPhi_; 00096 TH1F* h_MCConvPhoTwoTracksR_; 00098 TH1F* h_MCConvPhoOneTrackE_; 00099 TH1F* h_MCConvPhoOneTrackEta_; 00100 TH1F* h_MCConvPhoOneTrackPhi_; 00101 TH1F* h_MCConvPhoOneTrackR_; 00102 00103 TH1F* h_MCEleE_; 00104 TH1F* h_MCEleEta_; 00105 TH1F* h_MCElePhi_; 00106 TH1F* h_BremFrac_; 00107 TH1F* h_BremEnergy_; 00108 TH2F* h_EleEvsPhoE_; 00109 TH2F* h_bremEvsEleE_; 00110 00111 TProfile* p_BremVsR_; 00112 TProfile* p_BremVsEta_; 00113 00114 TProfile* p_BremVsConvR_; 00115 TProfile* p_BremVsConvEta_; 00116 00117 TH2F* h_bremFracVsConvR_; 00118 00119 }; 00120 00121 #endif