12 import modularAnalysis
as ma
13 from variables
import variables
as vm
18 myMain = basf2.create_path()
23 ma.inputMdst(filename=basf2.find_file(
'B02pi0D0_D2kpi_B2Dstarpi_Dstar2Dpi_D2kpi.root',
'examples',
False),
30 photons = (
'gamma',
'')
32 ma.fillParticleLists([kaons, pions, photons], path=myMain)
35 ma.reconstructDecay(
'pi0 -> gamma gamma',
'0.05 < M < 1.7', path=myMain)
38 ma.reconstructDecay(
'D0 -> K- pi+',
'1.800 < M < 1.900', path=myMain)
41 ma.reconstructDecay(
'D*+ -> D0 pi+',
'0.0 <= Q < 0.02', path=myMain)
44 ma.reconstructDecay(
'anti-B0:tag -> D*+ pi-',
'5.000 < M < 6.000', path=myMain)
47 ma.reconstructDecay(
'B0:sig -> anti-D0 pi0',
'0.000 < M < 6.000', path=myMain)
50 ma.reconstructDecay(
'Upsilon(4S):B0barB0 -> anti-B0:tag B0:sig',
'0.000 < M < 11.000', dmID=1, path=myMain)
51 ma.reconstructDecay(
'Upsilon(4S):B0B0 -> B0:tag B0:sig',
'0.000 < M < 11.000', dmID=2, path=myMain)
52 ma.copyLists(
'Upsilon(4S):all', [
'Upsilon(4S):B0barB0',
'Upsilon(4S):B0B0'], path=myMain)
55 ma.matchMCTruth(
'Upsilon(4S):all', myMain)
58 ma.buildRestOfEvent(
'B0:tag', path=myMain)
59 ma.buildRestOfEvent(
'Upsilon(4S):all', path=myMain)
62 commonVariables = vc.mc_truth + vc.deltae_mbc
63 BvariableList = commonVariables + vc.roe_multiplicities
66 Y4SvariableList = vc.mc_truth + vc.roe_multiplicities + vc.recoil_kinematics + vc.extra_energy
67 vm.addAlias(
'dmID',
'extraInfo(decayModeID)')
68 Y4SvariableList += [
'dmID']
69 Y4SvariableList += vu.create_aliases(commonVariables,
'daughter(0, {variable})',
'Btag')
70 Y4SvariableList += vu.create_aliases(commonVariables,
'daughter(1, {variable})',
'Bsig')
73 ma.variablesToNtuple(
'B0:tag', variables=BvariableList, filename=
'ROE_BtagBsig.root', treename=
'btag', path=myMain)
74 ma.variablesToNtuple(
'Upsilon(4S):all', variables=Y4SvariableList, filename=
'ROE_BtagBsig.root', treename=
'btagbsig', path=myMain)
77 print(basf2.statistics)