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