Skip to content

Commit

Permalink
Merge pull request #13417 from slava77/CMSSW_8_0_0/sign670/dpEras
Browse files Browse the repository at this point in the history
 era-aware T0 data processing setup
  • Loading branch information
davidlange6 committed Feb 22, 2016
2 parents 78c77d3 + 0a11e49 commit 5bc8f67
Show file tree
Hide file tree
Showing 40 changed files with 587 additions and 341 deletions.
9 changes: 6 additions & 3 deletions Configuration/DataProcessing/python/Impl/AlCa.py
Expand Up @@ -14,6 +14,9 @@
import FWCore.ParameterSet.Config as cms

class AlCa(Scenario):
def __init__(self):
Scenario.__init__(self)

"""
_AlCa_
Expand All @@ -37,7 +40,7 @@ def promptReco(self, globalTag, **args):
dictIO(options,args)
options.conditions = gtNameAndConnect(globalTag, args)

process = cms.Process('RECO')
process = cms.Process('RECO', self.eras)
cb = ConfigBuilder(options, process = process, with_output = True)

# Input source
Expand Down Expand Up @@ -65,7 +68,7 @@ def alcaSkim(self, skims, **args):

options.triggerResultsProcess = 'RECO'

process = cms.Process('ALCA')
process = cms.Process('ALCA', self.eras)
cb = ConfigBuilder(options, process = process)

# Input source
Expand All @@ -92,7 +95,7 @@ def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
options.name = "EDMtoMEConvert"
options.conditions = gtNameAndConnect(globalTag, args)

process = cms.Process("HARVESTING")
process = cms.Process("HARVESTING", self.eras)
process.source = dqmIOSource(args)
configBuilder = ConfigBuilder(options, process = process)
configBuilder.prepare()
Expand Down
1 change: 1 addition & 0 deletions Configuration/DataProcessing/python/Impl/AlCaLumiPixels.py
Expand Up @@ -10,6 +10,7 @@

class AlCaLumiPixels(AlCa):
def __init__(self):
AlCa.__init__(self)
self.skims=['LumiPixels']
"""
_AlCaLumiPixels_
Expand Down
1 change: 1 addition & 0 deletions Configuration/DataProcessing/python/Impl/AlCaP0.py
Expand Up @@ -10,6 +10,7 @@

class AlCaP0(AlCa):
def __init__(self):
AlCa.__init__(self)
self.skims=['@AlCaP0']
"""
_AlCaP0_
Expand Down
1 change: 1 addition & 0 deletions Configuration/DataProcessing/python/Impl/AlCaPhiSymEcal.py
Expand Up @@ -10,6 +10,7 @@

class AlCaPhiSymEcal(AlCa):
def __init__(self):
AlCa.__init__(self)
self.skims=['@AlCaPhiSym']
"""
_AlCaPhiSymEcal_
Expand Down
1 change: 1 addition & 0 deletions Configuration/DataProcessing/python/Impl/AlCaTestEnable.py
Expand Up @@ -10,6 +10,7 @@

class AlCaTestEnable(AlCa):
def __init__(self):
AlCa.__init__(self)
self.skims=['TkAlLAS']
"""
_AlCaTestEnable_
Expand Down
6 changes: 4 additions & 2 deletions Configuration/DataProcessing/python/Impl/DataScouting.py
Expand Up @@ -16,6 +16,8 @@
from Configuration.DataProcessing.RecoTLR import customisePrompt,customiseExpress

class DataScouting(Scenario):
def __init__(self):
Scenario.__init__(self)
"""
_DataScouting_
Expand All @@ -40,7 +42,7 @@ def promptReco(self, globalTag, **args):
dictIO(options,args)
options.conditions = gtNameAndConnect(globalTag, args)

process = cms.Process('DataScouting')
process = cms.Process('DataScouting', self.eras)
cb = ConfigBuilder(options, process = process, with_output = True)

# Input source
Expand All @@ -64,7 +66,7 @@ def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
options.name = "EDMtoMEConvert"
options.conditions = gtNameAndConnect(globalTag, args)

process = cms.Process("HARVESTING")
process = cms.Process("HARVESTING", self.eras)
process.source = dqmIOSource(args)
configBuilder = ConfigBuilder(options, process = process)
configBuilder.prepare()
Expand Down
234 changes: 62 additions & 172 deletions Configuration/DataProcessing/python/Impl/HeavyIons.py
Expand Up @@ -2,230 +2,120 @@
"""
_HeavyIons_
Scenario supporting heavy-ion collisions
Scenario supporting heavy ions collisions
"""

import os
import sys

from Configuration.DataProcessing.Scenario import *
from Configuration.DataProcessing.Utils import stepALCAPRODUCER,addMonitoring,dictIO,dqmIOSource
from Configuration.DataProcessing.Reco import Reco
import FWCore.ParameterSet.Config as cms
from Configuration.DataProcessing.RecoTLR import customisePromptHI,customiseExpressHI

class HeavyIons(Scenario):
class HeavyIons(Reco):
def __init__(self):
Reco.__init__(self)
self.recoSeq=''
self.cbSc='HeavyIons'
self.promptCustoms='Configuration/DataProcessing/RecoTLR.customisePromptHI'
self.expressCustoms='Configuration/DataProcessing/RecoTLR.customiseExpressHI'
self.visCustoms='Configuration/DataProcessing/RecoTLR.customiseExpressHI'
"""
_HeavyIons_
Implement configuration building for data processing for
heavy-ion collision data taking
Implement configuration building for data processing for Heavy Ions
collision data taking
"""

def _checkMINIAOD(self,**args):
if 'outputs' in args:
for a in args['outputs']:
if a['dataTier'] == 'MINIAOD':
raise RuntimeError("MINIAOD is not supported in HeavyIons")


def _setRepackedFlag(self,args):
if not 'repacked' in args:
args['repacked']= True

def promptReco(self, globalTag, **args):
"""
_promptReco_
Heavy-ion collision data taking prompt reco
Heavy ions collision data taking prompt reco
"""
self._checkMINIAOD(**args)
self._setRepackedFlag(args)

skims = ['SiStripCalZeroBias',
'SiStripCalMinBias',
'TkAlMinBiasHI',
'HcalCalMinBias',
'DtCalibHI']
step = stepALCAPRODUCER(skims)
options = Options()
options.__dict__.update(defaultOptions.__dict__)
options.scenario = "HeavyIons"
options.step = 'RAW2DIGI,L1Reco,RECO'+step+',DQM,ENDJOB'
options.isRepacked = True
dictIO(options,args)
options.conditions = globalTag

process = cms.Process('RECO')
cb = ConfigBuilder(options, process = process, with_output=True)
if not 'skims' in args:
args['skims']=['@allForPrompt']

# Input source
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring()
)
cb.prepare()
if not 'customs' in args:
args['customs']=[ ]

args['customs'].append(self.promptCustoms)

process = Reco.promptReco(self,globalTag, **args)

customisePromptHI(process)
addMonitoring(process)

return process


def expressProcessing(self, globalTag, **args):
"""
_expressProcessing_
Heavy-ion collision data taking express processing
Heavy ions collision data taking express processing
"""
self._checkMINIAOD(**args)
self._setRepackedFlag(args)

skims = ['SiStripCalZeroBias',
'TkAlMinBiasHI']
step = stepALCAPRODUCER(skims)
options = Options()
options.__dict__.update(defaultOptions.__dict__)
options.scenario = "HeavyIons"
options.step = 'RAW2DIGI,L1Reco,RECO'+step+',DQM,ENDJOB'
options.isRepacked = True
dictIO(options,args)
options.conditions = globalTag

process = cms.Process('RECO')
cb = ConfigBuilder(options, process = process, with_output=True)
if not 'skims' in args:
args['skims']=['@allForExpress']

# Input source
process.source = cms.Source("NewEventStreamFileReader",
fileNames = cms.untracked.vstring()
)
cb.prepare()
if not 'customs' in args:
args['customs']=[ ]

customiseExpressHI(process)
addMonitoring(process)
args['customs'].append( self.expressCustoms )

process = Reco.expressProcessing(self,globalTag, **args)

return process


def alcaSkim(self, skims, **args):
def visualizationProcessing(self, globalTag, **args):
"""
_alcaSkim_
_visualizationProcessing_
AlcaReco processing & skims for heavy-ion collisions
Heavy ions collision data taking visualization processing
"""
self._checkMINIAOD(**args)
self._setRepackedFlag(args)

globalTag = None
if 'globaltag' in args:
globalTag = args['globaltag']

step = ""
if 'PromptCalibProd' in skims:
step = "ALCA:PromptCalibProd"
skims.remove('PromptCalibProd')

if len( skims ) > 0:
if step != "":
step += ","
step += "ALCAOUTPUT:"

for skim in skims:
step += (skim+"+")
options = Options()
options.__dict__.update(defaultOptions.__dict__)
options.scenario = "HeavyIons"
options.step = step.rstrip('+')
options.isMC = False
options.isData = True
options.beamspot = None
options.eventcontent = None
options.relval = None
if globalTag != None :
options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
options.triggerResultsProcess = 'RECO'

process = cms.Process('ALCA')
cb = ConfigBuilder(options, process = process)

# Input source
process.source = cms.Source(
"PoolSource",
fileNames = cms.untracked.vstring()
)
if not 'customs' in args:
args['customs']=[ ]

cb.prepare()

# FIXME: dirty hack..any way around this?
# Tier0 needs the dataset used for ALCAHARVEST step to be a different data-tier
if 'PromptCalibProd' in step:
process.ALCARECOStreamPromptCalibProd.dataset.dataTier = cms.untracked.string('ALCAPROMPT')

return process


def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
"""
_dqmHarvesting_
Heavy-ion collisions data taking DQM Harvesting
"""
options = defaultOptions
options.scenario = "HeavyIons"
options.step = "HARVESTING:dqmHarvesting"
options.isMC = False
options.isData = True
options.beamspot = None
options.eventcontent = None
options.name = "EDMtoMEConvert"
options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
options.arguments = ""
options.evt_type = ""
options.filein = []

process = cms.Process("HARVESTING")
if args.get('newDQMIO', False):
process.source = cms.Source("DQMRootSource")
else:
process.source = cms.Source("PoolSource")
configBuilder = ConfigBuilder(options, process = process)
configBuilder.prepare()

#
# customise process for particular job
#
process.source.processingMode = cms.untracked.string('RunsAndLumis')
process.source.fileNames = cms.untracked(cms.vstring())
process.maxEvents.input = -1
process.dqmSaver.workflow = datasetName
process.dqmSaver.saveByLumiSection = 1
if 'referenceFile' in args and args.get('referenceFile', ''):
process.DQMStore.referenceFileName = \
cms.untracked.string(args['referenceFile'])
args['customs'].append( self.visCustoms )

process = Reco.visualizationProcessing(self,globalTag, **args)

return process


def alcaHarvesting(self, globalTag, datasetName, **args):
"""
_alcaHarvesting_
Heavy-ion collisions data taking AlCa Harvesting
Heavy ions collisions data taking AlCa Harvesting
"""
options = defaultOptions
options.scenario = "HeavyIons"
options.step = "ALCAHARVEST:BeamSpotByRun+BeamSpotByLumi"
options.isMC = False
options.isData = True
options.beamspot = None
options.eventcontent = None
options.name = "ALCAHARVEST"
options.conditions = globalTag
options.arguments = ""
options.evt_type = ""
options.filein = []

process = cms.Process("ALCAHARVEST")
process.source = cms.Source("PoolSource")
configBuilder = ConfigBuilder(options, process = process)
configBuilder.prepare()

#
# customise process for particular job
#
process.source.processingMode = cms.untracked.string('RunsAndLumis')
process.source.fileNames = cms.untracked(cms.vstring())
process.maxEvents.input = -1
process.dqmSaver.workflow = datasetName

return process
self._checkMINIAOD(**args)

if not 'skims' in args and not 'alcapromptdataset' in args:
args['skims']=['BeamSpotByRun',
'BeamSpotByLumi',
'SiStripQuality']

return Reco.alcaHarvesting(self, globalTag, datasetName, **args)

0 comments on commit 5bc8f67

Please sign in to comment.