Belle II Software
development
ReconstructForTREPS.py
1
#!/usr/bin/env python3
2
3
10
11
import
basf2
12
from
modularAnalysis
import
fillParticleListFromMC, reconstructDecay, variablesToNtuple, inputMdst
13
14
# main path
15
main = basf2.create_path()
16
17
# load input mdst file
18
inputMdst(
'utrepsbpipi_100k.root'
, path=main)
19
20
# get pi+:MC from MCParticles
21
fillParticleListFromMC(
'pi+:MC'
,
'mcPrimary'
, path=main)
22
23
# reconstruct a virtual gamma for convenience
24
reconstructDecay(
'gamma:Virtual -> pi+:MC pi-:MC'
,
''
, path=main)
25
26
# store variables of gamma:Virtual to ntuple
27
variablesToNtuple
(
'gamma:Virtual'
, [
'M'
,
'E'
,
'daughter(0, cosTheta)'
,
'daughter(1, cosTheta)'
], path=main)
28
29
# process
30
basf2.process(main)
31
32
# show call statistics
33
print(basf2.statistics)
variablesToNtuple
Definition:
variablesToNtuple.py:1
generators
examples
ReconstructForTREPS.py
Generated on Fri Nov 8 2024 02:38:23 for Belle II Software by
1.9.6