Belle II Software development
datconPXDDataReduction.py
1#!/usr/bin/env python3
2
3
10
11
15
16import basf2 as b2
17from simulation import add_simulation
18from tracking import add_hit_preparation_modules
19from datcon.datcon_functions import add_datcon
20
21b2.set_random_seed(1337)
22
23num_events = 10
24
25output_filename = "datconPXDDataReduction.root"
26
27# create path
28main = b2.create_path()
29
30main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=num_events)
31
32# generate BBbar events
33main.add_module('EvtGenInput')
34
35# detector simulation, don't perform data reduction per default, but use DATCON instead
36add_simulation(main, bkgOverlay=False, forceSetPXDDataReduction=True, usePXDDataReduction=False, cleanupPXDDataReduction=False)
37
38# add DATCON simulation using the DATCON
39add_hit_preparation_modules(main, components=["SVD"])
40add_datcon(main)
41
42main.add_module('Progress')
43
44# Finally add output
45main.add_module("RootOutput", outputFileName=output_filename)
46
47# process events and print call statistics
48b2.process(main)
49print(b2.statistics)