Skip to content

Commit 8c537cb

Browse files
Change names of command-line options for run-dependent MC with integer IOV weights
1 parent 4147e8f commit 8c537cb

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

Configuration/Applications/python/ConfigBuilder.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class Options:
8282
defaultOptions.fast=False
8383
defaultOptions.runsAndWeightsForMC = None
8484
defaultOptions.runsScenarioForMC = None
85-
defaultOptions.runsAndWeightsForMCInteger = None
86-
defaultOptions.runsScenarioForMCInteger = None
85+
defaultOptions.runsAndWeightsForMCIntegerWeights = None
86+
defaultOptions.runsScenarioForMCIntegerWeights = None
8787
defaultOptions.runUnscheduled = False
8888
defaultOptions.timeoutOutput = False
8989
defaultOptions.nThreads = '1'
@@ -500,18 +500,18 @@ def filesFromOption(self):
500500

501501
# modify source in case of run-dependent MC (Run-3 method)
502502
self.runsAndWeightsInt=None
503-
if self._options.runsAndWeightsForMCInteger or self._options.runsScenarioForMCInteger:
503+
if self._options.runsAndWeightsForMCIntegerWeights or self._options.runsScenarioForMCIntegerWeights:
504504
if not self._options.isMC :
505-
raise Exception("options --runsAndWeightsForMCInteger and --runsScenarioForMCInteger are only valid for MC")
506-
if self._options.runsAndWeightsForMCInteger:
507-
self.runsAndWeightsInt = eval(self._options.runsAndWeightsForMCInteger)
505+
raise Exception("options --runsAndWeightsForMCIntegerWeights and --runsScenarioForMCIntegerWeights are only valid for MC")
506+
if self._options.runsAndWeightsForMCIntegerWeights:
507+
self.runsAndWeightsInt = eval(self._options.runsAndWeightsForMCIntegerWeights)
508508
else:
509509
from Configuration.StandardSequences.RunsAndWeights import RunsAndWeights
510-
if isinstance(RunsAndWeights[self._options.runsScenarioForMCInteger], str):
511-
__import__(RunsAndWeights[self._options.runsScenarioForMCInteger])
512-
self.runsAndWeightsInt = sys.modules[RunsAndWeights[self._options.runsScenarioForMCInteger]].runProbabilityDistribution
510+
if isinstance(RunsAndWeights[self._options.runsScenarioForMCIntegerWeights], str):
511+
__import__(RunsAndWeights[self._options.runsScenarioForMCIntegerWeights])
512+
self.runsAndWeightsInt = sys.modules[RunsAndWeights[self._options.runsScenarioForMCIntegerWeights]].runProbabilityDistribution
513513
else:
514-
self.runsAndWeightsInt = RunsAndWeights[self._options.runsScenarioForMCInteger]
514+
self.runsAndWeightsInt = RunsAndWeights[self._options.runsScenarioForMCIntegerWeights]
515515

516516
if self.runsAndWeightsInt:
517517
if not self._options.relval:

Configuration/Applications/python/Options.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
default=False)
9090

9191
parser.add_option("--runsAndWeightsForMC",
92-
help="Assign run numbers to MC source according to relatieve weights. [(run1,weight1),...,(runN,weightN)])",
92+
help="Assign run numbers to MC source according to relative weights. [(run1,weight1),...,(runN,weightN)])",
9393
default=None,
9494
dest="runsAndWeightsForMC")
9595

@@ -98,15 +98,15 @@
9898
default=None,
9999
dest="runsScenarioForMC")
100100

101-
parser.add_option("--runsAndWeightsForMCInteger",
101+
parser.add_option("--runsAndWeightsForMCIntegerWeights",
102102
help="Assign run numbers to MC source according to relative weights where weighting is determined by the number of times the run number appears. [(run1,run2,...,runN)])",
103103
default=None,
104-
dest="runsAndWeightsForMCInteger")
104+
dest="runsAndWeightsForMCIntegerWeights")
105105

106-
parser.add_option("--runsScenarioForMCInteger",
107-
help="Load a scenario to set run numbers in MC.)",
106+
parser.add_option("--runsScenarioForMCIntegerWeights",
107+
help="Load a scenario to set run numbers in MC with integer IOV weights.)",
108108
default=None,
109-
dest="runsScenarioForMCInteger")
109+
dest="runsScenarioForMCIntegerWeights")
110110

111111
parser.add_option("--runUnscheduled",
112112
help="Automatically convert configuration to run unscheduled the EDProducers/EDFilters that were scheduled",

Configuration/PyReleaseValidation/python/relval_steps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ def lhegensim2018ml(fragment,howMuch):
18081808
'--procModifiers':'premix_stage2,runDependent'
18091809
}
18101810

1811-
steps['DIGIPRMXUP18_PU25_RD']=merge([{'--conditions':'auto:phase1_2018_realistic_rd', '--relval': str(kevents_rd*1000) + ',' + str(events_per_job_rd), '--runsScenarioForMCInteger': 'Run2018_Equal_Lumi_Integer_Weights'}, digiPremixRD2018, digiPremixUp2018Defaults25ns])
1811+
steps['DIGIPRMXUP18_PU25_RD']=merge([{'--conditions':'auto:phase1_2018_realistic_rd', '--relval': str(kevents_rd*1000) + ',' + str(events_per_job_rd), '--runsScenarioForMCIntegerWeights': 'Run2018_Equal_Lumi_Integer_Weights'}, digiPremixRD2018, digiPremixUp2018Defaults25ns])
18121812

18131813
# configuration to simulate cross run number boundary in IB, given 5 events per lumi
18141814
steps['DIGIPRMXUP18_PU25_RD_IB']=merge([{'--conditions':'auto:phase1_2018_realistic_rd', '--customise_commands':"\"process.source.setRunNumberForEachLumi = cms.untracked.vuint32(315257,316083) \"", '--procModifiers':'premix_stage2,runDependent'}, digiPremixRD2018, digiPremixUp2018Defaults25ns])

0 commit comments

Comments
 (0)