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