32from modularAnalysis
import inputMdst
33from modularAnalysis
import reconstructDecay
34from modularAnalysis
import matchMCTruth
35from vertex
import kFit
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)
64kFit(
'D0:kpi', 0.0, path=my_path)
69reconstructDecay(
'D*+ -> D0:kpi pi+:all',
'0.0 <= Q < 0.02 and 2.5 < useCMSFrame(p) < 5.5', path=my_path)
72matchMCTruth(
'D*+', path=my_path)
76kFit(
'D*+', 0.0, path=my_path)
80dstar_vars = vc.inv_mass + vc.mc_truth
82fs_hadron_vars = vu.create_aliases_for_selected(
83 vc.pid + vc.track + vc.mc_truth,
84 'D*+ -> [D0 -> ^K- ^pi+] ^pi+')
86d0_vars = vu.create_aliases_for_selected(
87 vc.inv_mass + vc.mc_truth,
88 'D*+ -> ^D0 pi+',
'D0')
92output_file =
'B2A403-KFit-VertexFit.root'
94 filename=output_file, treename=
'dsttree', path=my_path)