Belle II Software
development
reconstruction_utils.py
1
#!/usr/bin/env python3
2
3
10
11
import
modularAnalysis
as
ma
12
13
14
def
bToCharmHLTSkim(path):
15
"""
16
Function to reconstruct B meson candidates for HLT skims
17
@param path modules are added to this path
18
"""
19
20
BplusList = []
21
BzeroList = []
22
23
# Light mesons
24
ma.fillParticleList(
"pi+:GoodTrackForHLT"
,
"abs(d0) < 2 and abs(z0) < 5"
, path=path)
25
ma.fillParticleList(
"K+:GoodTrackForHLT"
,
"abs(d0) < 2 and abs(z0) < 5"
, path=path)
26
ma.fillParticleList(
'gamma:GoodPi0ForHLT'
,
'[clusterReg == 1 and E > 0.02250] or \
27
[clusterReg == 2 and E > 0.020] or \
28
[clusterReg == 3 and E > 0.020]'
,
29
writeOut=
True
, path=path)
30
ma.reconstructDecay(
'pi0:GoodPi0ForHLT -> gamma:GoodPi0ForHLT gamma:GoodPi0ForHLT'
,
'0.105 < M < 0.150'
, 1,
True
, path)
31
32
# D0 lists
33
ma.reconstructDecay(decayString=
'D0:KpiForHLT -> K-:GoodTrackForHLT pi+:GoodTrackForHLT'
, cut=
'1.7 < M < 2.0'
, path=path)
34
ma.reconstructDecay(
35
decayString=
'D0:Kpipi0ForHLT -> K-:GoodTrackForHLT pi+:GoodTrackForHLT pi0:GoodPi0ForHLT'
,
36
cut=
'1.7 < M < 2.0'
,
37
path=path)
38
ma.reconstructDecay(
39
decayString=
'D0:KpipipiForHLT -> K-:GoodTrackForHLT pi+:GoodTrackForHLT pi+:GoodTrackForHLT pi-:GoodTrackForHLT'
,
40
cut=
'1.7 < M < 2.0'
,
41
path=path)
42
# D+ list
43
ma.reconstructDecay(
44
decayString=
'D+:KpipiForHLT -> K-:GoodTrackForHLT pi+:GoodTrackForHLT pi+:GoodTrackForHLT'
,
45
cut=
'1.8 < M < 1.9'
,
46
path=path)
47
48
# D*+ lists
49
ma.reconstructDecay(
50
decayString=
'D*+:D0_KpiForHLT -> D0:KpiForHLT pi+:GoodTrackForHLT'
,
51
cut=
'massDifference(0) < 0.16'
,
52
path=path)
53
ma.reconstructDecay(
54
decayString=
'D*+:D0_Kpipi0ForHLT -> D0:Kpipi0ForHLT pi+:GoodTrackForHLT'
,
55
cut=
'massDifference(0) < 0.16'
,
56
path=path)
57
ma.reconstructDecay(
58
decayString=
'D*+:D0_KpipipiForHLT -> D0:KpipipiForHLT pi+:GoodTrackForHLT'
,
59
cut=
'massDifference(0) < 0.16'
,
60
path=path)
61
62
# B+ lists
63
ma.reconstructDecay(
"B+:BtoD0pi_KpiForHLT -> anti-D0:KpiForHLT pi+:GoodTrackForHLT"
,
64
"Mbc > 5.15 and abs(deltaE) < 0.5"
, path=path)
65
BplusList.append(
"B+:BtoD0pi_KpiForHLT"
)
66
ma.reconstructDecay(
"B+:BtoD0pi_Kpipi0ForHLT -> anti-D0:Kpipi0ForHLT pi+:GoodTrackForHLT"
,
67
"Mbc > 5.15 and abs(deltaE) < 0.3"
, path=path)
68
BplusList.append(
"B+:BtoD0pi_Kpipi0ForHLT"
)
69
ma.reconstructDecay(
"B+:BtoD0pi_KpipipiForHLT -> anti-D0:KpipipiForHLT pi+:GoodTrackForHLT"
,
70
"Mbc > 5.15 and abs(deltaE) < 0.3"
, path=path)
71
BplusList.append(
"B+:BtoD0pi_KpipipiForHLT"
)
72
73
# B0 lists
74
ma.reconstructDecay(
"B0:B0toDpi_KpipiForHLT -> D-:KpipiForHLT pi+:GoodTrackForHLT"
,
75
"5.15 < Mbc and abs(deltaE) < 0.3"
, path=path)
76
BzeroList.append(
"B0:B0toDpi_KpipiForHLT"
)
77
ma.reconstructDecay(
"B0:B0toDstarPi_D0pi_KpiForHLT -> D*-:D0_KpiForHLT pi+:GoodTrackForHLT"
,
78
"5.15 < Mbc and abs(deltaE) < 0.3"
, path=path)
79
BzeroList.append(
"B0:B0toDstarPi_D0pi_KpiForHLT"
)
80
ma.reconstructDecay(
"B0:B0toDstarPi_D0pi_KpipipiForHLT -> D*-:D0_KpipipiForHLT pi+:GoodTrackForHLT"
,
81
"5.15 < Mbc and abs(deltaE) < 0.3"
, path=path)
82
BzeroList.append(
"B0:B0toDstarPi_D0pi_KpipipiForHLT"
)
83
ma.reconstructDecay(
"B0:B0toDstarPi_D0pi_Kpipi0ForHLT -> D*-:D0_Kpipi0ForHLT pi+:GoodTrackForHLT"
,
84
"5.15 < Mbc and abs(deltaE) < 0.3"
, path=path)
85
BzeroList.append(
"B0:B0toDstarPi_D0pi_Kpipi0ForHLT"
)
86
87
ma.copyLists(
"B+:BtoCharmForHLT"
, BplusList, path=path)
88
ma.copyLists(
"B0:BtoCharmForHLT"
, BzeroList, path=path)
hlt
softwaretrigger
scripts
softwaretrigger
reconstruction_utils.py
Generated on Sun Nov 23 2025 02:54:35 for Belle II Software by
1.13.2