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