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