Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:09:25

0001 #ifndef DQM_CASTORMONITOR_CASTORDIGIMONITOR_H
0002 #define DQM_CASTORMONITOR_CASTORDIGIMONITOR_H
0003 
0004 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0005 
0006 #include "CalibFormats/CastorObjects/interface/CastorCoderDb.h"
0007 #include "CalibFormats/CastorObjects/interface/CastorDbService.h"
0008 #include "CondFormats/CastorObjects/interface/CastorPedestal.h"
0009 #include "CondFormats/CastorObjects/interface/CastorPedestalWidth.h"
0010 
0011 #include "DQMServices/Core/interface/DQMStore.h"
0012 #include "FWCore/ServiceRegistry/interface/Service.h"
0013 
0014 #include "DataFormats/Common/interface/TriggerResults.h"
0015 #include "FWCore/Common/interface/TriggerNames.h"
0016 #include "FWCore/Framework/interface/ConsumesCollector.h"
0017 #include "FWCore/Utilities/interface/ESGetToken.h"
0018 #include "CondFormats/CastorObjects/interface/CastorChannelQuality.h"
0019 #include "CondFormats/DataRecord/interface/CastorChannelQualityRcd.h"
0020 
0021 //#include "FWCore/Framework/interface/Run.h"
0022 
0023 class CastorDigiMonitor {
0024 public:
0025   typedef dqm::legacy::DQMStore DQMStore;
0026   typedef dqm::legacy::MonitorElement MonitorElement;
0027   CastorDigiMonitor(const edm::ParameterSet &ps, edm::ConsumesCollector &&);
0028   ~CastorDigiMonitor();
0029 
0030   void bookHistograms(DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &);
0031   void processEvent(edm::Event const &event,
0032                     const CastorDigiCollection &cast,
0033                     const edm::TriggerResults &trig,
0034                     const CastorDbService &cond);
0035   void endRun();
0036   void getDbData(const edm::EventSetup &);
0037   int ModSecToIndex(int module, int sector);
0038   void fillTrigRes(edm::Event const &event, const edm::TriggerResults &TrigResults, double Etot);
0039 
0040 private:
0041   edm::ESGetToken<CastorChannelQuality, CastorChannelQualityRcd> castorChannelQualityToken_;
0042   std::string subsystemname_;
0043   int fVerbosity;
0044   int ievt_;
0045   float Qrms_DEAD;
0046 
0047   MonitorElement *hBX, *hpBXtrig;
0048   MonitorElement *hpTrigRes;
0049   MonitorElement *h2QrmsTSvsCh;
0050   MonitorElement *hQIErms[10];
0051   MonitorElement *hTSratio;
0052   MonitorElement *h2TSratio;
0053   MonitorElement *h2status;
0054   MonitorElement *h2digierr;
0055   MonitorElement *h2repsum;
0056   MonitorElement *h2qualityMap;
0057   MonitorElement *hReport;
0058   MonitorElement *h2QmeantsvsCh;
0059   MonitorElement *h2QmeanMap;
0060   MonitorElement *hModule;
0061   MonitorElement *hSector;
0062   MonitorElement *hdigisize;
0063   MonitorElement *h2towEMvsHAD;
0064   MonitorElement *htowE;
0065 
0066   int TS_MAX = 10;
0067   float RatioThresh1 = 0.;
0068   float QIEerrThreshold = 0.0001;
0069   double QrmsTS[224][10], QmeanTS[224][10];
0070   const int TSped = 0;
0071 };
0072 
0073 #endif