Belle II Software  release-05-01-25
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 16 of file cdst_reprocessTOP.py.

Member Function Documentation

◆ event()

def event (   self)
event function 

Definition at line 19 of file cdst_reprocessTOP.py.

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

The documentation for this class was generated from the following file:
ClusterEfficiency.ClusterEfficiency.event
def event(self)
Definition: ClusterEfficiency.py:146
Belle2::PyStoreArray
a (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:58