13 <output>CPVToolsOutput.root</output>
14 <contact>Thibaud Humair; thumair@mpp.mpg.de</contact>
15 <description>This file employs all the time dependent CPV analysis tools. It reconstructs B0sig->J/PsiKs on the signal side
16 and applies the flavor tagger on the ROE. The vertex of B0sig is reconstructed and the vertex of B0tag is reconstructed
17 with the TagV module. </description>
22import modularAnalysis
as ma
23import flavorTagger
as ft
29cp_val_path = b2.Path()
31inputFile = b2.find_file(filename=
'analysis/mdst11_BGx1_b2jpsiks.root', data_type=
'validation')
32ma.inputMdst(filename=inputFile, path=cp_val_path)
35ma.fillParticleList(decayString=
'pi+:all', cut=
'', path=cp_val_path)
36ma.fillParticleList(decayString=
'mu+:all', cut=
'', path=cp_val_path)
38ma.reconstructDecay(decayString=
'K_S0:pipi -> pi+:all pi-:all', cut=
'dM<0.25', path=cp_val_path)
39ma.reconstructDecay(decayString=
'J/psi:mumu -> mu+:all mu-:all', cut=
'dM<0.11', path=cp_val_path)
40ma.reconstructDecay(decayString=
'B0:jpsiks -> J/psi:mumu K_S0:pipi', cut=
'Mbc > 5.2 and abs(deltaE)<0.2', path=cp_val_path)
42ma.matchMCTruth(list_name=
'B0:jpsiks', path=cp_val_path)
45ma.buildRestOfEvent(target_list_name=
'B0:jpsiks', fillWithMostLikely=
True, path=cp_val_path)
48b2.conditions.append_globaltag(ma.getAnalysisGlobaltag())
52 particleLists=[
'B0:jpsiks'],
53 weightFiles=
'B2nunubarBGx1',
56vx.treeFit(list_name=
'B0:jpsiks', conf_level=1e-10, ipConstraint=
True, path=cp_val_path)
57vx.TagV(list_name=
'B0:jpsiks', MCassociation=
'breco', constraintType=
'tube', path=cp_val_path)
60fs_vars = vc.pid + vc.track + vc.track_hits + vc.mc_truth
61jpsiandk0s_vars = vc.mc_truth
62vertex_vars = vc.vertex + vc.mc_vertex + vc.kinematics + vc.mc_kinematics
63bvars = vc.reco_stats + \
66 vc.roe_multiplicities + \
67 [
'flavor_tagging'] + \
71 vu.create_aliases_for_selected(list_of_variables=fs_vars,
72 decay_string=
'B0 -> [J/psi -> ^mu+ ^mu-] [K_S0 -> ^pi+ ^pi-]') + \
73 vu.create_aliases_for_selected(list_of_variables=jpsiandk0s_vars,
74 decay_string=
'B0 -> [^J/psi -> mu+ mu-] [^K_S0 -> pi+ pi-]') + \
75 vu.create_aliases_for_selected(list_of_variables=vertex_vars,
76 decay_string=
'B0 -> [^J/psi -> ^mu+ ^mu-] [^K_S0 -> ^pi+ ^pi-]')
79ma.variablesToNtuple(decayString=
'B0:jpsiks',
81 filename=
'../CPVToolsOutput.root',
85ma.summaryOfLists(particleLists=[
'B0:jpsiks'], path=cp_val_path)
87cp_val_path.add_module(
'Progress')
89b2.process(cp_val_path)