Belle II Software
release-05-01-25
014_first_steering_file.py
1
#!/usr/bin/env python3
2
3
import
sys
4
import
basf2
as
b2
5
import
modularAnalysis
as
ma
6
import
stdV0s
7
8
# get input file number from the command line
9
filenumber = sys.argv[1]
10
11
# create path
12
main = b2.Path()
13
14
# load input data from mdst/udst file
15
ma.inputMdstList(
16
environmentType=
"default"
,
17
filelist=[b2.find_file(f
"starterkit/2021/1111540100_eph3_BGx0_{filenumber}.root"
,
"examples"
)],
18
path=main,
19
)
20
21
# fill final state particle lists
22
ma.fillParticleList(
23
"e+:uncorrected"
,
24
"electronID > 0.1 and dr < 0.5 and abs(dz) < 2 and thetaInCDCAcceptance"
,
25
path=main,
26
)
27
stdV0s.stdKshorts
(path=main)
28
29
# combine final state particles to form composite particles
30
ma.reconstructDecay(
31
"J/psi:ee -> e+:uncorrected e-:uncorrected"
, cut=
"dM < 0.11"
, path=main
32
)
33
34
# combine J/psi and KS candidates to form B0 candidates
35
ma.reconstructDecay(
36
"B0 -> J/psi:ee K_S0:merged"
,
37
cut=
""
,
38
path=main,
39
)
40
41
# match reconstructed with MC particles
42
ma.matchMCTruth(
"B0"
, path=main)
43
44
# Save variables to an output file (ntuple)
45
ma.variablesToNtuple(
46
"B0"
,
47
variables=[
'Mbc'
,
'isSignal'
],
48
filename=
"Bd2JpsiKS.root"
,
49
treename=
"tree"
,
50
path=main,
51
)
52
53
# Start the event loop (actually start processing things)
54
b2.process(main)
55
56
# print out the summary
57
print(b2.statistics)
stdV0s.stdKshorts
def stdKshorts(prioritiseV0=True, fitter='TreeFit', path=None)
Definition:
stdV0s.py:10
online_book
basf2
steering_files
014_first_steering_file.py
Generated on Fri Nov 5 2021 03:55:58 for Belle II Software by
1.8.17