13 from ROOT
import Belle2
14 from reconstruction
import add_top_modules, add_cdst_output
25 ''' replacing TOP likelihoods in PIDLikelihoods with new values '''
28 ''' event function '''
30 chargedStableSet = [Belle2.Const.electron,
35 Belle2.Const.deuteron]
38 pid = track.getRelated(
'PIDLikelihoods')
40 top = track.getRelated(
'TOPLikelihoods')
42 if top.getFlag() == 1:
43 for chargedStable
in chargedStableSet:
44 logL = top.getLogL(chargedStable)
45 pid.setLogLikelihood(Belle2.Const.TOP, chargedStable, logL)
53 b2.use_central_database(
'data_reprocessing_proc7')
54 b2.use_local_database(
'localDB/localDB.txt',
'localDB/')
57 main = b2.create_path()
60 roinput = b2.register_module(
'RootInput')
61 main.add_module(roinput)
64 main.add_module(
'TOPGeometryParInitializer')
67 recalibrator = b2.register_module(
'TOPTimeRecalibrator')
68 recalibrator.param(
'subtractBunchTime',
False)
69 main.add_module(recalibrator)
73 for m
in main.modules():
74 if m.type() ==
"TOPBunchFinder":
75 m.param(
'usePIDLikelihoods',
True)
84 progress = b2.register_module(
'Progress')
85 main.add_module(progress)
a (simplified) python wrapper for StoreArray.