32 import modularAnalysis
as ma
33 from vertex
import kFit
34 from stdCharged
import stdMu
35 from stdV0s
import stdKshorts
40 my_path = b2.create_path()
43 ma.inputMdst(environmentType=
'default',
44 filename=b2.find_file(
'B02JpsiKs_Jpsi2mumu_Ks2pipi.root',
'examples',
False),
48 stdMu(
'loose', path=my_path)
49 stdKshorts(path=my_path)
52 ma.scaleError(
'mu+:scaled',
'mu+:loose', 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:merged',
'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')
75 outputfile =
'scaleHelixError_output.root'
76 ma.variablesToNtuple(
'B0:default', B0_vars,
77 filename=outputfile, treename=
'B0_default', path=my_path)
78 ma.variablesToNtuple(
'B0:scaled', B0_vars,
79 filename=outputfile, treename=
'B0_scaled', path=my_path)