Belle II Software  release-08-01-10
save_geometry_as_root.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
20 
21 from basf2 import Path, process
22 
23 main = Path()
24 # EventInfoSetter - generate event meta data
25 main.add_module("EventInfoSetter", expList=[0], runList=[0], evtNumList=[1])
26 # Geometry parameter loader
27 main.add_module('Gearbox')
28 # Geometry builder, ignore database and exclude the ECL as we cannot exclude
29 # things when loading Geometry from the database. Alternatively one could
30 # create a database geometry configuration without the ecl.
31 main.add_module('Geometry', useDB=False, excludedComponents=['ECL', 'Cryostat'])
32 # Saves the geometry as a Root file
33 main.add_module('ExportGeometry', Filename='Belle2Geo.root')
34 # Process one event
35 process(main)