Skip to content

Commit

Permalink
CSC TP data vs emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Dildick committed Apr 1, 2021
1 parent 6f8a09f commit 6ac28c7
Show file tree
Hide file tree
Showing 14 changed files with 595 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@
#--------------------------------------------------
# Standard Unpacking Path

process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
process.load("Configuration.StandardSequences.RawToDigi_Data_cff")

# remove unneeded unpackers
process.RawToDigi.remove(process.ecalDigis)
process.RawToDigi.remove(process.ecalPreshowerDigis)
process.RawToDigi.remove(process.hcalDigis)
process.RawToDigi.remove(process.muonCSCDigis)
process.RawToDigi.remove(process.muonDTDigis)
process.RawToDigi.remove(process.siPixelDigis)
process.RawToDigi.remove(process.siStripDigis)
Expand Down Expand Up @@ -168,7 +167,7 @@
#--------------------------------------------------
# L1T Emulator Online DQM Schedule

process.schedule = cms.Schedule(
process.schedule = cms.Schedule(
process.rawToDigiPath,
process.l1tEmulatorMonitorPath,
process.l1tStage2EmulatorMonitorClientPath,
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/test/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
set -x

if [[ $# -eq 0 ]]; then
echo "Please provide a name of the clinet"
echo "Please provide a name of the client"
exit 1
fi

Expand Down
55 changes: 55 additions & 0 deletions DQM/L1TMonitor/interface/L1TdeCSCTPG.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#ifndef DQM_L1TMonitor_L1TdeCSCTPG_h
#define DQM_L1TMonitor_L1TdeCSCTPG_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/CSCALCTDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"

class L1TdeCSCTPG : public DQMEDAnalyzer {
public:
L1TdeCSCTPG(const edm::ParameterSet& ps);
~L1TdeCSCTPG() 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<CSCALCTDigiCollection> dataALCT_token_;
edm::EDGetTokenT<CSCALCTDigiCollection> emulALCT_token_;
edm::EDGetTokenT<CSCCLCTDigiCollection> dataCLCT_token_;
edm::EDGetTokenT<CSCCLCTDigiCollection> emulCLCT_token_;
edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> dataLCT_token_;
edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> emulLCT_token_;
std::string monitorDir_;

std::vector<std::string> chambers_;
std::vector<std::string> dataEmul_;

std::vector<std::string> alctVars_;
std::vector<std::string> clctVars_;
std::vector<std::string> lctVars_;

std::vector<unsigned> alctNBin_;
std::vector<unsigned> clctNBin_;
std::vector<unsigned> lctNBin_;
std::vector<double> alctMinBin_;
std::vector<double> clctMinBin_;
std::vector<double> lctMinBin_;
std::vector<double> alctMaxBin_;
std::vector<double> clctMaxBin_;
std::vector<double> lctMaxBin_;

// first key is the chamber number
// second key is the variable
std::map<uint32_t, std::map<std::string, MonitorElement*> > chamberHistos;
};

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

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

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

Expand Down
17 changes: 10 additions & 7 deletions DQM/L1TMonitor/python/L1TEmulatorMonitor_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
l1TdeRCTfromRCT.rctSourceData = 'rctDigis'
l1TdeRCTfromRCT.HistFolder = cms.untracked.string('L1TEMU/L1TdeRCT_FromRCT')

from DQM.L1TMonitor.L1TdeCSCTPG_cfi import *

from DQM.L1TMonitor.L1TdeCSCTF_cfi import *

from DQM.L1TMonitor.L1GtHwValidation_cff import *
Expand All @@ -67,7 +69,7 @@

############################################################

# GMT unpack from Fed813 in legacy stage1 parallel running
# GMT unpack from Fed813 in legacy stage1 parallel running
from EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi import *
l1GtUnpack.DaqGtInputTag = 'rawDataCollector'

Expand All @@ -78,11 +80,12 @@
)

l1ExpertDataVsEmulator = cms.Sequence(
l1TdeGCT +
l1TdeCSCTF +
l1GtHwValidation +
l1TdeRCTRun1
)
l1TdeGCT +
l1tdeCSCTPG +
l1TdeCSCTF +
l1GtHwValidation +
l1TdeRCTRun1
)


l1EmulatorMonitorTask = cms.Task(
Expand Down Expand Up @@ -116,7 +119,7 @@

l1EmulatorMonitorStage1 = cms.Sequence(
#caloStage1Digis*
#caloStage1LegacyFormatDigis*
#caloStage1LegacyFormatDigis*
l1demonstage1+
l1ExpertDataVsEmulatorStage1
)
Expand Down
119 changes: 68 additions & 51 deletions DQM/L1TMonitor/python/L1TStage2Emulator_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,89 +7,102 @@
from L1Trigger.L1TCalorimeter.simDigis_cff import *
# CaloLayer1
from L1Trigger.L1TCaloLayer1.simCaloStage2Layer1Digis_cfi import simCaloStage2Layer1Digis
valCaloStage2Layer1Digis = simCaloStage2Layer1Digis.clone()
valCaloStage2Layer1Digis.ecalToken = cms.InputTag("caloLayer1Digis")
valCaloStage2Layer1Digis.hcalToken = cms.InputTag("caloLayer1Digis")
valCaloStage2Layer1Digis.unpackEcalMask = cms.bool(True)
valCaloStage2Layer1Digis.unpackHcalMask = cms.bool(True)
valCaloStage2Layer1Digis = simCaloStage2Layer1Digis.clone(
ecalToken = "caloLayer1Digis",
hcalToken = "caloLayer1Digis",
unpackEcalMask = True,
unpackHcalMask = True
)

# CaloLayer2
from L1Trigger.L1TCalorimeter.simCaloStage2Digis_cfi import simCaloStage2Digis
valCaloStage2Layer2Digis = simCaloStage2Digis.clone()
valCaloStage2Layer2Digis.towerToken = cms.InputTag("caloStage2Digis", "CaloTower")
valCaloStage2Layer2Digis = simCaloStage2Digis.clone(towerToken = "caloStage2Digis:CaloTower")

# BMTF-Legacy
from L1Trigger.L1TMuonBarrel.simBmtfDigis_cfi import *
valBmtfDigis = simBmtfDigis.clone()
valBmtfDigis.DTDigi_Source = cms.InputTag("bmtfDigis")
valBmtfDigis.DTDigi_Theta_Source = cms.InputTag("bmtfDigis")
valBmtfDigis = simBmtfDigis.clone(
DTDigi_Source = "bmtfDigis",
DTDigi_Theta_Source = "bmtfDigis"
)

# BMTF-Kalman
from L1Trigger.L1TMuonBarrel.simKBmtfDigis_cfi import *
from L1Trigger.L1TMuonBarrel.simKBmtfStubs_cfi import *
valKBmtfStubs = simKBmtfStubs.clone()
valKBmtfStubs.srcPhi = cms.InputTag("bmtfDigis")
valKBmtfStubs.srcTheta = cms.InputTag("bmtfDigis")
valKBmtfDigis = simKBmtfDigis.clone()
valKBmtfDigis.src = cms.InputTag("valKBmtfStubs")
valKBmtfStubs = simKBmtfStubs.clone(
srcPhi = "bmtfDigis",
srcTheta = "bmtfDigis"
)
valKBmtfDigis = simKBmtfDigis.clone(src = "valKBmtfStubs")

# BMTF-AlgoTriggerSelector
from DQM.L1TMonitor.L1TBMTFAlgoSelector_cfi import *
valBmtfAlgoSel = l1tBmtfAlgoSelector.clone()
valBmtfAlgoSel.bmtfKalman = cms.InputTag("valKBmtfDigis:BMTF")
valBmtfAlgoSel.bmtfLegacy = cms.InputTag("valBmtfDigis:BMTF")
valBmtfAlgoSel = l1tBmtfAlgoSelector.clone(
bmtfKalman = "valKBmtfDigis:BMTF",
bmtfLegacy = "valBmtfDigis:BMTF"
)

# OMTF
from L1Trigger.L1TMuonOverlap.simOmtfDigis_cfi import *
valOmtfDigis = simOmtfDigis.clone()
valOmtfDigis.srcDTPh = cms.InputTag('omtfStage2Digis')
valOmtfDigis.srcDTTh = cms.InputTag('omtfStage2Digis')
valOmtfDigis.srcCSC = cms.InputTag('omtfStage2Digis')
valOmtfDigis.srcRPC = cms.InputTag('omtfStage2Digis')
valOmtfDigis = simOmtfDigis.clone(
srcDTPh = "omtfStage2Digis",
srcDTTh = "omtfStage2Digis",
srcCSC = "omtfStage2Digis",
srcRPC = "omtfStage2Digis"
)

# GEM TPG
from L1Trigger.L1TGEM.simGEMDigis_cff import *
valMuonGEMPadDigis = simMuonGEMPadDigis.clone()
valMuonGEMPadDigis.InputCollection = cms.InputTag('muonGEMDigis')
valMuonGEMPadDigiClusters = simMuonGEMPadDigiClusters.clone()
valMuonGEMPadDigiClusters.InputCollection = cms.InputTag('valMuonGEMPadDigis')
valMuonGEMPadDigis = simMuonGEMPadDigis.clone(InputCollection = "muonGEMDigis")
valMuonGEMPadDigiClusters = simMuonGEMPadDigiClusters.clone(InputCollection = "valMuonGEMPadDigis")

# CSC TPG
from L1Trigger.CSCTriggerPrimitives.cscTriggerPrimitiveDigis_cfi import *
valCscStage2Digis = cscTriggerPrimitiveDigis.clone(
CSCComparatorDigiProducer = "muonCSCDigis:MuonCSCComparatorDigi",
CSCWireDigiProducer = "muonCSCDigis:MuonCSCWireDigi"
)

from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
run3_GEM.toModify( valCscStage2Digis, GEMPadDigiClusterProducer = "valMuonGEMPadDigiClusters" )

# EMTF
from L1Trigger.L1TMuonEndCap.simEmtfDigis_cfi import *
valEmtfStage2Digis = simEmtfDigis.clone()
valEmtfStage2Digis.CSCInput = "emtfStage2Digis"
valEmtfStage2Digis.RPCInput = "muonRPCDigis"
valEmtfStage2Digis = simEmtfDigis.clone(
CSCInput = "emtfStage2Digis",
RPCInput = "muonRPCDigis"
)

# uGMT
from L1Trigger.L1TMuon.simGmtStage2Digis_cfi import *
valGmtCaloSumDigis = simGmtCaloSumDigis.clone()
valGmtCaloSumDigis.caloStage2Layer2Label = cms.InputTag("valCaloStage2Layer1Digis")
valGmtStage2Digis = simGmtStage2Digis.clone()
valGmtStage2Digis.barrelTFInput = cms.InputTag("gmtStage2Digis", "BMTF")
valGmtStage2Digis.overlapTFInput = cms.InputTag("gmtStage2Digis", "OMTF")
valGmtStage2Digis.forwardTFInput = cms.InputTag("gmtStage2Digis", "EMTF")
valGmtStage2Digis.triggerTowerInput = cms.InputTag("valGmtCaloSumDigis", "TriggerTowerSums")
valGmtCaloSumDigis = simGmtCaloSumDigis.clone(caloStage2Layer2Label = "valCaloStage2Layer1Digis")
valGmtStage2Digis = simGmtStage2Digis.clone(
barrelTFInput = "gmtStage2Digis:BMTF",
overlapTFInput = "gmtStage2Digis:OMTF",
forwardTFInput = "gmtStage2Digis:EMTF",
triggerTowerInput = "valGmtCaloSumDigis:TriggerTowerSums"
)

# uGT
from L1Trigger.L1TGlobal.simGtStage2Digis_cfi import simGtStage2Digis
from L1Trigger.L1TGlobal.simGtExtFakeProd_cfi import simGtExtFakeProd

valGtStage2Digis = simGtStage2Digis.clone()
valGtStage2Digis.ExtInputTag = cms.InputTag("gtStage2Digis")
valGtStage2Digis.MuonInputTag = cms.InputTag("gtStage2Digis", "Muon")
valGtStage2Digis.EGammaInputTag = cms.InputTag("gtStage2Digis", "EGamma")
valGtStage2Digis.TauInputTag = cms.InputTag("gtStage2Digis", "Tau")
valGtStage2Digis.JetInputTag = cms.InputTag("gtStage2Digis", "Jet")
valGtStage2Digis.EtSumInputTag = cms.InputTag("gtStage2Digis", "EtSum")
valGtStage2Digis.AlgorithmTriggersUnmasked = cms.bool(False)
valGtStage2Digis.AlgorithmTriggersUnprescaled = cms.bool(False)
valGtStage2Digis.EmulateBxInEvent = cms.int32(5)
valGtStage2Digis.PrescaleSet = cms.uint32(7)
valGtStage2Digis.GetPrescaleColumnFromData = cms.bool(True)
valGtStage2Digis.AlgoBlkInputTag = cms.InputTag("gtStage2Digis")

valGtStage2Digis = simGtStage2Digis.clone(
ExtInputTag = "gtStage2Digis",
MuonInputTag = "gtStage2Digis:Muon",
EGammaInputTag = "gtStage2Digis:EGamma",
TauInputTag = "gtStage2Digis:Tau",
JetInputTag = "gtStage2Digis:Jet",
EtSumInputTag = "gtStage2Digis:EtSum",
AlgorithmTriggersUnmasked = False,
AlgorithmTriggersUnprescaled = False,
EmulateBxInEvent = cms.int32(5),
PrescaleSet = cms.uint32(7),
GetPrescaleColumnFromData = True,
AlgoBlkInputTag = "gtStage2Digis"
)
Stage2L1HardwareValidation = cms.Sequence(
valCaloStage2Layer1Digis +
valCscStage2Digis +
valBmtfDigis +
valKBmtfStubs +
valKBmtfDigis +
Expand Down Expand Up @@ -122,6 +135,9 @@
# GEM TPG
from DQM.L1TMonitor.L1TdeGEMTPG_cfi import *

# CSC TPG
from DQM.L1TMonitor.L1TdeCSCTPG_cfi import *

# BMTF
from DQM.L1TMonitor.L1TdeStage2BMTF_cfi import *
from DQM.L1TMonitor.L1TdeStage2BMTFSecond_cff import *
Expand All @@ -147,6 +163,7 @@
l1tdeStage2Bmtf +
l1tdeStage2BmtfSecond +
l1tdeStage2Omtf +
l1tdeCSCTPG +
l1tdeStage2EmtfOnlineDQMSeq +
l1tStage2uGMTEmulatorOnlineDQMSeq +
l1tdeStage2uGT +
Expand Down
34 changes: 34 additions & 0 deletions DQM/L1TMonitor/python/L1TdeCSCTPG_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer

l1tdeCSCTPGCommon = cms.PSet(
monitorDir = cms.string('L1TEMU/L1TdeCSCTPG'),
chambers = cms.vstring("ME1a", "ME1b", "ME12", "ME13", "ME21", "ME22",
"ME31", "ME32", "ME41", "ME42"),
alctVars = cms.vstring("quality", "wiregroup", "bx"),
alctNBin = cms.vuint32(6, 116, 20),
alctMinBin = cms.vdouble(0, 0, 0),
alctMaxBin = cms.vdouble(6, 116, 20),
clctVars = cms.vstring("quality", "halfstrip", "bx",
"pattern", "bend", "quartstrip","eightstrip"),
clctNBin = cms.vuint32(16, 240, 20, 16, 2, 2, 2),
clctMinBin = cms.vdouble(0, 0, 0, 0, 0, 0, 0),
clctMaxBin = cms.vdouble(16, 240, 20, 16, 2, 2, 2),
lctVars = cms.vstring( "quality", "wiregroup", "halfstrip",
"bx", "pattern", "bend", "quartstrip","eightstrip"),
lctNBin = cms.vuint32(16, 116, 240, 20, 16, 2, 2, 2),
lctMinBin = cms.vdouble(0, 0, 0, 0, 0, 0, 0, 0),
lctMaxBin = cms.vdouble(16, 116, 240, 20, 16, 2, 2, 2),
)

l1tdeCSCTPG = DQMEDAnalyzer(
"L1TdeCSCTPG",
l1tdeCSCTPGCommon,
dataALCT = cms.InputTag("muonCSCDigis","MuonCSCALCTDigi"),
emulALCT = cms.InputTag("valCscStage2Digis"),
dataCLCT = cms.InputTag("muonCSCDigis","MuonCSCCLCTDigi"),
emulCLCT = cms.InputTag("valCscStage2Digis"),
dataLCT = cms.InputTag("muonCSCDigis","MuonCSCCorrelatedLCTDigi"),
emulLCT = cms.InputTag("valCscStage2Digis", "MPCSORTED"),
dataEmul = cms.vstring("data","emul"),
)
Loading

0 comments on commit 6ac28c7

Please sign in to comment.