Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:23

0001 #ifndef ESTimingTask_H
0002 #define ESTimingTask_H
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "FWCore/Framework/interface/ESHandle.h"
0007 #include "FWCore/Framework/interface/EventSetup.h"
0008 #include "CondFormats/ESObjects/interface/ESGain.h"
0009 
0010 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0011 
0012 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0013 
0014 #include "TF1.h"
0015 #include "TH1F.h"
0016 #include "DQMServices/Core/interface/DQMStore.h"
0017 
0018 double fitf(double *x, double *par);
0019 
0020 class ESTimingTask : public DQMEDAnalyzer {
0021 public:
0022   ESTimingTask(const edm::ParameterSet &ps);
0023   ~ESTimingTask() override;
0024 
0025 private:
0026   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0027   void analyze(const edm::Event &, const edm::EventSetup &) override;
0028   void set(const edm::EventSetup &es);
0029 
0030   // ----------member data ---------------------------
0031   edm::EDGetTokenT<ESDigiCollection> digilabel_;
0032   std::string prefixME_;
0033 
0034   MonitorElement *hTiming_[2][2];
0035   MonitorElement *h2DTiming_;
0036 
0037   edm::ESGetToken<ESGain, ESGainRcd> esgainToken_;
0038   edm::ESHandle<ESGain> esgain_;
0039 
0040   TF1 *fit_;
0041   TH1F *htESP_;
0042   TH1F *htESM_;
0043 
0044   int runNum_, eCount_;
0045   Double_t wc_, n_;
0046 };
0047 
0048 #endif