Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-11-01 03:29:38

0001 #ifndef ECALRECHITANALYZER_H
0002 #define ECALRECHITANALYZER_H
0003 
0004 // author: Bobby Scurlock (The University of Florida)
0005 // date: 11/20/2006
0006 
0007 #include <memory>
0008 #include "FWCore/PluginManager/interface/ModuleDef.h"
0009 #include "FWCore/Framework/interface/MakerMacros.h"
0010 #include "FWCore/ServiceRegistry/interface/Service.h"
0011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0012 // user include files
0013 
0014 #include "FWCore/Framework/interface/Event.h"
0015 #include "FWCore/Framework/interface/ESHandle.h"
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "FWCore/Framework/interface/Frameworkfwd.h"
0018 #include "FWCore/Framework/interface/EventSetup.h"
0019 
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 
0022 #include "DQMServices/Core/interface/DQMStore.h"
0023 
0024 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0025 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0026 #include "DataFormats/JetReco/interface/CaloJet.h"
0027 #include "DataFormats/METReco/interface/CaloMETCollection.h"
0028 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0029 #include "DataFormats/METReco/interface/GenMETCollection.h"
0030 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
0031 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0032 #include "DataFormats/DetId/interface/DetId.h"
0033 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0034 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0035 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0036 
0037 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0038 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0039 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0040 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0041 #include "DataFormats/DetId/interface/DetId.h"
0042 
0043 //--egamma Reco stuff--//
0044 #include "DataFormats/EgammaCandidates/interface/Electron.h"
0045 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0046 #include "DataFormats/EgammaCandidates/interface/Photon.h"
0047 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0048 
0049 #include <memory>
0050 #include <vector>
0051 #include <utility>
0052 #include <ostream>
0053 #include <fstream>
0054 #include <string>
0055 #include <algorithm>
0056 #include <cmath>
0057 #include <TLorentzVector.h>
0058 #include <string>
0059 #include <map>
0060 
0061 #include <TH1.h>
0062 #include <TH2.h>
0063 #include <TFile.h>
0064 #include <TMath.h>
0065 
0066 class DetId;
0067 //class HcalTopology;
0068 class CaloGeometry;
0069 class CaloSubdetectorGeometry;
0070 class CaloGeometryRecord;
0071 //class CaloTowerConstituentsMap;
0072 //class CaloRecHit;
0073 
0074 //
0075 // class declaration
0076 //
0077 
0078 class ECALRecHitAnalyzer : public DQMEDAnalyzer {
0079 public:
0080   ECALRecHitAnalyzer(const edm::ParameterSet&);
0081   //~ECALRecHitAnalyzer();
0082 
0083   void analyze(const edm::Event&, const edm::EventSetup&) override;
0084   //  virtual void beginJob(void) ;
0085   virtual void dqmbeginRun(const edm::Run&, const edm::EventSetup&);
0086 
0087   void WriteECALRecHits(const edm::Event&, const edm::EventSetup&);
0088   void FillGeometry(const edm::EventSetup&);
0089   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0090 
0091 private:
0092   // Inputs from Configuration
0093   edm::EDGetTokenT<EBRecHitCollection> EBRecHitsLabel_;
0094   edm::EDGetTokenT<EERecHitCollection> EERecHitsLabel_;
0095   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeomToken_;
0096   const CaloGeometry* caloGeom_;
0097   bool debug_;
0098   bool finebinning_;
0099   std::string FolderName_;
0100   int CurrentEvent;
0101 
0102   //histos
0103   MonitorElement* hEB_ieta_iphi_etaMap;
0104   MonitorElement* hEB_ieta_iphi_phiMap;
0105   MonitorElement* hEB_ieta_detaMap;
0106   MonitorElement* hEB_ieta_dphiMap;
0107 
0108   MonitorElement* hEEpZ_ix_iy_irMap;
0109   MonitorElement* hEEpZ_ix_iy_xMap;
0110   MonitorElement* hEEpZ_ix_iy_yMap;
0111   MonitorElement* hEEpZ_ix_iy_zMap;
0112   MonitorElement* hEEpZ_ix_iy_dxMap;
0113   MonitorElement* hEEpZ_ix_iy_dyMap;
0114 
0115   MonitorElement* hEEmZ_ix_iy_irMap;
0116   MonitorElement* hEEmZ_ix_iy_xMap;
0117   MonitorElement* hEEmZ_ix_iy_yMap;
0118   MonitorElement* hEEmZ_ix_iy_zMap;
0119   MonitorElement* hEEmZ_ix_iy_dxMap;
0120   MonitorElement* hEEmZ_ix_iy_dyMap;
0121 
0122   MonitorElement* hECAL_Nevents;
0123 
0124   MonitorElement* hEEpZ_energy_ix_iy;
0125   MonitorElement* hEEmZ_energy_ix_iy;
0126   MonitorElement* hEB_energy_ieta_iphi;
0127 
0128   MonitorElement* hEEpZ_Minenergy_ix_iy;
0129   MonitorElement* hEEmZ_Minenergy_ix_iy;
0130   MonitorElement* hEB_Minenergy_ieta_iphi;
0131 
0132   MonitorElement* hEEpZ_Maxenergy_ix_iy;
0133   MonitorElement* hEEmZ_Maxenergy_ix_iy;
0134   MonitorElement* hEB_Maxenergy_ieta_iphi;
0135 
0136   MonitorElement* hEEpZ_Occ_ix_iy;
0137   MonitorElement* hEEmZ_Occ_ix_iy;
0138   MonitorElement* hEB_Occ_ieta_iphi;
0139 
0140   MonitorElement* hEEpZ_energyvsir;
0141   MonitorElement* hEEmZ_energyvsir;
0142   MonitorElement* hEB_energyvsieta;
0143 
0144   MonitorElement* hEEpZ_Maxenergyvsir;
0145   MonitorElement* hEEmZ_Maxenergyvsir;
0146   MonitorElement* hEB_Maxenergyvsieta;
0147 
0148   MonitorElement* hEEpZ_Minenergyvsir;
0149   MonitorElement* hEEmZ_Minenergyvsir;
0150   MonitorElement* hEB_Minenergyvsieta;
0151 
0152   MonitorElement* hEEpZ_SETvsir;
0153   MonitorElement* hEEmZ_SETvsir;
0154   MonitorElement* hEB_SETvsieta;
0155 
0156   MonitorElement* hEEpZ_METvsir;
0157   MonitorElement* hEEmZ_METvsir;
0158   MonitorElement* hEB_METvsieta;
0159 
0160   MonitorElement* hEEpZ_METPhivsir;
0161   MonitorElement* hEEmZ_METPhivsir;
0162   MonitorElement* hEB_METPhivsieta;
0163 
0164   MonitorElement* hEEpZ_MExvsir;
0165   MonitorElement* hEEmZ_MExvsir;
0166   MonitorElement* hEB_MExvsieta;
0167 
0168   MonitorElement* hEEpZ_MEyvsir;
0169   MonitorElement* hEEmZ_MEyvsir;
0170   MonitorElement* hEB_MEyvsieta;
0171 
0172   MonitorElement* hEEpZ_Occvsir;
0173   MonitorElement* hEEmZ_Occvsir;
0174   MonitorElement* hEB_Occvsieta;
0175 };
0176 
0177 #endif