Belle II Software development
run_ee5x5_algorithm_noCalc.py
1#!/usr/bin/env python3
2
3
10
11import sys
12import glob
13from ROOT import Belle2
14
15# Usage: basf2 run_ee5x5_algorithm_noCalc.py "inputfiles*.root"
16
17# Run just the algorithm part of the eclee5x5 calibration, which calibrates the single crystal
18# energy response using Bhabha events. Runs on the output produced by the collector stage.
19
20# This scripts merges the collector files and writes the hisograms to the specified output file.
21# Other scripts are available to obtain payloads "ECLCrystalEnergy5x5", "ECLExpee5x5E",
22# "ECLeedPhiData", or "ECLeedPhiMC".
23
25fileNames = ['eclee5x5CollectorOutput.root']
26narg = len(sys.argv)
27if(narg == 2):
28 fileNames = glob.glob(sys.argv[1])
29print("input fileNames = ", fileNames)
30algo.setInputFileNames(fileNames)
31algo.setOutputName("eclee5x5_algorithm_noCalc.root")
32algo.setMinEntries(150)
33algo.setPayloadName("None")
34algo.setStoreConst(False)
35
36
37# Run algorithm after merging all input files, as opposed to one run at a time
38alg_result = algo.execute()
39print("result of eclee5x5Algorithm was", alg_result)
40
41# Commits a successful list of dbobjects to localdb/
42algo.commit()
Calibrate ecl crystals using Bhabha events.