Belle II Software development
coltest.py
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3
4
11
12import sys
13
14import basf2 as b2
15from simulation import register_simulation
16from reconstruction import register_reconstruction
17
18
19b2.set_log_level(b2.LogLevel.ERROR)
20
21argvs = sys.argv
22argc = len(argvs)
23
24# print argvs[1]
25# print argc
26
27# detecor components to be reconstructed
28components = [
29 'MagneticField',
30 'BeamPipe',
31 'PXD',
32 'SVD',
33 'CDC',
34 'TOP',
35 'ARICH',
36 'BKLM',
37 'ECL',
38]
39
40# register sim/recon modules
41register_simulation(components)
42register_reconstruction(components)
43
44# create a main path
45main = b2.create_path()
46
47# Add input module
48input = b2.register_module("SeqRootInput")
49# input.param ( "inputFileName", "/fcdisk1-1/data/sim/sim-evtgen.sroot")
50input.param("inputFileName", "/pcidisk1-1/data/rec/rec-evtgen.sroot")
51main.add_module(input)
52
53# create geometry
54gearbox = b2.register_module('Gearbox')
55main.add_module(gearbox)
56geometry = b2.register_module('Geometry')
57main.add_module(geometry)
58
59# Add output module
60output = b2.register_module("SeqRootOutput")
61output.param("outputFileName", "/dev/null")
62
63# Add Rbuf2Ds
64# rbuf2ds = register_module("Rbuf2Ds")
65# rbuf2ds.param("RingBufferName", argvs[1])
66# main.add_module(rbuf2ds)
67
68# Add Progress
69progress = b2.register_module("Progress")
70main.add_module(progress)
71
72# Add Ds2Rbuf
73# ds2rbuf = register_module("Ds2Rbuf")
74# ds2rbuf.param("RingBufferName", argvs[2])
75# main.add_module(ds2rbuf)
76
77# Run
78b2.process(main, 5000)