Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:55:11

0001 #ifndef L1TdeGCT_H
0002 #define L1TdeGCT_H
0003 
0004 /*\class L1TdeGCT
0005  *\description GCT data|emulation comparison DQM interface 
0006                produces expert level DQM monitorable elements
0007  *\author N.Leonardo
0008  *\date 08.09
0009  */
0010 
0011 // system, common includes
0012 #include <memory>
0013 #include <string>
0014 #include "FWCore/ServiceRegistry/interface/Service.h"
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/MakerMacros.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0020 // dqm includes
0021 #include "DQMServices/Core/interface/DQMStore.h"
0022 // l1 dataformats, d|e record includes
0023 #include "L1Trigger/HardwareValidation/interface/DEtrait.h"
0024 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0025 
0026 class L1TdeGCT : public DQMEDAnalyzer {
0027 public:
0028   explicit L1TdeGCT(const edm::ParameterSet&);
0029   ~L1TdeGCT() override;
0030 
0031 protected:
0032   void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) override;
0033 
0034   void analyze(const edm::Event&, const edm::EventSetup&) override;
0035 
0036 private:
0037   // input d|e record
0038   edm::EDGetTokenT<L1DataEmulRecord> DEsource_;
0039   bool hasRecord_;
0040 
0041   // debug verbose level
0042   int verbose_;
0043   int verbose() { return verbose_; }
0044 
0045   // root output file name
0046   std::string histFile_;
0047 
0048   // dqm histogram folder
0049   std::string histFolder_;
0050 
0051   bool m_stage1_layer2_;
0052 
0053   // dqm common
0054   bool monitorDaemon_;
0055 
0056   // (em) iso, no-iso, (jets) cen, for, tau & energy sums.
0057   static const int nGctColl_ = dedefs::GCThfbit - dedefs::GCTisolaem + 1;
0058   static const int nStage1Layer2Coll_ = dedefs::GCTisotaujets - dedefs::GCTisolaem + 1;
0059 
0060   // counters
0061   int colCount[nGctColl_];
0062   int nWithCol[nGctColl_];
0063 
0064   int colCount_stage1Layer2[nStage1Layer2Coll_];
0065   int nWithCol_stage1Layer2[nStage1Layer2Coll_];
0066 
0067   // Ranges and labels
0068   const int phiNBins = 18;
0069   const double phiMinim = -0.5;
0070   const double phiMaxim = 17.5;
0071   const int etaNBins = 22;
0072   const double etaMinim = -0.5;
0073   const double etaMaxim = 21.5;
0074   static const int nerr = 5;
0075   const int nbit = 32;
0076   std::string cLabel[nGctColl_] = {
0077       "IsoEM", "NoisoEM", "CenJet", "ForJet", "TauJet", "HT", "MET", "ET", "MHT", "HFSums", "HFCnts"};
0078   std::string sLabel[nStage1Layer2Coll_] = {
0079       "IsoEM", "NoisoEM", "CenJet", "ForJet", "TauJet", "HT", "MET", "ET", "MHT", "Stage1HFSums", "HFCnts", "IsoTauJet"};
0080   std::string errLabel[nerr] = {"Agree", "Loc. Agree", "L.Disagree", "Data only", "Emul only"};
0081 
0082   // MEs
0083   MonitorElement* sysrates;
0084   MonitorElement* sysncand[2];
0085 
0086   MonitorElement* errortype[nGctColl_];
0087   // location
0088   MonitorElement* etaphi[nGctColl_];
0089   MonitorElement* eta[nGctColl_];
0090   MonitorElement* phi[nGctColl_];
0091   MonitorElement* rnk[nGctColl_];
0092   MonitorElement* etaData[nGctColl_];
0093   MonitorElement* phiData[nGctColl_];
0094   MonitorElement* rnkData[nGctColl_];
0095 
0096   MonitorElement* errortype_stage1layer2[nStage1Layer2Coll_];
0097   // location
0098   MonitorElement* etaphi_stage1layer2[nStage1Layer2Coll_];
0099   MonitorElement* eta_stage1layer2[nStage1Layer2Coll_];
0100   MonitorElement* phi_stage1layer2[nStage1Layer2Coll_];
0101   MonitorElement* rnk_stage1layer2[nStage1Layer2Coll_];
0102   MonitorElement* etaData_stage1layer2[nStage1Layer2Coll_];
0103   MonitorElement* phiData_stage1layer2[nStage1Layer2Coll_];
0104   MonitorElement* rnkData_stage1layer2[nStage1Layer2Coll_];
0105 
0106   // trigger data word
0107 
0108   MonitorElement* dword[nGctColl_];
0109   MonitorElement* eword[nGctColl_];
0110   MonitorElement* deword[nGctColl_];
0111   MonitorElement* masked[nGctColl_];
0112   MonitorElement* dword_stage1layer2[nStage1Layer2Coll_];
0113   MonitorElement* eword_stage1layer2[nStage1Layer2Coll_];
0114   MonitorElement* deword_stage1layer2[nStage1Layer2Coll_];
0115   MonitorElement* masked_stage1layer2[nStage1Layer2Coll_];
0116 
0117 public:
0118 };
0119 
0120 #endif