Belle II Software development
ARICHImportGeometryToDB.py
1#!/usr/bin/env python3
2
3
10import basf2 as b2
11import os
12
13home = os.environ['BELLE2_LOCAL_DIR']
14
15# change if you use different local DB folder (see arich/examples/database... examples of database usage)
16# use_local_database(home + "/arich/database/cosmicTest_payloads/cosmicTest_database.txt",
17# home + "/arich/database/cosmicTest_payloads")
18# use_local_database(home + "/arich/database/newGeo/database.txt",
19# home + "/arich/database/newGeo")
20b2.use_local_database("localdb/database.txt", "localdb")
21
22
23gearbox = b2.register_module('Gearbox')
24
25main = b2.create_path()
26main.add_module('EventInfoSetter', evtNumList=1, logLevel=b2.LogLevel.DEBUG)
27main.add_module(gearbox)
28
29# import geometry for ARICH only
30geometry = b2.register_module('Geometry')
31geometry.param('components', ['ARICH'])
32geometry.param('payloadIov', [0, 0, -1, -1])
33geometry.param('createPayloads', 1)
34main.add_module(geometry)
35print("Geometry Imported to the database!")
36b2.process(main)