00001 #ifndef PhotonsWithConversionsAnalyzer_H 00002 #define PhotonsWithConversionsAnalyzer_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 PhotonsWithConversionsAnalyzer : public edm::EDAnalyzer 00024 { 00025 00026 public: 00027 00028 // 00029 explicit PhotonsWithConversionsAnalyzer( const edm::ParameterSet& ) ; 00030 virtual ~PhotonsWithConversionsAnalyzer(); 00031 00032 00033 virtual void analyze( const edm::Event&, const edm::EventSetup& ) ; 00034 virtual void beginJob() ; 00035 virtual void endJob() ; 00036 00037 private: 00038 00039 float etaTransformation( float a, float b); 00040 00041 00042 // 00043 PhotonMCTruthFinder* thePhotonMCTruthFinder_; 00044 00045 std::string fOutputFileName_ ; 00046 TFile* fOutputFile_ ; 00047 00048 00049 int nEvt_; 00050 int nMCPho_; 00051 int nMatched_; 00052 00053 std::string HepMCLabel; 00054 std::string SimTkLabel; 00055 std::string SimVtxLabel; 00056 std::string SimHitLabel; 00057 00058 00059 std::string photonCollectionProducer_; 00060 std::string photonCollection_; 00061 00062 TH1F *h_ErecoEMC_; 00063 TH1F *h_deltaPhi_; 00064 TH1F *h_deltaEta_; 00065 00066 00068 TH1F *h_MCphoE_; 00069 TH1F *h_MCphoPhi_; 00070 TH1F *h_MCphoEta_; 00071 00072 00073 00075 TH1F *h_MCConvE_; 00076 TH1F *h_MCConvPt_; 00077 TH1F *h_MCConvEta_; 00078 00079 00080 // SC from reco photons 00081 TH1F* h_scE_; 00082 TH1F* h_scEt_; 00083 TH1F* h_scEta_; 00084 TH1F* h_scPhi_; 00085 // 00086 TH1F* h_phoE_; 00087 TH1F* h_phoEta_; 00088 TH1F* h_phoPhi_; 00089 // 00090 // All tracks from reco photons 00091 TH2F* h2_tk_nHitsVsR_; 00092 // 00093 TH2F* h2_tk_inPtVsR_; 00094 00095 00096 00097 00098 00099 }; 00100 00101 #endif