5 Scenario supporting proton collisions 8 from __future__
import print_function
14 from Configuration.DataProcessing.Utils
import stepALCAPRODUCER,stepSKIMPRODUCER,addMonitoring,dictIO,dqmIOSource,harvestingMode,dqmSeq,nanoFlavours,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']
64 if not 'customs' in args:
68 print(args[
'outputs'])
69 for a
in args[
'outputs']:
70 if a[
'dataTier'] ==
'MINIAOD':
72 if a[
'dataTier']
in [
'NANOAOD',
'NANOEDMAOD']:
74 if "nanoFlavours" in args:
76 args[
'customs'].
append(
'PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize')
81 options.customisation_file=args[
'customs']
85 options.step =
'RAW2DIGI,L1Reco,RECO' 86 options.step += self.
recoSeq + eiStep + step + PhysicsSkimStep
87 options.step += miniAODStep + nanoAODStep
88 options.step +=
',DQM' + dqmStep +
',ENDJOB' 93 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
promptModifiers) )
94 cb =
ConfigBuilder(options, process = process, with_output =
True)
97 process.source = cms.Source(
"PoolSource",
98 fileNames = cms.untracked.vstring()
111 Proton collision data taking express processing 114 skims = args[
'skims']
116 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
117 for wfl
in pclWkflws:
123 options.__dict__.update(defaultOptions.__dict__)
124 options.scenario = self.
cbSc 125 if (
'nThreads' in args) :
126 options.nThreads=args[
'nThreads']
130 options.step =
'RAW2DIGI,L1Reco,RECO'+self.
recoSeq+eiStep+step+
',DQM'+dqmStep+
',ENDJOB' 136 options.filein =
'tobeoverwritten.xyz' 137 if 'inputSource' in args:
138 options.filetype = args[
'inputSource']
139 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
expressModifiers) )
141 if 'customs' in args:
142 options.customisation_file=args[
'customs']
146 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
157 _visualizationProcessing_ 162 options.__dict__.update(defaultOptions.__dict__)
163 options.scenario = self.
cbSc 166 if 'preFilter' in args:
167 options.step +=
'FILTER:'+args[
'preFilter']+
',' 171 if 'beamSplashRun' in args:
172 options.step +=
'RAW2DIGI,L1Reco,RECO'+args[
'beamSplashRun']+
',ENDJOB' 173 print(
"Using RECO%s step in visualizationProcessing" % args[
'beamSplashRun'])
175 options.step +=
'RAW2DIGI,L1Reco,RECO'+eiStep+
',ENDJOB' 181 options.timeoutOutput =
True 183 options.filein =
'tobeoverwritten.xyz' 185 if 'inputSource' in args:
186 options.filetype = args[
'inputSource']
189 options.filetype =
'DQMDAQ' 191 print(
"Using %s source"%options.filetype)
193 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
visModifiers) )
195 if 'customs' in args:
196 options.customisation_file=args[
'customs']
200 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
219 AlcaReco processing & skims for proton collisions 224 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
225 skims = [x
for x
in skims
if x
not in pclWflws]
228 step +=
'ALCA:'+(
'+'.
join(pclWflws))
233 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
236 options.__dict__.update(defaultOptions.__dict__)
237 options.scenario = self.
cbSc 239 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None' 240 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
241 options.conditions +=
','+args[
'globalTagConnect']
243 options.triggerResultsProcess =
'RECO' 245 if 'customs' in args:
246 options.customisation_file=args[
'customs']
248 process = cms.Process(
'ALCA', self.eras)
252 process.source = cms.Source(
254 fileNames = cms.untracked.vstring()
262 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
263 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
272 Proton collisions data taking DQM Harvesting 275 options = defaultOptions
276 options.scenario = self.
cbSc 277 options.step =
"HARVESTING"+
dqmSeq(args,
':dqmHarvesting')
278 options.name =
"EDMtoMEConvert" 281 process = cms.Process(
"HARVESTING", self.eras)
284 if 'customs' in args:
285 options.customisation_file=args[
'customs']
288 configBuilder.prepare()
298 Proton collisions data taking AlCa Harvesting 303 skims = args[
'skims']
306 if 'alcapromptdataset' in args:
307 skims.append(
'@'+args[
'alcapromptdataset'])
309 if len(skims) == 0:
return None 310 options = defaultOptions
311 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
312 options.step =
"ALCAHARVEST:"+(
'+'.
join(skims))
313 options.name =
"ALCAHARVEST" 316 process = cms.Process(
"ALCAHARVEST", self.eras)
317 process.source = cms.Source(
"PoolSource")
319 if 'customs' in args:
320 options.customisation_file=args[
'customs']
323 configBuilder.prepare()
328 process.source.processingMode = cms.untracked.string(
'RunsAndLumis')
329 process.source.fileNames = cms.untracked(cms.vstring())
330 process.maxEvents.input = -1
331 process.dqmSaver.workflow = datasetName
339 skimming method overload for the prompt skiming 342 options = defaultOptions
343 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
344 options.step =
"SKIM:"+(
'+'.
join(skims))
345 options.name =
"SKIM" 347 process = cms.Process(
"SKIM", self.eras)
348 process.source = cms.Source(
"PoolSource")
350 if 'customs' in args:
351 options.customisation_file=args[
'customs']
354 configBuilder.prepare()
359 def repack(self, **args): 360 options = defaultOptions 362 options.filein='file.dat' 363 options.filetype='DAT' 364 options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__ 365 process = cms.Process('REPACK', self.eras) 366 cb = ConfigBuilder(options, process = process, with_output = True,with_input=True) 368 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 nanoFlavours(flavours)
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)