5 Scenario supporting proton collisions
8 from __future__
import print_function
14 from Configuration.DataProcessing.Utils
import stepALCAPRODUCER,dqmIOSource,harvestingMode,dictIO,gtNameAndConnect,addMonitoring
15 import FWCore.ParameterSet.Config
as cms
19 Scenario.__init__(self)
24 Implement configuration building for data processing for proton
30 if not 'skims' in args:
34 if not 'skims' in args:
35 args[
'skims']=self.skims
38 options.__dict__.update(defaultOptions.__dict__)
39 options.scenario =
"pp"
44 process = cms.Process(
'RECO', self.eras)
45 cb =
ConfigBuilder(options, process = process, with_output =
True)
48 process.source = cms.Source(
"PoolSource",
49 fileNames = cms.untracked.vstring()
59 AlcaReco processing & skims for proton collisions
63 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
64 skims = [x
for x
in skims
if x
not in pclWflws]
67 step +=
'ALCA:'+(
'+'.
join(pclWflws))
72 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
75 options.__dict__.update(defaultOptions.__dict__)
76 options.scenario =
"pp"
78 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None'
79 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
80 options.conditions +=
','+args[
'globalTagConnect']
82 options.triggerResultsProcess =
'RECO'
84 process = cms.Process(
'ALCA', self.eras)
88 process.source = cms.Source(
90 fileNames=cms.untracked.vstring()
98 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
99 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
108 Proton collisions data taking DQM Harvesting
111 options = defaultOptions
112 options.scenario =
"pp"
113 options.step =
"HARVESTING:alcaHarvesting"
114 options.name =
"EDMtoMEConvert"
117 process = cms.Process(
"HARVESTING", self.eras)
120 configBuilder.prepare()
138 Proton collisions data taking AlCa Harvesting
143 skims = args[
'skims']
146 if 'alcapromptdataset' in args:
147 skims.append(
'@'+args[
'alcapromptdataset'])
149 if len(skims) == 0:
return None
150 options = defaultOptions
151 options.scenario = self.cbSc
if hasattr(self,
'cbSc')
else self.__class__.__name__
152 options.step =
"ALCAHARVEST:"+(
'+'.
join(skims))
153 options.name =
"ALCAHARVEST"
156 process = cms.Process(
"ALCAHARVEST", self.eras)
157 process.source = cms.Source(
"PoolSource")
159 if 'customs' in args:
160 options.customisation_file=args[
'customs']
163 configBuilder.prepare()
168 process.source.processingMode = cms.untracked.string(
'RunsAndLumis')
169 process.source.fileNames = cms.untracked(cms.vstring())
170 process.maxEvents.input = -1
171 process.dqmSaver.workflow = datasetName
179 Proton collision data taking express processing
184 skims = args[
'skims']
185 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
186 for wfl
in pclWkflws:
190 options.__dict__.update(defaultOptions.__dict__)
191 options.scenario =
"pp"
194 if 'outputs' in args:
196 outputs_Raw = [x
for x
in args[
'outputs']
if x[
'dataTier'] ==
'RAW']
197 outputs_noRaw = [x
for x
in args[
'outputs']
if x[
'dataTier'] !=
'RAW']
198 if len(outputs_Raw) == 1:
199 print(
'RAW data-tier requested')
200 options.outputDefinition = outputs_noRaw.__str__()
205 options.filein =
'tobeoverwritten.xyz'
206 if 'inputSource' in args:
207 options.filetype = args[
'inputSource']
208 process = cms.Process(
'RECO', self.eras)
210 if 'customs' in args:
211 options.customisation_file=args[
'customs']
213 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
219 for output
in outputs_Raw:
221 moduleLabel = output[
'moduleLabel']
222 selectEvents = output.get(
'selectEvents',
None)
223 maxSize = output.get(
'maxSize',
None)
225 outputModule = cms.OutputModule(
227 fileName = cms.untracked.string(
"%s.root" % moduleLabel)
230 outputModule.dataset = cms.untracked.PSet(dataTier = cms.untracked.string(
"RAW"))
233 outputModule.maxSize = cms.untracked.int32(maxSize)
235 if selectEvents !=
None:
236 outputModule.SelectEvents = cms.untracked.PSet(
237 SelectEvents = cms.vstring(selectEvents)
239 outputModule.outputCommands = cms.untracked.vstring(
'drop *',
242 setattr(process, moduleLabel, outputModule)
244 setattr(process, moduleLabel+
'_step', cms.EndPath(outputModule))
245 path = getattr(process, moduleLabel+
'_step')
246 process.schedule.append(path)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
static std::string join(char **cmd)