Go to the documentation of this file.00001
00002 """
00003 _preprodmc_
00004
00005 Scenario supporting pre-production
00006
00007 """
00008
00009 import os
00010 import sys
00011
00012 from Configuration.DataProcessing.Scenario import Scenario
00013 import FWCore.ParameterSet.Config as cms
00014 from Configuration.PyReleaseValidation.ConfigBuilder import ConfigBuilder
00015 from Configuration.PyReleaseValidation.ConfigBuilder import Options
00016 from Configuration.PyReleaseValidation.ConfigBuilder import defaultOptions
00017 from Configuration.PyReleaseValidation.ConfigBuilder import installFilteredStream
00018
00019
00020 class preprodmc(Scenario):
00021 """
00022 _preprodmc_
00023
00024 Implement configuration building for RelVal MC production
00025
00026 """
00027
00028
00029 def promptReco(self, globalTag, writeTiers = ['RECO'], **args):
00030 """
00031 _promptReco_
00032
00033 Prompt reco for pre-production
00034
00035 """
00036
00037 options = Options()
00038 options.__dict__.update(defaultOptions.__dict__)
00039 options.scenario = "pp"
00040 options.step = 'RAW2DIGI,L1Reco,RECO,VALIDATION:validation_preprod,DQM:DQMOfflinePOG,ENDJOB'
00041 options.isMC = True
00042 options.isData = False
00043 options.beamspot = None
00044 options.eventcontent = ','.join(writeTiers)
00045 options.datatier = ','.join(writeTiers)
00046 options.magField = 'AutoFromDBCurrent'
00047 options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
00048
00049 process = cms.Process('RECO')
00050 cb = ConfigBuilder(options, process = process, with_output = True)
00051
00052
00053 process.source = cms.Source("PoolSource",
00054 fileNames = cms.untracked.vstring()
00055 )
00056 cb.prepare()
00057
00058 return process
00059
00060
00061 def alcaReco(self, skims, **args):
00062 """
00063 _alcaReco_
00064
00065 AlcaReco processing & skims for pre-production
00066
00067 """
00068 options = Options()
00069 options.__dict__.update(defaultOptions.__dict__)
00070 options.scenario = "pp"
00071 options.step = 'ALCA:MuAlStandAloneCosmics+DQM,ENDJOB'
00072 options.isMC = True
00073 options.isData = False
00074 options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
00075 options.beamspot = None
00076 options.eventcontent = None
00077 options.relval = None
00078
00079 process = cms.Process('ALCA')
00080 cb = ConfigBuilder(options, process = process)
00081
00082
00083 process.source = cms.Source(
00084 "PoolSource",
00085 fileNames = cms.untracked.vstring()
00086 )
00087
00088 cb.prepare()
00089
00090
00091
00092
00093 availableStreams = process.outputModules_().keys()
00094
00095
00096
00097
00098 for skim in skims:
00099 if skim not in availableStreams:
00100 msg = "Skim named: %s not available " % skim
00101 msg += "in Alca Reco Config:\n"
00102 msg += "Known Skims: %s\n" % availableStreams
00103 raise RuntimeError, msg
00104
00105
00106
00107
00108 for availSkim in availableStreams:
00109 if availSkim not in skims:
00110 self.dropOutputModule(process, availSkim)
00111
00112 return process
00113
00114
00115 def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
00116 """
00117 _dqmHarvesting_
00118
00119 DQM Harvesting for pre-production
00120
00121 """
00122 options = defaultOptions
00123 options.scenario = "pp"
00124 options.step = "HARVESTING:validationpreprodHarvesting+dqmHarvestingPOG"
00125 options.isMC = True
00126 options.isData = False
00127 options.beamspot = None
00128 options.eventcontent = None
00129 options.name = "EDMtoMEConvert"
00130 options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
00131 options.arguments = ""
00132 options.evt_type = ""
00133 options.filein = []
00134
00135 process = cms.Process("HARVESTING")
00136 process.source = cms.Source("PoolSource")
00137 configBuilder = ConfigBuilder(options, process = process)
00138 configBuilder.prepare()
00139
00140
00141
00142
00143 process.source.processingMode = cms.untracked.string('RunsAndLumis')
00144 process.source.fileNames = cms.untracked(cms.vstring())
00145 process.maxEvents.input = -1
00146 process.dqmSaver.workflow = datasetName
00147 if args.has_key('referenceFile') and args.get('referenceFile', ''):
00148 process.DQMStore.referenceFileName = \
00149 cms.untracked.string(args['referenceFile'])
00150
00151 return process