34 import modularAnalysis
as ma
39 my_path = b2.create_path()
42 ma.inputMdst(filename=b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False),
48 photons = (
'gamma',
'')
49 ma.fillParticleListsFromMC(decayStringsWithCuts=[kaons, pions, photons],
54 ma.reconstructDecay(decayString=
'pi0 -> gamma gamma',
55 cut=
'0.1 < InvM < 0.15',
59 ma.reconstructDecay(decayString=
'D0:ch1 -> K- pi+',
63 ma.reconstructDecay(decayString=
'D0:ch2 -> K- pi+ pi0',
67 ma.reconstructDecay(decayString=
'D0:ch3 -> K- pi+ pi+ pi-',
71 ma.reconstructDecay(decayString=
'D0:ch4 -> K- K+',
75 ma.reconstructDecay(decayString=
'D0:ch5 -> pi+ pi-',
81 ma.copyLists(outputListName=
'D0:all',
82 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
86 ma.reconstructDecay(decayString=
'B+:D0pi -> anti-D0:all pi+',
87 cut=
'5.24 < Mbc < 5.29 and abs(deltaE) < 1.0',
92 ma.matchMCTruth(list_name=
'B+:D0pi',
96 d_vars = vc.inv_mass + vc.kinematics
97 pi_vars = vc.kinematics
98 b_vars = vc.deltae_mbc + \
100 vu.create_aliases_for_selected(list_of_variables=d_vars,
101 decay_string=
'B+ -> ^anti-D0 pi+',
103 vu.create_aliases_for_selected(list_of_variables=pi_vars,
104 decay_string=
'B+ -> anti-D0 ^pi+',
106 vu.create_aliases(list_of_variables=[
'decayModeID'],
107 wrapper=
'daughter(0,extraInfo({variable}))',
111 output_file =
'B2A303-MultipleDecays-Reconstruction.root'
112 ma.variablesToNtuple(decayString=
'B+:D0pi',
114 filename=output_file,