L1TStage2RegionalMuonCandComp

ratioVariables

tfs

variables

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
#ifndef DQM_L1TMonitor_L1TStage2RegionalMuonCandComp_h
#define DQM_L1TMonitor_L1TStage2RegionalMuonCandComp_h

#include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"

#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"

class L1TStage2RegionalMuonCandComp : public DQMEDAnalyzer {
public:
  L1TStage2RegionalMuonCandComp(const edm::ParameterSet& ps);
  ~L1TStage2RegionalMuonCandComp() override;
  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

protected:
  void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override;
  void analyze(const edm::Event&, const edm::EventSetup&) override;

private:
  enum variables {
    BXRANGEGOOD = 1,
    BXRANGEBAD,
    NMUONGOOD,
    NMUONBAD,
    MUONALL,
    MUONGOOD,
    PTBAD,
    ETABAD,
    LOCALPHIBAD,
    SIGNBAD,
    SIGNVALBAD,
    QUALBAD,
    HFBAD,
    LINKBAD,
    PROCBAD,
    TFBAD,
    TRACKADDRBAD,
    DXYBAD,
    PT2BAD
  };
  enum ratioVariables {
    RBXRANGE = 1,
    RNMUON,
    RMUON,
    RPT,
    RETA,
    RLOCALPHI,
    RSIGN,
    RSIGNVAL,
    RQUAL,
    RHF,
    RLINK,
    RPROC,
    RTF,
    RTRACKADDR,
    RDXY,
    RPT2
  };
  enum tfs { BMTFBIN = 1, OMTFNEGBIN, OMTFPOSBIN, EMTFNEGBIN, EMTFPOSBIN };
  int numSummaryBins_{
      TRACKADDRBAD};  // In Run-2 we didn't have the last two bins. This is incremented in source file if we configure for Run-3.
  int numErrBins_{
      RTRACKADDR};  // In Run-2 we didn't have the last two bins. This is incremented in source file if we configure for Run-3.
  bool incBin[RPT2 + 1];

  edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> muonToken1;
  edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> muonToken2;
  std::string monitorDir;
  std::string muonColl1Title;
  std::string muonColl2Title;
  std::string summaryTitle;
  bool ignoreBadTrkAddr;
  std::vector<int> ignoreBin;
  bool verbose;
  bool hasDisplacementInfo;

  MonitorElement* summary;
  MonitorElement* errorSummaryNum;
  MonitorElement* errorSummaryDen;

  MonitorElement* muColl1BxRange;
  MonitorElement* muColl1nMu;
  MonitorElement* muColl1hwPt;
  MonitorElement* muColl1hwEta;
  MonitorElement* muColl1hwPhi;
  MonitorElement* muColl1hwSign;
  MonitorElement* muColl1hwSignValid;
  MonitorElement* muColl1hwQual;
  MonitorElement* muColl1link;
  MonitorElement* muColl1processor;
  MonitorElement* muColl1trackFinderType;
  MonitorElement* muColl1hwHF;
  MonitorElement* muColl1TrkAddrSize;
  MonitorElement* muColl1TrkAddr;
  MonitorElement* muColl1hwDXY;
  MonitorElement* muColl1hwPtUnconstrained;

  MonitorElement* muColl2BxRange;
  MonitorElement* muColl2nMu;
  MonitorElement* muColl2hwPt;
  MonitorElement* muColl2hwEta;
  MonitorElement* muColl2hwPhi;
  MonitorElement* muColl2hwSign;
  MonitorElement* muColl2hwSignValid;
  MonitorElement* muColl2hwQual;
  MonitorElement* muColl2link;
  MonitorElement* muColl2processor;
  MonitorElement* muColl2trackFinderType;
  MonitorElement* muColl2hwHF;
  MonitorElement* muColl2TrkAddrSize;
  MonitorElement* muColl2TrkAddr;
  MonitorElement* muColl2hwDXY;
  MonitorElement* muColl2hwPtUnconstrained;
};

#endif