Skip to content

Commit

Permalink
Merge pull request #9143 from jingyucms/jingyu-5-17-dqm
Browse files Browse the repository at this point in the history
run stage1 emulator for l1t dqm 75x
  • Loading branch information
cmsbuild committed May 27, 2015
2 parents ba47d27 + 223b294 commit 549467b
Show file tree
Hide file tree
Showing 19 changed files with 1,263 additions and 342 deletions.
@@ -0,0 +1,235 @@
# L1 Emulator DQM sequence
#
# authors previous versions - see CVS
#
# V.M. Ghete 2010-10-22 revised version of L1 emulator DQM


import FWCore.ParameterSet.Config as cms

process = cms.Process("L1TEmuDQMlive")


#----------------------------
# Event Source
#
# for live online DQM in P5
process.load("DQM.Integration.test.inputsource_cfi")
#
# for testing in lxplus
#process.load("DQM.Integration.test.fileinputsource_cfi")

#----------------------------
# DQM Environment
#

#

process.load("DQMServices.Components.DQMEnvironment_cfi")
process.dqmEnv.subSystemFolder = 'L1TEMUStage1'

#
process.load("DQM.Integration.test.environment_cfi")
# for local test
process.dqmSaver.dirName = '.'
#
# no references needed
# replace DQMStore.referenceFileName = "L1TEMU_reference.root"

#
# Condition for P5 cluster
process.load("DQM.Integration.test.FrontierCondition_GT_cfi")
process.GlobalTag.RefreshEachRun = cms.untracked.bool(True)
# Condition for lxplus
#process.load("DQM.Integration.test.FrontierCondition_GT_Offline_cfi")

#process.load("Configuration.StandardSequences.GeometryRecoDB_cff")

process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
#-------------------------------------
# sequences needed for L1 emulator DQM
#

# standard unpacking sequence
process.load("Configuration.StandardSequences.RawToDigi_Data_cff")

# L1 data - emulator sequences
process.load("DQM.L1TMonitor.L1TEmulatorMonitor_cff")
process.load("DQM.L1TMonitorClient.L1TEMUMonitorClient_cff")
process.load("L1Trigger.L1TCalorimeter.caloStage1Params_cfi")

#-------------------------------------
# paths & schedule for L1 emulator DQM
#

# TODO define a L1 trigger L1TriggerRawToDigi in the standard sequence
# to avoid all these remove
process.rawToDigiPath = cms.Path(process.RawToDigi)
#
process.RawToDigi.remove("siPixelDigis")
process.RawToDigi.remove("siStripDigis")
process.RawToDigi.remove("scalersRawToDigi")
process.RawToDigi.remove("castorDigis")

process.gtDigis.DaqGtFedId = cms.untracked.int32(809)

# L1HvVal + emulator monitoring path
process.l1HwValEmulatorMonitorPath = cms.Path(process.l1Stage1HwValEmulatorMonitor)

# for RCT at P5, read FED vector from OMDS
#process.load("L1TriggerConfig.RCTConfigProducers.l1RCTOmdsFedVectorProducer_cfi")
#process.valRctDigis.getFedsFromOmds = cms.bool(True)

#
process.l1EmulatorMonitorClientPath = cms.Path(process.l1EmulatorMonitorClient)

#
process.l1EmulatorMonitorEndPath = cms.EndPath(process.dqmEnv*process.dqmSaver)

#

#
process.schedule = cms.Schedule(process.rawToDigiPath,
process.l1HwValEmulatorMonitorPath,
#process.l1EmulatorMonitorClientPath,
process.l1EmulatorMonitorEndPath)

#---------------------------------------------

# examples for quick fixes in case of troubles
# please do not modify the commented lines
#
# remove a module from hardware validation
# cff file: L1Trigger.HardwareValidation.L1HardwareValidation_cff
#
# process.L1HardwareValidation.remove(process.deCsctf)
#
process.L1HardwareValidation.remove(process.deDt)


#
# remove a L1 trigger system from the comparator integrated in hardware validation
# cfi file: L1Trigger.HardwareValidation.L1Comparator_cfi
#
#process.l1compare.COMPARE_COLLS = [0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0]
#

process.l1compareforstage1.COMPARE_COLLS = [
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
]

process.l1demonstage1.COMPARE_COLLS = [
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
]
#ETP,HTP,RCT,GCT, DTP,DTF,CTP,CTF,RPC,LTC,GMT,GT


#
# remove an expert module for L1 trigger system
# cff file: DQM.L1TMonitor.L1TEmulatorMonitor_cff
#
# process.l1ExpertDataVsEmulator.remove(process.l1GtHwValidation)
#

process.l1ExpertDataVsEmulatorStage1.remove(process.l1TdeCSCTF)

process.l1ExpertDataVsEmulatorStage1.remove(process.l1TdeRCT)

process.l1demonstage1.HistFolder = cms.untracked.string('L1TEMUStage1')

process.l1TdeStage1Layer2.HistFolder = cms.untracked.string('L1TEMUStage1/Stage1Layer2expert')

process.l1Stage1GtHwValidation.DirName = cms.untracked.string("L1TEMUStage1/GTexpert")

#
# remove a module / sequence from l1EmulatorMonitorClient
# cff file: DQM.L1TMonitorClient.L1TEmulatorMonitorClient_cff
#
# process.l1EmulatorMonitorClient.remove(process.l1EmulatorErrorFlagClient)
#


#
# fast over-mask a system in L1TEMUEventInfoClient:
# if the name of the system is in the list, the system will be masked
# (the default mask value is given in L1Systems VPSet)
#
# names are case sensitive, order is irrelevant
# "ECAL", "HCAL", "RCT", "GCT", "DTTF", "DTTPG", "CSCTF", "CSCTPG", "RPC", "GMT", "GT"
#
# process.l1temuEventInfoClient.DisableL1Systems = cms.vstring("ECAL")
#


#
# fast over-mask an object in L1TEMUEventInfoClient:
# if the name of the object is in the list, the object will be masked
# (the default mask value is given in L1Objects VPSet)
#
# names are case sensitive, order is irrelevant
#
# "Mu", "NoIsoEG", "IsoEG", "CenJet", "ForJet", "TauJet", "ETM", "ETT", "HTT", "HTM",
# "HfBitCounts", "HfRingEtSums", "TechTrig", "GtExternal
#
# process.l1temuEventInfoClient.DisableL1Objects = cms.vstring("ETM")
#


#
# turn on verbosity in L1TEMUEventInfoClient
#
# process.l1EmulatorEventInfoClient.verbose = cms.untracked.bool(True)

# un-comment next lines in case you use the file for private tests on the playback server
# see https://twiki.cern.ch/twiki/bin/view/CMS/DQMTest for instructions
#
#process.dqmSaver.dirName = '.'
#process.dqmSaver.saveByRun = 1
#process.dqmSaver.saveAtJobEnd = True

print "Running with run type = ", process.runType.getRunType()
process.castorDigis.InputLabel = cms.InputTag("rawDataCollector")
process.csctfDigis.producer = cms.InputTag("rawDataCollector")
process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataCollector")
process.ecalDigis.InputLabel = cms.InputTag("rawDataCollector")
process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataCollector")
process.gctDigis.inputLabel = cms.InputTag("rawDataCollector")
process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataCollector")
process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataCollector")
process.hcalDigis.InputLabel = cms.InputTag("rawDataCollector")
process.l1compare.FEDsourceEmul = cms.untracked.InputTag("rawDataCollector")
process.l1compare.FEDsourceData = cms.untracked.InputTag("rawDataCollector")
process.muonCSCDigis.InputObjects = cms.InputTag("rawDataCollector")
process.muonDTDigis.inputLabel = cms.InputTag("rawDataCollector")
process.muonRPCDigis.InputLabel = cms.InputTag("rawDataCollector")
process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataCollector")
process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector")
process.siStripDigis.ProductLabel = cms.InputTag("rawDataCollector")

#--------------------------------------------------
# Heavy Ion Specific Fed Raw Data Collection Label
#--------------------------------------------------
if (process.runType.getRunType() == process.runType.hi_run):
process.castorDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.csctfDigis.producer = cms.InputTag("rawDataRepacker")
process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataRepacker")
process.ecalDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataRepacker")
process.gctDigis.inputLabel = cms.InputTag("rawDataRepacker")
process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataRepacker")
process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataRepacker")
process.hcalDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.l1compare.FEDsourceEmul = cms.untracked.InputTag("rawDataRepacker")
process.l1compare.FEDsourceData = cms.untracked.InputTag("rawDataRepacker")
process.muonCSCDigis.InputObjects = cms.InputTag("rawDataRepacker")
process.muonDTDigis.inputLabel = cms.InputTag("rawDataRepacker")
process.muonRPCDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataRepacker")
process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker")



### process customizations included here
from DQM.Integration.test.online_customizations_cfi import *
process = customise(process)
30 changes: 25 additions & 5 deletions DQM/L1TMonitor/interface/L1TdeGCT.h
Expand Up @@ -56,36 +56,42 @@ class L1TdeGCT : public DQMEDAnalyzer {
// dqm histogram folder
std::string histFolder_;

bool m_stage1_layer2_;

// dqm common
bool monitorDaemon_;

// (em) iso, no-iso, (jets) cen, for, tau & energy sums.
static const int nGctColl_ = dedefs::GCThfbit-dedefs::GCTisolaem+1;
static const int nGctColl_ = dedefs::GCThfbit-dedefs::GCTisolaem+1;
static const int nStage1Layer2Coll_ = dedefs::GCTisotaujets-dedefs::GCTisolaem+1;

// counters
int colCount[nGctColl_];
int nWithCol[nGctColl_];

int colCount_stage1Layer2[nStage1Layer2Coll_];
int nWithCol_stage1Layer2[nStage1Layer2Coll_];

// Ranges and labels
const int phiNBins = 18 ;
const double phiMinim = -0.5;
const double phiMaxim = 17.5;
const int etaNBins = 22 ;
const double etaMinim = -0.5;
const double etaMaxim = 21.5;
const int rnkNBins = 63;
const double rnkMinim = 0.5;
const double rnkMaxim = 63.5;
static const int nerr = 5;
const int nbit = 32;
std::string cLabel[nGctColl_]=
{"IsoEM", "NoisoEM", "CenJet", "ForJet", "TauJet", "HT", "MET", "ET", "MHT", "HFSums", "HFCnts"};
std::string sLabel[nStage1Layer2Coll_]=
{"IsoEM", "NoisoEM", "CenJet", "ForJet", "TauJet", "HT", "MET", "ET", "MHT", "Stage1HFSums", "HFCnts", "IsoTauJet"};
std::string errLabel[nerr]=
{"Agree", "Loc. Agree", "L.Disagree", "Data only", "Emul only"};

// MEs
MonitorElement* sysrates;
MonitorElement* sysncand[2];

MonitorElement* errortype[nGctColl_];
// location
MonitorElement* etaphi [nGctColl_];
Expand All @@ -96,12 +102,26 @@ class L1TdeGCT : public DQMEDAnalyzer {
MonitorElement* phiData[nGctColl_];
MonitorElement* rnkData[nGctColl_];

MonitorElement* errortype_stage1layer2[nStage1Layer2Coll_];
// location
MonitorElement* etaphi_stage1layer2 [nStage1Layer2Coll_];
MonitorElement* eta_stage1layer2 [nStage1Layer2Coll_];
MonitorElement* phi_stage1layer2 [nStage1Layer2Coll_];
MonitorElement* rnk_stage1layer2 [nStage1Layer2Coll_];
MonitorElement* etaData_stage1layer2[nStage1Layer2Coll_];
MonitorElement* phiData_stage1layer2[nStage1Layer2Coll_];
MonitorElement* rnkData_stage1layer2[nStage1Layer2Coll_];

// trigger data word

MonitorElement* dword [nGctColl_];
MonitorElement* eword [nGctColl_];
MonitorElement* deword[nGctColl_];
MonitorElement* masked[nGctColl_];

MonitorElement* dword_stage1layer2 [nStage1Layer2Coll_];
MonitorElement* eword_stage1layer2 [nStage1Layer2Coll_];
MonitorElement* deword_stage1layer2[nStage1Layer2Coll_];
MonitorElement* masked_stage1layer2[nStage1Layer2Coll_];
public:

};
Expand Down
1 change: 1 addition & 0 deletions DQM/L1TMonitor/python/L1GtHwValidation_cff.py
Expand Up @@ -2,3 +2,4 @@

from DQM.L1TMonitor.l1GtHwValidation_cfi import *

from DQM.L1TMonitor.l1Stage1GtHwValidation_cfi import *
17 changes: 17 additions & 0 deletions DQM/L1TMonitor/python/L1TDEMONStage1_cfi.py
@@ -0,0 +1,17 @@
import FWCore.ParameterSet.Config as cms

l1demonstage1 = cms.EDAnalyzer("L1TDEMON",
HistFolder = cms.untracked.string('L1TEMU'),
HistFile = cms.untracked.string('l1demon.root'),
disableROOToutput = cms.untracked.bool(True),
DataEmulCompareSource = cms.InputTag("l1compareforstage1"),
VerboseFlag = cms.untracked.int32(0),
RunInFilterFarm = cms.untracked.bool(False),
COMPARE_COLLS = cms.untracked.vuint32(
0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0
# ETP,HTP,RCT,GCT,DTP,DTF,CTP,CTF,RPC,LTC,GMT,GT
)
)



1 change: 0 additions & 1 deletion DQM/L1TMonitor/python/L1TDEMON_cfi.py
Expand Up @@ -5,7 +5,6 @@
HistFile = cms.untracked.string('l1demon.root'),
disableROOToutput = cms.untracked.bool(True),
DataEmulCompareSource = cms.InputTag("l1compare"),
DQMStore = cms.untracked.bool(True),
VerboseFlag = cms.untracked.int32(0),
RunInFilterFarm = cms.untracked.bool(False),
COMPARE_COLLS = cms.untracked.vuint32(
Expand Down

0 comments on commit 549467b

Please sign in to comment.