34 from ROOT
import Belle2
38 from basf2
import conditions
as b2conditions
53 print(
"Python arguments:")
57 counting = counting + 1
59 fileNames = [
'eclBhabhaTCollector.root']
62 fileNames = glob(sys.argv[1])
63 algo.setInputFileNames(fileNames)
67 basePath = sys.argv[2] +
"/"
68 print(
"basePath = ", basePath)
73 algo.debugOutput =
True
74 algo.meanCleanRebinFactor = 3
76 algo.meanCleanCutMinFactor = 0.3
79 algo.debugFilenameBase =
"eclBhabhaTAlgorithm"
94 b2.set_debug_level(35)
95 b2.set_log_level(b2.LogLevel.INFO)
98 exprun_vector = algo.getRunListFromAllData()
100 baseName =
"eclBhabhaTAlgorithm"
101 basePathAndName = basePath + baseName
102 algo.debugFilenameBase = basePathAndName
107 b2conditions.override_globaltags()
109 b2.B2INFO(
"Adding Local Database {} to head of chain of local databases.")
110 b2conditions.prepend_testing_payloads(
"localdb/database.txt")
111 b2.B2INFO(
"Using Global Tag {}")
112 b2conditions.prepend_globaltag(
"dp_recon_release6_patch")
113 b2conditions.prepend_globaltag(
"Reco_master_patch_rel5")
114 b2conditions.prepend_globaltag(
"AIRFLOW_online_snapshot_20210719-124441")
115 b2conditions.prepend_globaltag(
"data_reprocessing_prompt")
119 print(
"Combining all runs' histograms for a single calibration")
120 print(
"path = ", basePathAndName)
121 alg_result = algo.execute()
122 print(
"Calibration completion status", alg_result)
123 if (alg_result == 0):
126 print(
"Calibrating each run individually")
127 runsWithoutEnoughData = []
128 for exprun
in exprun_vector:
129 iov_to_execute = ROOT.vector(
"std::pair<int,int>")()
130 iov_to_execute.push_back(exprun)
131 print(
"path = ", basePathAndName)
132 alg_result = algo.execute(iov_to_execute, 0)
133 print(
"Calibration success-result was", alg_result,
" (0=ok, 2=needs more data)")
134 if (alg_result == 0):
138 print(
"Summary of possible calibration completion status values:")
139 print(
" c_OK = Finished successfuly = 0 in Python")
140 print(
" c_Iterate, = Needs iteration = 1 in Python")
141 print(
" c_NotEnoughData, = Needs more data = 2 in Python")
142 print(
" c_Failure, = Failed = 3 in Python")
143 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.