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