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