5 Scenario supporting proton collisions for AlCa needs for the CT-PPS detector 8 from __future__
import print_function
14 from Configuration.DataProcessing.Utils
import stepALCAPRODUCER,dqmIOSource,harvestingMode,dictIO,gtNameAndConnect,addMonitoring
15 from Configuration.Eras.Era_Run3_cff
import Run3
16 import FWCore.ParameterSet.Config
as cms
20 Scenario.__init__(self)
27 Implement configuration building for data processing for proton 28 collision data taking for AlCa needs for the CT-PPS detector 33 if not 'skims' in args:
37 if not 'skims' in args:
38 args[
'skims']=self.
skims 39 if not 'customs' in args:
43 options.__dict__.update(defaultOptions.__dict__)
44 options.scenario =
"pp" 49 print(args[
'customs'])
50 options.customisation_file=args[
'customs']
54 process = cms.Process(
'RECO', cms.ModifierChain(self.
eras) )
55 cb =
ConfigBuilder(options, process = process, with_output =
True)
58 process.source = cms.Source(
"PoolSource",
59 fileNames = cms.untracked.vstring()
70 AlcaReco processing & skims for proton collisions 74 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
75 skims = [x
for x
in skims
if x
not in pclWflws]
78 step +=
'ALCA:'+(
'+'.
join(pclWflws))
83 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
86 options.__dict__.update(defaultOptions.__dict__)
87 options.scenario =
"pp" 89 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None' 90 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
91 options.conditions +=
','+args[
'globalTagConnect']
93 options.triggerResultsProcess =
'RECO' 95 process = cms.Process(
'ALCA', self.
eras)
99 process.source = cms.Source(
101 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 120 options = defaultOptions
121 options.scenario =
"pp" 122 options.step =
"HARVESTING:alcaHarvesting" 123 options.name =
"EDMtoMEConvert" 126 process = cms.Process(
"HARVESTING", self.
eras)
129 configBuilder.prepare()
140 Proton collision data taking express processing 145 skims = args[
'skims']
146 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
147 for wfl
in pclWkflws:
151 options.__dict__.update(defaultOptions.__dict__)
152 options.scenario =
"pp" 155 if 'outputs' in args:
157 outputs_Raw = [x
for x
in args[
'outputs']
if x[
'dataTier'] ==
'RAW']
158 outputs_noRaw = [x
for x
in args[
'outputs']
if x[
'dataTier'] !=
'RAW']
159 if len(outputs_Raw) == 1:
160 print(
'RAW data-tier requested')
161 options.outputDefinition = outputs_noRaw.__str__()
165 options.filein =
'tobeoverwritten.xyz' 166 if 'inputSource' in args:
167 options.filetype = args[
'inputSource']
168 process = cms.Process(
'RECO', self.
eras)
170 if 'customs' in args:
171 options.customisation_file=args[
'customs']
173 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
179 for output
in outputs_Raw:
181 moduleLabel = output[
'moduleLabel']
182 selectEvents = output.get(
'selectEvents',
None)
183 maxSize = output.get(
'maxSize',
None)
185 outputModule = cms.OutputModule(
187 fileName = cms.untracked.string(
"%s.root" % moduleLabel)
190 outputModule.dataset = cms.untracked.PSet(dataTier = cms.untracked.string(
"RAW"))
193 outputModule.maxSize = cms.untracked.int32(maxSize)
195 if selectEvents !=
None:
196 outputModule.SelectEvents = cms.untracked.PSet(
197 SelectEvents = cms.vstring(selectEvents)
199 outputModule.outputCommands = cms.untracked.vstring(
'drop *',
202 setattr(process, moduleLabel, outputModule)
203 setattr(process, moduleLabel+
'_step', cms.EndPath(outputModule))
204 path = getattr(process, moduleLabel+
'_step')
205 process.schedule.append(path)
def harvestingMode(process, datasetName, args, rANDl=True)
def gtNameAndConnect(globalTag, args)
def dqmHarvesting(self, datasetName, runNumber, globalTag, args)
def dictIO(options, args)
def expressProcessing(self, globalTag, args)
def addMonitoring(process)
def alcaSkim(self, skims, args)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def promptReco(self, globalTag, args)
def stepALCAPRODUCER(skims)
static std::string join(char **cmd)
def skimsIfNotGiven(self, args, sl)