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
20
import basf2
21
from reconstruction import add_reconstruction
22
23
main = basf2.create_path()
24
25
# Read input.
26
inputFileName = "../PartGunChargedStableGenSim.root"
27
main.add_module("RootInput", inputFileName=inputFileName)
28
29
# Load parameters.
30
main.add_module("Gearbox")
31
# Create geometry.
32
main.add_module("Geometry")
33
34
# Reconstruct events.
35
add_reconstruction(main)
36
37
# enable debug output for the module added by add_reconstruction()
38
for m in main.modules():
39
if
m.name() ==
'CDCDedxPID'
:
40
m.param(
'enableDebugOutput'
,
True
)
41
42
43
output = basf2.register_module(
'RootOutput'
)
44
output.param(
'outputFileName'
,
'../ParticleGunSimRec_dedx.root'
)
45
# let's keep this small
46
output.param(
'branchNames'
, [
'CDCDedxLikelihoods'
,
'CDCDedxTracks'
,
'VXDDedxLikelihoods'
,
'VXDDedxTracks'
,
'EventMetaData'
])
47
main.add_module(output)
48
49
main.add_module(
"ProgressBar"
)
50
51
basf2.process(main)
52
print(basf2.statistics)
reconstruction
validation
0_dedxPID_ParticleGun.py
Generated on Tue Nov 12 2024 02:41:09 for Belle II Software by
1.9.6