23from ROOT
import Belle2
26from basf2
import conditions
as b2conditions
41print(
"Python arguments:")
45 counting = counting + 1
47fileNames = [
'eclHadronTimeCalibrationValidationCollector.root']
50 fileNames = glob(sys.argv[1])
51algo.setInputFileNames(fileNames)
55 basePath = sys.argv[2] +
"/"
56 print(
"basePath = ", basePath)
61algo.meanCleanRebinFactor = 3
63algo.meanCleanCutMinFactor = 0.4
66b2.set_log_level(b2.LogLevel.INFO)
69exprun_vector = algo.getRunListFromAllData()
71baseName =
"eclHadronTValidationAlgorithm"
72basePathAndName = basePath + baseName
73algo.debugFilenameBase = basePathAndName
78b2conditions.override_globaltags()
80b2.B2INFO(
"Adding Local Database {} to head of chain of local databases.")
81b2conditions.prepend_testing_payloads(
"localdb/database.txt")
82b2.B2INFO(
"Using Global Tag {}")
83b2conditions.prepend_globaltag(
"dp_recon_release6_patch")
84b2conditions.prepend_globaltag(
"Reco_master_patch_rel5")
85b2conditions.prepend_globaltag(
"AIRFLOW_online_snapshot_20210719-124441")
86b2conditions.prepend_globaltag(
"data_reprocessing_prompt")
90 print(
"Combining all runs' histograms for a single calibration")
91 print(
"path = ", basePathAndName)
92 alg_result = algo.execute()
93 print(
"Calibration completion status", alg_result)
97 print(
"Calibrating each run individually")
98 runsWithoutEnoughData = []
99 for exprun
in exprun_vector:
100 iov_to_execute = ROOT.vector(
"std::pair<int,int>")()
101 iov_to_execute.push_back(exprun)
102 print(
"path = ", basePathAndName)
103 alg_result = algo.execute(iov_to_execute, 0)
104 print(
"Calibration success-result was", alg_result,
" (0=ok, 2=needs more data)")
105 if (alg_result == 0):
109print(
"Summary of possible calibration completion status values:")
110print(
" c_OK = Finished successfully = 0 in Python")
111print(
" c_Iterate, = Needs iteration = 1 in Python")
112print(
" c_NotEnoughData, = Needs more data = 2 in Python")
113print(
" c_Failure, = Failed = 3 in Python")
114print(
" 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.