Belle II Software  release-06-01-15
ReplaceTOPLikelihoods Class Reference
Inheritance diagram for ReplaceTOPLikelihoods:
Collaboration diagram for ReplaceTOPLikelihoods:

Public Member Functions

def event (self)
 

Detailed Description

 replacing TOP likelihoods in PIDLikelihoods with new values 

Definition at line 24 of file cdst_reprocessTOP.py.

Member Function Documentation

◆ event()

def event (   self)
 event function 

Definition at line 27 of file cdst_reprocessTOP.py.

27  def event(self):
28  ''' event function '''
29 
30  chargedStableSet = [Belle2.Const.electron,
31  Belle2.Const.muon,
32  Belle2.Const.pion,
33  Belle2.Const.kaon,
34  Belle2.Const.proton,
35  Belle2.Const.deuteron]
36 
37  for track in Belle2.PyStoreArray('Tracks'):
38  pid = track.getRelated('PIDLikelihoods')
39  # should unset TOP in PIDLikelihoods first, but such function is not available
40  top = track.getRelated('TOPLikelihoods')
41  if top and pid:
42  if top.getFlag() == 1:
43  for chargedStable in chargedStableSet:
44  logL = top.getLogL(chargedStable)
45  pid.setLogLikelihood(Belle2.Const.TOP, chargedStable, logL)
46 
47 
48 # Database:
49 # - replace the name and location of the local DB before running!
50 # - payloads are searched for in the reverse order of DB's given below;
51 # therefore the new calibration, if provided, is taken from the local DB.
52 # - one can even use several local DB's
53 b2.use_central_database('data_reprocessing_proc7') # global tag used in production of cdst
54 b2.use_local_database('localDB/localDB.txt', 'localDB/') # new calibration
55 
56 # Create path
a (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:56

The documentation for this class was generated from the following file: