diff --git a/DQM/Integration/python/test/pixellumi_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/test/pixellumi_dqm_sourceclient-live_cfg.py
old mode 100644
new mode 100755
index 8a058958cda44..65cbf8d45908c
--- a/DQM/Integration/python/test/pixellumi_dqm_sourceclient-live_cfg.py
+++ b/DQM/Integration/python/test/pixellumi_dqm_sourceclient-live_cfg.py
@@ -1,191 +1,125 @@
-######################################################################
-## File: pixellumidqm_live_cfg.py
-##
-## Unpacks AlCaLumiPixels, then runs some basic selection,
-## followed by the PixelLumi Calculation, separately for the three trigger types.
-## NB: only one, ZeroBias trigger, used for now.
-## Bug Adder: Amita Raval
-######################################################################
import FWCore.ParameterSet.Config as cms
-import os
-
-#####################
-# Configurable pieces
-#####################
process = cms.Process("PixelLumiDQM")
-#-------------------------------
-# Import standard configurations
-#-------------------------------
-process.load('Configuration.StandardSequences.Services_cff')
-#process.load('Configuration.EventContent.EventContent_cff')
-process.load('FWCore.MessageService.MessageLogger_cfi')
-#process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
+process.MessageLogger = cms.Service("MessageLogger",
+ debugModules = cms.untracked.vstring('siPixelDigis',
+ 'sipixelEDAClient'),
+ cout = cms.untracked.PSet(threshold = cms.untracked.string('ERROR')),
+ destinations = cms.untracked.vstring('cout')
+)
+
+#----------------------------
+# 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")
-#---------------
+#----------------------------
+# DQM Live Environment
+#-----------------------------
+process.load("DQM.Integration.test.environment_cfi")
+process.dqmEnv.subSystemFolder = "PixelLumi"
+# for local running
+process.dqmSaver.dirName = '.'
+
+process.source.SelectEvents = cms.untracked.vstring("HLT_ZeroBias*")
+#process.DQMStore.referenceFileName = '/dqmdata/dqm/reference/pixel_reference_pp.root'
+#if (process.runType.getRunType() == process.runType.hi_run):
+# process.DQMStore.referenceFileName = '/dqmdata/dqm/reference/pixel_reference_hi.root'
+
+if (process.runType.getRunType() == process.runType.cosmic_run):
+ process.source.SelectEvents = cms.untracked.vstring('HLT*SingleMu*')
+
+#----------------------------
# Magnetic Field
-#---------------
+#-----------------------------
+# 3.8T field
process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
-#process.load('Configuration.StandardSequences.MagneticField_38T_cff')
-#---------
+#-------------------------------------------------
# GEOMETRY
-#---------
+#-------------------------------------------------
process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
-#----------
+#-------------------------------------------------
# GLOBALTAG
-#----------
+#-------------------------------------------------
# Condition for P5 cluster
process.load("DQM.Integration.test.FrontierCondition_GT_cfi")
# Condition for lxplus
#process.load("DQM.Integration.test.FrontierCondition_GT_Offline_cfi")
-#----------------
-# DQM Environment
-#----------------
-process.load("DQMServices.Components.DQMEnvironment_cfi")
-
-#-----------------------------------------------------------------------------
-# DQM Live Environment (for integration, replace with standard for deployment)
-#-----------------------------------------------------------------------------
-process.load("DQM.Integration.test.environment_cfi")
-process.dqmEnv.subSystemFolder = "PixelLumi"
-process.dqmSaver.dirName = '.'
-#------------------------
+#-----------------------
# Reconstruction Modules
-#------------------------
-# Replace the whole reco config with just the local pixel reco
-#-------------------------------------------------------------
-#process.load('Configuration.StandardSequences.Reconstruction_cff')
-#process.load("Configuration.StandardSequences.ReconstructionCosmics_cff")
-#process.load("RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi")
-#process.load("RecoLocalTracker.SiPixelRecHits.PixelCPEESProducers_cff")
+#-----------------------
+# Real data raw to digi
+process.load("EventFilter.SiPixelRawToDigi.SiPixelRawToDigi_cfi")
+process.siPixelDigis.IncludeErrors = True
+
+# Local Reconstruction
process.load("RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi")
+#----------------------------------
+# High Pileup Configuration Changes
+#----------------------------------
+#if (process.runType.getRunType() == process.runType.hpu_run):
+# process.DQMEventStreamHttpReader.SelectEvents = cms.untracked.PSet(
+# SelectEvents = cms.vstring('HLT_600Tower*','HLT_L1*','HLT_Jet*','HLT_*Cosmic*','HLT_HT*','HLT_MinBias_*','HLT_Physics*', 'HLT_ZeroBias*','HLT_HcalNZS*'))
+
+
+process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector")
#--------------------------------
-# Data - raw to digi; just pixels
+# Heavy Ion Configuration Changes
#--------------------------------
-#process.load("Configuration.StandardSequences.RawToDigi_cff")
-#process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
-#process.load('Configuration.StandardSequences.EndOfProcess_cff')
-process.load("EventFilter.SiPixelRawToDigi.SiPixelRawToDigi_cfi")
-process.siPixelDigis.InputLabel = 'source'
-process.siPixelDigis.IncludeErrors = True
+if (process.runType.getRunType() == process.runType.hi_run):
+ process.load('Configuration.StandardSequences.RawToDigi_Repacked_cff')
+ process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker")
+# process.DQMEventStreamHttpReader.SelectEvents = cms.untracked.PSet(
+# SelectEvents = cms.vstring('HLT_HI*'))
+
+#--------------------------
+# Pixel DQM Source and Client
+#----------------------
+process.load("DQM.PixelLumi.PixelLumiDQM_cfi")
+
+process.dqmSaver.producer = "Playback"
-#--------
-# Filters
-#--------
-# HLT Filters: trigger path filters for 3 triggers in the AlCaLumi stream
-# NB: Only ZeroBiasSelector_cfi being used for now
-process.load("DQM.PixelLumi.ZeroBiasSelector_cfi")
-process.load("DQM.PixelLumi.AlCaLumiPixelsZeroBiasSelector_cfi")
-process.load("DQM.PixelLumi.RandomTriggerSelector_cfi")
-
-# Make three instances of pixel_lumi_dqm; only 1 being used for now
-#------------------------------------------------------------------
-from DQM.PixelLumi.PixelLumiDQM_cfi import pixel_lumi_dqm
-
-process.PixelLumiDqmAlcaLumiPixel = pixel_lumi_dqm
-
-process.PixelLumiDqmZeroBias = pixel_lumi_dqm.clone(
- resetEveryNLumiSections=cms.untracked.int32(1),
- logFileName = cms.untracked.string("/nfshome0/dqmdev/pixel_lumi.txt")
- )
if process.dqmSaver.producer.value() is "Playback":
- process.PixelLumiDqmZeroBias.logFileName = cms.untracked.string("/nfshome0/dqmdev/pixel_lumi.txt")
+ process.pixel_lumi_dqm.logFileName = cms.untracked.string("pixel_lumi.txt")
else:
- process.PixelLumiDqmZeroBias.logFileName = cms.untracked.string("/nfshome0/dqmpro/pixel_lumi.txt")
+ process.pixel_lumi_dqm.logFileName = cms.untracked.string("/nfshome0/dqmpro/pixel_lumi.txt")
+print process.pixel_lumi_dqm.logFileName
-process.PixelLumiDqmRandom = pixel_lumi_dqm.clone(
- resetEveryNLumiSections=cms.untracked.int32(20)
- )
+#--------------------------
+# Service
+#--------------------------
+process.AdaptorConfig = cms.Service("AdaptorConfig")
-process.PixelLumiDqmHFGetter = cms.EDAnalyzer("HFLumiGetter")
+#--------------------------
+# Filters
+#--------------------------
-#----------------
-# Lumi from "DIP"
-#-------------------------------------------------
-# process.DBService=cms.Service('DBService',
-# authPath= cms.untracked.string('/nfshome0/centraltspro/secure/')
-# )
-process.GlobalTag.DBParameters.authenticationPath = cms.untracked.string('/nfshome0/centraltspro/secure/')
-# process.DIPLumiProducer=cms.ESSource("DIPLumiProducer",
-# connect=cms.string('oracle://cms_omds_lb/CMS_RUNTIME_LOGGER')
-# #Zhen recommends:
-# # connect=cms.string('oracle://cms_orcon_prod/cms_lumi_prod')
-# # crashes at end of lumisection
-# )
-
-process.options = cms.untracked.PSet(
- wantSummary = cms.untracked.bool(True)
- )
-process.MessageLogger.cerr.threshold = cms.untracked.string("INFO")
-process.MessageLogger.cerr.INFO.limit = cms.untracked.int32(-1)
-process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(100)
-
-#-------------
-# Input Source
-#-------------
-process.load("DQM.Integration.test.inputsource_cfi")
-#process.DQMEventStreamHttpReader.consumerName = 'DQM Pixel Luminosity Consumer'
-#process.DQMEventStreamHttpReader.SelectHLTOutput = cms.untracked.string('hltOutputALCALUMIPIXELS')
-#process.DQMEventStreamHttpReader.maxEventRequestRate = cms.untracked.double(200.0)
-#process.DQMEventStreamHttpReader.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('AlCa_LumiPixels_ZeroBias_v*'))
-
-
-# Only unpack pixel data; there is nothing else, really.
-process.MyRawToDigi = cms.Sequence(process.siPixelDigis)
-# Change this to test without stable beams
-process.siPixelDigis.InputLabel = cms.InputTag("hltFEDSelectorLumiPixels")
-#process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector")
-
-# Only reconstruct the pixel clusters.
-process.MyReconstruction = cms.Sequence(process.siPixelClusters)
-process.reconstruction_step = cms.Path(process.MyReconstruction)
-
-#-------------
-# DQM services
-#-------------
-process.dqm_step = cms.Path(process.dqmEnv*process.dqmSaver)
-
-# Lumi DQM settings. These are from J's code, now default in the _cfi for PixelLumiDQM.
-#process.pixel_lumi_tupler.includeVertexInfo = cms.untracked.bool(False)
-#process.pixel_lumi_tupler.includeTrackInfo = cms.untracked.bool(False)
-#process.pixel_lumi_tupler.includeStripClusterInfo = cms.untracked.bool(False)
-
-#-------------------------------
-# Path and schedule definitions.
-#-------------------------------
-process.raw2digi_step = cms.Path(process.MyRawToDigi)
-process.HF = cms.Path(process.PixelLumiDqmHFGetter)
-#process.plumdqm_alca_lumipixel_step = cms.Path(process.alca_lumi_pixels_zerobias_selector*
-# process.PixelLumiDqmAlcaLumiPixel)
-process.plumdqm_alca_zerobias_step = cms.Path(
- #process.scraping_filter * # this seems to need tracks so cannot be used
- process.zerobias_selector *
- process.PixelLumiDqmZeroBias)
-#
-#process.plumdqm_alca_random_step = cms.Path(
-# process.scraping_filter * # this seems to need tracks so cannot be used
-# process.random_trigger_selector *
-# process.PixelLumiDqmRandom)
-
-#--------------------
-# Schedule definition
-#--------------------
-process.schedule = cms.Schedule(process.raw2digi_step,
- process.reconstruction_step,
-# process.HF,
- process.plumdqm_alca_zerobias_step,
- #process.plumdqm_alca_random_step,
- process.dqm_step)
+#--------------------------
+# Scheduling
+#--------------------------
+process.Reco = cms.Sequence(process.siPixelDigis*process.siPixelClusters)
+process.DQMmodules = cms.Sequence(process.dqmEnv*
+ process.pixel_lumi_dqm*
+ process.dqmSaver)
+process.p = cms.Path(process.Reco*process.DQMmodules)
### process customizations included here
from DQM.Integration.test.online_customizations_cfi import *
process = customise(process)
-
-######################################################################
diff --git a/DQM/PixelLumi/plugins/BuildFile.xml b/DQM/PixelLumi/plugins/BuildFile.xml
new file mode 100755
index 0000000000000..370ebd11f3f8c
--- /dev/null
+++ b/DQM/PixelLumi/plugins/BuildFile.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DQM/PixelLumi/plugins/PixelLumiDQM.cc b/DQM/PixelLumi/plugins/PixelLumiDQM.cc
new file mode 100755
index 0000000000000..b6ce829c280ff
--- /dev/null
+++ b/DQM/PixelLumi/plugins/PixelLumiDQM.cc
@@ -0,0 +1,731 @@
+// -*- C++ -*-
+
+// Package: PixelLumiDQM
+// Class: PixelLumiDQM
+
+// Author: Amita Raval
+// Based on Jeroen Hegeman's code for Pixel Cluster Count Luminosity
+
+#include "PixelLumiDQM.h"
+
+#include "DataFormats/Common/interface/Handle.h"
+#include "DataFormats/DetId/interface/DetId.h"
+#include "DataFormats/GeometryVector/interface/Pi.h"
+#include "DataFormats/GeometryVector/interface/LocalPoint.h"
+#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
+#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
+#include "DataFormats/SiPixelDetId/interface/PixelBarrelName.h"
+#include "DataFormats/SiPixelDetId/interface/PixelEndcapName.h"
+#include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
+#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
+#include "DQMServices/Core/interface/DQMStore.h"
+#include "DQMServices/Core/interface/MonitorElement.h"
+#include "FWCore/Framework/interface/ESHandle.h"
+#include "FWCore/Framework/interface/Event.h"
+#include "FWCore/Framework/interface/EventSetup.h"
+#include "FWCore/Framework/interface/LuminosityBlock.h"
+#include "FWCore/Framework/interface/MakerMacros.h"
+#include "FWCore/Framework/interface/Run.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/MessageLogger/interface/MessageLogger.h"
+#include "FWCore/ServiceRegistry/interface/Service.h"
+#include "FWCore/Utilities/interface/EDMException.h"
+#include "Geometry/CommonTopologies/interface/PixelTopology.h"
+#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
+#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
+#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
+
+#include
+#include