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 for a
in args[
'outputs']:
67 if a[
'dataTier'] ==
'MINIAOD':
73 options.customisation_file=args[
'customs']
77 options.step =
'RAW2DIGI,L1Reco,RECO'+self.
recoSeq+eiStep+step+PhysicsSkimStep+miniAODStep+
',DQM'+dqmStep+
',ENDJOB'
82 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
promptModifiers) )
83 cb =
ConfigBuilder(options, process = process, with_output =
True)
86 process.source = cms.Source(
"PoolSource",
87 fileNames = cms.untracked.vstring()
100 Proton collision data taking express processing
103 skims = args[
'skims']
105 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
106 for wfl
in pclWkflws:
112 options.__dict__.update(defaultOptions.__dict__)
113 options.scenario = self.
cbSc
114 if (
'nThreads' in args) :
115 options.nThreads=args[
'nThreads']
119 options.step =
'RAW2DIGI,L1Reco,RECO'+self.
recoSeq+eiStep+step+
',DQM'+dqmStep+
',ENDJOB'
125 options.filein =
'tobeoverwritten.xyz'
126 if 'inputSource' in args:
127 options.filetype = args[
'inputSource']
128 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
expressModifiers) )
130 if 'customs' in args:
131 options.customisation_file=args[
'customs']
135 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
146 _visualizationProcessing_
151 options.__dict__.update(defaultOptions.__dict__)
152 options.scenario = self.
cbSc
155 if 'preFilter' in args:
156 options.step +=
'FILTER:'+args[
'preFilter']+
','
160 options.step +=
'RAW2DIGI,L1Reco,RECO'+eiStep+
',ENDJOB'
165 options.timeoutOutput =
True
167 options.filein =
'tobeoverwritten.xyz'
169 if 'inputSource' in args:
170 options.filetype = args[
'inputSource']
173 options.filetype =
'DQMDAQ'
175 print(
"Using %s source"%options.filetype)
177 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
visModifiers) )
179 if 'customs' in args:
180 options.customisation_file=args[
'customs']
184 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
203 AlcaReco processing & skims for proton collisions
208 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
209 skims = [x
for x
in skims
if x
not in pclWflws]
212 step +=
'ALCA:'+(
'+'.
join(pclWflws))
217 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
220 options.__dict__.update(defaultOptions.__dict__)
221 options.scenario = self.
cbSc
223 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None'
224 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
225 options.conditions +=
','+args[
'globalTagConnect']
227 options.triggerResultsProcess =
'RECO'
229 if 'customs' in args:
230 options.customisation_file=args[
'customs']
232 process = cms.Process(
'ALCA', self.eras)
236 process.source = cms.Source(
238 fileNames = cms.untracked.vstring()
246 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
247 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
256 Proton collisions data taking DQM Harvesting
259 options = defaultOptions
260 options.scenario = self.
cbSc
261 options.step =
"HARVESTING"+
dqmSeq(args,
':dqmHarvesting')
262 options.name =
"EDMtoMEConvert"
265 process = cms.Process(
"HARVESTING", self.eras)
268 if 'customs' in args:
269 options.customisation_file=args[
'customs']
272 configBuilder.prepare()
282 Proton collisions data taking AlCa Harvesting
287 skims = args[
'skims']
290 if 'alcapromptdataset' in args:
291 skims.append(
'@'+args[
'alcapromptdataset'])
293 if len(skims) == 0:
return None
294 options = defaultOptions
295 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
296 options.step =
"ALCAHARVEST:"+(
'+'.
join(skims))
297 options.name =
"ALCAHARVEST"
300 process = cms.Process(
"ALCAHARVEST", self.eras)
301 process.source = cms.Source(
"PoolSource")
303 if 'customs' in args:
304 options.customisation_file=args[
'customs']
307 configBuilder.prepare()
312 process.source.processingMode = cms.untracked.string(
'RunsAndLumis')
313 process.source.fileNames = cms.untracked(cms.vstring())
314 process.maxEvents.input = -1
315 process.dqmSaver.workflow = datasetName
323 skimming method overload for the prompt skiming
326 options = defaultOptions
327 options.scenario = self.
cbSc if hasattr(self,
'cbSc')
else self.__class__.__name__
328 options.step =
"SKIM:"+(
'+'.
join(skims))
329 options.name =
"SKIM"
331 process = cms.Process(
"SKIM", self.eras)
332 process.source = cms.Source(
"PoolSource")
334 if 'customs' in args:
335 options.customisation_file=args[
'customs']
338 configBuilder.prepare()
343 def repack(self, **args):
344 options = defaultOptions
346 options.filein='file.dat'
347 options.filetype='DAT'
348 options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__
349 process = cms.Process('REPACK', self.eras)
350 cb = ConfigBuilder(options, process = process, with_output = True,with_input=True)
352 print cb.pythonCfgCode
def visualizationProcessing
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
static std::string join(char **cmd)