00001 #ifndef Validation_EcalClusters_EgammaSuperClusters_h 00002 #define Validation_EcalClusters_EgammaSuperClusters_h 00003 00011 // 00012 // $Id: EgammaSuperClusters.h,v 1.13 2009/12/14 22:24:33 wmtan Exp $ 00013 // 00014 #include <string> 00015 00016 #include "FWCore/Framework/interface/Event.h" 00017 #include "FWCore/Framework/interface/EDAnalyzer.h" 00018 #include "FWCore/Framework/interface/Frameworkfwd.h" 00019 #include "FWCore/Framework/interface/MakerMacros.h" 00020 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00021 00022 #include "DQMServices/Core/interface/DQMStore.h" 00023 #include "DQMServices/Core/interface/MonitorElement.h" 00024 00025 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 00026 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" 00027 00028 class EgammaSuperClusters : public edm::EDAnalyzer 00029 { 00030 public: 00031 explicit EgammaSuperClusters( const edm::ParameterSet& ); 00032 ~EgammaSuperClusters(); 00033 00034 virtual void analyze( const edm::Event&, const edm::EventSetup& ); 00035 virtual void beginJob(); 00036 virtual void endJob(); 00037 00038 private: 00039 std::string outputFile_; 00040 //std::string CMSSW_Version_; 00041 00042 bool verboseDBE_; 00043 DQMStore* dbe_; 00044 00045 // mc truth 00046 edm::InputTag MCTruthCollection_; 00047 00048 // barrel clusters 00049 edm::InputTag barrelRawSuperClusterCollection_; 00050 edm::InputTag barrelCorSuperClusterCollection_; 00051 00052 // endcap clusters 00053 edm::InputTag endcapRawSuperClusterCollection_; 00054 edm::InputTag endcapPreSuperClusterCollection_; 00055 edm::InputTag endcapCorSuperClusterCollection_; 00056 00057 // collections of hits 00058 edm::InputTag barrelRecHitCollection_; 00059 edm::InputTag endcapRecHitCollection_; 00060 00061 MonitorElement* hist_EB_RawSC_Size_; 00062 MonitorElement* hist_EE_RawSC_Size_; 00063 MonitorElement* hist_EB_CorSC_Size_; 00064 MonitorElement* hist_EE_CorSC_Size_; 00065 MonitorElement* hist_EE_PreSC_Size_; 00066 double hist_min_Size_; 00067 double hist_max_Size_; 00068 int hist_bins_Size_; 00069 00070 MonitorElement* hist_EB_RawSC_NumBC_; 00071 MonitorElement* hist_EE_RawSC_NumBC_; 00072 MonitorElement* hist_EB_CorSC_NumBC_; 00073 MonitorElement* hist_EE_CorSC_NumBC_; 00074 MonitorElement* hist_EE_PreSC_NumBC_; 00075 double hist_min_NumBC_; 00076 double hist_max_NumBC_; 00077 int hist_bins_NumBC_; 00078 00079 MonitorElement* hist_EB_RawSC_ET_; 00080 MonitorElement* hist_EE_RawSC_ET_; 00081 MonitorElement* hist_EB_CorSC_ET_; 00082 MonitorElement* hist_EE_CorSC_ET_; 00083 MonitorElement* hist_EE_PreSC_ET_; 00084 double hist_min_ET_; 00085 double hist_max_ET_; 00086 int hist_bins_ET_; 00087 00088 MonitorElement* hist_EB_RawSC_Eta_; 00089 MonitorElement* hist_EE_RawSC_Eta_; 00090 MonitorElement* hist_EB_CorSC_Eta_; 00091 MonitorElement* hist_EE_CorSC_Eta_; 00092 MonitorElement* hist_EE_PreSC_Eta_; 00093 double hist_min_Eta_; 00094 double hist_max_Eta_; 00095 int hist_bins_Eta_; 00096 00097 MonitorElement* hist_EB_RawSC_Phi_; 00098 MonitorElement* hist_EE_RawSC_Phi_; 00099 MonitorElement* hist_EB_CorSC_Phi_; 00100 MonitorElement* hist_EE_CorSC_Phi_; 00101 MonitorElement* hist_EE_PreSC_Phi_; 00102 double hist_min_Phi_; 00103 double hist_max_Phi_; 00104 int hist_bins_Phi_; 00105 00106 MonitorElement* hist_EB_RawSC_S1toS9_; 00107 MonitorElement* hist_EE_RawSC_S1toS9_; 00108 MonitorElement* hist_EB_CorSC_S1toS9_; 00109 MonitorElement* hist_EE_CorSC_S1toS9_; 00110 MonitorElement* hist_EE_PreSC_S1toS9_; 00111 double hist_min_S1toS9_; 00112 double hist_max_S1toS9_; 00113 int hist_bins_S1toS9_; 00114 00115 MonitorElement* hist_EB_RawSC_S25toE_; 00116 MonitorElement* hist_EE_RawSC_S25toE_; 00117 MonitorElement* hist_EB_CorSC_S25toE_; 00118 MonitorElement* hist_EE_CorSC_S25toE_; 00119 MonitorElement* hist_EE_PreSC_S25toE_; 00120 double hist_min_S25toE_; 00121 double hist_max_S25toE_; 00122 int hist_bins_S25toE_; 00123 00124 MonitorElement* hist_EB_RawSC_EoverTruth_; 00125 MonitorElement* hist_EE_RawSC_EoverTruth_; 00126 MonitorElement* hist_EB_CorSC_EoverTruth_; 00127 MonitorElement* hist_EE_CorSC_EoverTruth_; 00128 MonitorElement* hist_EE_PreSC_EoverTruth_; 00129 double hist_min_EoverTruth_; 00130 double hist_max_EoverTruth_; 00131 int hist_bins_EoverTruth_; 00132 00133 MonitorElement* hist_EB_RawSC_deltaR_; 00134 MonitorElement* hist_EE_RawSC_deltaR_; 00135 MonitorElement* hist_EB_CorSC_deltaR_; 00136 MonitorElement* hist_EE_CorSC_deltaR_; 00137 MonitorElement* hist_EE_PreSC_deltaR_; 00138 double hist_min_deltaR_; 00139 double hist_max_deltaR_; 00140 int hist_bins_deltaR_; 00141 00142 MonitorElement* hist_EE_PreSC_preshowerE_; 00143 MonitorElement* hist_EE_CorSC_preshowerE_; 00144 double hist_min_preshowerE_; 00145 double hist_max_preshowerE_; 00146 int hist_bins_preshowerE_; 00147 00148 MonitorElement* hist_EE_CorSC_phiWidth_; 00149 MonitorElement* hist_EB_CorSC_phiWidth_; 00150 double hist_min_phiWidth_; 00151 double hist_max_phiWidth_; 00152 int hist_bins_phiWidth_; 00153 00154 MonitorElement* hist_EE_CorSC_etaWidth_; 00155 MonitorElement* hist_EB_CorSC_etaWidth_; 00156 double hist_min_etaWidth_; 00157 double hist_max_etaWidth_; 00158 int hist_bins_etaWidth_; 00159 00160 double hist_min_R_; 00161 double hist_max_R_; 00162 int hist_bins_R_; 00163 00164 MonitorElement* hist_EB_CorSC_ET_vs_Eta_; 00165 MonitorElement* hist_EB_CorSC_ET_vs_Phi_; 00166 00167 MonitorElement* hist_EE_CorSC_ET_vs_Eta_; 00168 MonitorElement* hist_EE_CorSC_ET_vs_Phi_; 00169 MonitorElement* hist_EE_CorSC_ET_vs_R_; 00170 00171 00172 void closestMCParticle(const HepMC::GenEvent *genEvent, const reco::SuperCluster &sc, 00173 double &dRClosest, double &energyClosest); 00174 00175 00176 float ecalEta(float EtaParticle , float Zvertex, float plane_Radius); 00177 00178 }; 00179 #endif 00180