5 Scenario supporting proton collisions for AlCa needs for the CT-PPS detector 8 from __future__
import print_function
15 from Configuration.DataProcessing.Utils
import stepALCAPRODUCER,dqmIOSource,harvestingMode,dictIO,gtNameAndConnect,addMonitoring
16 from Configuration.Eras.Era_Run3_cff
import Run3
17 import FWCore.ParameterSet.Config
as cms
21 Scenario.__init__(self)
28 Implement configuration building for data processing for proton 29 collision data taking for AlCa needs for the CT-PPS detector 34 if not 'skims' in args:
38 if not 'skims' in args:
39 args[
'skims']=self.
skims 40 if not 'customs' in args:
44 options.__dict__.update(defaultOptions.__dict__)
45 options.scenario =
"pp" 50 print(args[
'customs'])
51 options.customisation_file=args[
'customs']
55 process = cms.Process(
'RECO', cms.ModifierChain(self.
eras) )
56 cb =
ConfigBuilder(options, process = process, with_output =
True)
59 process.source = cms.Source(
"PoolSource",
60 fileNames = cms.untracked.vstring()
71 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()
109 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
110 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
118 Proton collisions data taking DQM Harvesting 121 options = defaultOptions
122 options.scenario =
"pp" 123 options.step =
"HARVESTING:alcaHarvesting" 124 options.name =
"EDMtoMEConvert" 127 process = cms.Process(
"HARVESTING", self.
eras)
130 configBuilder.prepare()
141 Proton collision data taking express processing 146 skims = args[
'skims']
147 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
148 for wfl
in pclWkflws:
152 options.__dict__.update(defaultOptions.__dict__)
153 options.scenario =
"pp" 156 if 'outputs' in args:
158 outputs_Raw = [x
for x
in args[
'outputs']
if x[
'dataTier'] ==
'RAW']
159 outputs_noRaw = [x
for x
in args[
'outputs']
if x[
'dataTier'] !=
'RAW']
160 if len(outputs_Raw) == 1:
161 print(
'RAW data-tier requested')
162 options.outputDefinition = outputs_noRaw.__str__()
166 options.filein =
'tobeoverwritten.xyz' 167 if 'inputSource' in args:
168 options.filetype = args[
'inputSource']
169 process = cms.Process(
'RECO', self.
eras)
171 if 'customs' in args:
172 options.customisation_file=args[
'customs']
174 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
180 for output
in outputs_Raw:
182 moduleLabel = output[
'moduleLabel']
183 selectEvents = output.get(
'selectEvents',
None)
184 maxSize = output.get(
'maxSize',
None)
186 outputModule = cms.OutputModule(
188 fileName = cms.untracked.string(
"%s.root" % moduleLabel)
191 outputModule.dataset = cms.untracked.PSet(dataTier = cms.untracked.string(
"RAW"))
194 outputModule.maxSize = cms.untracked.int32(maxSize)
196 if selectEvents !=
None:
197 outputModule.SelectEvents = cms.untracked.PSet(
198 SelectEvents = cms.vstring(selectEvents)
200 outputModule.outputCommands = cms.untracked.vstring(
'drop *',
203 setattr(process, moduleLabel, outputModule)
204 setattr(process, moduleLabel+
'_step', cms.EndPath(outputModule))
205 path = getattr(process, moduleLabel+
'_step')
206 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)