5 Scenario supporting proton collisions 8 from __future__
import print_function
14 from Configuration.DataProcessing.Utils
import stepALCAPRODUCER,stepSKIMPRODUCER,addMonitoring,dictIO,dqmIOSource,harvestingMode,dqmSeq,gtNameAndConnect
15 import FWCore.ParameterSet.Config
as cms
16 from Configuration.DataProcessing.RecoTLR
import customisePrompt,customiseExpress
20 Scenario.__init__(self)
22 self.
cbSc=self.__class__.__name__
29 Implement configuration building for data processing for proton 36 if 'repacked' in args:
37 if args[
'repacked'] ==
True:
38 options.isRepacked =
True 40 options.isRepacked =
False 48 Proton collision data taking prompt reco 53 if (
"PhysicsSkims" in args) :
57 options.__dict__.update(defaultOptions.__dict__)
58 options.scenario = self.
cbSc 59 if (
'nThreads' in args) :
60 options.nThreads=args[
'nThreads']
66 print(args[
'outputs'])
67 for a
in args[
'outputs']:
68 if a[
'dataTier'] ==
'MINIAOD':
70 if a[
'dataTier']
in [
'NANOAOD',
'NANOEDMAOD']:
76 options.customisation_file=args[
'customs']
80 options.step =
'RAW2DIGI,L1Reco,RECO' 81 options.step += self.
recoSeq + eiStep + step + PhysicsSkimStep
82 options.step += miniAODStep + nanoAODStep
83 options.step +=
',DQM' + dqmStep +
',ENDJOB' 88 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
promptModifiers) )
89 cb =
ConfigBuilder(options, process = process, with_output =
True)
92 process.source = cms.Source(
"PoolSource",
93 fileNames = cms.untracked.vstring()
106 Proton collision data taking express processing 109 skims = args[
'skims']
111 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
112 for wfl
in pclWkflws:
118 options.__dict__.update(defaultOptions.__dict__)
119 options.scenario = self.
cbSc 120 if (
'nThreads' in args) :
121 options.nThreads=args[
'nThreads']
125 options.step =
'RAW2DIGI,L1Reco,RECO'+self.
recoSeq+eiStep+step+
',DQM'+dqmStep+
',ENDJOB' 131 options.filein =
'tobeoverwritten.xyz' 132 if 'inputSource' in args:
133 options.filetype = args[
'inputSource']
134 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
expressModifiers) )
136 if 'customs' in args:
137 options.customisation_file=args[
'customs']
141 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
152 _visualizationProcessing_ 157 options.__dict__.update(defaultOptions.__dict__)
158 options.scenario = self.
cbSc 161 if 'preFilter' in args:
162 options.step +=
'FILTER:'+args[
'preFilter']+
',' 166 if 'beamSplashRun' in args:
167 options.step +=
'RAW2DIGI,L1Reco,RECO'+args[
'beamSplashRun']+
',ENDJOB' 168 print(
"Using RECO%s step in visualizationProcessing" % args[
'beamSplashRun'])
170 options.step +=
'RAW2DIGI,L1Reco,RECO'+eiStep+
',ENDJOB' 176 options.timeoutOutput =
True 178 options.filein =
'tobeoverwritten.xyz' 180 if 'inputSource' in args:
181 options.filetype = args[
'inputSource']
184 options.filetype =
'DQMDAQ' 186 print(
"Using %s source"%options.filetype)
188 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
visModifiers) )
190 if 'customs' in args:
191 options.customisation_file=args[
'customs']
195 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
214 AlcaReco processing & skims for proton collisions 219 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
220 skims = [x
for x
in skims
if x
not in pclWflws]
223 step +=
'ALCA:'+(
'+'.
join(pclWflws))
228 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
231 options.__dict__.update(defaultOptions.__dict__)
232 options.scenario = self.
cbSc 234 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None' 235 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
236 options.conditions +=
','+args[
'globalTagConnect']
238 options.triggerResultsProcess =
'RECO' 240 if 'customs' in args:
241 options.customisation_file=args[
'customs']
243 process = cms.Process(
'ALCA', self.eras)
247 process.source = cms.Source(
249 fileNames = cms.untracked.vstring()
257 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
258 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
267 Proton collisions data taking DQM Harvesting 270 options = defaultOptions
271 options.scenario = self.
cbSc 272 options.step =
"HARVESTING"+
dqmSeq(args,
':dqmHarvesting')
273 options.name =
"EDMtoMEConvert" 276 process = cms.Process(
"HARVESTING", self.eras)
279 if 'customs' in args:
280 options.customisation_file=args[
'customs']
283 configBuilder.prepare()
293 Proton collisions data taking AlCa Harvesting 298 skims = args[
'skims']
301 if 'alcapromptdataset' in args:
302 skims.append(
'@'+args[
'alcapromptdataset'])
304 if len(skims) == 0:
return None 305 options = defaultOptions
306 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
307 options.step =
"ALCAHARVEST:"+(
'+'.
join(skims))
308 options.name =
"ALCAHARVEST" 311 process = cms.Process(
"ALCAHARVEST", self.eras)
312 process.source = cms.Source(
"PoolSource")
314 if 'customs' in args:
315 options.customisation_file=args[
'customs']
318 configBuilder.prepare()
323 process.source.processingMode = cms.untracked.string(
'RunsAndLumis')
324 process.source.fileNames = cms.untracked(cms.vstring())
325 process.maxEvents.input = -1
326 process.dqmSaver.workflow = datasetName
334 skimming method overload for the prompt skiming 337 options = defaultOptions
338 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
339 options.step =
"SKIM:"+(
'+'.
join(skims))
340 options.name =
"SKIM" 342 process = cms.Process(
"SKIM", self.eras)
343 process.source = cms.Source(
"PoolSource")
345 if 'customs' in args:
346 options.customisation_file=args[
'customs']
349 configBuilder.prepare()
354 def repack(self, **args): 355 options = defaultOptions 357 options.filein='file.dat' 358 options.filetype='DAT' 359 options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__ 360 process = cms.Process('REPACK', self.eras) 361 cb = ConfigBuilder(options, process = process, with_output = True,with_input=True) 363 print cb.pythonCfgCode def stepSKIMPRODUCER(PhysicsSkims)
def harvestingMode(process, datasetName, args, rANDl=True)
def skimming(self, skims, globalTag, options)
def dqmSeq(args, default)
def gtNameAndConnect(globalTag, args)
def expressProcessing(self, globalTag, args)
def visualizationProcessing(self, globalTag, args)
def alcaSkim(self, skims, args)
def dictIO(options, args)
def alcaHarvesting(self, globalTag, datasetName, args)
def addMonitoring(process)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def stepALCAPRODUCER(skims)
def promptReco(self, globalTag, args)
def dqmHarvesting(self, datasetName, runNumber, globalTag, args)
static std::string join(char **cmd)
def _checkRepackedFlag(self, options, args)