Belle II Software development
rawdata_simulation.py
1#!/usr/bin/env python3
2
3
10
11# Usage:
12# basf2 rawdata_simulation.py -o outputfilename.sroot
13
14
15import basf2
16
17from simulation import add_simulation
18from softwaretrigger import constants
19
20from rawdata import add_packers
21
22# You could use your own components here or just use the default for the HLT (everything except PXD)
23# e.g. without SVD
24# components = ["CDC", "ECL", "TOP", "ARICH", "KLM"]
25# if you leave out the components in all calls, the default will be used
26components = constants.DEFAULT_HLT_COMPONENTS
27
28main_path = basf2.create_path()
29
30main_path.add_module("EventInfoSetter", evtNumList=[10])
31main_path.add_module("EvtGenInput")
32
33add_simulation(main_path, components)
34add_packers(main_path, components=components)
35
36main_path.add_module("SeqRootOutput",
37 outputFileName="hlt_rawdata_simulation.sroot",
38 saveObjs=["EventMetaData"] + constants.RAWDATA_OBJECTS)
39
40basf2.print_path(main_path)
41basf2.process(main_path)
42
43print(basf2.statistics)