33from modularAnalysis
import inputMdst
34from modularAnalysis
import reconstructDecay
35from modularAnalysis
import matchMCTruth
36from vertex
import raveFit
37from modularAnalysis
import variablesToExtraInfo
38from stdCharged
import stdPi, stdK
39from modularAnalysis
import variablesToNtuple
40from variables
import variables
as vm
46my_path = b2.create_path()
49inputMdst(filename=b2.find_file(
'B02pi0D0_D2kpi_B2Dstarpi_Dstar2Dpi_D2kpi.root',
'examples',
False),
55stdPi(
'all', path=my_path)
57stdPi(
'loose', path=my_path)
59stdK(
'loose', path=my_path)
63reconstructDecay(
'D0:kpi -> K-:loose pi+:loose',
'1.8 < M < 1.9', path=my_path)
64reconstructDecay(
'D0:kpi_mass -> K-:loose pi+:loose',
'1.8 < M < 1.9', path=my_path)
70vm.addAlias(
"M_BeforeFit",
"extraInfo(M_before_vertex_fit)")
72raveFit(
'D0:kpi', 0.0, path=my_path)
78raveFit(
'D0:kpi_mass', 0.0, fit_type=
'massvertex', path=my_path)
83reconstructDecay(
'D*+:1 -> D0:kpi pi+:all',
84 '0.0 <= Q < 0.02 and 2.5 < useCMSFrame(p) < 5.5', path=my_path)
85reconstructDecay(
'D*+:2 -> D0:kpi_mass 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)
94raveFit(
'D*+:1', 0.0, path=my_path)
98raveFit(
'D*+:2', 0.0, constraint=
'ipprofile', path=my_path)
102dstar_vars = vc.inv_mass + vc.mc_truth + \
103 vc.mc_flight_info + vc.flight_info
105fs_hadron_vars = vu.create_aliases_for_selected(
106 vc.pid + vc.track + vc.mc_truth,
107 'D*+ -> [D0 -> ^K- ^pi+] ^pi+')
109d0_vars = vu.create_aliases_for_selected(
110 vc.inv_mass + vc.mc_truth + [
"M_BeforeFit"],
111 'D*+ -> ^D0 pi+',
'D0')
115output_file =
'B2A405-Rave-MassVertexFit.root'
117 filename=output_file, treename=
'dsttree1', path=my_path)
119 filename=output_file, treename=
'dsttree2', path=my_path)