00001 #ifndef ECALRECHITANALYZER_H 00002 #define ECALRECHITANALYZER_H 00003 00004 // author: Bobby Scurlock (The University of Florida) 00005 // date: 11/20/2006 00006 00007 #include <memory> 00008 #include "FWCore/PluginManager/interface/ModuleDef.h" 00009 #include "FWCore/Framework/interface/MakerMacros.h" 00010 #include "FWCore/ServiceRegistry/interface/Service.h" 00011 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00012 // user include files 00013 00014 #include "FWCore/Framework/interface/Event.h" 00015 #include "FWCore/Framework/interface/ESHandle.h" 00016 #include "FWCore/Framework/interface/EDAnalyzer.h" 00017 #include "DataFormats/Common/interface/Handle.h" 00018 #include "FWCore/Framework/interface/Frameworkfwd.h" 00019 #include "FWCore/Framework/interface/EventSetup.h" 00020 00021 00022 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00023 00024 00025 #include "DQMServices/Core/interface/DQMStore.h" 00026 00027 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00028 #include "DataFormats/JetReco/interface/CaloJetCollection.h" 00029 #include "DataFormats/JetReco/interface/CaloJet.h" 00030 #include "DataFormats/METReco/interface/CaloMETCollection.h" 00031 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" 00032 #include "DataFormats/METReco/interface/GenMETCollection.h" 00033 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" 00034 #include "Geometry/CaloGeometry/interface/CaloGeometry.h" 00035 #include "DataFormats/DetId/interface/DetId.h" 00036 #include "DataFormats/GeometryVector/interface/GlobalPoint.h" 00037 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" 00038 #include "DataFormats/HcalDetId/interface/HcalDetId.h" 00039 00040 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" 00041 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h" 00042 #include "DataFormats/EcalDetId/interface/EBDetId.h" 00043 #include "DataFormats/EcalDetId/interface/EEDetId.h" 00044 #include "DataFormats/DetId/interface/DetId.h" 00045 00046 //--egamma Reco stuff--// 00047 #include "DataFormats/EgammaCandidates/interface/Electron.h" 00048 #include "DataFormats/EgammaReco/interface/SuperCluster.h" 00049 #include "DataFormats/EgammaCandidates/interface/Photon.h" 00050 00051 #include <memory> 00052 #include <vector> 00053 #include <utility> 00054 #include <ostream> 00055 #include <fstream> 00056 #include <string> 00057 #include <algorithm> 00058 #include <cmath> 00059 #include <TLorentzVector.h> 00060 #include <string> 00061 #include <map> 00062 00063 #include <TH1.h> 00064 #include <TH2.h> 00065 #include <TFile.h> 00066 #include <TMath.h> 00067 #include "DQMServices/Core/interface/MonitorElement.h" 00068 00069 class DetId; 00070 //class HcalTopology; 00071 class CaloGeometry; 00072 class CaloSubdetectorGeometry; 00073 //class CaloTowerConstituentsMap; 00074 //class CaloRecHit; 00075 00076 00077 // 00078 // class declaration 00079 // 00080 00081 class ECALRecHitAnalyzer : public edm::EDAnalyzer { 00082 public: 00083 00084 ECALRecHitAnalyzer(const edm::ParameterSet&); 00085 //~ECALRecHitAnalyzer(); 00086 00087 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00088 virtual void beginJob(const edm::EventSetup&) ; 00089 virtual void endJob() ; 00090 00091 void WriteECALRecHits(const edm::Event&, const edm::EventSetup&); 00092 void FillGeometry(const edm::EventSetup&); 00093 void DumpGeometry(); 00094 void BookHistos(); 00095 00096 private: 00097 // DAQ Tools 00098 DQMStore* dbe_; 00099 std::map<std::string, MonitorElement*> me; 00100 // Inputs from Configuration 00101 std::string outputFile_; 00102 std::string geometryFile_; 00103 edm::InputTag EBRecHitsLabel_; 00104 edm::InputTag EERecHitsLabel_; 00105 bool debug_; 00106 bool dumpGeometry_; 00107 00108 int CurrentEvent; 00109 }; 00110 00111 #endif