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-
319321def pre_collector (max_events = None , is_cosmic = False , use_badWires = False ):
320322 """
321323 Define pre collection (reconstruction in our purpose).
0 commit comments