32from modularAnalysis
import inputMdst
33from modularAnalysis
import reconstructDecay
34from modularAnalysis
import matchMCTruth
35from vertex
import raveFit
36from stdCharged
import stdPi, stdK
37from modularAnalysis
import variablesToNtuple
42my_path = b2.create_path()
45inputMdst(filename=b2.find_file(
'B02pi0D0_D2kpi_B2Dstarpi_Dstar2Dpi_D2kpi.root',
'examples',
False),
52stdPi(
'all', path=my_path)
54stdPi(
'loose', path=my_path)
56stdK(
'loose', path=my_path)
60reconstructDecay(
'D0:kpi -> K-:loose pi+:loose',
'1.8 < M < 1.9', path=my_path)
61reconstructDecay(
'D0:st -> K-:loose pi+:loose',
'1.8 < M < 1.9', path=my_path)
62reconstructDecay(
'D0:du -> K-:loose pi+:loose',
'1.8 < M < 1.9', path=my_path)
66raveFit(
'D0:kpi', 0.0, fit_type=
'massvertex', path=my_path)
70raveFit(
'D0:st', 0.0, path=my_path)
72raveFit(
'D0:st', 0.0, decay_string=
'^D0 -> K- pi+', constraint=
'ipprofile', path=my_path)
76raveFit(
'D0:du', 0.0, daughtersUpdate=
True, path=my_path)
81reconstructDecay(
'D*+:1 -> D0:kpi pi+:all',
82 '0.0 <= Q < 0.02 and 2.5 < useCMSFrame(p) < 5.5', path=my_path)
83reconstructDecay(
'D*+:2 -> D0:kpi pi+:all',
84 '0.0 <= Q < 0.02 and 2.5 < useCMSFrame(p) < 5.5', path=my_path)
85reconstructDecay(
'D*+:3 -> D0:kpi pi+:all',
86 '0.0 <= Q < 0.02 and 2.5 < useCMSFrame(p) < 5.5', path=my_path)
89matchMCTruth(
'D*+:1', path=my_path)
90matchMCTruth(
'D*+:2', path=my_path)
91matchMCTruth(
'D*+:3', path=my_path)
95raveFit(
'D*+:1', 0.0, path=my_path)
99raveFit(
'D*+:2', 0.0, constraint=
'ipprofile', path=my_path)
103raveFit(
'D*+:3', 0.0, decay_string=
'D*+ -> D0 ^pi+', constraint=
'ipprofile', path=my_path)
106dstar_vars = vc.inv_mass + vc.mc_truth + \
107 vc.mc_flight_info + vc.flight_info + vc.vertex
109fs_hadron_vars = vu.create_aliases_for_selected(
110 vc.pid + vc.track + vc.mc_truth,
111 'D*+ -> [D0 -> ^K- ^pi+] ^pi+')
113d0_vars = vu.create_aliases_for_selected(
114 vc.inv_mass + vc.mc_truth + vc.vertex,
115 'D*+ -> ^D0 pi+',
'D0')
117dstt = vc.kinematics + vc.vertex + vc.mc_vertex + vc.flight_info + \
118 vu.create_aliases_for_selected(
122dstu = vc.kinematics + vu.create_aliases_for_selected(
127output_file =
'B2A406-Rave-DecayStringVertexFit.root'
129 filename=output_file, treename=
'dsttree1', path=my_path)
131 filename=output_file, treename=
'dsttree2', path=my_path)
133 filename=output_file, treename=
'dsttree3', path=my_path)
135 filename=output_file, treename=
'd0tree1', path=my_path)
137 filename=output_file, treename=
'd0tree2', path=my_path)