File indexing completed on 2024-10-14 22:39:35
0001 #ifndef ESOccupancyTask_H
0002 #define ESOccupancyTask_H
0003
0004 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0005 #include "FWCore/Framework/interface/Event.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007
0008 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0009
0010 struct ESOccLSCache {
0011 int ievtLS_;
0012 };
0013
0014 class ESOccupancyTask : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<ESOccLSCache>> {
0015 public:
0016 ESOccupancyTask(const edm::ParameterSet& ps);
0017 ~ESOccupancyTask() override {}
0018
0019 protected:
0020 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0021 void analyze(const edm::Event&, const edm::EventSetup&) override;
0022
0023
0024 std::shared_ptr<ESOccLSCache> globalBeginLuminosityBlock(const edm::LuminosityBlock& lumi,
0025 const edm::EventSetup& c) const override;
0026
0027 void globalEndLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& c) override;
0028
0029 private:
0030
0031 edm::EDGetTokenT<ESRecHitCollection> rechittoken_;
0032 std::string prefixME_;
0033
0034 MonitorElement* hRecOCC_[2][2];
0035 MonitorElement* hSelOCC_[2][2];
0036 MonitorElement* hSelOCCByLS_[2][2];
0037 MonitorElement* hRecNHit_[2][2];
0038 MonitorElement* hEnDensity_[2][2];
0039 MonitorElement* hSelEnDensity_[2][2];
0040 MonitorElement* hGoodRecNHit_[2][2];
0041 MonitorElement* hSelEng_[2][2];
0042 MonitorElement* hEng_[2][2];
0043 MonitorElement* hEvEng_[2][2];
0044 MonitorElement* hE1E2_[2];
0045
0046 int runNum_, eCount_;
0047 };
0048
0049 #endif