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']
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 args[
'customs'].
append(
'PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize')
79 options.customisation_file=args[
'customs']
83 options.step =
'RAW2DIGI,L1Reco,RECO' 84 options.step += self.
recoSeq + eiStep + step + PhysicsSkimStep
85 options.step += miniAODStep + nanoAODStep
86 options.step +=
',DQM' + dqmStep +
',ENDJOB' 91 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
promptModifiers) )
92 cb =
ConfigBuilder(options, process = process, with_output =
True)
95 process.source = cms.Source(
"PoolSource",
96 fileNames = cms.untracked.vstring()
109 Proton collision data taking express processing 112 skims = args[
'skims']
114 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
115 for wfl
in pclWkflws:
121 options.__dict__.update(defaultOptions.__dict__)
122 options.scenario = self.
cbSc 123 if (
'nThreads' in args) :
124 options.nThreads=args[
'nThreads']
128 options.step =
'RAW2DIGI,L1Reco,RECO'+self.
recoSeq+eiStep+step+
',DQM'+dqmStep+
',ENDJOB' 134 options.filein =
'tobeoverwritten.xyz' 135 if 'inputSource' in args:
136 options.filetype = args[
'inputSource']
137 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
expressModifiers) )
139 if 'customs' in args:
140 options.customisation_file=args[
'customs']
144 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
155 _visualizationProcessing_ 160 options.__dict__.update(defaultOptions.__dict__)
161 options.scenario = self.
cbSc 164 if 'preFilter' in args:
165 options.step +=
'FILTER:'+args[
'preFilter']+
',' 169 if 'beamSplashRun' in args:
170 options.step +=
'RAW2DIGI,L1Reco,RECO'+args[
'beamSplashRun']+
',ENDJOB' 171 print(
"Using RECO%s step in visualizationProcessing" % args[
'beamSplashRun'])
173 options.step +=
'RAW2DIGI,L1Reco,RECO'+eiStep+
',ENDJOB' 179 options.timeoutOutput =
True 181 options.filein =
'tobeoverwritten.xyz' 183 if 'inputSource' in args:
184 options.filetype = args[
'inputSource']
187 options.filetype =
'DQMDAQ' 189 print(
"Using %s source"%options.filetype)
191 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
visModifiers) )
193 if 'customs' in args:
194 options.customisation_file=args[
'customs']
198 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
217 AlcaReco processing & skims for proton collisions 222 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
223 skims = [x
for x
in skims
if x
not in pclWflws]
226 step +=
'ALCA:'+(
'+'.
join(pclWflws))
231 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
234 options.__dict__.update(defaultOptions.__dict__)
235 options.scenario = self.
cbSc 237 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None' 238 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
239 options.conditions +=
','+args[
'globalTagConnect']
241 options.triggerResultsProcess =
'RECO' 243 if 'customs' in args:
244 options.customisation_file=args[
'customs']
246 process = cms.Process(
'ALCA', self.eras)
250 process.source = cms.Source(
252 fileNames = cms.untracked.vstring()
260 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
261 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
270 Proton collisions data taking DQM Harvesting 273 options = defaultOptions
274 options.scenario = self.
cbSc 275 options.step =
"HARVESTING"+
dqmSeq(args,
':dqmHarvesting')
276 options.name =
"EDMtoMEConvert" 279 process = cms.Process(
"HARVESTING", self.eras)
282 if 'customs' in args:
283 options.customisation_file=args[
'customs']
286 configBuilder.prepare()
296 Proton collisions data taking AlCa Harvesting 301 skims = args[
'skims']
304 if 'alcapromptdataset' in args:
305 skims.append(
'@'+args[
'alcapromptdataset'])
307 if len(skims) == 0:
return None 308 options = defaultOptions
309 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
310 options.step =
"ALCAHARVEST:"+(
'+'.
join(skims))
311 options.name =
"ALCAHARVEST" 314 process = cms.Process(
"ALCAHARVEST", self.eras)
315 process.source = cms.Source(
"PoolSource")
317 if 'customs' in args:
318 options.customisation_file=args[
'customs']
321 configBuilder.prepare()
326 process.source.processingMode = cms.untracked.string(
'RunsAndLumis')
327 process.source.fileNames = cms.untracked(cms.vstring())
328 process.maxEvents.input = -1
329 process.dqmSaver.workflow = datasetName
337 skimming method overload for the prompt skiming 340 options = defaultOptions
341 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
342 options.step =
"SKIM:"+(
'+'.
join(skims))
343 options.name =
"SKIM" 345 process = cms.Process(
"SKIM", self.eras)
346 process.source = cms.Source(
"PoolSource")
348 if 'customs' in args:
349 options.customisation_file=args[
'customs']
352 configBuilder.prepare()
357 def repack(self, **args): 358 options = defaultOptions 360 options.filein='file.dat' 361 options.filetype='DAT' 362 options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__ 363 process = cms.Process('REPACK', self.eras) 364 cb = ConfigBuilder(options, process = process, with_output = True,with_input=True) 366 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)