Belle II Software  release-06-00-14
0_combinedPID.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """
13 <header>
14  <input>PartGunChargedStableGenSim.root</input>
15  <output>CombinedPIDPerformance.root</output>
16  <description>This steering script fully reconstructs particle gun events for a set of charged stable particles,
17  making plots for PID performance validation</description>
18  <contact>jbennett@phy.olemiss.edu</contact>
19  <interval>release</interval>
20 </header>
21 """
22 
23 import basf2
24 from reconstruction import add_reconstruction
25 
26 main = basf2.create_path()
27 
28 # Read input.
29 inputFileName = "../PartGunChargedStableGenSim.root"
30 main.add_module("RootInput", inputFileName=inputFileName)
31 
32 # Load parameters.
33 main.add_module("Gearbox")
34 # Create geometry.
35 main.add_module("Geometry")
36 
37 # Reconstruct events.
38 add_reconstruction(main)
39 
40 # run a module to generate histograms to test pid performance
41 pidperformance = basf2.register_module('CombinedPIDPerformance')
42 pidperformance.param('outputFileName', 'CombinedPIDPerformance.root')
43 pidperformance.param('numberOfBins', 50)
44 main.add_module(pidperformance)
45 
46 main.add_module("ProgressBar")
47 
48 basf2.process(main)
49 print(basf2.statistics)