33 from ROOT
import Belle2
36 from basf2
import conditions
as b2conditions
51 print(
"Python arguments:")
55 counting = counting + 1
57 fileNames = [
'eclBhabhaTCollector.root']
60 fileNames = glob(sys.argv[1])
61 algo.setInputFileNames(fileNames)
65 basePath = sys.argv[2] +
"/"
66 print(
"basePath = ", basePath)
71 algo.debugOutput =
True
72 algo.meanCleanRebinFactor = 3
74 algo.meanCleanCutMinFactor = 0.3
77 algo.debugFilenameBase =
"eclBhabhaTAlgorithm"
92 b2.set_debug_level(35)
93 b2.set_log_level(b2.LogLevel.INFO)
96 exprun_vector = algo.getRunListFromAllData()
98 baseName =
"eclBhabhaTAlgorithm"
99 basePathAndName = basePath + baseName
100 algo.debugFilenameBase = basePathAndName
105 b2conditions.override_globaltags()
107 b2.B2INFO(
"Adding Local Database {} to head of chain of local databases.")
108 b2conditions.prepend_testing_payloads(
"localdb/database.txt")
109 b2.B2INFO(
"Using Global Tag {}")
110 b2conditions.prepend_globaltag(
"dp_recon_release6_patch")
111 b2conditions.prepend_globaltag(
"Reco_master_patch_rel5")
112 b2conditions.prepend_globaltag(
"AIRFLOW_online_snapshot_20210719-124441")
113 b2conditions.prepend_globaltag(
"data_reprocessing_prompt")
117 print(
"Combining all runs' histograms for a single calibration")
118 print(
"path = ", basePathAndName)
119 alg_result = algo.execute()
120 print(
"Calibration completion status", alg_result)
121 if (alg_result == 0):
124 print(
"Calibrating each run individually")
125 runsWithoutEnoughData = []
126 for exprun
in exprun_vector:
127 iov_to_execute = ROOT.vector(
"std::pair<int,int>")()
128 iov_to_execute.push_back(exprun)
129 print(
"path = ", basePathAndName)
130 alg_result = algo.execute(iov_to_execute, 0)
131 print(
"Calibration success-result was", alg_result,
" (0=ok, 2=needs more data)")
132 if (alg_result == 0):
136 print(
"Summary of possible calibration completion status values:")
137 print(
" c_OK = Finished successfuly = 0 in Python")
138 print(
" c_Iterate, = Needs iteration = 1 in Python")
139 print(
" c_NotEnoughData, = Needs more data = 2 in Python")
140 print(
" c_Failure, = Failed = 3 in Python")
141 print(
" c_Undefined = Not yet known (before execution) = 4 in Python")
Calibrate ecl crystals using bhabha events.
static Environment & Instance()
Static method to get a reference to the Environment instance.