Belle II Software development
0_dedxPID_ParticleGun.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <input>PartGunChargedStableGenSim.root</input>
14 <output>ParticleGunSimRec_dedx.root</output>
15 <description>Generates dE/dx debug data (DedxTracks) for testing</description>
16 <contact>renu2@andrew.cmu.edu</contact>
17</header>
18"""
19
20import basf2
21from reconstruction import add_reconstruction
22
23basf2.set_random_seed(1337)
24
25main = basf2.create_path()
26
27# Read input.
28inputFileName = "../PartGunChargedStableGenSim.root"
29main.add_module("RootInput", inputFileName=inputFileName)
30
31# Load parameters.
32main.add_module("Gearbox")
33# Create geometry.
34main.add_module("Geometry")
35
36# Reconstruct events.
37add_reconstruction(main)
38
39output = basf2.register_module('RootOutput')
40output.param('outputFileName', '../ParticleGunSimRec_dedx.root')
41# let's keep this small
42output.param('branchNames', ['CDCDedxLikelihoods', 'CDCDedxTracks', 'VXDDedxLikelihoods', 'VXDDedxTracks', 'EventMetaData'])
43main.add_module(output)
44
45main.add_module("ProgressBar")
46
47basf2.process(main)