Skip to content

Commit ddd7a34

Browse files
authored
Merge pull request #48459 from ftorrresd/nano_wfn
Increase Nano relval WF counter buffer size
2 parents 5da506a + 8c4438c commit ddd7a34

File tree

2 files changed

+35
-28
lines changed

2 files changed

+35
-28
lines changed

Configuration/PyReleaseValidation/python/relval_nano.py

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,39 @@
33

44

55
class WFN:
6-
# a simple class to number workflows dynamically
7-
def __init__(self, offset):
6+
def __init__(self, offset: int):
87
self.offset = offset
9-
self.index = 0
10-
self.subindex = 1
11-
12-
def __call__(self):
13-
if self.subindex == 100:
14-
print("this is not going to work nicely")
15-
self.subindex = 0 / 0
16-
r = float(f'{self.offset}.{self.index}{self.subindex:02d}')
17-
self.subindex += 1
18-
return r
19-
20-
def next(self, index=None):
8+
self.index = 1
9+
self.thousands = 0
10+
self.hundreds = 0
11+
12+
def __call__(self) -> float:
13+
if self.index >= 100:
14+
raise ValueError("Overflow: Leading-index exceeded limit (100)")
15+
value_str = f"{self.offset}.{self.thousands}{self.hundreds}{self.index:02d}"
16+
result = float(value_str)
17+
self.index += 1
18+
return result
19+
20+
def subnext(self) -> None:
21+
self.hundreds += 1
22+
self.index = 1
23+
if self.hundreds >= 10:
24+
raise ValueError("Overflow: Sub-index (hundreds) exceeded limit (999)")
25+
26+
def next(self, index: int = None) -> None:
2127
if index is None:
22-
self.index += 1
28+
self.thousands += 1
29+
self.hundreds = 0
2330
else:
24-
# manually set the index if given
25-
assert index > self.index
26-
self.index = index
27-
self.subindex = 1
31+
if index <= self.thousands:
32+
raise ValueError("New index must be greater than current index")
33+
self.thousands = index
34+
self.hundreds = 0
2835

29-
def subnext(self):
30-
# go to the next tenth for the subindex 10 because of 02d formating
31-
self.subindex = math.ceil(self.subindex / 10.) * 10 + 1
36+
if self.thousands >= 10:
37+
raise ValueError("Overflow: Sub-sub-index (thousands) exceeded limit (9999)")
38+
self.index = 1
3239

3340

3441
workflows = Matrix()
@@ -378,7 +385,7 @@ def subnext(self):
378385

379386
################################################################
380387
_wfn = WFN(2500)
381-
######## 2500.0xx ########
388+
######## 2500.0xxx ########
382389
# Run2, 10_6_X MiniAOD input (current recommendation for 2016--2018)
383390
workflows[_wfn()] = ['NANOmc106Xul16v2', ['TTbarMINIAOD10.6_UL16v2', 'NANO_mc10.6ul16v2', 'HRV_NANO_mc']]
384391
workflows[_wfn()] = ['NANOmc106Xul17v2', ['TTbarMINIAOD10.6_UL17v2', 'NANO_mc10.6ul17v2', 'HRV_NANO_mc']]
@@ -403,7 +410,7 @@ def subnext(self):
403410
workflows[_wfn()] = ['NANOdataUL18reMINI', ['RunJetHT2018D_reminiaodUL', 'REMINIAOD_data2018UL', 'NANO_data_UL18reMINI', 'HRV_NANO_data']] # noqa
404411

405412
_wfn.next(1)
406-
######## 2500.1xx ########
413+
######## 2500.1xxx ########
407414
# Run3, 13_0_X input (current recommendation for 2022--2023)
408415
workflows[_wfn()] = ['NANOmc130X', ['TTbarMINIAOD13.0', 'NANO_mc13.0', 'HRV_NANO_mc']]
409416

@@ -421,7 +428,7 @@ def subnext(self):
421428
_wfn.subnext()
422429

423430
_wfn.next(2)
424-
######## 2500.2xx ########
431+
######## 2500.2xxx ########
425432
# Run3, 14_0_X input (2024 RAW/AOD)
426433
# Standard NANO, MC
427434

@@ -474,7 +481,7 @@ def subnext(self):
474481
workflows[_wfn()] = ['NANOdata2024reMINI', ['JetMET1_Run2024H_AOD_140X', 'REMINIAOD_data2024', 'NANO_data_2024_reMINI', 'HRV_NANO_data']] # noqa
475482

476483
_wfn.next(3)
477-
######## 2500.3xx ########
484+
######## 2500.3xxx ########
478485
# Run3, 15_0_X input (2024 MINIv6+NANOv15 & 2025 data-taking)
479486
# Standard NANO, MC
480487
workflows[_wfn()] = ['NANOmc150X', ['TTbar_13p6_Summer24_MINIAOD_150X', 'NANO_mc15.0', 'HRV_NANO_mc']]
@@ -516,7 +523,7 @@ def subnext(self):
516523

517524

518525
_wfn.next(9)
519-
######## 2500.9xx ########
526+
######## 2500.9xxx ########
520527
# NANOGEN
521528
workflows[_wfn()] = ['', ['TTbarMINIAOD10.6_UL18v2', 'NANOGENFromMini']]
522529
workflows[_wfn()] = ['', ['TTbarMINIAOD14.0', 'NANOGENFromMini']]

Configuration/PyReleaseValidation/scripts/runTheMatrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def runSelected(opt):
102102
17034.0, # RelValTTbar_14TeV 2025 PU = Run3_Flat55To75_PoissonOOTPU
103103
14034.0, # RelValTTbar_14TeV Run3_2023_FastSim
104104
14234.0, # RelValTTbar_14TeV Run3_2023_FastSim PU = Run3_Flat55To75_PoissonOOTPU
105-
2500.301, # RelValTTbar_14TeV NanoAOD from existing MINI
105+
2500.3001, # RelValTTbar_14TeV NanoAOD from existing MINI
106106

107107
###### pp Data
108108
## Run3

0 commit comments

Comments
 (0)