Skip to content

Commit 471c128

Browse files
committed
Merge pull request #1085 in B2/basf2 from feature/BII-9408-add-cdc-calibration-procedure-to-expert_config-rel06-00 to release/06-00
* commit '69b0baeb637f87fc4c9c8c1532761d544bf3e8dd': Link the calibration procedure to the expert config
2 parents 8601fda + 69b0bae commit 471c128

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

calibration/scripts/prompt/calibrations/caf_cdc.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"max_events_for_xt_sr_calibration": 10000000, # 10M
4747
"fractions_for_each_type": [0.5, 1, 0.5], # [mumu, hadron, cosmic]
4848
"max_job_for_each_type": [400, 700, 400],
49-
"calib_mode": "quick",
49+
"calib_mode": "quick", # manual or predefined: quick, full
50+
"calibration_procedure": {"tz0": 1, "xt0": 0, "sr_tz0": 0, "tz2": 0},
5051
"payload_boundaries": [],
5152
"backend_args": {"request_memory": "4 GB"}
5253
})
@@ -259,8 +260,10 @@ def get_calibrations(input_data, **kwargs):
259260
"sr_tz1": 0,
260261
"tz2": 0
261262
}
263+
elif calib_mode == "manual":
264+
calibration_procedure = expert_config["calibration_procedure"]
262265
else:
263-
basf2.B2FATAL(f"Calibration mode is not defined {calib_mode}")
266+
basf2.B2FATAL(f"Calibration mode is not defined {calib_mode}, should be quick, full, or manual")
264267
# t0
265268
calib_keys = list(calibration_procedure)
266269
cals = [None]*len(calib_keys)
@@ -297,7 +300,7 @@ def get_calibrations(input_data, **kwargs):
297300
use_badWires=True if calib_keys[i] == "tz" else False,
298301
collector_granularity=collector_granularity,
299302
backend_args=expert_config["backend_args"],
300-
dependencies=[cals[i-1]] if i > 1 else None
303+
dependencies=[cals[i-1]] if i > 0 else None
301304
)
302305
if payload_boundaries:
303306
basf2.B2INFO("Found payload_boundaries: calibration strategies set to SequentialBoundaries.")
@@ -315,7 +318,6 @@ def get_calibrations(input_data, **kwargs):
315318

316319

317320
#################################################
318-
319321
def pre_collector(max_events=None, is_cosmic=False, use_badWires=False):
320322
"""
321323
Define pre collection (reconstruction in our purpose).

0 commit comments

Comments
 (0)