Belle II Software development
evaluatePerformance.py
1#!/usr/bin/env python3
2
3
10
11import basf2 as b2
12from simulation import add_simulation
13from svd import add_svd_reconstruction
14import glob
15
16numEvents = 2000
17
18bkgFiles = glob.glob('/sw/belle2/bkg/*.root') # Phase3 background
19bkgFiles = None # uncomment to remove background
20simulateJitter = False
21
22ROIfinding = False
23Phase2 = False
24MCTracking = True
25# set this string to identify the output rootfiles
26tag = "_Y4S_noJitter_noBKG_noROI_MCTF.root"
27
28main = b2.create_path()
29
30b2.set_random_seed(1)
31
32expList = [0]
33if Phase2:
34 expList = [1002]
35
36eventinfosetter = b2.register_module('EventInfoSetter')
37eventinfosetter.param('expList', expList)
38eventinfosetter.param('runList', [0])
39eventinfosetter.param('evtNumList', [numEvents])
40main.add_module(eventinfosetter)
41main.add_module('EventInfoPrinter')
42main.add_module('EvtGenInput')
43
44add_simulation(
45 main,
46 bkgfiles=bkgFiles,
47 usePXDDataReduction=ROIfinding,
48 simulateT0jitter=simulateJitter)
49
50add_svd_reconstruction(main)
51
52'''
53from tracking import add_tracking_reconstruction
54add_tracking_reconstruction(
55 main,
56 components=["SVD"],
57 mcTrackFinding=MCTracking,
58 trackFitHypotheses=[211],
59 skipHitPreparerAdding=True)
60
61
62tag = "_Y4S_jitter10ns_wBKG_noROI_MCTF.root"
63clseval = b2.register_module('SVDClusterEvaluationTrueInfo')
64clseval.param('outputFileName', "ClusterEvaluationTrueInfo" + str(tag))
65main.add_module(clseval)
66
67svdperf = b2.register_module('SVDPerformance')
68svdperf.param('outputFileName', "SVDPerformance" + str(tag))
69main.add_module(svdperf)
70'''
71# main.add_module('RootOutput')
72main.add_module('Progress')
73
74b2.print_path(main)
75
76b2.process(main)
77
78print(b2.statistics)