Skip to content

Commit

Permalink
Merge pull request #1085 in B2/basf2 from feature/BII-9408-add-cdc-ca…
Browse files Browse the repository at this point in the history
…libration-procedure-to-expert_config-rel06-00 to release/06-00

* commit '69b0baeb637f87fc4c9c8c1532761d544bf3e8dd':
  Link the calibration procedure to the expert config
  • Loading branch information
GiacomoXT committed Jun 16, 2022
2 parents 8601fda + 69b0bae commit 471c128
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions calibration/scripts/prompt/calibrations/caf_cdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"max_events_for_xt_sr_calibration": 10000000, # 10M
"fractions_for_each_type": [0.5, 1, 0.5], # [mumu, hadron, cosmic]
"max_job_for_each_type": [400, 700, 400],
"calib_mode": "quick",
"calib_mode": "quick", # manual or predefined: quick, full
"calibration_procedure": {"tz0": 1, "xt0": 0, "sr_tz0": 0, "tz2": 0},
"payload_boundaries": [],
"backend_args": {"request_memory": "4 GB"}
})
Expand Down Expand Up @@ -259,8 +260,10 @@ def get_calibrations(input_data, **kwargs):
"sr_tz1": 0,
"tz2": 0
}
elif calib_mode == "manual":
calibration_procedure = expert_config["calibration_procedure"]
else:
basf2.B2FATAL(f"Calibration mode is not defined {calib_mode}")
basf2.B2FATAL(f"Calibration mode is not defined {calib_mode}, should be quick, full, or manual")
# t0
calib_keys = list(calibration_procedure)
cals = [None]*len(calib_keys)
Expand Down Expand Up @@ -297,7 +300,7 @@ def get_calibrations(input_data, **kwargs):
use_badWires=True if calib_keys[i] == "tz" else False,
collector_granularity=collector_granularity,
backend_args=expert_config["backend_args"],
dependencies=[cals[i-1]] if i > 1 else None
dependencies=[cals[i-1]] if i > 0 else None
)
if payload_boundaries:
basf2.B2INFO("Found payload_boundaries: calibration strategies set to SequentialBoundaries.")
Expand All @@ -315,7 +318,6 @@ def get_calibrations(input_data, **kwargs):


#################################################

def pre_collector(max_events=None, is_cosmic=False, use_badWires=False):
"""
Define pre collection (reconstruction in our purpose).
Expand Down

0 comments on commit 471c128

Please sign in to comment.