Skip to content

Commit

Permalink
Split uGMT DQM module into two
Browse files Browse the repository at this point in the history
One module with BX distributions and one looking only at the central BX.
The BX distribution module can only run on validation events in Run-3,
while the other one can run on all events.
  • Loading branch information
dinyar committed May 30, 2022
1 parent 30b34a4 commit 54e2e35
Show file tree
Hide file tree
Showing 7 changed files with 417 additions and 202 deletions.
22 changes: 0 additions & 22 deletions DQM/L1TMonitor/interface/L1TStage2uGMT.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class L1TStage2uGMT : public DQMEDAnalyzer {
const float etaScale_;
const float phiScale_;

MonitorElement* ugmtBMTFBX;
MonitorElement* ugmtBMTFnMuons;
MonitorElement* ugmtBMTFhwPt;
MonitorElement* ugmtBMTFhwPtUnconstrained;
Expand All @@ -61,7 +60,6 @@ class L1TStage2uGMT : public DQMEDAnalyzer {
MonitorElement* ugmtBMTFMuMuDPhi;
MonitorElement* ugmtBMTFMuMuDR;

MonitorElement* ugmtOMTFBX;
MonitorElement* ugmtOMTFnMuons;
MonitorElement* ugmtOMTFhwPt;
MonitorElement* ugmtOMTFhwEta;
Expand All @@ -79,7 +77,6 @@ class L1TStage2uGMT : public DQMEDAnalyzer {
MonitorElement* ugmtOMTFMuMuDPhi;
MonitorElement* ugmtOMTFMuMuDR;

MonitorElement* ugmtEMTFBX;
MonitorElement* ugmtEMTFnMuons;
MonitorElement* ugmtEMTFhwPt;
MonitorElement* ugmtEMTFhwPtUnconstrained;
Expand All @@ -100,8 +97,6 @@ class L1TStage2uGMT : public DQMEDAnalyzer {
MonitorElement* ugmtEMTFMuMuDR;

MonitorElement* ugmtEMTFShowerTypeOccupancyPerSector;
MonitorElement* ugmtEMTFShowerTypeOccupancyPerBx;
MonitorElement* ugmtEMTFShowerSectorOccupancyPerBx;

MonitorElement* ugmtBOMTFposMuMuDEta;
MonitorElement* ugmtBOMTFposMuMuDPhi;
Expand All @@ -117,12 +112,6 @@ class L1TStage2uGMT : public DQMEDAnalyzer {
MonitorElement* ugmtEOMTFnegMuMuDPhi;
MonitorElement* ugmtEOMTFnegMuMuDR;

MonitorElement* ugmtBMTFBXvsProcessor;
MonitorElement* ugmtOMTFBXvsProcessor;
MonitorElement* ugmtEMTFBXvsProcessor;
MonitorElement* ugmtBXvsLink;

MonitorElement* ugmtMuonBX;
MonitorElement* ugmtnMuons;
MonitorElement* ugmtMuonIndex;
MonitorElement* ugmtMuonhwPt;
Expand Down Expand Up @@ -160,19 +149,8 @@ class L1TStage2uGMT : public DQMEDAnalyzer {
MonitorElement* ugmtMuonPhivsEta;
MonitorElement* ugmtMuonPhiAtVtxvsEtaAtVtx;

MonitorElement* ugmtMuonBXvsLink;
MonitorElement* ugmtMuonBXvshwPt;
MonitorElement* ugmtMuonBXvshwEta;
MonitorElement* ugmtMuonBXvshwPhi;
MonitorElement* ugmtMuonBXvshwCharge;
MonitorElement* ugmtMuonBXvshwChargeValid;
MonitorElement* ugmtMuonBXvshwQual;
MonitorElement* ugmtMuonBXvshwIso;
MonitorElement* ugmtMuonChargevsLink;

// Output shower plots
MonitorElement* ugmtMuonShowerTypeOccupancyPerBx;

// muon correlations
MonitorElement* ugmtMuMuInvMass;
MonitorElement* ugmtMuMuInvMassAtVtx;
Expand Down
72 changes: 72 additions & 0 deletions DQM/L1TMonitor/interface/L1TStage2uGMTBxDistributions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#ifndef DQM_L1TMonitor_L1TStage2uGMTBxDistributions_h
#define DQM_L1TMonitor_L1TStage2uGMTBxDistributions_h

#include "DataFormats/L1Trigger/interface/Muon.h"
#include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"
#include "DataFormats/L1Trigger/interface/MuonShower.h"
#include "DataFormats/L1TMuon/interface/RegionalMuonShower.h"
#include "L1Trigger/L1TMuon/interface/MicroGMTConfiguration.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 L1TStage2uGMTBxDistributions : public DQMEDAnalyzer {
public:
L1TStage2uGMTBxDistributions(const edm::ParameterSet& ps);
~L1TStage2uGMTBxDistributions() 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:
edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> ugmtBMTFToken_;
edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> ugmtOMTFToken_;
edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> ugmtEMTFToken_;
edm::EDGetTokenT<l1t::MuonBxCollection> ugmtMuonToken_;
edm::EDGetTokenT<l1t::RegionalMuonShowerBxCollection> ugmtEMTFShowerToken_;
edm::EDGetTokenT<l1t::MuonShowerBxCollection> ugmtMuonShowerToken_;
std::string monitorDir_;
bool emul_;
bool verbose_;
bool hadronicShowers_;

MonitorElement* ugmtBMTFBX;

MonitorElement* ugmtOMTFBX;

MonitorElement* ugmtEMTFBX;

MonitorElement* ugmtEMTFShowerTypeOccupancyPerBx;
MonitorElement* ugmtEMTFShowerSectorOccupancyPerBx;

MonitorElement* ugmtBMTFBXvsProcessor;
MonitorElement* ugmtOMTFBXvsProcessor;
MonitorElement* ugmtEMTFBXvsProcessor;
MonitorElement* ugmtBXvsLink;

MonitorElement* ugmtMuonBX;
MonitorElement* ugmtMuonBXvsLink;
MonitorElement* ugmtMuonBXvshwPt;
MonitorElement* ugmtMuonBXvshwEta;
MonitorElement* ugmtMuonBXvshwPhi;
MonitorElement* ugmtMuonBXvshwCharge;
MonitorElement* ugmtMuonBXvshwChargeValid;
MonitorElement* ugmtMuonBXvshwQual;
MonitorElement* ugmtMuonBXvshwIso;

// Output shower plots
MonitorElement* ugmtMuonShowerTypeOccupancyPerBx;

static constexpr unsigned IDX_TIGHT_SHOWER{2};
static constexpr unsigned IDX_NOMINAL_SHOWER{1};
};

#endif
3 changes: 3 additions & 0 deletions DQM/L1TMonitor/plugins/SealModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ DEFINE_FWK_MODULE(L1TStage2CaloLayer2);
#include "DQM/L1TMonitor/interface/L1TStage2uGMT.h"
DEFINE_FWK_MODULE(L1TStage2uGMT);

#include "DQM/L1TMonitor/interface/L1TStage2uGMTBxDistributions.h"
DEFINE_FWK_MODULE(L1TStage2uGMTBxDistributions);

#include "DQM/L1TMonitor/interface/L1TObjectsTiming.h"
DEFINE_FWK_MODULE(L1TObjectsTiming);

Expand Down
21 changes: 21 additions & 0 deletions DQM/L1TMonitor/python/L1TStage2uGMTBxDistributions_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import FWCore.ParameterSet.Config as cms

# the uGMT DQM module
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
l1TStage2uGMTBxDistributions = DQMEDAnalyzer(
"L1TStage2uGMTBxDistributions",
bmtfProducer = cms.InputTag("gmtStage2Digis", "BMTF"),
omtfProducer = cms.InputTag("gmtStage2Digis", "OMTF"),
emtfProducer = cms.InputTag("gmtStage2Digis", "EMTF"),
emtfShowerProducer = cms.InputTag("gmtStage2Digis", "EMTF"),
muonProducer = cms.InputTag("gmtStage2Digis", "Muon"),
muonShowerProducer = cms.InputTag("gmtStage2Digis", "MuonShower"),
monitorDir = cms.untracked.string("L1T/L1TStage2uGMT"),
emulator = cms.untracked.bool(False),
verbose = cms.untracked.bool(False),
hadronicShowers = cms.untracked.bool(False)
)

## Era: Run3_2021; Displaced muons from BMTF used in uGMT from Run-3
from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
stage2L1Trigger_2021.toModify(l1TStage2uGMTBxDistributions, hadronicShowers = cms.untracked.bool(True))
8 changes: 5 additions & 3 deletions DQM/L1TMonitor/python/L1TStage2uGMT_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# the uGMT DQM module
from DQM.L1TMonitor.L1TStage2uGMT_cfi import *
from DQM.L1TMonitor.L1TStage2uGMTBxDistributions_cfi import *

# the uGMT intermediate muon DQM modules
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
Expand Down Expand Up @@ -215,6 +216,7 @@
# sequences
l1tStage2uGMTOnlineDQMSeq = cms.Sequence(
l1tStage2uGMT +
l1TStage2uGMTBxDistributions +
l1tStage2uGMTIntermediateBMTF +
l1tStage2uGMTIntermediateOMTFNeg +
l1tStage2uGMTIntermediateOMTFPos +
Expand All @@ -234,7 +236,7 @@
)


## Era: Run3_2021; Hadronic showers from EMTF used in uGMT from Run-3. Comparing output copies routinely, but moving the uGMT main DQM behind the fat event filter so the BX comparisons aren't biased.
## Era: Run3_2021; Hadronic showers from EMTF used in uGMT from Run-3. Comparing output copies routinely, but moving the uGMT BX distribution plots behind the fat event filter so the BX comparisons aren't biased.
from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021

_run3_l1tStage2uGMTOnlineDQMSeq = cms.Sequence(l1tStage2uGMTOnlineDQMSeq.copy() +
Expand All @@ -250,10 +252,10 @@
l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy4 +
l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy5
)
_run3_l1tStage2uGMTOnlineDQMSeq.remove(l1tStage2uGMT)
_run3_l1tStage2uGMTOnlineDQMSeq.remove(l1TStage2uGMTBxDistributions)
stage2L1Trigger_2021.toReplaceWith(l1tStage2uGMTOnlineDQMSeq, _run3_l1tStage2uGMTOnlineDQMSeq)

# The following needs to go after the fat events filter, because inputs are read out with only the central BX for the standard events, so the BX distributions would otherwise be heavily biased toward the central BX.
_run3_l1tStage2uGMTValidationEventOnlineDQMSeq = cms.Sequence(l1tStage2uGMT)
_run3_l1tStage2uGMTValidationEventOnlineDQMSeq = cms.Sequence(l1TStage2uGMTBxDistributions)
stage2L1Trigger_2021.toReplaceWith(l1tStage2uGMTValidationEventOnlineDQMSeq, _run3_l1tStage2uGMTValidationEventOnlineDQMSeq)

Loading

0 comments on commit 54e2e35

Please sign in to comment.