Skip to content

Commit

Permalink
Add flag to create or not Muon At Vertex plots for Intermediate MUon …
Browse files Browse the repository at this point in the history
…of L1T uGMT Online DQM
  • Loading branch information
Andre Govinda Stahl Leiton committed Nov 19, 2017
1 parent f5ffa4e commit 0566461
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 42 deletions.
1 change: 1 addition & 0 deletions DQM/L1TMonitor/interface/L1TStage2uGMTMuon.h
Expand Up @@ -34,6 +34,7 @@ class L1TStage2uGMTMuon : public DQMEDAnalyzer {
std::string monitorDir;
std::string titlePrefix;
bool verbose;
bool makeMuonAtVtxPlots;

MonitorElement* ugmtMuonBX;
MonitorElement* ugmtnMuons;
Expand Down
91 changes: 49 additions & 42 deletions DQM/L1TMonitor/src/L1TStage2uGMTMuon.cc
Expand Up @@ -5,7 +5,8 @@ L1TStage2uGMTMuon::L1TStage2uGMTMuon(const edm::ParameterSet& ps)
: ugmtMuonToken(consumes<l1t::MuonBxCollection>(ps.getParameter<edm::InputTag>("muonProducer"))),
monitorDir(ps.getUntrackedParameter<std::string>("monitorDir")),
titlePrefix(ps.getUntrackedParameter<std::string>("titlePrefix")),
verbose(ps.getUntrackedParameter<bool>("verbose"))
verbose(ps.getUntrackedParameter<bool>("verbose")),
makeMuonAtVtxPlots(ps.getUntrackedParameter<bool>("makeMuonAtVtxPlots"))
{
}

Expand All @@ -17,6 +18,7 @@ void L1TStage2uGMTMuon::fillDescriptions(edm::ConfigurationDescriptions& descrip
desc.addUntracked<std::string>("monitorDir", "")->setComment("Target directory in the DQM file. Will be created if not existing.");
desc.addUntracked<std::string>("titlePrefix", "")->setComment("Prefix text for the histogram titles.");
desc.addUntracked<bool>("verbose", false);
desc.addUntracked<bool>("makeMuonAtVtxPlots", false);
descriptions.add("l1tStage2uGMTMuon", desc);
}

Expand Down Expand Up @@ -44,12 +46,6 @@ void L1TStage2uGMTMuon::bookHistograms(DQMStore::IBooker& ibooker, const edm::Ru
ugmtMuonhwPhi = ibooker.book1D("ugmtMuonhwPhi", (titlePrefix+"#phi").c_str(), 576, -0.5, 575.5);
ugmtMuonhwPhi->setAxisTitle("Hardware Phi", 1);

ugmtMuonhwEtaAtVtx = ibooker.book1D("ugmtMuonhwEtaAtVtx", (titlePrefix+"#eta at vertex").c_str(), 461, -230.5, 230.5);
ugmtMuonhwEtaAtVtx->setAxisTitle("Hardware Eta at Vertex", 1);

ugmtMuonhwPhiAtVtx = ibooker.book1D("ugmtMuonhwPhiAtVtx", (titlePrefix+"#phi at vertex").c_str(), 576, -0.5, 575.5);
ugmtMuonhwPhiAtVtx->setAxisTitle("Hardware Phi at Vertex", 1);

ugmtMuonhwCharge = ibooker.book1D("ugmtMuonhwCharge", (titlePrefix+"Charge").c_str(), 2, -0.5, 1.5);
ugmtMuonhwCharge->setAxisTitle("Hardware Charge", 1);

Expand All @@ -68,12 +64,6 @@ void L1TStage2uGMTMuon::bookHistograms(DQMStore::IBooker& ibooker, const edm::Ru
ugmtMuonPhi = ibooker.book1D("ugmtMuonPhi", (titlePrefix+"#phi").c_str(), 126, -3.15, 3.15);
ugmtMuonPhi->setAxisTitle("#phi", 1);

ugmtMuonEtaAtVtx = ibooker.book1D("ugmtMuonEtaAtVtx", (titlePrefix+"#eta at vertex").c_str(), 100, -2.5, 2.5);
ugmtMuonEtaAtVtx->setAxisTitle("#eta at Vertex", 1);

ugmtMuonPhiAtVtx = ibooker.book1D("ugmtMuonPhiAtVtx", (titlePrefix+"#phi at vertex").c_str(), 126, -3.15, 3.15);
ugmtMuonPhiAtVtx->setAxisTitle("#phi at Vertex", 1);

ugmtMuonCharge = ibooker.book1D("ugmtMuonCharge", (titlePrefix+"Charge").c_str(), 3, -1.5, 1.5);
ugmtMuonCharge->setAxisTitle("Charge", 1);

Expand All @@ -89,18 +79,6 @@ void L1TStage2uGMTMuon::bookHistograms(DQMStore::IBooker& ibooker, const edm::Ru
ugmtMuonPhivsEta->setAxisTitle("#eta", 1);
ugmtMuonPhivsEta->setAxisTitle("#phi", 2);

ugmtMuonPtvsEtaAtVtx = ibooker.book2D("ugmtMuonPtvsEtaAtVtx", (titlePrefix+"p_{T} vs #eta at vertex").c_str(), 100, -2.5, 2.5, 256, -0.5, 255.5);
ugmtMuonPtvsEtaAtVtx->setAxisTitle("#eta at Vertex", 1);
ugmtMuonPtvsEtaAtVtx->setAxisTitle("p_{T} [GeV]", 2);

ugmtMuonPtvsPhiAtVtx = ibooker.book2D("ugmtMuonPtvsPhiAtVtx", (titlePrefix+"p_{T} vs #phi at vertex").c_str(), 64, -3.2, 3.2, 256, -0.5, 255.5);
ugmtMuonPtvsPhiAtVtx->setAxisTitle("#phi", 1);
ugmtMuonPtvsPhiAtVtx->setAxisTitle("p_{T} [GeV]", 2);

ugmtMuonPhiAtVtxvsEtaAtVtx = ibooker.book2D("ugmtMuonPhiAtVtxvsEtaAtVtx", (titlePrefix+"#phi_{vtx} vs #eta_{vtx}").c_str(), 100, -2.5, 2.5, 64, -3.2, 3.2);
ugmtMuonPhiAtVtxvsEtaAtVtx->setAxisTitle("#eta at Vertex", 1);
ugmtMuonPhiAtVtxvsEtaAtVtx->setAxisTitle("#phi at Vertex", 2);

ugmtMuonBXvshwPt = ibooker.book2D("ugmtMuonBXvshwPt", (titlePrefix+"BX vs p_{T}").c_str(), 256, -0.5, 511.5, 5, -2.5, 2.5);
ugmtMuonBXvshwPt->setAxisTitle("Hardware p_{T}", 1);
ugmtMuonBXvshwPt->setAxisTitle("BX", 2);
Expand All @@ -113,14 +91,6 @@ void L1TStage2uGMTMuon::bookHistograms(DQMStore::IBooker& ibooker, const edm::Ru
ugmtMuonBXvshwPhi->setAxisTitle("Hardware #phi", 1);
ugmtMuonBXvshwPhi->setAxisTitle("BX", 2);

ugmtMuonBXvshwEtaAtVtx = ibooker.book2D("ugmtMuonBXvshwEtaAtVtx", (titlePrefix+"BX vs #eta at vertex").c_str(), 93, -232.5, 232.5, 5, -2.5, 2.5);
ugmtMuonBXvshwEtaAtVtx->setAxisTitle("Hardware #eta at Vertex", 1);
ugmtMuonBXvshwEtaAtVtx->setAxisTitle("BX", 2);

ugmtMuonBXvshwPhiAtVtx = ibooker.book2D("ugmtMuonBXvshwPhiAtVtx", (titlePrefix+"BX vs #phi at vertex").c_str(), 116, -2.5, 577.5, 5, -2.5, 2.5);
ugmtMuonBXvshwPhiAtVtx->setAxisTitle("Hardware #phi at Vertex", 1);
ugmtMuonBXvshwPhiAtVtx->setAxisTitle("BX", 2);

ugmtMuonBXvshwCharge = ibooker.book2D("ugmtMuonBXvshwCharge", (titlePrefix+"BX vs Charge").c_str(), 2, -0.5, 1.5, 5, -2.5, 2.5);
ugmtMuonBXvshwCharge->setAxisTitle("Hardware Charge", 1);
ugmtMuonBXvshwCharge->setAxisTitle("BX", 2);
Expand All @@ -132,6 +102,40 @@ void L1TStage2uGMTMuon::bookHistograms(DQMStore::IBooker& ibooker, const edm::Ru
ugmtMuonBXvshwQual = ibooker.book2D("ugmtMuonBXvshwQual", (titlePrefix+"BX vs Quality").c_str(), 16, -0.5, 15.5, 5, -2.5, 2.5);
ugmtMuonBXvshwQual->setAxisTitle("Quality", 1);
ugmtMuonBXvshwQual->setAxisTitle("BX", 2);

if (makeMuonAtVtxPlots) {
ugmtMuonhwEtaAtVtx = ibooker.book1D("ugmtMuonhwEtaAtVtx", (titlePrefix+"#eta at vertex").c_str(), 461, -230.5, 230.5);
ugmtMuonhwEtaAtVtx->setAxisTitle("Hardware Eta at Vertex", 1);

ugmtMuonhwPhiAtVtx = ibooker.book1D("ugmtMuonhwPhiAtVtx", (titlePrefix+"#phi at vertex").c_str(), 576, -0.5, 575.5);
ugmtMuonhwPhiAtVtx->setAxisTitle("Hardware Phi at Vertex", 1);

ugmtMuonEtaAtVtx = ibooker.book1D("ugmtMuonEtaAtVtx", (titlePrefix+"#eta at vertex").c_str(), 100, -2.5, 2.5);
ugmtMuonEtaAtVtx->setAxisTitle("#eta at Vertex", 1);

ugmtMuonPhiAtVtx = ibooker.book1D("ugmtMuonPhiAtVtx", (titlePrefix+"#phi at vertex").c_str(), 126, -3.15, 3.15);
ugmtMuonPhiAtVtx->setAxisTitle("#phi at Vertex", 1);

ugmtMuonPtvsEtaAtVtx = ibooker.book2D("ugmtMuonPtvsEtaAtVtx", (titlePrefix+"p_{T} vs #eta at vertex").c_str(), 100, -2.5, 2.5, 256, -0.5, 255.5);
ugmtMuonPtvsEtaAtVtx->setAxisTitle("#eta at Vertex", 1);
ugmtMuonPtvsEtaAtVtx->setAxisTitle("p_{T} [GeV]", 2);

ugmtMuonPhiAtVtxvsEtaAtVtx = ibooker.book2D("ugmtMuonPhiAtVtxvsEtaAtVtx", (titlePrefix+"#phi_{vtx} vs #eta_{vtx}").c_str(), 100, -2.5, 2.5, 64, -3.2, 3.2);
ugmtMuonPhiAtVtxvsEtaAtVtx->setAxisTitle("#eta at Vertex", 1);
ugmtMuonPhiAtVtxvsEtaAtVtx->setAxisTitle("#phi at Vertex", 2);

ugmtMuonPtvsPhiAtVtx = ibooker.book2D("ugmtMuonPtvsPhiAtVtx", (titlePrefix+"p_{T} vs #phi at vertex").c_str(), 64, -3.2, 3.2, 256, -0.5, 255.5);
ugmtMuonPtvsPhiAtVtx->setAxisTitle("#phi at Vertex", 1);
ugmtMuonPtvsPhiAtVtx->setAxisTitle("p_{T} [GeV]", 2);

ugmtMuonBXvshwEtaAtVtx = ibooker.book2D("ugmtMuonBXvshwEtaAtVtx", (titlePrefix+"BX vs #eta at vertex").c_str(), 93, -232.5, 232.5, 5, -2.5, 2.5);
ugmtMuonBXvshwEtaAtVtx->setAxisTitle("Hardware #eta at Vertex", 1);
ugmtMuonBXvshwEtaAtVtx->setAxisTitle("BX", 2);

ugmtMuonBXvshwPhiAtVtx = ibooker.book2D("ugmtMuonBXvshwPhiAtVtx", (titlePrefix+"BX vs #phi at vertex").c_str(), 116, -2.5, 577.5, 5, -2.5, 2.5);
ugmtMuonBXvshwPhiAtVtx->setAxisTitle("Hardware #phi at Vertex", 1);
ugmtMuonBXvshwPhiAtVtx->setAxisTitle("BX", 2);
}
}

void L1TStage2uGMTMuon::analyze(const edm::Event& e, const edm::EventSetup& c) {
Expand All @@ -150,34 +154,37 @@ void L1TStage2uGMTMuon::analyze(const edm::Event& e, const edm::EventSetup& c) {
ugmtMuonhwPt->Fill(Muon->hwPt());
ugmtMuonhwEta->Fill(Muon->hwEta());
ugmtMuonhwPhi->Fill(Muon->hwPhi());
ugmtMuonhwEtaAtVtx->Fill(Muon->hwEtaAtVtx());
ugmtMuonhwPhiAtVtx->Fill(Muon->hwPhiAtVtx());
ugmtMuonhwCharge->Fill(Muon->hwCharge());
ugmtMuonhwChargeValid->Fill(Muon->hwChargeValid());
ugmtMuonhwQual->Fill(Muon->hwQual());

ugmtMuonPt->Fill(Muon->pt());
ugmtMuonEta->Fill(Muon->eta());
ugmtMuonPhi->Fill(Muon->phi());
ugmtMuonEtaAtVtx->Fill(Muon->etaAtVtx());
ugmtMuonPhiAtVtx->Fill(Muon->phiAtVtx());
ugmtMuonCharge->Fill(Muon->charge());

ugmtMuonPtvsEta->Fill(Muon->eta(), Muon->pt());
ugmtMuonPtvsPhi->Fill(Muon->phi(), Muon->pt());
ugmtMuonPhivsEta->Fill(Muon->eta(), Muon->phi());
ugmtMuonPtvsEtaAtVtx->Fill(Muon->etaAtVtx(), Muon->pt());
ugmtMuonPtvsPhiAtVtx->Fill(Muon->phiAtVtx(), Muon->pt());
ugmtMuonPhiAtVtxvsEtaAtVtx->Fill(Muon->etaAtVtx(), Muon->phiAtVtx());

ugmtMuonBXvshwPt->Fill(Muon->hwPt(), itBX);
ugmtMuonBXvshwEta->Fill(Muon->hwEta(), itBX);
ugmtMuonBXvshwPhi->Fill(Muon->hwPhi(), itBX);
ugmtMuonBXvshwEtaAtVtx->Fill(Muon->hwEtaAtVtx(), itBX);
ugmtMuonBXvshwPhiAtVtx->Fill(Muon->hwPhiAtVtx(), itBX);
ugmtMuonBXvshwCharge->Fill(Muon->hwCharge(), itBX);
ugmtMuonBXvshwChargeValid->Fill(Muon->hwChargeValid(), itBX);
ugmtMuonBXvshwQual->Fill(Muon->hwQual(), itBX);

if (makeMuonAtVtxPlots) {
ugmtMuonhwEtaAtVtx->Fill(Muon->hwEtaAtVtx());
ugmtMuonhwPhiAtVtx->Fill(Muon->hwPhiAtVtx());
ugmtMuonEtaAtVtx->Fill(Muon->etaAtVtx());
ugmtMuonPhiAtVtx->Fill(Muon->phiAtVtx());
ugmtMuonPtvsEtaAtVtx->Fill(Muon->etaAtVtx(), Muon->pt());
ugmtMuonPtvsPhiAtVtx->Fill(Muon->phiAtVtx(), Muon->pt());
ugmtMuonPhiAtVtxvsEtaAtVtx->Fill(Muon->etaAtVtx(), Muon->phiAtVtx());
ugmtMuonBXvshwEtaAtVtx->Fill(Muon->hwEtaAtVtx(), itBX);
ugmtMuonBXvshwPhiAtVtx->Fill(Muon->hwPhiAtVtx(), itBX);
}
}
}
}
Expand Down

0 comments on commit 0566461

Please sign in to comment.