Belle II Software development
NoKickCuts_evaluation.py
1
8
9
26
27import basf2 as b2
28
29import argparse
30parser = argparse.ArgumentParser(description="NoKickCuts evaluation module")
31parser.add_argument(
32 '--useValidation',
33 dest='use_validation',
34 action='store_const',
35 const=True,
36 default=False,
37 help='print validation plots')
38parser.add_argument(
39 '--useFitMethod',
40 dest='use_fitMethod',
41 action='store_const',
42 const=True,
43 default=False,
44 help='definition of the cuts with the double-gaussian fit')
45
46args = parser.parse_args()
47use_Validation = args.use_validation
48use_fit = args.use_fitMethod
49
50
51main_path = b2.create_path()
52
53mctrackfinder = b2.register_module('TrackFinderMCTruthRecoTracks')
54mctrackfinder.param('WhichParticles', ['SVD'])
55mctrackfinder.param('EnergyCut', 0)
56
57gearbox = b2.register_module('Gearbox')
58
59geometry = b2.register_module('Geometry')
60
61rootinput = b2.register_module('RootInput')
62# param("inputFileNames", "/home/belle2/vberta/storage/release1_validation/training_sample/simulated*.root")
63
64progressbar = b2.register_module('ProgressBar')
65
66mctrackmatcher = b2.register_module('MCRecoTracksMatcher')
67mctrackmatcher.param('UseCDCHits', False)
68mctrackmatcher.param('UseSVDHits', True)
69mctrackmatcher.param('UsePXDHits', True)
70mctrackmatcher.param('mcRecoTracksStoreArrayName', 'MCRecoTracks')
71
72NoKickCuts = b2.register_module('NoKickCutsEval')
73NoKickCuts.param('useValidation', use_Validation)
74NoKickCuts.param('useFitMethod', use_fit)
75
76
77main_path.add_module(rootinput)
78main_path.add_module(gearbox)
79main_path.add_module(geometry)
80main_path.add_module(mctrackfinder)
81main_path.add_module(NoKickCuts)
82main_path.add_module(progressbar)
83
84b2.process(main_path)
85print(b2.statistics)