Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data-vs-emulator plots for L1T shower DQM #36396

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions DQM/L1TMonitor/interface/L1TdeCSCTPGShower.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#ifndef DQM_L1TMonitor_L1TdeCSCTPGShower_h
#define DQM_L1TMonitor_L1TdeCSCTPGShower_h

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

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

#include "DataFormats/CSCDigi/interface/CSCShowerDigiCollection.h"

class L1TdeCSCTPGShower : public DQMEDAnalyzer {
public:
L1TdeCSCTPGShower(const edm::ParameterSet& ps);
~L1TdeCSCTPGShower() override;

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

private:
bool areSameShowers(const CSCShowerDigi& lhs, const CSCShowerDigi& rhs) const;

edm::EDGetTokenT<CSCShowerDigiCollection> dataALCTShower_token_;
edm::EDGetTokenT<CSCShowerDigiCollection> emulALCTShower_token_;
edm::EDGetTokenT<CSCShowerDigiCollection> dataCLCTShower_token_;
edm::EDGetTokenT<CSCShowerDigiCollection> emulCLCTShower_token_;
edm::EDGetTokenT<CSCShowerDigiCollection> dataLCTShower_token_;
edm::EDGetTokenT<CSCShowerDigiCollection> emulLCTShower_token_;

std::string monitorDir_;

MonitorElement* lctShowerDataSummary_denom_;
MonitorElement* lctShowerDataSummary_num_;
MonitorElement* alctShowerDataSummary_denom_;
MonitorElement* alctShowerDataSummary_num_;
MonitorElement* clctShowerDataSummary_denom_;
MonitorElement* clctShowerDataSummary_num_;

MonitorElement* lctShowerEmulSummary_denom_;
MonitorElement* lctShowerEmulSummary_num_;
MonitorElement* alctShowerEmulSummary_denom_;
MonitorElement* alctShowerEmulSummary_num_;
MonitorElement* clctShowerEmulSummary_denom_;
MonitorElement* clctShowerEmulSummary_num_;
};

#endif
34 changes: 34 additions & 0 deletions DQM/L1TMonitor/interface/L1TdeStage2Shower.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#ifndef DQM_L1TMonitor_L1TdeStage2Shower_h
#define DQM_L1TMonitor_L1TdeStage2Shower_h

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

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

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

class L1TdeStage2Shower : public DQMEDAnalyzer {
public:
L1TdeStage2Shower(const edm::ParameterSet& ps);
~L1TdeStage2Shower() override;

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::RegionalMuonShowerBxCollection> data_EMTFShower_token_;
edm::EDGetTokenT<l1t::RegionalMuonShowerBxCollection> emul_EMTFShower_token_;

std::string monitorDir_;

MonitorElement* emtfShowerDataSummary_denom_;
MonitorElement* emtfShowerDataSummary_num_;
MonitorElement* emtfShowerEmulSummary_denom_;
MonitorElement* emtfShowerEmulSummary_num_;
};

#endif
6 changes: 6 additions & 0 deletions DQM/L1TMonitor/plugins/SealModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,18 @@ DEFINE_FWK_MODULE(L1TdeGEMTPG);
#include "DQM/L1TMonitor/interface/L1TdeCSCTPG.h"
DEFINE_FWK_MODULE(L1TdeCSCTPG);

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

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

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

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

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

Expand Down
14 changes: 14 additions & 0 deletions DQM/L1TMonitor/python/L1TStage2Emulator_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@
RPCInput = "muonRPCDigis",
GEMInput = 'valMuonGEMPadDigiClusters'
)
# EMTF shower
from L1Trigger.L1TMuonEndCap.simEmtfShowers_cfi import *
valEmtfStage2Showers = simEmtfShowers.clone(
CSCShowerInput = cms.InputTag('valCscStage2Digis')
)

# uGMT
from L1Trigger.L1TMuon.simGmtStage2Digis_cfi import *
Expand Down Expand Up @@ -125,6 +130,10 @@
_run3_Stage2L1HardwareValidation = Stage2L1HardwareValidation.copy()
run3_GEM.toReplaceWith( Stage2L1HardwareValidation, cms.Sequence( valMuonGEMPadDigis + valMuonGEMPadDigiClusters + _run3_Stage2L1HardwareValidation) )

from Configuration.Eras.Modifier_run3_common_cff import run3_common
_run3Shower_Stage2L1HardwareValidation = Stage2L1HardwareValidation.copy()
run3_common.toReplaceWith( Stage2L1HardwareValidation, cms.Sequence(_run3Shower_Stage2L1HardwareValidation + valEmtfStage2Showers) )

Stage2L1HardwareValidationForValidationEvents = cms.Sequence(
valCaloStage2Layer2Digis
)
Expand All @@ -144,6 +153,7 @@

# CSC TPG
from DQM.L1TMonitor.L1TdeCSCTPG_cfi import *
from DQM.L1TMonitor.L1TdeCSCTPGShower_cfi import *

# BMTF
from DQM.L1TMonitor.L1TdeStage2BMTF_cfi import *
Expand Down Expand Up @@ -183,6 +193,10 @@
from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
run3_GEM.toReplaceWith( l1tStage2EmulatorOnlineDQM, _run3_l1tStage2EmulatorOnlineDQM )

from Configuration.Eras.Modifier_run3_common_cff import run3_common
_run3shower_l1tStage2EmulatorOnlineDQM = l1tStage2EmulatorOnlineDQM.copy()
run3_common.toReplaceWith( l1tStage2EmulatorOnlineDQM, cms.Sequence(_run3shower_l1tStage2EmulatorOnlineDQM + l1tdeCSCTPGShower) )

# sequence to run only for validation events
l1tStage2EmulatorOnlineDQMValidationEvents = cms.Sequence(
l1tdeStage2CaloLayer1 +
Expand Down
20 changes: 20 additions & 0 deletions DQM/L1TMonitor/python/L1TdeCSCTPGShower_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer

l1tdeCSCTPGShower = DQMEDAnalyzer(
"L1TdeCSCTPGShower",
# CSC Showers not in data yet. Use Emul for both
# Once Run 3 firmware are implemented, should change data tags to
# cms.InputTag("muonCSCDigis", "MuonCSCShowerDigi") for correlated shower,
# something like cms.InputTag("muonCSCDigis", "MuonCSCShowerDigiAnode") for Anode shower,
# and something like cms.InputTag("muonCSCDigis", "MuonCSCShowerDigiCathode") for Cathode shower
# - 2021.12.06 Xunwu Zuo
dataALCTShower = cms.InputTag("valCscStage2Digis", "Anode"),
emulALCTShower = cms.InputTag("valCscStage2Digis", "Anode"),
dataCLCTShower = cms.InputTag("valCscStage2Digis", "Cathode"),
emulCLCTShower = cms.InputTag("valCscStage2Digis", "Cathode"),
dataLCTShower = cms.InputTag("valCscStage2Digis"),
emulLCTShower = cms.InputTag("valCscStage2Digis"),
monitorDir = cms.untracked.string("L1TEMU/L1TdeCSCTPGShower"),
)

4 changes: 4 additions & 0 deletions DQM/L1TMonitor/python/L1TdeStage2EMTF_cff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import FWCore.ParameterSet.Config as cms

from DQM.L1TMonitor.L1TdeStage2EMTF_cfi import *
from DQM.L1TMonitor.L1TdeStage2Shower_cfi import *

# List of bins to ignore
ignoreBinsDeStage2Emtf = [1]
Expand All @@ -27,3 +28,6 @@
l1tdeStage2EmtfComp
)

from Configuration.Eras.Modifier_run3_common_cff import run3_common
_run3shower_l1tdeStage2EmtfOnlineDQMSeq = l1tdeStage2EmtfOnlineDQMSeq.copy()
run3_common.toReplaceWith(l1tdeStage2EmtfOnlineDQMSeq, cms.Sequence(_run3shower_l1tdeStage2EmtfOnlineDQMSeq + l1tdeStage2Shower))
17 changes: 17 additions & 0 deletions DQM/L1TMonitor/python/L1TdeStage2Shower_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import FWCore.ParameterSet.Config as cms

from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
l1tdeStage2Shower = DQMEDAnalyzer(
"L1TdeStage2Shower",
# EMTF Showers not in data yet. Use Emul for both
# Once Run 3 firmware are implemented, should change data tags to
# cms.InputTag("emtfStage2Digis")
# - 2021.12.06 Xunwu Zuo

# dataSource = cms.InputTag("simEmtfShowers", "EMTF"),
# emulSource = cms.InputTag("simEmtfShowers", "EMTF"),
dataSource = cms.InputTag("valEmtfStage2Showers", "EMTF"),
emulSource = cms.InputTag("valEmtfStage2Showers", "EMTF"),
monitorDir = cms.untracked.string("L1TEMU/L1TdeStage2EMTF/Shower"),
)

Loading