Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-05 22:25:53

0001 #ifndef CaloOnlineTools_EcalTools_EcalURecHitHists_h
0002 #define CaloOnlineTools_EcalTools_EcalURecHitHists_h
0003 // -*- C++ -*-
0004 //
0005 // Package:   EcalURecHitHists
0006 // Class:     EcalURecHitHists
0007 //
0008 /**\class EcalURecHitHists EcalURecHitHists.cc
0009 
0010  Description: <one line class summary>
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  Seth COOPER
0017 //         Created:  Th Nov 22 5:46:22 CEST 2007
0018 //
0019 //
0020 
0021 // system include files
0022 #include <memory>
0023 #include <vector>
0024 #include <map>
0025 #include <set>
0026 
0027 // user include files
0028 #include "FWCore/Framework/interface/Frameworkfwd.h"
0029 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0030 #include "FWCore/Framework/interface/Event.h"
0031 #include "FWCore/Framework/interface/MakerMacros.h"
0032 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0033 #include "FWCore/Framework/interface/EventSetup.h"
0034 
0035 #include "DataFormats/EcalRecHit/interface/EcalUncalibratedRecHit.h"
0036 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0037 #include "DataFormats/DetId/interface/DetId.h"
0038 #include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"
0039 
0040 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
0041 #include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
0042 
0043 #include "CaloOnlineTools/EcalTools/interface/EcalFedMap.h"
0044 
0045 #include "TFile.h"
0046 #include "TH1F.h"
0047 #include "TGraph.h"
0048 #include "TNtuple.h"
0049 
0050 //
0051 // class declaration
0052 //
0053 
0054 class EcalURecHitHists : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0055 public:
0056   explicit EcalURecHitHists(const edm::ParameterSet&);
0057   ~EcalURecHitHists() override;
0058 
0059 private:
0060   void beginRun(edm::Run const&, edm::EventSetup const&) override;
0061   void endRun(edm::Run const&, edm::EventSetup const&) override;
0062   void analyze(edm::Event const&, edm::EventSetup const&) override;
0063   void endJob() override;
0064   std::string intToString(int num);
0065   void initHists(int);
0066 
0067   // ----------member data ---------------------------
0068 
0069   const edm::InputTag ebUncalibratedRecHitCollection_;
0070   const edm::InputTag eeUncalibratedRecHitCollection_;
0071 
0072   const edm::EDGetTokenT<EcalUncalibratedRecHitCollection> ebUncalibRecHitsToken_;
0073   const edm::EDGetTokenT<EcalUncalibratedRecHitCollection> eeUncalibRecHitsToken_;
0074   const edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> ecalMappingToken_;
0075 
0076   int runNum_;
0077   const double histRangeMax_, histRangeMin_;
0078   std::string fileName_;
0079 
0080   std::vector<int> maskedChannels_;
0081   std::vector<int> maskedFEDs_;
0082   std::vector<std::string> maskedEBs_;
0083   std::map<int, TH1F*> FEDsAndHists_;
0084   std::map<int, TH1F*> FEDsAndTimingHists_;
0085 
0086   TH1F* allFedsHist_;
0087   TH1F* allFedsTimingHist_;
0088 
0089   TFile* file;
0090   EcalFedMap* fedMap_;
0091   const EcalElectronicsMapping* ecalElectronicsMap_;
0092 };
0093 
0094 #endif