process.digi2raw_step = cms.Path(process.DigiToRaw)
process.endjob_step = cms.EndPath(process.endOfProcess)
process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)

# Schedule definition
process.schedule = cms.Schedule(process.digitisation_step,process.L1simulation_step,process.digi2raw_step)
process.schedule.extend(process.HLTSchedule)
process.schedule.extend([process.endjob_step,process.RAWSIMoutput_step])

# customisation of the process.

# Automatic addition of the customisation function from SLHCUpgradeSimulations.Configuration.postLS1Customs
from SLHCUpgradeSimulations.Configuration.postLS1Customs import customisePostLS1 

#call to customisation function customisePostLS1 imported from SLHCUpgradeSimulations.Configuration.postLS1Customs
process = customisePostLS1(process)

# Automatic addition of the customisation function from Configuration.DataProcessing.Utils
from Configuration.DataProcessing.Utils import addMonitoring 

#call to customisation function addMonitoring imported from Configuration.DataProcessing.Utils
process = addMonitoring(process)

# Automatic addition of the customisation function from HLTrigger.Configuration.customizeHLTforMC
from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC 

#call to customisation function customizeHLTforMC imported from HLTrigger.Configuration.customizeHLTforMC
process = customizeHLTforMC(process)

# End of customisation functions
Beispiel #2
0
def customizeHLTforAll(process, menuType = "GRun", _customInfo = None):

    if (_customInfo is not None):

        _maxEvents = _customInfo['maxEvents']
        _globalTag = _customInfo['globalTag']
        _inputFile = _customInfo['inputFile']
        _realData  = _customInfo['realData']
        
        import FWCore.ParameterSet.VarParsing as VarParsing
        cmsRunOptions = VarParsing.VarParsing('python')

        cmsRunOptions.maxEvents  = _maxEvents
        cmsRunOptions.register('globalTag',_globalTag,cmsRunOptions.multiplicity.singleton,cmsRunOptions.varType.string,"GlobalTag")
        cmsRunOptions.inputFiles = _inputFile
        cmsRunOptions.register('realData',_realData,cmsRunOptions.multiplicity.singleton,cmsRunOptions.varType.bool,"Real Data?")

        cmsRunOptions.parseArguments()

# report in log file
#       print cmsRunOptions

        _maxEvents = cmsRunOptions.maxEvents
        _globalTag = cmsRunOptions.globalTag
        _inputFile = cmsRunOptions.inputFiles
        _realData  = cmsRunOptions.realData

# maxEvents
        if _maxEvents != -2:
            _maxEvents = cms.untracked.int32( _maxEvents )
            if hasattr(process,'maxEvents'):
                process.maxEvents.input = _maxEvents
            else:
                process.maxEvents = cms.untracked.PSet( input = _maxEvents )

# GlobalTag
        if _globalTag == "@":
            _globalTag = _customInfo['globalTags'][_realData]
        if _globalTag != "":
            if hasattr(process,'GlobalTag'):
                from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
                process.GlobalTag = GlobalTag(process.GlobalTag, _globalTag, '')
#               process.GlobalTag.snapshotTime = cms.string("9999-12-31 23:59:59.000")

# inputFile
        if _inputFile[0] == "@":
            _inputFile[0] = _customInfo['inputFiles'][_realData]
        if _inputFile != "":
            if hasattr(process,'source'):
                process.source.fileNames = cms.untracked.vstring( _inputFile )
                    
        if _realData:
# Real-Data customisation
            if menuType == "HIon":
#               fix "Unrunnable schedule" exception
                from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
                process = MassReplaceInputTag(process,"rawDataRepacker","rawDataCollector") #,"rawDataRepacker::@skipCurrentProcess")
        else:
# Monte-Carlo customisation
            from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
            process = customizeHLTforMC(process)
            if menuType == "HIon":
                from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
                process = MassReplaceInputTag(process,"rawDataRepacker","rawDataCollector")

    else:
        pass

    return process
                                process.digi2raw_step)
process.schedule.extend(process.HLTSchedule)
process.schedule.extend([
    process.raw2digi_step, process.L1Reco_step, process.reconstruction_step,
    process.eventinterpretaion_step
])
process.schedule.extend([process.analyze])
process.schedule.extend([process.FastTimerOutput])

# customisation of the process.
from SLHCUpgradeSimulations.Configuration.postLS1Customs import customisePostLS1
process = customisePostLS1(process)

# Automatic addition of the customisation function from HLTrigger.Configuration.customizeHLTforMC
from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC

#call to customisation function customizeHLTforMC imported from HLTrigger.Configuration.customizeHLTforMC
process = customizeHLTforMC(process)

# Automatic addition of the customisation function from SLHCUpgradeSimulations.Configuration.postLS1Customs
#from SLHCUpgradeSimulations.Configuration.postLS1Customs import *
#process = customisePostLS1(process)

# Automatic addition of the customisation function from SimGeneral.MixingModule.fullMixCustomize_cff
#from SimGeneral.MixingModule.fullMixCustomize_cff import setCrossingFrameOn

#call to customisation function setCrossingFrameOn imported from SimGeneral.MixingModule.fullMixCustomize_cff
#process = setCrossingFrameOn(process)

# End of customisation functions
def customizeHLTforAll(process, _customInfo=None):

    if _customInfo is not None:

        _maxEvents = _customInfo["maxEvents"]
        _globalTag = _customInfo["globalTag"]
        _inputFile = _customInfo["inputFile"]
        _realData = _customInfo["realData"]

        import FWCore.ParameterSet.VarParsing as VarParsing

        cmsRunOptions = VarParsing.VarParsing("python")

        cmsRunOptions.maxEvents = _maxEvents
        cmsRunOptions.register(
            "globalTag", _globalTag, cmsRunOptions.multiplicity.singleton, cmsRunOptions.varType.string, "GlobalTag"
        )
        cmsRunOptions.inputFiles = _inputFile
        cmsRunOptions.register(
            "realData", _realData, cmsRunOptions.multiplicity.singleton, cmsRunOptions.varType.bool, "Real Data?"
        )

        cmsRunOptions.parseArguments()

        # report in log file
        #       print cmsRunOptions

        _maxEvents = cmsRunOptions.maxEvents
        _globalTag = cmsRunOptions.globalTag
        _inputFile = cmsRunOptions.inputFiles
        _realData = cmsRunOptions.realData

        # maxEvents
        if _maxEvents != -2:
            _maxEvents = cms.untracked.int32(_maxEvents)
            if hasattr(process, "maxEvents"):
                process.maxEvents.input = _maxEvents
            else:
                process.maxEvents = cms.untracked.PSet(input=_maxEvents)

        # GlobalTag
        if _globalTag == "@":
            _globalTag = _customInfo["globalTags"][_realData]
        if _globalTag != "":
            if hasattr(process, "GlobalTag"):
                from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag

                process.GlobalTag = GlobalTag(process.GlobalTag, _globalTag, "")

        # inputFile
        if _inputFile[0] == "@":
            _inputFile[0] = _customInfo["inputFiles"][_realData]
        if _inputFile != "":
            if hasattr(process, "source"):
                process.source.fileNames = cms.untracked.vstring(_inputFile)

        # MC customisation
        if not _realData:
            from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC

            process = customizeHLTforMC(process)
            if _customInfo["menuType"] == "HIon":
                from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag

                process = MassReplaceInputTag(process, "rawDataRepacker", "rawDataCollector")
    else:
        pass

    # CMSSW version customisation
    from HLTrigger.Configuration.customizeHLTforCMSSW import customiseHLTforCMSSW

    process = customiseHLTforCMSSW(process)

    return process
Beispiel #5
0
def customizeHLTforAll(process, menuType="GRun", _customInfo=None):

    if (_customInfo is not None):

        _maxEvents = _customInfo['maxEvents']
        _globalTag = _customInfo['globalTag']
        _inputFile = _customInfo['inputFile']
        _realData = _customInfo['realData']

        import FWCore.ParameterSet.VarParsing as VarParsing
        cmsRunOptions = VarParsing.VarParsing('python')

        cmsRunOptions.maxEvents = _maxEvents
        cmsRunOptions.register('globalTag', _globalTag,
                               cmsRunOptions.multiplicity.singleton,
                               cmsRunOptions.varType.string, "GlobalTag")
        cmsRunOptions.inputFiles = _inputFile
        cmsRunOptions.register('realData', _realData,
                               cmsRunOptions.multiplicity.singleton,
                               cmsRunOptions.varType.bool, "Real Data?")

        cmsRunOptions.parseArguments()

        # report in log file
        #       print cmsRunOptions

        _maxEvents = cmsRunOptions.maxEvents
        _globalTag = cmsRunOptions.globalTag
        _inputFile = cmsRunOptions.inputFiles
        _realData = cmsRunOptions.realData

        # maxEvents
        if _maxEvents != -2:
            _maxEvents = cms.untracked.int32(_maxEvents)
            if hasattr(process, 'maxEvents'):
                process.maxEvents.input = _maxEvents
            else:
                process.maxEvents = cms.untracked.PSet(input=_maxEvents)

# GlobalTag
        if _globalTag == "@":
            _globalTag = _customInfo['globalTags'][_realData]
        if _globalTag != "":
            if hasattr(process, 'GlobalTag'):
                from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
                process.GlobalTag = GlobalTag(process.GlobalTag, _globalTag,
                                              '')
#               process.GlobalTag.snapshotTime = cms.string("9999-12-31 23:59:59.000")

# inputFile
        if _inputFile[0] == "@":
            _inputFile[0] = _customInfo['inputFiles'][_realData]
        if _inputFile != "":
            if hasattr(process, 'source'):
                process.source.fileNames = cms.untracked.vstring(_inputFile)

        if _realData:
            # Real-Data customisation
            if menuType == "HIon":
                #               fix "Unrunnable schedule" exception
                from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
                process = MassReplaceInputTag(
                    process, "rawDataRepacker",
                    "rawDataRepacker::@skipCurrentProcess")
        else:
            # Monte-Carlo customisation
            from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
            process = customizeHLTforMC(process)
            if menuType == "HIon":
                from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
                process = MassReplaceInputTag(process, "rawDataRepacker",
                                              "rawDataCollector")

    else:
        pass

    return process