32 import modularAnalysis
as ma
33 from vertex
import kFit
34 from stdCharged
import stdMu
35 from stdV0s
import stdKshorts, scaleErrorKshorts
40 my_path = b2.create_path()
43 ma.inputMdst(filename=b2.find_file(
'B02JpsiKs_Jpsi2mumu_Ks2pipi.root',
'examples',
False),
47 stdMu(
'loose', path=my_path)
48 stdKshorts(path=my_path)
51 ma.scaleError(
'mu+:scaled',
'mu+:loose', path=my_path)
52 scaleErrorKshorts(path=my_path)
55 ma.reconstructDecay(
'J/psi:default -> mu+:loose mu-:loose',
'3.05 < M < 3.15', path=my_path)
56 ma.reconstructDecay(
'B0:default -> J/psi:default K_S0:merged',
'5.27 < Mbc < 5.29 and abs(deltaE)<0.1', path=my_path)
57 ma.reconstructDecay(
'J/psi:scaled -> mu+:scaled mu-:scaled',
'3.05 < M < 3.15', path=my_path)
58 ma.reconstructDecay(
'B0:scaled -> J/psi:scaled K_S0:scaled',
'5.27 < Mbc < 5.29 and abs(deltaE)<0.1', path=my_path)
61 kFit(
'B0:default', 0., decay_string=
'B0 -> [J/psi -> ^mu+ ^mu-] K_S0', path=my_path)
62 kFit(
'B0:scaled', 0., decay_string=
'B0 -> [J/psi -> ^mu+ ^mu-] K_S0', path=my_path)
65 ma.matchMCTruth(
'B0:default', path=my_path)
66 ma.matchMCTruth(
'B0:scaled', path=my_path)
69 B0_vars = vc.mc_truth + vc.vertex + vc.mc_vertex
70 B0_vars += [
'LBoost',
'LBoostErr',
'mcLBoost']
71 helices = [a + b
for a
in [
'd0',
'phi0',
'omega',
'z0',
'tanLambda']
for b
in [
'',
'Err',
'Pull']]
72 B0_vars += vu.create_aliases_for_selected(helices,
'B0 -> [J/psi -> ^mu+ ^mu-] [K_S0 -> ^pi+ ^pi-]')
73 B0_vars += vu.create_aliases_for_selected([
'isFromV0'],
'B0 -> J/psi ^K_S0')
76 outputfile =
'scaleHelixError_output.root'
77 ma.variablesToNtuple(
'B0:default', B0_vars,
78 filename=outputfile, treename=
'B0_default', path=my_path)
79 ma.variablesToNtuple(
'B0:scaled', B0_vars,
80 filename=outputfile, treename=
'B0_scaled', path=my_path)