9import modularAnalysis
as ma
13import stdCharged
as stdc
16from variables
import variables
18variables.addAlias(
'TubeX',
'extraInfo(TubePosX)')
19variables.addAlias(
'TubeY',
'extraInfo(TubePosY)')
20variables.addAlias(
'TubeZ',
'extraInfo(TubePosZ)')
21variables.addAlias(
'Tube00',
'extraInfo(TubeCov00)')
22variables.addAlias(
'Tube01',
'extraInfo(TubeCov01)')
23variables.addAlias(
'Tube02',
'extraInfo(TubeCov02)')
24variables.addAlias(
'Tube10',
'extraInfo(TubeCov10)')
25variables.addAlias(
'Tube11',
'extraInfo(TubeCov11)')
26variables.addAlias(
'Tube12',
'extraInfo(TubeCov12)')
27variables.addAlias(
'Tube20',
'extraInfo(TubeCov20)')
28variables.addAlias(
'Tube21',
'extraInfo(TubeCov21)')
29variables.addAlias(
'Tube22',
'extraInfo(TubeCov22)')
31variables.addAlias(
'avf00',
'extraInfo(prod_vtx_cov00)')
32variables.addAlias(
'avf01',
'extraInfo(prod_vtx_cov01)')
33variables.addAlias(
'avf02',
'extraInfo(prod_vtx_cov02)')
34variables.addAlias(
'avf10',
'extraInfo(prod_vtx_cov10)')
35variables.addAlias(
'avf11',
'extraInfo(prod_vtx_cov11)')
36variables.addAlias(
'avf12',
'extraInfo(prod_vtx_cov12)')
37variables.addAlias(
'avf20',
'extraInfo(prod_vtx_cov20)')
38variables.addAlias(
'avf21',
'extraInfo(prod_vtx_cov21)')
39variables.addAlias(
'avf22',
'extraInfo(prod_vtx_cov22)')
41variables.addAlias(
'avfPx',
'extraInfo(Px_after_avf)')
42variables.addAlias(
'avfPy',
'extraInfo(Py_after_avf)')
43variables.addAlias(
'avfPz',
'extraInfo(Pz_after_avf)')
44variables.addAlias(
'avfE',
'extraInfo(E_after_avf)')
46variables.addAlias(
'mcPxCms',
'useCMSFrame(mcPX)')
47variables.addAlias(
'mcPyCms',
'useCMSFrame(mcPY)')
48variables.addAlias(
'mcPzCms',
'useCMSFrame(mcPZ)')
49variables.addAlias(
'mcECms',
'useCMSFrame(mcE)')
51variables.addAlias(
'tube_dir_X',
'extraInfo(TubeDirX)')
52variables.addAlias(
'tube_dir_Y',
'extraInfo(TubeDirY)')
53variables.addAlias(
'tube_dir_Z',
'extraInfo(TubeDirZ)')
54variables.addAlias(
'tube_B_aparent_Momentum_from_creatorB',
'extraInfo(TubeB_p_estimated)')
56variables.addAlias(
'truex',
'matchedMC(x)')
57variables.addAlias(
'truey',
'matchedMC(y)')
58variables.addAlias(
'truez',
'matchedMC(z)')
60my_path = b2.create_path()
67stdc.stdPi(listtype=
'all', path=my_path)
68stdc.stdPi(listtype=
'good', path=my_path)
69stdc.stdK(listtype=
'all', path=my_path)
70stdc.stdK(listtype=
'good', path=my_path)
71stdc.stdMu(listtype=
'all', path=my_path)
72stdc.stdMu(listtype=
'good', path=my_path)
74ma.reconstructDecay(
'D0:kpi -> K-:good pi+:good',
'', path=my_path)
75ma.matchMCTruth(
'D0:kpi', path=my_path)
76ma.applyCuts(
'D0:kpi',
'abs(mcPDG)==421', path=my_path)
77vx.raveFit(
'D0:kpi', 0.0, path=my_path)
79ma.reconstructDecay(
'J/psi:mumu -> mu+:good mu-:good',
'', path=my_path)
80vx.raveFit(
'J/psi:mumu', 0.0, path=my_path)
83ma.reconstructDecay(
'B+:tag -> anti-D0:kpi pi+:all',
'', path=my_path)
84ma.matchMCTruth(
'B+:tag', path=my_path)
85ma.applyCuts(
'B+:tag',
'isSignalAcceptMissingNeutrino>0.5', path=my_path)
86vx.raveFit(
'B+:tag', 0.0, path=my_path)
89ma.reconstructDecay(
'B-:sigT -> J/psi:mumu K-:good pi+:good pi-:good',
'', path=my_path)
90ma.matchMCTruth(
'B-:sigT', path=my_path)
91ma.applyCuts(
'B-:sigT',
'abs(mcPDG)==521', path=my_path)
93ma.reconstructDecay(
'Upsilon(4S):sig -> B+:tag B-:sigT',
'', path=my_path)
95mytestmodule2 = b2.register_module(
'BtubeCreator')
99my_path.add_module(mytestmodule2, listName=
'Upsilon(4S):sig', decayString=
'Upsilon(4S):sig -> ^B+:tag B-:sigT')
100vx.raveFit(
'B-:sigT', 0.0, constraint=
'btube', path=my_path)
102output_file =
'test.root'
103true_vars = [
'truex',
'truey',
'truez']
104avf_vars = [
'avf00',
'avf01',
'avf02',
'avf10',
'avf11',
'avf12',
'avf20',
'avf21',
'avf22',
'avfPx',
'avfPy',
'avfPz',
'avfE']
121 'tube_B_aparent_Momentum_from_creatorB']
123common_vars = vc.kinematics + vc.vertex + vc.mc_vertex + vc.mc_truth + \
124 vc.mc_kinematics + [
'InvM',
'mcPxCms',
'mcPyCms',
'mcPzCms',
'mcECms']
125D_vars_tagside = vu.create_aliases_for_selected(
126 list_of_variables=common_vars,
127 decay_string=
'B+:tag -> ^anti-D0:kpi pi+:all',
129U4S_vars_sig = vu.create_aliases_for_selected(
130 list_of_variables=common_vars + tube_vars + true_vars,
131 decay_string=
'Upsilon(4S):sig -> B+:tag ^B-:sigT',
133U4S_vars_tag = vu.create_aliases_for_selected(
134 list_of_variables=common_vars + avf_vars + true_vars,
135 decay_string=
'Upsilon(4S):sig -> ^B+:tag B-:sigT',
137U4S_vars = common_vars + U4S_vars_tag + U4S_vars_sig + D_vars_tagside
138ma.variablesToNtuple(
'Upsilon(4S):sig', U4S_vars,
139 filename=output_file, treename=
'u4stree', path=my_path)
140ma.variablesToNtuple(
'B+:tag', common_vars,
141 filename=output_file, treename=
'tagtree', path=my_path)
def require_file(filename, data_type="", py_case=None)
def clean_working_directory()
def safe_process(*args, **kwargs)