CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/DQMOffline/JetMET/interface/ECALRecHitAnalyzer.h

Go to the documentation of this file.
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(void) ;
00089   virtual void beginRun(const edm::Run&, const edm::EventSetup&) ;
00090   virtual void endJob() ;
00091 
00092   void WriteECALRecHits(const edm::Event&, const edm::EventSetup&);
00093   void FillGeometry(const edm::EventSetup&);
00094   void BookHistos();
00095  
00096  private:
00097   // DAQ Tools
00098   DQMStore* dbe_;
00099 
00100   // Inputs from Configuration
00101   edm::InputTag EBRecHitsLabel_;
00102   edm::InputTag EERecHitsLabel_;
00103   bool debug_;
00104   bool finebinning_;
00105   std::string FolderName_;
00106   int CurrentEvent;
00107 
00108   //histos
00109   MonitorElement* hEB_ieta_iphi_etaMap;
00110   MonitorElement* hEB_ieta_iphi_phiMap;
00111   MonitorElement* hEB_ieta_detaMap;
00112   MonitorElement* hEB_ieta_dphiMap;
00113   
00114   MonitorElement* hEEpZ_ix_iy_irMap;
00115   MonitorElement* hEEpZ_ix_iy_xMap;
00116   MonitorElement* hEEpZ_ix_iy_yMap;
00117   MonitorElement* hEEpZ_ix_iy_zMap;
00118   MonitorElement* hEEpZ_ix_iy_dxMap;  
00119   MonitorElement* hEEpZ_ix_iy_dyMap;
00120   
00121   MonitorElement* hEEmZ_ix_iy_irMap;
00122   MonitorElement* hEEmZ_ix_iy_xMap;
00123   MonitorElement* hEEmZ_ix_iy_yMap;
00124   MonitorElement* hEEmZ_ix_iy_zMap;
00125   MonitorElement* hEEmZ_ix_iy_dxMap;  
00126   MonitorElement* hEEmZ_ix_iy_dyMap;
00127   
00128   MonitorElement* hECAL_Nevents;
00129   
00130   MonitorElement* hEEpZ_energy_ix_iy;
00131   MonitorElement* hEEmZ_energy_ix_iy;
00132   MonitorElement* hEB_energy_ieta_iphi;
00133   
00134   MonitorElement* hEEpZ_Minenergy_ix_iy;
00135   MonitorElement* hEEmZ_Minenergy_ix_iy;
00136   MonitorElement* hEB_Minenergy_ieta_iphi;
00137   
00138   MonitorElement* hEEpZ_Maxenergy_ix_iy;
00139   MonitorElement* hEEmZ_Maxenergy_ix_iy;
00140   MonitorElement* hEB_Maxenergy_ieta_iphi;
00141   
00142   MonitorElement* hEEpZ_Occ_ix_iy; 
00143   MonitorElement* hEEmZ_Occ_ix_iy;
00144   MonitorElement* hEB_Occ_ieta_iphi;
00145   
00146   MonitorElement* hEEpZ_energyvsir;
00147   MonitorElement* hEEmZ_energyvsir;
00148   MonitorElement* hEB_energyvsieta;
00149   
00150   MonitorElement* hEEpZ_Maxenergyvsir;
00151   MonitorElement* hEEmZ_Maxenergyvsir;
00152   MonitorElement* hEB_Maxenergyvsieta;
00153   
00154   MonitorElement* hEEpZ_Minenergyvsir;
00155   MonitorElement* hEEmZ_Minenergyvsir;
00156   MonitorElement* hEB_Minenergyvsieta;
00157   
00158   MonitorElement* hEEpZ_SETvsir;
00159   MonitorElement* hEEmZ_SETvsir;
00160   MonitorElement* hEB_SETvsieta;
00161   
00162   MonitorElement* hEEpZ_METvsir;
00163   MonitorElement* hEEmZ_METvsir;
00164   MonitorElement* hEB_METvsieta;
00165   
00166   MonitorElement* hEEpZ_METPhivsir;
00167   MonitorElement* hEEmZ_METPhivsir;
00168   MonitorElement* hEB_METPhivsieta;
00169   
00170   MonitorElement* hEEpZ_MExvsir;
00171   MonitorElement* hEEmZ_MExvsir;
00172   MonitorElement* hEB_MExvsieta;
00173   
00174   MonitorElement* hEEpZ_MEyvsir;
00175   MonitorElement* hEEmZ_MEyvsir;
00176   MonitorElement* hEB_MEyvsieta;
00177   
00178   MonitorElement* hEEpZ_Occvsir;
00179   MonitorElement* hEEmZ_Occvsir;
00180   MonitorElement* hEB_Occvsieta;
00181 };
00182 
00183 #endif