Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1TGMT_H
0002 #define L1TGMT_H
0003 
0004 /*
0005  * \file L1TGMT.h
0006  *
0007  * \author J. Berryhill, I. Mikulec
0008  *
0009 */
0010 
0011 // system include files
0012 #include <memory>
0013 #include <unistd.h>
0014 
0015 // user include files
0016 #include "FWCore/Framework/interface/Frameworkfwd.h"
0017 
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/MakerMacros.h"
0020 
0021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0022 
0023 #include "DQMServices/Core/interface/DQMStore.h"
0024 #include "FWCore/ServiceRegistry/interface/Service.h"
0025 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0026 
0027 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
0028 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTCand.h"
0029 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTExtendedCand.h"
0030 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutCollection.h"
0031 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0032 
0033 #include <iostream>
0034 #include <fstream>
0035 #include <vector>
0036 
0037 //
0038 // class decleration
0039 //
0040 class L1MuTriggerScales;
0041 class L1MuTriggerScalesRcd;
0042 class L1MuTriggerPtScale;
0043 class L1MuTriggerPtScaleRcd;
0044 
0045 class L1TGMT : public DQMEDAnalyzer {
0046 public:
0047   // Constructor
0048   L1TGMT(const edm::ParameterSet& ps);
0049 
0050   // Destructor
0051   ~L1TGMT() override;
0052 
0053 protected:
0054   // Analyze
0055   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0056 
0057   void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) override;
0058 
0059 private:
0060   // ----------member data ---------------------------
0061 
0062   enum ensubs { DTTF = 0, RPCb, CSCTF, RPCf, GMT };
0063 
0064   MonitorElement* subs_nbx[5];
0065   MonitorElement* subs_eta[5];
0066   MonitorElement* subs_phi[5];
0067   MonitorElement* subs_pt[5];
0068   MonitorElement* subs_qty[5];
0069   MonitorElement* subs_etaphi[5];
0070   MonitorElement* subs_etaqty[5];
0071   MonitorElement* subs_bits[5];
0072 
0073   MonitorElement* regional_triggers;
0074 
0075   MonitorElement* bx_number;
0076   MonitorElement* dbx_chip;
0077   MonitorElement* eta_dtcsc_and_rpc;
0078   MonitorElement* eta_dtcsc_only;
0079   MonitorElement* eta_rpc_only;
0080   MonitorElement* phi_dtcsc_and_rpc;
0081   MonitorElement* phi_dtcsc_only;
0082   MonitorElement* phi_rpc_only;
0083   MonitorElement* etaphi_dtcsc_and_rpc;
0084   MonitorElement* etaphi_dtcsc_only;
0085   MonitorElement* etaphi_rpc_only;
0086   MonitorElement* dist_phi_dt_rpc;
0087   MonitorElement* dist_phi_csc_rpc;
0088   MonitorElement* dist_phi_dt_csc;
0089   MonitorElement* dist_eta_dt_rpc;
0090   MonitorElement* dist_eta_csc_rpc;
0091   MonitorElement* dist_eta_dt_csc;
0092   MonitorElement* bx_dt_rpc;
0093   MonitorElement* bx_csc_rpc;
0094   MonitorElement* bx_dt_csc;
0095 
0096   MonitorElement* n_rpcb_vs_dttf;
0097   MonitorElement* n_rpcf_vs_csctf;
0098   MonitorElement* n_csctf_vs_dttf;
0099 
0100   MonitorElement* subs_dbx[4];
0101 
0102   const bool verbose_;
0103   std::ofstream logFile_;
0104   const edm::EDGetTokenT<L1MuGMTReadoutCollection> gmtSource_;
0105   edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> l1muTrigscaleToken_;
0106   edm::ESGetToken<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd> l1TrigptscaleToken_;
0107 
0108   int bxnum_old_;  // bx of previous event
0109   int obnum_old_;  // orbit of previous event
0110   int trsrc_old_;  // code of trigger source ( bits: 0 DT, 1 bRPC, 2 CSC, 3 fRPC )
0111 
0112   static const double piconv_;
0113   double phiconv_(float phi);
0114   void book_(const edm::EventSetup& c);
0115 };
0116 
0117 #endif