16b2.use_database_chain()
17b2.use_central_database(
"GT_gen_data_003.04_gcr2017-08", b2.LogLevel.WARNING)
20def ana(exp=1, run=3118, magneticField=True, prefix='', dest='.'):
24 files = glob.glob(prefix + f
'/e{exp:0>4}/cosmics/r{run:0>5}/all/dst/sub00/dst.cosmic.{exp:0>4}.{run:0>5}' +
'*.root')
29 main = b2.create_path()
31 main.add_module(
'RootInput',
34 gearbox = b2.register_module(
'Gearbox',
35 fileName=
"/geometry/GCR_Summer2017.xml",
37 (
"/Global/length",
"8.",
"m"),
38 (
"/Global/width",
"8.",
"m"),
39 (
"/Global/height",
"8.",
"m"),
41 main.add_module(gearbox)
43 main.add_module(
'Geometry',
44 excludedComponents=[
'EKLM'])
46 output =
"/".join([dest, f
'qam.{exp:0>4}.{run:0>5}.root'])
47 main.add_module(
'CDCCosmicAnalysis',
48 noBFit=
not magneticField,
54 main.add_module(
'Progress')
60if __name__ ==
"__main__":
62 parser = argparse.ArgumentParser()
64 parser.add_argument(
'exp', help=
'Experimental number')
65 parser.add_argument(
'run', help=
'Run number')
66 args = parser.parse_args()
67 ana(exp=args.exp, run=args.run, magneticField=
True,
70 prefix=
'/hsm/belle2/bdata/Data/release-00-09-01/DB00000266/GCR1/prod00000001',