5 Scenario supporting proton collisions for AlCa needs when ALCANANO is produced 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)
21 self.
promptCustoms= [
'Configuration/DataProcessing/RecoTLR.customisePrompt' ]
27 Implement configuration building for data processing for proton 28 collision data taking for AlCa needs when ALCANANO is produced 33 if not 'skims' in args:
37 if not 'skims' in args:
38 args[
'skims']=self.skims
39 if not 'customs' in args:
45 options.__dict__.update(defaultOptions.__dict__)
46 options.scenario =
"pp" 51 print(args[
'customs'])
52 options.customisation_file=args[
'customs']
58 process = cms.Process(
'RECO', cms.ModifierChain(self.eras, self.
promptModifiers) )
59 cb =
ConfigBuilder(options, process = process, with_output =
True)
62 process.source = cms.Source(
"PoolSource",
63 fileNames = cms.untracked.vstring()
72 AlcaReco processing & skims for proton collisions 75 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
76 skims = [x
for x
in skims
if x
not in pclWflws]
79 step +=
'ALCA:'+(
'+'.
join(pclWflws))
84 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
87 options.__dict__.update(defaultOptions.__dict__)
88 options.scenario =
"pp" 90 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None' 91 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
92 options.conditions +=
','+args[
'globalTagConnect']
94 options.triggerResultsProcess =
'RECO' 96 process = cms.Process(
'ALCA', self.eras)
100 process.source = cms.Source(
102 fileNames=cms.untracked.vstring()
108 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
109 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
117 Proton collisions data taking DQM Harvesting 119 options = defaultOptions
120 options.scenario =
"pp" 121 options.step =
"HARVESTING:alcaHarvesting" 122 options.name =
"EDMtoMEConvert" 125 process = cms.Process(
"HARVESTING", self.eras)
128 configBuilder.prepare()
137 Proton collisions data taking AlCa Harvesting 141 skims = args[
'skims']
144 if 'alcapromptdataset' in args:
145 skims.append(
'@'+args[
'alcapromptdataset'])
147 if len(skims) == 0:
return None 148 options = defaultOptions
149 options.scenario = self.cbSc
if hasattr(self,
'cbSc')
else self.__class__.__name__
150 options.step =
"ALCAHARVEST:"+(
'+'.
join(skims))
151 options.name =
"ALCAHARVEST" 154 process = cms.Process(
"ALCAHARVEST", self.eras)
155 process.source = cms.Source(
"PoolSource")
157 if 'customs' in args:
158 options.customisation_file=args[
'customs']
161 configBuilder.prepare()
163 process.source.processingMode = cms.untracked.string(
'RunsAndLumis')
164 process.source.fileNames = cms.untracked(cms.vstring())
165 process.maxEvents.input = -1
166 process.dqmSaver.workflow = datasetName
173 Proton collision data taking express processing 177 skims = args[
'skims']
178 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
179 for wfl
in pclWkflws:
183 options.__dict__.update(defaultOptions.__dict__)
184 options.scenario =
"pp" 187 if 'outputs' in args:
189 outputs_Raw = [x
for x
in args[
'outputs']
if x[
'dataTier'] ==
'RAW']
190 outputs_noRaw = [x
for x
in args[
'outputs']
if x[
'dataTier'] !=
'RAW']
191 if len(outputs_Raw) == 1:
192 print(
'RAW data-tier requested')
193 options.outputDefinition = outputs_noRaw.__str__()
197 options.filein =
'tobeoverwritten.xyz' 198 if 'inputSource' in args:
199 options.filetype = args[
'inputSource']
200 process = cms.Process(
'RECO', self.eras)
202 if 'customs' in args:
203 options.customisation_file=args[
'customs']
205 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
211 for output
in outputs_Raw:
213 moduleLabel = output[
'moduleLabel']
214 selectEvents = output.get(
'selectEvents',
None)
215 maxSize = output.get(
'maxSize',
None)
217 outputModule = cms.OutputModule(
219 fileName = cms.untracked.string(
"%s.root" % moduleLabel)
222 outputModule.dataset = cms.untracked.PSet(dataTier = cms.untracked.string(
"RAW"))
225 outputModule.maxSize = cms.untracked.int32(maxSize)
227 if selectEvents !=
None:
228 outputModule.SelectEvents = cms.untracked.PSet(
229 SelectEvents = cms.vstring(selectEvents)
231 outputModule.outputCommands = cms.untracked.vstring(
'drop *',
234 setattr(process, moduleLabel, outputModule)
236 setattr(process, moduleLabel+
'_step', cms.EndPath(outputModule))
237 path = getattr(process, moduleLabel+
'_step')
238 process.schedule.append(path)
def harvestingMode(process, datasetName, args, rANDl=True)
def alcaSkim(self, skims, args)
def gtNameAndConnect(globalTag, args)
def promptReco(self, globalTag, args)
def dictIO(options, args)
def expressProcessing(self, globalTag, args)
def addMonitoring(process)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def stepALCAPRODUCER(skims)
static std::string join(char **cmd)
def alcaHarvesting(self, globalTag, datasetName, args)
def dqmHarvesting(self, datasetName, runNumber, globalTag, args)
def skimsIfNotGiven(self, args, sl)