32from ROOT
import Belle2
35from basf2
import conditions
as b2conditions
50print(
"Python arguments:")
54 counting = counting + 1
56fileNames = [
'eclBhabhaTCollector.root']
59 fileNames = glob(sys.argv[1])
60algo.setInputFileNames(fileNames)
64 basePath = sys.argv[2] +
"/"
65 print(
"basePath = ", basePath)
70algo.debugOutput =
True
71algo.meanCleanRebinFactor = 3
73algo.meanCleanCutMinFactor = 0.3
76algo.debugFilenameBase =
"eclBhabhaTAlgorithm"
92b2.set_log_level(b2.LogLevel.INFO)
95exprun_vector = algo.getRunListFromAllData()
97baseName =
"eclBhabhaTAlgorithm"
98basePathAndName = basePath + baseName
99algo.debugFilenameBase = basePathAndName
104b2conditions.override_globaltags()
106b2.B2INFO(
"Adding Local Database {} to head of chain of local databases.")
107b2conditions.prepend_testing_payloads(
"localdb/database.txt")
108b2.B2INFO(
"Using Global Tag {}")
109b2conditions.prepend_globaltag(
"dp_recon_release6_patch")
110b2conditions.prepend_globaltag(
"Reco_master_patch_rel5")
111b2conditions.prepend_globaltag(
"AIRFLOW_online_snapshot_20210719-124441")
112b2conditions.prepend_globaltag(
"data_reprocessing_prompt")
116 print(
"Combining all runs' histograms for a single calibration")
117 print(
"path = ", basePathAndName)
118 alg_result = algo.execute()
119 print(
"Calibration completion status", alg_result)
120 if (alg_result == 0):
123 print(
"Calibrating each run individually")
124 runsWithoutEnoughData = []
125 for exprun
in exprun_vector:
126 iov_to_execute = ROOT.vector(
"std::pair<int,int>")()
127 iov_to_execute.push_back(exprun)
128 print(
"path = ", basePathAndName)
129 alg_result = algo.execute(iov_to_execute, 0)
130 print(
"Calibration success-result was", alg_result,
" (0=ok, 2=needs more data)")
131 if (alg_result == 0):
135print(
"Summary of possible calibration completion status values:")
136print(
" c_OK = Finished successfully = 0 in Python")
137print(
" c_Iterate, = Needs iteration = 1 in Python")
138print(
" c_NotEnoughData, = Needs more data = 2 in Python")
139print(
" c_Failure, = Failed = 3 in Python")
140print(
" 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.