Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:42:30

0001 #ifndef DQM_L1TMonitor_L1TObjectsTiming_h
0002 #define DQM_L1TMonitor_L1TObjectsTiming_h
0003 
0004 // System include files
0005 #include <memory>
0006 #include <vector>
0007 #include <array>
0008 #include <algorithm>
0009 #include <string>
0010 
0011 #include "DataFormats/L1Trigger/interface/Muon.h"
0012 #include "DataFormats/L1Trigger/interface/EGamma.h"
0013 #include "DataFormats/L1Trigger/interface/Jet.h"
0014 #include "DataFormats/L1Trigger/interface/EtSum.h"
0015 #include "DataFormats/L1Trigger/interface/Tau.h"
0016 
0017 #include "DataFormats/L1Trigger/interface/BXVector.h"
0018 #include "L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h"
0019 
0020 #include "FWCore/Framework/interface/Event.h"
0021 #include "FWCore/ServiceRegistry/interface/Service.h"
0022 #include "FWCore/Framework/interface/EventSetup.h"
0023 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0025 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0026 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0027 #include "FWCore/Framework/interface/Frameworkfwd.h"
0028 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0029 #include "DQMServices/Core/interface/DQMStore.h"
0030 
0031 class L1TObjectsTiming : public DQMEDAnalyzer {
0032 public:
0033   L1TObjectsTiming(const edm::ParameterSet& ps);
0034   ~L1TObjectsTiming() override;
0035   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0036 
0037 protected:
0038   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0039   void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override;
0040   void analyze(const edm::Event&, const edm::EventSetup&) override;
0041 
0042 private:
0043   edm::EDGetTokenT<l1t::MuonBxCollection> ugmtMuonToken_;
0044   edm::EDGetTokenT<l1t::JetBxCollection> stage2CaloLayer2JetToken_;
0045   edm::EDGetTokenT<l1t::EGammaBxCollection> stage2CaloLayer2EGammaToken_;
0046   edm::EDGetTokenT<l1t::TauBxCollection> stage2CaloLayer2TauToken_;
0047   edm::EDGetTokenT<l1t::EtSumBxCollection> stage2CaloLayer2EtSumToken_;
0048 
0049   edm::EDGetTokenT<GlobalAlgBlkBxCollection> l1tStage2uGtProducer_;  // input tag for L1 uGT DAQ readout record
0050 
0051   std::string monitorDir_;
0052   bool verbose_;
0053 
0054   // To get the algo bits corresponding to algo names
0055   std::shared_ptr<l1t::L1TGlobalUtil> gtUtil_;
0056 
0057   // For the timing histograms
0058   int algoBitFirstBxInTrain_;
0059   int algoBitLastBxInTrain_;
0060   int algoBitIsoBx_;
0061   const std::string algoNameFirstBxInTrain_;
0062   const std::string algoNameLastBxInTrain_;
0063   const std::string algoNameIsoBx_;
0064   const unsigned int bxrange_;  //this is the out bx range
0065 
0066   unsigned int useAlgoDecision_;
0067 
0068   std::vector<double> egammaPtCuts_;
0069   double jetPtCut_;
0070   double egammaPtCut_;
0071   double tauPtCut_;
0072   double etsumPtCut_;
0073   double muonPtCut_;
0074   int muonQualCut_;
0075 
0076   //---------Histograms booking---------
0077   // All bunches
0078   std::vector<MonitorElement*> muons_eta_phi;
0079   std::vector<MonitorElement*> jet_eta_phi;
0080   std::vector<MonitorElement*> egamma_eta_phi;
0081   std::vector<MonitorElement*> tau_eta_phi;
0082   std::vector<MonitorElement*> etsum_eta_phi_MET;
0083   std::vector<MonitorElement*> etsum_eta_phi_METHF;
0084   std::vector<MonitorElement*> etsum_eta_phi_MHT;
0085   std::vector<MonitorElement*> etsum_eta_phi_MHTHF;
0086 
0087   MonitorElement* denominator_muons;
0088   MonitorElement* denominator_jet;
0089   MonitorElement* denominator_egamma;
0090   MonitorElement* denominator_tau;
0091   MonitorElement* denominator_etsum_MET;
0092   MonitorElement* denominator_etsum_METHF;
0093   MonitorElement* denominator_etsum_MHT;
0094   MonitorElement* denominator_etsum_MHTHF;
0095 
0096   // Isolated bunches
0097   std::vector<MonitorElement*> muons_eta_phi_isolated;
0098   std::vector<MonitorElement*> jet_eta_phi_isolated;
0099   std::vector<std::vector<MonitorElement*>> egamma_eta_phi_isolated;
0100   std::vector<MonitorElement*> tau_eta_phi_isolated;
0101   std::vector<MonitorElement*> etsum_eta_phi_MET_isolated;
0102   std::vector<MonitorElement*> etsum_eta_phi_METHF_isolated;
0103   std::vector<MonitorElement*> etsum_eta_phi_MHT_isolated;
0104   std::vector<MonitorElement*> etsum_eta_phi_MHTHF_isolated;
0105 
0106   MonitorElement* denominator_muons_isolated;
0107   MonitorElement* denominator_jet_isolated;
0108   std::vector<MonitorElement*> denominator_egamma_isolated;
0109   MonitorElement* denominator_tau_isolated;
0110   MonitorElement* denominator_etsum_isolated_MET;
0111   MonitorElement* denominator_etsum_isolated_METHF;
0112   MonitorElement* denominator_etsum_isolated_MHT;
0113   MonitorElement* denominator_etsum_isolated_MHTHF;
0114 
0115   std::vector<MonitorElement*> egamma_iso_bx_ieta_isolated;
0116   std::vector<MonitorElement*> egamma_noniso_bx_ieta_isolated;
0117 
0118   // First bunch in train
0119   std::vector<MonitorElement*> muons_eta_phi_firstbunch;
0120   std::vector<MonitorElement*> jet_eta_phi_firstbunch;
0121   std::vector<std::vector<MonitorElement*>> egamma_eta_phi_firstbunch;
0122   std::vector<MonitorElement*> tau_eta_phi_firstbunch;
0123   std::vector<MonitorElement*> etsum_eta_phi_firstbunch;
0124   std::vector<MonitorElement*> etsum_eta_phi_MET_firstbunch;
0125   std::vector<MonitorElement*> etsum_eta_phi_METHF_firstbunch;
0126   std::vector<MonitorElement*> etsum_eta_phi_MHT_firstbunch;
0127   std::vector<MonitorElement*> etsum_eta_phi_MHTHF_firstbunch;
0128 
0129   MonitorElement* denominator_muons_firstbunch;
0130   MonitorElement* denominator_jet_firstbunch;
0131   std::vector<MonitorElement*> denominator_egamma_firstbunch;
0132   MonitorElement* denominator_tau_firstbunch;
0133   MonitorElement* denominator_etsum_firstbunch_MET;
0134   MonitorElement* denominator_etsum_firstbunch_METHF;
0135   MonitorElement* denominator_etsum_firstbunch_MHT;
0136   MonitorElement* denominator_etsum_firstbunch_MHTHF;
0137 
0138   std::vector<MonitorElement*> egamma_iso_bx_ieta_firstbunch;
0139   std::vector<MonitorElement*> egamma_noniso_bx_ieta_firstbunch;
0140 
0141   // Last bunch in train
0142   std::vector<MonitorElement*> muons_eta_phi_lastbunch;
0143   std::vector<MonitorElement*> jet_eta_phi_lastbunch;
0144   std::vector<std::vector<MonitorElement*>> egamma_eta_phi_lastbunch;
0145   std::vector<MonitorElement*> tau_eta_phi_lastbunch;
0146   std::vector<MonitorElement*> etsum_eta_phi_MET_lastbunch;
0147   std::vector<MonitorElement*> etsum_eta_phi_METHF_lastbunch;
0148   std::vector<MonitorElement*> etsum_eta_phi_MHT_lastbunch;
0149   std::vector<MonitorElement*> etsum_eta_phi_MHTHF_lastbunch;
0150 
0151   MonitorElement* denominator_muons_lastbunch;
0152   MonitorElement* denominator_jet_lastbunch;
0153   std::vector<MonitorElement*> denominator_egamma_lastbunch;
0154   MonitorElement* denominator_tau_lastbunch;
0155   MonitorElement* denominator_etsum_lastbunch_MET;
0156   MonitorElement* denominator_etsum_lastbunch_METHF;
0157   MonitorElement* denominator_etsum_lastbunch_MHT;
0158   MonitorElement* denominator_etsum_lastbunch_MHTHF;
0159 
0160   std::vector<MonitorElement*> egamma_iso_bx_ieta_lastbunch;
0161   std::vector<MonitorElement*> egamma_noniso_bx_ieta_lastbunch;
0162 };
0163 
0164 #endif