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