25from ROOT
import Belle2
28from basf2
import conditions
as b2conditions
43print(
"Python arguments:")
47 counting = counting + 1
49fileNames = [
'eclBhabhaTimeCalibrationValidationCollector.root']
52 fileNames = glob(sys.argv[1])
53algo.setInputFileNames(fileNames)
57 basePath = sys.argv[2] +
"/"
58 print(
"basePath = ", basePath)
63algo.meanCleanRebinFactor = 3
65algo.meanCleanCutMinFactor = 0.4
68b2.set_log_level(b2.LogLevel.INFO)
71exprun_vector = algo.getRunListFromAllData()
73baseName =
"eclBhabhaTValidationAlgorithm"
74basePathAndName = basePath + baseName
75algo.debugFilenameBase = basePathAndName
80b2conditions.override_globaltags()
82b2.B2INFO(
"Adding Local Database {} to head of chain of local databases.")
83b2conditions.prepend_testing_payloads(
"localdb/database.txt")
84b2.B2INFO(
"Using Global Tag {}")
85b2conditions.prepend_globaltag(
"dp_recon_release6_patch")
86b2conditions.prepend_globaltag(
"Reco_master_patch_rel5")
87b2conditions.prepend_globaltag(
"AIRFLOW_online_snapshot_20210719-124441")
88b2conditions.prepend_globaltag(
"data_reprocessing_prompt")
92 print(
"Combining all runs' histograms for a single calibration")
93 print(
"path = ", basePathAndName)
94 alg_result = algo.execute()
95 print(
"Calibration completion status", alg_result)
99 print(
"Calibrating each run individually")
100 runsWithoutEnoughData = []
101 for exprun
in exprun_vector:
102 iov_to_execute = ROOT.vector(
"std::pair<int,int>")()
103 iov_to_execute.push_back(exprun)
104 print(
"path = ", basePathAndName)
105 alg_result = algo.execute(iov_to_execute, 0)
106 print(
"Calibration success-result was", alg_result,
" (0=ok, 2=needs more data)")
107 if (alg_result == 0):
111print(
"Summary of possible calibration completion status values:")
112print(
" c_OK = Finished successfully = 0 in Python")
113print(
" c_Iterate, = Needs iteration = 1 in Python")
114print(
" c_NotEnoughData, = Needs more data = 2 in Python")
115print(
" c_Failure, = Failed = 3 in Python")
116print(
" c_Undefined = Not yet known (before execution) = 4 in Python")
Validate the ecl timing calibrations using a hadronic event selection.
static Environment & Instance()
Static method to get a reference to the Environment instance.