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

L1 muon DQM CMSSW_8_0_23 81x synched #16513

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a8b7af1
fix conflict by removing data directory. will add again later
thomreis Jul 12, 2016
f3c7fd2
Configuration for EMTF data to emulator comparison
thomreis Jul 12, 2016
4bed71a
BMTF data to emulator comparison module
thomreis Jul 12, 2016
a7ff7f8
OMTF data to emulator comparison module
thomreis Jul 12, 2016
423a1e6
correct x axis range for summary plots
thomreis Jul 20, 2016
8b35b3c
Working commit for zero suppression DQM module
thomreis Jul 20, 2016
bff988c
fill BX range plots correctly
thomreis Jul 20, 2016
1a6e5c0
fix muon mismatch flag
thomreis Jul 20, 2016
415f615
Use emtfStage2Digis as input for the EMTF and OMTF emulator instead o…
thomreis Jul 20, 2016
d604e63
Add L1TStage2MuonComp and L1TStage2RegionalMuonCandComp to SealModule
thomreis Aug 2, 2016
107f1e6
Working commit. Code compiles
thomreis Aug 2, 2016
3fee67e
Fix stop condition for loop
thomreis Aug 2, 2016
5e41c50
Fix segmentation fault
thomreis Aug 2, 2016
59f1836
Add histograms for mismatching track addresses and flag to ignore the…
thomreis Aug 2, 2016
c1f9a60
Change histogram title
thomreis Aug 2, 2016
fe2d73b
Add TF output vs. uGMT input comparison to DQM
thomreis Aug 2, 2016
034ecfd
Set bin labels correctly
thomreis Aug 2, 2016
eb2880b
activate zero suppression DQM module
thomreis Aug 2, 2016
862b48f
uGMT zero suppression DQM code. pending fix for unpacker plugin location
thomreis Aug 3, 2016
110519e
make code less verbose
thomreis Aug 3, 2016
9871920
Debugging. Add expected ZS size histogram.
thomreis Aug 11, 2016
a0ceaba
Make zero suppression module more quite
thomreis Aug 11, 2016
27a22a4
Add uGMT zero suppression DQM module before the fat event filter
thomreis Aug 11, 2016
19c847d
Fill values from the correct collection in histograms
thomreis Aug 26, 2016
30745e9
Add per caption id histograms and zs enabled flag
thomreis Aug 30, 2016
082052c
Make event counter caption id dependant
thomreis Aug 30, 2016
a582dee
Remove auto from function prototype to get rid of clang error
thomreis Aug 31, 2016
62c3ebb
Make summary histogram title configurable for RegionalMuonCand compar…
thomreis Sep 7, 2016
841e98a
Add uGMT output muon to uGT input muon comparison
thomreis Sep 13, 2016
f7ba8e3
merge with developments in 8_0_10_patch2
thomreis Aug 5, 2016
91297eb
change auto_ptr to unique_ptr to fix compile errors after moving to 81X
thomreis Aug 11, 2016
112f936
Make summary histogram title configurable
thomreis Sep 7, 2016
9235a9f
fix productNotFound error for RPC inputs to EMTF emulator
thomreis Nov 8, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -54,7 +54,15 @@

process.load("DQM.L1TMonitor.L1TStage2_cff")

# zero suppression DQM module running before the fat event filter
from DQM.L1TMonitor.L1TStage2uGMT_cfi import l1tStage2uGMTZeroSupp
process.l1tStage2uGMTZeroSuppAllEvts = l1tStage2uGMTZeroSupp.clone()
process.l1tStage2uGMTZeroSuppAllEvts.monitorDir = cms.untracked.string("L1T2016/L1TStage2uGMT/zeroSuppression/AllEvts")
# customise path for zero suppression module analysing only fat events
process.l1tStage2uGMTZeroSupp.monitorDir = cms.untracked.string("L1T2016/L1TStage2uGMT/zeroSuppression/FatEvts")

process.l1tMonitorPath = cms.Path(
process.l1tStage2uGMTZeroSuppAllEvts +
process.hltFatEventFilter +
# process.selfFatEventFilter +
process.l1tStage2Unpack +
Expand Down
Expand Up @@ -75,7 +75,7 @@
# To get L1 conditions that are not in GlobalTag / O2O yet
process.load("L1Trigger.L1TCalorimeter.hackConditions_cff")
process.load("L1Trigger.L1TMuon.hackConditions_cff")
process.gmtParams.caloInputsMasked = cms.bool(True)
process.gmtParams.caloInputsMasked = cms.bool(True) # Disable uGMT calo inputs like in the online configuration
process.load("L1Trigger.L1TGlobal.hackConditions_cff")

# To get CaloTPGTranscoder
Expand Down
1 change: 1 addition & 0 deletions DQM/L1TMonitor/BuildFile.xml
Expand Up @@ -34,6 +34,7 @@
<use name="L1Trigger/CSCTrackFinder"/>
<use name="L1Trigger/GlobalTriggerAnalyzer"/>
<use name="L1Trigger/L1TMuon"/>
<use name="EventFilter/L1TRawToDigi"/>
<use name="CondTools/L1Trigger"/>
<use name="root"/>
<use name="boost"/>
Expand Down
71 changes: 71 additions & 0 deletions DQM/L1TMonitor/interface/L1TMP7ZeroSupp.h
@@ -0,0 +1,71 @@
#ifndef DQM_L1TMonitor_L1TMP7ZeroSupp_h
#define DQM_L1TMonitor_L1TMP7ZeroSupp_h

#include "DataFormats/FEDRawData/interface/FEDHeader.h"
//#include "DataFormats/FEDRawData/interface/FEDNumbering.h"
#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
#include "DataFormats/FEDRawData/interface/FEDTrailer.h"

#include "EventFilter/L1TRawToDigi/interface/AMC13Spec.h"
#include "EventFilter/L1TRawToDigi/interface/Block.h"

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

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


class L1TMP7ZeroSupp : public DQMEDAnalyzer {

public:

L1TMP7ZeroSupp(const edm::ParameterSet& ps);
virtual ~L1TMP7ZeroSupp();

protected:

virtual void dqmBeginRun(const edm::Run&, const edm::EventSetup&);
virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
virtual void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override;
virtual void analyze(const edm::Event&, const edm::EventSetup&) override;

private:

void bookCapIdHistograms(DQMStore::IBooker&, const unsigned int&);

// Add additional bins only before NBINLABELS
enum binlabels {EVTS=0, EVTSGOOD, EVTSBAD, BLOCKS, ZSBLKSGOOD, ZSBLKSBAD, ZSBLKSBADFALSEPOS, ZSBLKSBADFALSENEG, NBINLABELS};

edm::EDGetTokenT<FEDRawDataCollection> fedDataToken_;
bool zsEnabled_;
std::vector<int> fedIds_;
std::vector<std::vector<int>> masks_;

// header and trailer sizes in chars
int slinkHeaderSize_;
int slinkTrailerSize_;
int amc13HeaderSize_;
int amc13TrailerSize_;
int amcHeaderSize_;
int amcTrailerSize_;
int zsFlagMask_;

int maxFedReadoutSize_;

std::string monitorDir_;
bool verbose_;

unsigned int maxMasks_;

std::vector<unsigned int> definedMaskCapIds_;

std::map<unsigned int, MonitorElement*> zeroSuppValMap_;
std::map<unsigned int, MonitorElement*> readoutSizeNoZSMap_;
std::map<unsigned int, MonitorElement*> readoutSizeZSMap_;
std::map<unsigned int, MonitorElement*> readoutSizeZSExpectedMap_;
MonitorElement* capIds_;
};

#endif
1 change: 1 addition & 0 deletions DQM/L1TMonitor/interface/L1TStage2MuonComp.h
Expand Up @@ -35,6 +35,7 @@ class L1TStage2MuonComp : public DQMEDAnalyzer {
std::string monitorDir;
std::string muonColl1Title;
std::string muonColl2Title;
std::string summaryTitle;
bool verbose;

MonitorElement* summary;
Expand Down
77 changes: 77 additions & 0 deletions DQM/L1TMonitor/interface/L1TStage2RegionalMuonCandComp.h
@@ -0,0 +1,77 @@
#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/MonitorElement.h"

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


class L1TStage2RegionalMuonCandComp : public DQMEDAnalyzer {

public:

L1TStage2RegionalMuonCandComp(const edm::ParameterSet& ps);
virtual ~L1TStage2RegionalMuonCandComp();

protected:

virtual void dqmBeginRun(const edm::Run&, const edm::EventSetup&);
virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
virtual void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override;
virtual 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};
enum tfs {BMTFBIN=1, OMTFNEGBIN, OMTFPOSBIN, EMTFNEGBIN, EMTFPOSBIN};

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

MonitorElement* summary;

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* 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;

};

#endif
6 changes: 6 additions & 0 deletions DQM/L1TMonitor/plugins/SealModule.cc
Expand Up @@ -36,6 +36,9 @@ DEFINE_FWK_MODULE(L1TStage2uGMT);
#include <DQM/L1TMonitor/interface/L1TStage2MuonComp.h>
DEFINE_FWK_MODULE(L1TStage2MuonComp);

#include <DQM/L1TMonitor/interface/L1TStage2RegionalMuonCandComp.h>
DEFINE_FWK_MODULE(L1TStage2RegionalMuonCandComp);

#include <DQM/L1TMonitor/interface/L1TStage2uGT.h>
DEFINE_FWK_MODULE(L1TStage2uGT);

Expand All @@ -48,6 +51,9 @@ DEFINE_FWK_MODULE(L1TStage2OMTF);
#include <DQM/L1TMonitor/interface/L1TStage2EMTF.h>
DEFINE_FWK_MODULE(L1TStage2EMTF);

#include <DQM/L1TMonitor/interface/L1TMP7ZeroSupp.h>
DEFINE_FWK_MODULE(L1TMP7ZeroSupp);

#include <DQM/L1TMonitor/interface/L1TGCT.h>
DEFINE_FWK_MODULE(L1TGCT);

Expand Down
30 changes: 28 additions & 2 deletions DQM/L1TMonitor/python/L1TStage2Emulator_cff.py
Expand Up @@ -51,10 +51,25 @@
valCaloStage2Layer2Digis = simCaloStage2Digis.clone()
valCaloStage2Layer2Digis.towerToken = cms.InputTag("caloStage2Digis", "CaloTower")

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

# OMTF
from L1Trigger.L1TMuonOverlap.simOmtfDigis_cfi import *
valOmtfDigis = simOmtfDigis.clone()
valOmtfDigis.srcDTPh = cms.InputTag('bmtfDigis')
valOmtfDigis.srcDTTh = cms.InputTag('bmtfDigis')
valOmtfDigis.srcCSC = cms.InputTag('emtfStage2Digis')
valOmtfDigis.srcRPC = cms.InputTag('muonRPCDigis')

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

# uGMT
from L1Trigger.L1TMuon.simGmtStage2Digis_cfi import *
Expand Down Expand Up @@ -83,7 +98,9 @@
Stage2L1HardwareValidation = cms.Sequence(
valCaloStage2Layer1Digis +
valCaloStage2Layer2Digis +
valBmtfDigis +
valEmtfStage2Digis +
valOmtfDigis +
valGmtCaloSumDigis +
valGmtStage2Digis +
valGtStage2Digis
Expand All @@ -99,6 +116,12 @@
from DQM.L1TMonitor.L1TStage2CaloLayer2_cfi import *
from DQM.L1TMonitor.L1TStage2CaloLayer2Emul_cfi import *

# BMTF
from DQM.L1TMonitor.L1TdeStage2BMTF_cfi import *

# OMTF
from DQM.L1TMonitor.L1TdeStage2OMTF_cfi import *

# EMTF
from DQM.L1TMonitor.L1TdeStage2EMTF_cfi import *

Expand All @@ -116,7 +139,10 @@
# We process both layer2 and layer2emu in same sourceclient
# to be able to divide them in the MonitorClient
l1tStage2CaloLayer2 + l1tStage2CaloLayer2Emul +
l1tdeStage2Emtf +
l1tdeStage2Bmtf +
l1tdeStage2Omtf +
l1tdeStage2Emtf +
l1tdeStage2EmtfComp +
l1tStage2uGMTEmul +
l1tdeStage2uGMT +
l1tStage2uGtEmul
Expand Down
4 changes: 4 additions & 0 deletions DQM/L1TMonitor/python/L1TStage2_cff.py
Expand Up @@ -75,6 +75,10 @@
#l1tStage2Omtf +
l1tStage2Emtf +
l1tStage2uGMT +
l1tStage2uGMTZeroSupp +
l1tStage2BmtfOutVsuGMTIn +
l1tStage2EmtfOutVsuGMTIn +
l1tStage2uGMTOutVsuGTIn +
l1tStage2uGt
)

64 changes: 64 additions & 0 deletions DQM/L1TMonitor/python/L1TStage2uGMT_cfi.py
@@ -1,5 +1,6 @@
import FWCore.ParameterSet.Config as cms

# the uGMT DQM module
l1tStage2uGMT = cms.EDAnalyzer(
"L1TStage2uGMT",
bmtfProducer = cms.InputTag("gmtStage2Digis", "BMTF"),
Expand All @@ -11,3 +12,66 @@
verbose = cms.untracked.bool(False),
)

l1tStage2uGMTZeroSupp = cms.EDAnalyzer(
"L1TMP7ZeroSupp",
fedIds = cms.vint32(1402),
rawData = cms.InputTag("rawDataCollector"),
# mask for inputs (pt==0 defines empty muon)
maskCapId1 = cms.untracked.vint32(0x000001FF,
0x00000000,
0x000001FF,
0x00000000,
0x000001FF,
0x00000000),
# mask for outputs (pt==0 defines empty muon)
maskCapId2 = cms.untracked.vint32(0x0003FC00,
0x00000000,
0x0003FC00,
0x00000000,
0x0003FC00,
0x00000000),
# no masks defined for caption IDs 0 and 3-11
maxFEDReadoutSize = cms.untracked.int32(6000),
monitorDir = cms.untracked.string("L1T2016/L1TStage2uGMT/zeroSuppression"),
verbose = cms.untracked.bool(False),
)

# compares the unpacked BMTF output regional muon collection with the unpacked uGMT input regional muon collection from BMTF
# only muons that do not match are filled in the histograms
l1tStage2BmtfOutVsuGMTIn = cms.EDAnalyzer(
"L1TStage2RegionalMuonCandComp",
regionalMuonCollection1 = cms.InputTag("bmtfDigis", "BMTF"),
regionalMuonCollection2 = cms.InputTag("gmtStage2Digis", "BMTF"),
monitorDir = cms.untracked.string("L1T2016/L1TStage2uGMT/BMTFoutput_vs_uGMTinput"),
regionalMuonCollection1Title = cms.untracked.string("BMTF output data"),
regionalMuonCollection2Title = cms.untracked.string("uGMT input data from BMTF"),
summaryTitle = cms.untracked.string("Summary of comparison between BMTF output muons and uGMT input muons from BMTF"),
verbose = cms.untracked.bool(False),
)

# compares the unpacked EMTF output regional muon collection with the unpacked uGMT input regional muon collection from EMTF
# only muons that do not match are filled in the histograms
l1tStage2EmtfOutVsuGMTIn = cms.EDAnalyzer(
"L1TStage2RegionalMuonCandComp",
regionalMuonCollection1 = cms.InputTag("emtfStage2Digis"),
regionalMuonCollection2 = cms.InputTag("gmtStage2Digis", "EMTF"),
monitorDir = cms.untracked.string("L1T2016/L1TStage2uGMT/EMTFoutput_vs_uGMTinput"),
regionalMuonCollection1Title = cms.untracked.string("EMTF output data"),
regionalMuonCollection2Title = cms.untracked.string("uGMT input data from EMTF"),
summaryTitle = cms.untracked.string("Summary of comparison between EMTF output muons and uGMT input muons from EMTF"),
verbose = cms.untracked.bool(False),
)

# compares the unpacked uGMT muon collection to the unpacked uGT muon collection
# only muons that do not match are filled in the histograms
l1tStage2uGMTOutVsuGTIn = cms.EDAnalyzer(
"L1TStage2MuonComp",
muonCollection1 = cms.InputTag("gmtStage2Digis", "Muon"),
muonCollection2 = cms.InputTag("gtStage2Digis", "Muon"),
monitorDir = cms.untracked.string("L1T2016/L1TStage2uGMT/uGMToutput_vs_uGTinput"),
muonCollection1Title = cms.untracked.string("uGMT output muons"),
muonCollection2Title = cms.untracked.string("uGT input muons"),
summaryTitle = cms.untracked.string("Summary of comparison between uGMT output muons and uGT input muons"),
verbose = cms.untracked.bool(False),
)

15 changes: 15 additions & 0 deletions DQM/L1TMonitor/python/L1TdeStage2BMTF_cfi.py
@@ -0,0 +1,15 @@
import FWCore.ParameterSet.Config as cms

# compares the unpacked BMTF regional muon collection to the emulated BMTF regional muon collection
# only muons that do not match are filled in the histograms
l1tdeStage2Bmtf = cms.EDAnalyzer(
"L1TStage2RegionalMuonCandComp",
regionalMuonCollection1 = cms.InputTag("bmtfDigis", "BMTF"),
regionalMuonCollection2 = cms.InputTag("valBmtfDigis", "BMTF"),
monitorDir = cms.untracked.string("L1T2016EMU/L1TdeStage2BMTF"),
regionalMuonCollection1Title = cms.untracked.string("BMTF data"),
regionalMuonCollection2Title = cms.untracked.string("BMTF emulator"),
summaryTitle = cms.untracked.string("Summary of comparison between BMTF muons and BMTF emulator muons"),
verbose = cms.untracked.bool(False),
)

14 changes: 14 additions & 0 deletions DQM/L1TMonitor/python/L1TdeStage2EMTF_cfi.py
Expand Up @@ -8,3 +8,17 @@
verbose = cms.untracked.bool(False),
)

# compares the unpacked EMTF regional muon collection to the emulated EMTF regional muon collection
# only muons that do not match are filled in the histograms
l1tdeStage2EmtfComp = cms.EDAnalyzer(
"L1TStage2RegionalMuonCandComp",
regionalMuonCollection1 = cms.InputTag("emtfStage2Digis"),
regionalMuonCollection2 = cms.InputTag("valEmtfStage2Digis", "EMTF"),
monitorDir = cms.untracked.string("L1T2016EMU/L1TdeStage2EMTF"),
regionalMuonCollection1Title = cms.untracked.string("EMTF data"),
regionalMuonCollection2Title = cms.untracked.string("EMTF emulator"),
summaryTitle = cms.untracked.string("Summary of comparison between EMTF muons and EMTF emulator muons"),
ignoreBadTrackAddress = cms.untracked.bool(True),
verbose = cms.untracked.bool(False),
)