Skip to content

Commit

Permalink
Merge pull request #13034 from EsmaeelEskandari/esmaeel-dqm2016-stage2
Browse files Browse the repository at this point in the history
Esmaeel dqm2016 stage2
  • Loading branch information
cmsbuild committed Feb 1, 2016
2 parents cecda2a + 46e883e commit 7d2bd68
Show file tree
Hide file tree
Showing 9 changed files with 568 additions and 7 deletions.
177 changes: 177 additions & 0 deletions DQM/Integration/python/clients/l1tstage2_dqm_sourceclient-live_cfg.py
@@ -0,0 +1,177 @@
# L1 Trigger DQM sequence (L1T)
#
# authors previous versions - see CVS
#
# Esmaeel Eskandari Tadavani revised version of L1 Trigger DQM


import FWCore.ParameterSet.Config as cms

process = cms.Process("DQM")


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

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

process.load("DQM.Integration.config.environment_cfi")
process.dqmEnv.subSystemFolder = 'L1T2016'
process.dqmSaver.tag = 'L1T2016'
#
#
# references needed
#process.DQMStore.referenceFileName = "/dqmdata/dqm/reference/l1t_reference.root"

# Condition for P5 cluster
#process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
#es_prefer_GlobalTag = cms.ESPrefer('GlobalTag')
#process.GlobalTag.RefreshEachRun = cms.untracked.bool(True)

# Condition for lxplus
#process.load("DQM.Integration.config.FrontierCondition_GT_Offline_cfi")
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')
from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
process.GlobalTag.globaltag = cms.string('74X_dataRun2_HLT_v1')

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

#-------------------------------------
# sequences needed for L1 trigger DQM
#

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

# L1 Trigger sequences

# l1tMonitor and l1tMonitorEndPathSeq

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

#process.load("DQM.L1TMonitor.L1TMonitor_cff")
# L1 trigger synchronization module - it uses also HltHighLevel filter


#-------------------------------------
# paths & schedule for L1 Trigger 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.L1TMuonEmulation.remove("emptyCaloCollsProducer")
#process.emptyCaloCollsProducer.InputLabel = cms.InputTag("rawDataCollector")

# for GCT, unpack all five samples
#process.gctDigis.numberOfGctSamplesToUnpack = cms.uint32(5)

#if ( process.runType.getRunType() == process.runType.pp_run_stage1 or process.runType.getRunType() == process.runType.cosmic_run_stage1):
#process.gtDigis.DaqGtFedId = cms.untracked.int32(809)
#else:
#process.gtDigis.DaqGtFedId = cms.untracked.int32(813)

process.l1tMonitorPath = cms.Path(process.l1tStage2online)

# separate L1TSync path due to the use of the HltHighLevel filter

#process.l1tMonitorEndPath = cms.EndPath(process.l1tMonitorEndPathSeq)

process.dqmEndPath = cms.EndPath(
process.dqmEnv *
process.dqmSaver
)

process.schedule = cms.Schedule(#process.rawToDigiPath,
process.l1tMonitorPath,
#process.l1tMonitorEndPath,
process.dqmEndPath
)

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

# examples for quick fixes in case of troubles
# please do not modify the commented lines
# turn on verbosity in L1TEventInfoClient

# process.l1tEventInfoClient.verbose = cms.untracked.bool(True)

# remove module(s) or system sequence from l1tMonitorPath
# quality test disabled also

#process.l1tMonitorOnline.remove(process.bxTiming)
#process.l1tMonitorOnline.remove(process.bxTiming)
#process.l1tMonitorOnline.remove(process.l1tBPTX)
#process.l1tMonitorOnline.remove(process.l1tLtc)
#process.l1tMonitorOnline.remove(process.l1Dttf)
#process.l1tMonitorOnline.remove(process.l1tCsctf)
#process.l1tMonitorOnline.remove(process.l1tRpctf)
#process.l1tMonitorOnline.remove(process.l1tGmt)
#process.l1tMonitorOnline.remove(process.l1tGt)
#process.l1tMonitorOnline.remove(process.l1ExtraDqmSeq)
#process.l1tMonitorOnline.remove(process.l1tRate)
#process.l1tMonitorOnline.remove(process.l1tRctRun1)
#process.l1tMonitorOnline.remove(process.l1tGctSeq)

# remove module(s) or system sequence from l1tMonitorEndPath

#process.l1tMonitorEndPathSeq.remove(process.l1s)
#process.l1tMonitorEndPathSeq.remove(process.l1tscalers)
#process.schedule.remove(process.l1tSyncPath)

#--------------------------------------------------
# Heavy Ion Specific Fed Raw Data Collection Label
#--------------------------------------------------

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.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")
#process.bxTiming.FedSource = cms.untracked.InputTag("rawDataCollector")
#process.l1s.fedRawData = cms.InputTag("rawDataCollector")

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.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.bxTiming.FedSource = cms.untracked.InputTag("rawDataRepacker")
process.l1s.fedRawData = cms.InputTag("rawDataRepacker")

### process customizations included here

from DQM.Integration.config.online_customizations_cfi import *
process = customise(process)
83 changes: 83 additions & 0 deletions DQM/L1TMonitor/interface/L1TStage2BMTF.h
@@ -0,0 +1,83 @@
#ifndef DQM_L1TMonitor_L1TStage2BMTF_h
#define DQM_L1TMonitor_L1TStage2BMTF_h

/*
* \file L1TStage2BMTF.h
* \Author Esmaeel Eskandari Tadavani
*/

// system requirements
#include <iosfwd>
#include <memory>
#include <vector>
#include <string>
#include <algorithm>

// general requirements
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Run.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "DataFormats/Common/interface/OrphanHandle.h"

// stage2 requirements
#include "DataFormats/L1Trigger/interface/BXVector.h"
#include "DataFormats/L1Trigger/interface/Muon.h"
#include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"

// dqm requirements
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"


// class decleration

class L1TStage2BMTF: public DQMEDAnalyzer {

public:

// class constructor
L1TStage2BMTF(const edm::ParameterSet & ps);
// class destructor
virtual ~L1TStage2BMTF();

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

// data members
private:
// enum ensubs {BMTF, OMTF, EMTF, mGMT};

std::string monitorDir;
edm::InputTag stage2bmtfSource ;
bool verbose ;
edm::EDGetToken stage2bmtfToken ;


MonitorElement* eta_bmtf;
MonitorElement* phi_bmtf;
MonitorElement* pt_bmtf;
MonitorElement* bx_bmtf;
MonitorElement* etaVSphi_bmtf;
MonitorElement* phiVSpt_bmtf;
MonitorElement* etaVSpt_bmtf;
MonitorElement* etaVSbx_bmtf;
MonitorElement* phiVSbx_bmtf;
MonitorElement* ptVSbx_bmtf;


};

#endif
94 changes: 94 additions & 0 deletions DQM/L1TMonitor/interface/L1TStage2mGMT.h
@@ -0,0 +1,94 @@
#ifndef DQM_L1TMonitor_L1TStage2mGMT_h
#define DQM_L1TMonitor_L1TStage2mGMT_h

/*
* \file L1TStage2mGMT.h
* \Author Esmaeel Eskandari Tadavani
*/

// system requirements
#include <iosfwd>
#include <memory>
#include <vector>
#include <string>
#include <algorithm>

// general requirements
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Run.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "DataFormats/Common/interface/OrphanHandle.h"

// stage2 requirements
#include "DataFormats/L1Trigger/interface/BXVector.h"
#include "DataFormats/L1Trigger/interface/Muon.h"
#include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"

// dqm requirements
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

// class decleration

class L1TStage2mGMT: public DQMEDAnalyzer {

public:

// class constructor
L1TStage2mGMT(const edm::ParameterSet & ps);

// class destructor
virtual ~L1TStage2mGMT();

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

// data members
private:

std::string monitorDir;
edm::InputTag stage2mgmtSource ;
bool verbose ;
edm::EDGetToken stage2mgmtToken ;

MonitorElement* eta_mgmt;
MonitorElement* phi_mgmt;
MonitorElement* pt_mgmt;
MonitorElement* charge_mgmt;
MonitorElement* chargeVal_mgmt;
MonitorElement* qual_mgmt;
MonitorElement* iso_mgmt;

MonitorElement* bx_mgmt;

MonitorElement* etaVSbx_mgmt;
MonitorElement* phiVSbx_mgmt;
MonitorElement* ptVSbx_mgmt;
MonitorElement* chargeVSbx_mgmt;
MonitorElement* chargeValVSbx_mgmt;
MonitorElement* qualVSbx_mgmt;
MonitorElement* isoVSbx_mgmt;

MonitorElement* etaVSphi_mgmt;
MonitorElement* phiVSpt_mgmt;
MonitorElement* etaVSpt_mgmt;




};

#endif
8 changes: 8 additions & 0 deletions DQM/L1TMonitor/python/L1TStage2BMTF_cfi.py
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

l1tStage2BMTF = cms.EDAnalyzer("L1TStage2BMTF",
verbose = cms.untracked.bool(False),
stage2bmtfSource = cms.InputTag("bmtfDigis"),
DQMStore = cms.untracked.bool(True),
monitorDir = cms.untracked.string("L1T2016/L1TStage2BMTF")
)
9 changes: 9 additions & 0 deletions DQM/L1TMonitor/python/L1TStage2_cff.py
@@ -0,0 +1,9 @@
import FWCore.ParameterSet.Config as cms

from DQM.L1TMonitor.L1TStage2mGMT_cfi import *

from EventFilter.L1TRawToDigi.gmtStage2Digis_cfi import *

l1tStage2online = cms.Sequence(
l1tStage2mGMT
)
8 changes: 8 additions & 0 deletions DQM/L1TMonitor/python/L1TStage2mGMT_cfi.py
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

l1tStage2mGMT = cms.EDAnalyzer("L1TStage2mGMT",
verbose = cms.untracked.bool(False),
stage2mgmtSource = cms.InputTag("gmtStage2Digis"),
DQMStore = cms.untracked.bool(True),
monitorDir = cms.untracked.string("L1T2016/L1TStage2mGMT")
)

0 comments on commit 7d2bd68

Please sign in to comment.