12 Simple example script to reconstruct Dstart for the purpose of ARICH PID performance studies
13 Usage : basf2 reconstruct_Dstar.py exp start_run end_run
14 set up to use D* skim from proc9 (adjust line 42 to change input!
20 import modularAnalysis
as ma
23 import stdCharged
as stdc
26 my_path = b2.create_path()
31 exp = argvs[1].zfill(4)
43 main_path = b2.create_path()
47 for i
in range(int(start_run), int(end_run) + 1):
49 fname =
'/group/belle2/dataprod/Data/release-03-02-02/DB00000654/proc9/e' + exp +
'/4S/r' + \
50 ru.zfill(5) +
'/offskim/offskim_dstar/cdst/sub00/cdst.physics.' + exp +
'.' + ru.zfill(5) +
'.HLT0.offskim_dstar.root'
51 if os.path.exists(fname):
52 inputFilename.append(fname)
55 input_module = b2.register_module(
'RootInput')
56 input_module.param(
'inputFileNames', inputFilename)
59 my_path.add_module(input_module)
75 stdc.stdPi(listtype=
'all', path=my_path)
76 stdc.stdK(listtype=
'all', path=my_path)
80 ma.reconstructDecay(decayString=
'D0:kpi -> K-:all pi+:all', cut=
'1.8 < M < 1.9', path=my_path)
87 ma.reconstructDecay(decayString=
'D*+ -> D0:kpi pi+:all', cut=
'0.0 < Q < 0.2', path=my_path)
97 'pidPairProbabilityExpert(321, 211, ARICH)',
98 'pidDeltaLogLikelihoodValueExpert(211,321,ARICH)',
99 'pidProbabilityExpert(211, ARICH)',
100 'pidProbabilityExpert(321, ARICH)']
103 dstar_vars = vc.inv_mass + vc.mc_truth + vc.kinematics
105 fs_hadron_vars = vu.create_aliases_for_selected(
106 list_of_variables=vc.pid + vc.track + vc.mc_truth + vc.kinematics + pidVars,
107 decay_string=
'D*+ -> [D0 -> ^K- ^pi+] ^pi+')
109 d0_vars = vu.create_aliases_for_selected(
110 list_of_variables=vc.inv_mass + vc.mc_truth,
111 decay_string=
'D*+ -> ^D0 pi+',
115 output_file =
'Dstar2D0Pi-PID_exp' + exp +
'_r' + start_run +
'-' + end_run +
'.root'
116 ma.variablesToNtuple(
'D*+', dstar_vars + d0_vars + fs_hadron_vars,
117 filename=output_file, treename=
'dsttree', path=my_path)
120 my_path.add_module(
'Progress')