Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-25 03:29:25

0001 #ifndef DQM_L1TMonitor_L1TdeCSCTPG_h
0002 #define DQM_L1TMonitor_L1TdeCSCTPG_h
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007 
0008 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0009 #include "DQMServices/Core/interface/DQMStore.h"
0010 
0011 #include "DataFormats/CSCDigi/interface/CSCALCTDigiCollection.h"
0012 #include "DataFormats/CSCDigi/interface/CSCCLCTDigiCollection.h"
0013 #include "DataFormats/CSCDigi/interface/CSCCLCTPreTriggerDigiCollection.h"
0014 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
0015 
0016 class L1TdeCSCTPG : public DQMEDAnalyzer {
0017 public:
0018   L1TdeCSCTPG(const edm::ParameterSet& ps);
0019   ~L1TdeCSCTPG() override;
0020 
0021 protected:
0022   void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override;
0023   void analyze(const edm::Event&, const edm::EventSetup&) override;
0024 
0025 private:
0026   // customized equality function
0027   bool areSameCLCTs(const CSCCLCTDigi& lhs, const CSCCLCTDigi& rhs) const;
0028   bool areSameLCTs(const CSCCorrelatedLCTDigi& lhs, const CSCCorrelatedLCTDigi& rhs) const;
0029 
0030   edm::EDGetTokenT<CSCALCTDigiCollection> dataALCT_token_;
0031   edm::EDGetTokenT<CSCALCTDigiCollection> emulALCT_token_;
0032   edm::EDGetTokenT<CSCCLCTDigiCollection> dataCLCT_token_;
0033   edm::EDGetTokenT<CSCCLCTDigiCollection> emulCLCT_token_;
0034   edm::EDGetTokenT<CSCCLCTPreTriggerDigiCollection> emulpreCLCT_token_;
0035   edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> dataLCT_token_;
0036   edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> emulLCT_token_;
0037   std::string monitorDir_;
0038 
0039   // ME1/1 combines trigger data from ME1/a and ME1/b
0040   std::vector<std::string> chambers_;
0041   std::vector<std::string> dataEmul_;
0042 
0043   std::vector<std::string> alctVars_;
0044   std::vector<std::string> clctVars_;
0045   std::vector<std::string> lctVars_;
0046 
0047   std::vector<unsigned> alctNBin_;
0048   std::vector<unsigned> clctNBin_;
0049   std::vector<unsigned> lctNBin_;
0050   std::vector<double> alctMinBin_;
0051   std::vector<double> clctMinBin_;
0052   std::vector<double> lctMinBin_;
0053   std::vector<double> alctMaxBin_;
0054   std::vector<double> clctMaxBin_;
0055   std::vector<double> lctMaxBin_;
0056 
0057   /*
0058     When set to True, we assume that the data comes from
0059     the Building 904 CSC test-stand. This test-stand is a single
0060     ME1/1 chamber, ME2/1, or ME4/2 chamber.
0061   */
0062   bool useB904_;
0063   bool useB904ME11_;
0064   bool useB904ME21_;
0065   bool useB904ME234s2_;
0066 
0067   bool isRun3_;
0068   /*
0069      By default the DQM will make 2D summary plots. Do you also want
0070      the very large number of 1D plots? Would recommend to keep it to
0071      true so that it may help in the debugging process (S.D.)
0072   */
0073   bool make1DPlots_;
0074 
0075   // check the data CLCTs and emul CLCTs against emul preCLCTs
0076   bool preTriggerAnalysis_;
0077 
0078   // first key is the chamber number
0079   // second key is the variable
0080   std::map<uint32_t, std::map<std::string, MonitorElement*> > chamberHistos;
0081 
0082   // 2D plots
0083   MonitorElement* lctDataSummary_denom_;
0084   MonitorElement* lctDataSummary_num_;
0085   MonitorElement* alctDataSummary_denom_;
0086   MonitorElement* alctDataSummary_num_;
0087   MonitorElement* clctDataSummary_denom_;
0088   MonitorElement* clctDataSummary_num_;
0089 
0090   MonitorElement* lctEmulSummary_denom_;
0091   MonitorElement* lctEmulSummary_num_;
0092   MonitorElement* alctEmulSummary_denom_;
0093   MonitorElement* alctEmulSummary_num_;
0094   MonitorElement* clctEmulSummary_denom_;
0095   MonitorElement* clctEmulSummary_num_;
0096 };
0097 
0098 #endif