00001 #ifndef DUMPEVENT_H
00002 #define DUMPEVENT_H
00003
00004
00005
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
00012
00013 #include "FWCore/Framework/interface/Event.h"
00014 #include "FWCore/Framework/interface/ESHandle.h"
00015 #include "FWCore/Framework/interface/EDAnalyzer.h"
00016 #include "DataFormats/Common/interface/Handle.h"
00017 #include "FWCore/Framework/interface/Frameworkfwd.h"
00018 #include "FWCore/Framework/interface/EventSetup.h"
00019
00020
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022
00023
00024 #include "DQMServices/Core/interface/DQMStore.h"
00025
00026 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00027 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
00028 #include "DataFormats/JetReco/interface/CaloJet.h"
00029 #include "DataFormats/METReco/interface/CaloMET.h"
00030 #include "DataFormats/METReco/interface/CaloMETCollection.h"
00031 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00032 #include "DataFormats/METReco/interface/GenMET.h"
00033 #include "DataFormats/METReco/interface/GenMETCollection.h"
00034 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
00035 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00036 #include "DataFormats/DetId/interface/DetId.h"
00037 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00038 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00039 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00040 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00041
00042 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00043 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
00044 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00045 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00046 #include "DataFormats/DetId/interface/DetId.h"
00047
00048 #include "DataFormats/MuonReco/interface/Muon.h"
00049 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00050
00051
00052
00053 #include "DataFormats/EgammaCandidates/interface/Electron.h"
00054 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
00055 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00056 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00057 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
00058
00059 #include <vector>
00060 #include <utility>
00061 #include <ostream>
00062 #include <string>
00063 #include <algorithm>
00064 #include <cmath>
00065
00066 #include <TH1.h>
00067 #include <TH2.h>
00068 #include <TFile.h>
00069 #include <TMath.h>
00070
00071 class DetId;
00072
00073 class CaloGeometry;
00074 class CaloSubdetectorGeometry;
00075
00076
00077
00078
00079
00080
00081
00082
00083 class DumpEvent : public edm::EDAnalyzer {
00084 public:
00085
00086 DumpEvent(const edm::ParameterSet&);
00087
00088
00089 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00090 virtual void beginJob(const edm::EventSetup&) ;
00091 virtual void endJob() ;
00092
00093 void WritePhotons(const edm::Event&, const edm::EventSetup&);
00094 void WriteElectrons(const edm::Event&, const edm::EventSetup&);
00095 void WriteJets(const edm::Event&, const edm::EventSetup&);
00096 void WriteMuons(const edm::Event&, const edm::EventSetup&);
00097 void WriteMET(const edm::Event&, const edm::EventSetup&);
00098 void WriteSCs(const edm::Event&, const edm::EventSetup&);
00099 void BookHistos();
00100
00101 private:
00102 bool debug_;
00103
00104 TFile *m_DataFile;
00105
00106 TH1F *hElectron_eta, *hElectron_phi, *hElectron_energy;
00107 TH1F *hPhoton_eta, *hPhoton_phi, *hPhoton_energy;
00108 TH1F *hJet_eta, *hJet_phi, *hJet_energy;
00109 TH2F *hCaloTowerToJetMap_ieta_iphi;
00110 TH1F *hMuon_eta, *hMuon_phi, *hMuon_pt;
00111 TH1F *hRecoMET_phi, *hRecoMET_MET;
00112 TH1F *hGenMET_phi;
00113
00114 TH2F *hEEpZ_SC_ix_iy;
00115 TH2F *hEEmZ_SC_ix_iy;
00116 TH2F *hEB_SC_ieta_iphi;
00117 int CurrentEvent;
00118 float EnergyThreshold;
00119 int theEvent;
00120 int FirstEvent;
00121 int LastEvent;
00122
00123 };
00124
00125 #endif