34import modularAnalysis
as ma
39my_path = b2.create_path()
42ma.inputMdst(filename=b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False),
48photons = (
'gamma',
'')
49ma.fillParticleListsFromMC(decayStringsWithCuts=[kaons, pions, photons],
54ma.reconstructDecay(decayString=
'pi0 -> gamma gamma',
55 cut=
'0.1 < InvM < 0.15',
59ma.reconstructDecay(decayString=
'D0:ch1 -> K- pi+',
63ma.reconstructDecay(decayString=
'D0:ch2 -> K- pi+ pi0',
67ma.reconstructDecay(decayString=
'D0:ch3 -> K- pi+ pi+ pi-',
71ma.reconstructDecay(decayString=
'D0:ch4 -> K- K+',
75ma.reconstructDecay(decayString=
'D0:ch5 -> pi+ pi-',
81ma.copyLists(outputListName=
'D0:all',
82 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
86ma.reconstructDecay(decayString=
'B+:D0pi -> anti-D0:all pi+',
87 cut=
'5.24 < Mbc < 5.29 and abs(deltaE) < 1.0',
92ma.matchMCTruth(list_name=
'B+:D0pi',
96d_vars = vc.inv_mass + vc.kinematics
97pi_vars = vc.kinematics
98b_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}))',
111output_file =
'B2A303-MultipleDecays-Reconstruction.root'
112ma.variablesToNtuple(decayString=
'B+:D0pi',
114 filename=output_file,