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