00001 // -*- C++ -*- 00002 // 00003 // Package: EcalURecHitHists 00004 // Class: EcalURecHitHists 00005 // 00013 // 00014 // Original Author: Seth COOPER 00015 // Created: Th Nov 22 5:46:22 CEST 2007 00016 // $Id: EcalURecHitHists.h,v 1.5 2010/01/04 15:07:40 ferriff Exp $ 00017 // 00018 // 00019 00020 00021 // system include files 00022 #include <memory> 00023 #include <vector> 00024 #include <map> 00025 #include <set> 00026 00027 // user include files 00028 #include "FWCore/Framework/interface/Frameworkfwd.h" 00029 #include "FWCore/Framework/interface/EDAnalyzer.h" 00030 #include "FWCore/Framework/interface/Event.h" 00031 #include "FWCore/Framework/interface/MakerMacros.h" 00032 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00033 #include "FWCore/Framework/interface/ESHandle.h" 00034 #include "FWCore/Framework/interface/EventSetup.h" 00035 00036 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h" 00037 #include "DataFormats/EcalRecHit/interface/EcalUncalibratedRecHit.h" 00038 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" 00039 #include "DataFormats/DetId/interface/DetId.h" 00040 #include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h" 00041 00042 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h" 00043 00044 #include "CaloOnlineTools/EcalTools/interface/EcalFedMap.h" 00045 00046 #include "TFile.h" 00047 #include "TH1F.h" 00048 #include "TGraph.h" 00049 #include "TNtuple.h" 00050 #include "Geometry/EcalMapping/interface/EcalMappingRcd.h" 00051 00052 // 00053 // class declaration 00054 // 00055 00056 class EcalURecHitHists : public edm::EDAnalyzer { 00057 public: 00058 explicit EcalURecHitHists(const edm::ParameterSet&); 00059 ~EcalURecHitHists(); 00060 00061 00062 private: 00063 virtual void beginRun(edm::Run const &, edm::EventSetup const &) ; 00064 virtual void analyze(edm::Event const &, edm::EventSetup const &); 00065 virtual void endJob() ; 00066 std::string intToString(int num); 00067 void initHists(int); 00068 00069 // ----------member data --------------------------- 00070 00071 edm::InputTag EBUncalibratedRecHitCollection_; 00072 edm::InputTag EEUncalibratedRecHitCollection_; 00073 int runNum_; 00074 double histRangeMax_, histRangeMin_; 00075 std::string fileName_; 00076 00077 std::vector<int> maskedChannels_; 00078 std::vector<int> maskedFEDs_; 00079 std::vector<std::string> maskedEBs_; 00080 std::map<int,TH1F*> FEDsAndHists_; 00081 std::map<int,TH1F*> FEDsAndTimingHists_; 00082 00083 TH1F* allFedsHist_; 00084 TH1F* allFedsTimingHist_; 00085 00086 TFile* file; 00087 EcalFedMap* fedMap_; 00088 const EcalElectronicsMapping* ecalElectronicsMap_; 00089 };