Skip to content

Commit

Permalink
Merge pull request #11741 from slava77/CMSSW_7_5_3_patch1/hiRun2TLR
Browse files Browse the repository at this point in the history
heavyIonsRun2 scenario for data processing
  • Loading branch information
davidlange6 committed Oct 13, 2015
2 parents 3f62079 + 3eaf9cc commit 56c6f12
Show file tree
Hide file tree
Showing 6 changed files with 291 additions and 46 deletions.
104 changes: 104 additions & 0 deletions Configuration/DataProcessing/python/Impl/HeavyIonsRun2.py
@@ -0,0 +1,104 @@
#!/usr/bin/env python
"""
_HeavyIonsRun2_
Scenario supporting heavy ions collisions
"""

import os
import sys

from Configuration.DataProcessing.Reco import Reco
import FWCore.ParameterSet.Config as cms

class HeavyIonsRun2(Reco):
def __init__(self):
self.recoSeq=''
self.cbSc='HeavyIons'
self.promptCustoms='Configuration/DataProcessing/RecoTLR.customiseRun2PromptHI'
self.expressCustoms='Configuration/DataProcessing/RecoTLR.customiseRun2ExpressHI'
self.visCustoms='Configuration/DataProcessing/RecoTLR.customiseRun2ExpressHI'
"""
_HeavyIonsRun2_
Implement configuration building for data processing for Heavy Ions
collision data taking for Run2
"""


def promptReco(self, globalTag, **args):
"""
_promptReco_
Heavy ions collision data taking prompt reco
"""
if not 'skims' in args:
args['skims']=['@allForPrompt']

customsFunction = self.promptCustoms
if not 'customs' in args:
args['customs']=[ customsFunction ]
else:
args['customs'].append(customsFunction)

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

return process


def expressProcessing(self, globalTag, **args):
"""
_expressProcessing_
Heavy ions collision data taking express processing
"""
if not 'skims' in args:
args['skims']=['@allForExpress']

customsFunction = self.expressCustoms
if not 'customs' in args:
args['customs']=[ customsFunction ]
else:
args['customs'].append( customsFunction )

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

return process

def visualizationProcessing(self, globalTag, **args):
"""
_visualizationProcessing_
Heavy ions collision data taking visualization processing
"""
customsFunction = self.visCustoms
if not 'customs' in args:
args['customs']=[ customsFunction ]
else:
args['customs'].append( customsFunction )

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

return process

def alcaHarvesting(self, globalTag, datasetName, **args):
"""
_alcaHarvesting_
Heavy ions collisions data taking AlCa Harvesting
"""


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

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

6 changes: 5 additions & 1 deletion Configuration/DataProcessing/python/Reco.py
Expand Up @@ -49,7 +49,11 @@ def promptReco(self, globalTag, **args):
for a in args['outputs']:
if a['dataTier'] == 'MINIAOD':
miniAODStep=',PAT'
options.runUnscheduled=True

"""
Unscheduled for all
"""
options.runUnscheduled=True


if 'customs' in args:
Expand Down
117 changes: 73 additions & 44 deletions Configuration/DataProcessing/python/RecoTLR.py
@@ -1,6 +1,26 @@
import FWCore.ParameterSet.Config as cms

from RecoTracker.Configuration.customiseForRunI import customiseForRunI

##############################################################################
# common utilities
##############################################################################
def _swapOfflineBSwithOnline(process):
from RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi import onlineBeamSpotProducer
process.offlineBeamSpot = onlineBeamSpotProducer.clone()
return process

def _addLumiProducer(process):
if not hasattr(process,'lumiProducer'):
#unscheduled..
from RecoLuminosity.LumiProducer.lumiProducer_cff import lumiProducer,LumiDBService
process.lumiProducer=lumiProducer
#if it's scheduled
if hasattr(process, 'reconstruction_step'):
process.reconstruction_step+=process.lumiProducer

return process

#gone with the fact that there is no difference between production and development sequence
#def customiseCommon(process):
# return (process)
Expand Down Expand Up @@ -30,15 +50,10 @@ def customiseCosmicData(process):
##############################################################################
# this is supposed to be added on top of other (Run1) data customs
def customiseDataRun2Common(process):
if hasattr(process,'CSCGeometryESModule'):
process.CSCGeometryESModule.useGangedStripsInME1a = cms.bool(False)
if hasattr(process,'CSCIndexerESProducer'):
process.CSCIndexerESProducer.AlgoName=cms.string("CSCIndexerPostls1")
if hasattr(process,'CSCChannelMapperESProducer'):
process.CSCChannelMapperESProducer.AlgoName=cms.string("CSCChannelMapperPostls1")
if hasattr(process,'csc2DRecHits'):
process.csc2DRecHits.readBadChannels = cms.bool(False)
process.csc2DRecHits.CSCUseGasGainCorrections = cms.bool(False)
from SLHCUpgradeSimulations.Configuration.muonCustoms import unganged_me1a_geometry,customise_csc_LocalReco
process = unganged_me1a_geometry(process)
process = customise_csc_LocalReco(process)

if hasattr(process,'valCscTriggerPrimitiveDigis'):
#this is not doing anything at the moment
process.valCscTriggerPrimitiveDigis.commonParam.gangedME1a = cms.bool(False)
Expand All @@ -55,25 +70,28 @@ def customiseDataRun2Common(process):

return process

##############################################################################
# common+ "25ns" Use this for data daking starting from runs in 2015C (>= 253256 )
def customiseDataRun2Common_25ns(process):
# add stage1
def customiseDataRun2Common_withStage1(process):
process = customiseDataRun2Common(process)

from L1Trigger.L1TCommon.customsPostLS1 import customiseL1RecoForStage1
process=customiseL1RecoForStage1(process)

return process

##############################################################################
# common+ "25ns" Use this for data daking starting from runs in 2015C (>= 253256 )
def customiseDataRun2Common_25ns(process):
process = customiseDataRun2Common_withStage1(process)

from SLHCUpgradeSimulations.Configuration.postLS1Customs import customise_DQM_25ns
if hasattr(process,'dqmoffline_step'):
process=customise_DQM_25ns(process)
return process

# common+50ns. Needed only for runs >= 253000 if taken with 50ns
def customiseDataRun2Common_50nsRunsAfter253000(process):
process = customiseDataRun2Common(process)

from L1Trigger.L1TCommon.customsPostLS1 import customiseL1RecoForStage1
process=customiseL1RecoForStage1(process)
process = customiseDataRun2Common_withStage1(process)

if hasattr(process,'particleFlowClusterECAL'):
process.particleFlowClusterECAL.energyCorrector.autoDetectBunchSpacing = False
Expand Down Expand Up @@ -102,13 +120,12 @@ def customiseVALSKIM(process):
print "this method is outdated, please use RecoTLR.customisePPData"
process= customisePPData(process)
return process


##############################################################################
def customiseExpress(process):
process= customisePPData(process)

from RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi import onlineBeamSpotProducer
process.offlineBeamSpot = onlineBeamSpotProducer.clone()
process = _swapOfflineBSwithOnline(process)

return process

Expand All @@ -131,13 +148,7 @@ def customiseExpressRun2B0T(process):
##############################################################################
def customisePrompt(process):
process= customisePPData(process)

#add the lumi producer in the prompt reco only configuration
if not hasattr(process,'lumiProducer'):
#unscheduled..
from RecoLuminosity.LumiProducer.lumiProducer_cff import lumiProducer,LumiDBService
process.lumiProducer=lumiProducer
process.reconstruction_step+=process.lumiProducer
process = _addLumiProducer(process)

return process

Expand All @@ -159,34 +170,52 @@ def customisePromptRun2B0T(process):


##############################################################################

#gone with the fact that there is no difference between production and development sequence
#def customiseCommonHI(process):
# return process
# Heavy Ions
##############################################################################
# keep it in case modification is needed
def customiseCommonHI(process):
return process

##############################################################################
def customiseExpressHI(process):
#deprecated process= customiseCommonHI(process)

from RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi import onlineBeamSpotProducer
process.offlineBeamSpot = onlineBeamSpotProducer.clone()
process = customiseCommonHI(process)
process = _swapOfflineBSwithOnline(process)

return process

##############################################################################
def customisePromptHI(process):
#deprecated process= customiseCommonHI(process)
process = customiseCommonHI(process)
process = _swapOfflineBSwithOnline(process)

from RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi import onlineBeamSpotProducer
process.offlineBeamSpot = onlineBeamSpotProducer.clone()
process = _addLumiProducer(process)

#add the lumi producer in the prompt reco only configuration
if not hasattr(process,'lumiProducer'):
#unscheduled..
from RecoLuminosity.LumiProducer.lumiProducer_cff import lumiProducer,LumiDBService
process.lumiProducer=lumiProducer
process.reconstruction_step+=process.lumiProducer

return process

##############################################################################
# keep it in case modification is needed
def customiseRun2CommonHI(process):
process = customiseDataRun2Common_withStage1(process)

# HI Specific additional customizations:
# from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_Additional_HI
# process = customiseSimL1EmulatorForPostLS1_Additional_HI(process)

return process

##############################################################################
def customiseRun2ExpressHI(process):
process = customiseRun2CommonHI(process)
process = _swapOfflineBSwithOnline(process)

return process

##############################################################################
def customiseRun2PromptHI(process):
process = customiseRun2CommonHI(process)
process = _swapOfflineBSwithOnline(process)

process = _addLumiProducer(process)

return process

Expand Down

0 comments on commit 56c6f12

Please sign in to comment.