17 b2.use_database_chain()
18 b2.use_central_database(
"GT_gen_data_003.04_gcr2017-08", b2.LogLevel.WARNING)
21 def ana(exp=1, run=3118, magneticField=True, prefix='', dest='.'):
25 files = glob.glob(prefix +
'/e{0:0>4}/cosmics/r{1:0>5}/all/dst/sub00/dst.cosmic.{0:0>4}.{1:0>5}'.format(exp, run) +
'*.root')
30 main = b2.create_path()
32 main.add_module(
'RootInput',
35 gearbox = b2.register_module(
'Gearbox',
36 fileName=
"/geometry/GCR_Summer2017.xml",
38 (
"/Global/length",
"8.",
"m"),
39 (
"/Global/width",
"8.",
"m"),
40 (
"/Global/height",
"8.",
"m"),
42 main.add_module(gearbox)
44 main.add_module(
'Geometry',
45 excludedComponents=[
'EKLM'])
47 output =
"/".join([dest,
'qam.{0:0>4}.{1:0>5}.root'.format(exp, run)])
48 main.add_module(
'CDCCosmicAnalysis',
49 noBFit=
not magneticField,
55 main.add_module(
'Progress')
61 if __name__ ==
"__main__":
63 parser = argparse.ArgumentParser()
65 parser.add_argument(
'exp', help=
'Experimental number')
66 parser.add_argument(
'run', help=
'Run number')
67 args = parser.parse_args()
68 ana(exp=args.exp, run=args.run, magneticField=
True,
71 prefix=
'/hsm/belle2/bdata/Data/release-00-09-01/DB00000266/GCR1/prod00000001',