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)
23 self.
cbSc=self.__class__.__name__
30 Implement configuration building for data processing for proton
37 if 'repacked' in args:
38 if args[
'repacked'] ==
True:
39 options.isRepacked =
True
41 options.isRepacked =
False
49 Proton collision data taking prompt reco
54 if (
"PhysicsSkims" in args) :
58 options.__dict__.update(defaultOptions.__dict__)
59 options.scenario = self.
cbSc
60 if (
'nThreads' in args) :
61 options.nThreads=args[
'nThreads']
67 for a
in args[
'outputs']:
68 if a[
'dataTier'] ==
'MINIAOD':
74 options.customisation_file=args[
'customs']
80 options.step =
'RAW2DIGI,L1Reco,RECO'+self.
recoSeq+eiStep+step+PhysicsSkimStep+miniAODStep+
',DQM'+dqmStep+
',ENDJOB'
85 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
promptModifiers) )
86 cb =
ConfigBuilder(options, process = process, with_output =
True)
89 process.source = cms.Source(
"PoolSource",
90 fileNames = cms.untracked.vstring()
103 Proton collision data taking express processing
106 skims = args[
'skims']
108 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
109 for wfl
in pclWkflws:
115 options.__dict__.update(defaultOptions.__dict__)
116 options.scenario = self.
cbSc
117 if (
'nThreads' in args) :
118 options.nThreads=args[
'nThreads']
124 options.step =
'RAW2DIGI,L1Reco,RECO'+self.
recoSeq+eiStep+step+
',DQM'+dqmStep+
',ENDJOB'
130 options.filein =
'tobeoverwritten.xyz'
131 if 'inputSource' in args:
132 options.filetype = args[
'inputSource']
133 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
expressModifiers) )
135 if 'customs' in args:
136 options.customisation_file=args[
'customs']
140 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
151 _visualizationProcessing_
156 options.__dict__.update(defaultOptions.__dict__)
157 options.scenario = self.
cbSc
160 if 'preFilter' in args:
161 options.step +=
'FILTER:'+args[
'preFilter']+
','
167 options.step +=
'RAW2DIGI,L1Reco,RECO'+eiStep+
',ENDJOB'
172 options.timeoutOutput =
True
174 options.filein =
'tobeoverwritten.xyz'
176 if 'inputSource' in args:
177 options.filetype = args[
'inputSource']
180 options.filetype =
'DQMDAQ'
182 print(
"Using %s source"%options.filetype)
184 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
visModifiers) )
186 if 'customs' in args:
187 options.customisation_file=args[
'customs']
191 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
210 AlcaReco processing & skims for proton collisions
215 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
216 skims = [x
for x
in skims
if x
not in pclWflws]
219 step +=
'ALCA:'+(
'+'.
join(pclWflws))
224 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
227 options.__dict__.update(defaultOptions.__dict__)
228 options.scenario = self.
cbSc
230 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None'
231 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
232 options.conditions +=
','+args[
'globalTagConnect']
234 options.triggerResultsProcess =
'RECO'
236 if 'customs' in args:
237 options.customisation_file=args[
'customs']
239 process = cms.Process(
'ALCA', self.eras)
243 process.source = cms.Source(
245 fileNames = cms.untracked.vstring()
253 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
254 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
263 Proton collisions data taking DQM Harvesting
266 options = defaultOptions
267 options.scenario = self.
cbSc
268 options.step =
"HARVESTING"+
dqmSeq(args,
':dqmHarvesting')
269 options.name =
"EDMtoMEConvert"
272 process = cms.Process(
"HARVESTING", self.eras)
275 if 'customs' in args:
276 options.customisation_file=args[
'customs']
279 configBuilder.prepare()
289 Proton collisions data taking AlCa Harvesting
294 skims = args[
'skims']
297 if 'alcapromptdataset' in args:
298 skims.append(
'@'+args[
'alcapromptdataset'])
300 if len(skims) == 0:
return None
301 options = defaultOptions
302 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
303 options.step =
"ALCAHARVEST:"+(
'+'.
join(skims))
304 options.name =
"ALCAHARVEST"
307 process = cms.Process(
"ALCAHARVEST", self.eras)
308 process.source = cms.Source(
"PoolSource")
310 if 'customs' in args:
311 options.customisation_file=args[
'customs']
314 configBuilder.prepare()
319 process.source.processingMode = cms.untracked.string(
'RunsAndLumis')
320 process.source.fileNames = cms.untracked(cms.vstring())
321 process.maxEvents.input = -1
322 process.dqmSaver.workflow = datasetName
330 skimming method overload for the prompt skiming
333 options = defaultOptions
334 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
335 options.step =
"SKIM:"+(
'+'.
join(skims))
336 options.name =
"SKIM"
338 process = cms.Process(
"SKIM", self.eras)
339 process.source = cms.Source(
"PoolSource")
341 if 'customs' in args:
342 options.customisation_file=args[
'customs']
345 configBuilder.prepare()
350 def repack(self, **args):
351 options = defaultOptions
353 options.filein='file.dat'
354 options.filetype='DAT'
355 options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__
356 process = cms.Process('REPACK', self.eras)
357 cb = ConfigBuilder(options, process = process, with_output = True,with_input=True)
359 print cb.pythonCfgCode
def visualizationProcessing
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
static std::string join(char **cmd)