Belle II Software  release-05-01-25
crossTalkSkim_util.py
1 # !/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 #
5 # contributors: James Webb
6 #
7 
8 #
9 # util to skim out cross talk event in the origami sensors
10 #
11 # requires svdCrossTalkFinderModule to have flagged events in
12 # SVDEventInfo
13 #
14 # in order to use this function:
15 # import it:
16 # from svd.crossTalkSkim_utils import skimCrossTalkEventsModule
17 # and then use it:
18 # emptypath = create_path()
19 # skimCrossTalk.if_true(emptypath)
20 #
21 
22 import basf2
23 import ROOT
24 from ROOT import Belle2
25 
26 
27 class skimCrossTalkEventsModule(basf2.Module):
28  """
29  a basf2 pythin module to skim SVD xTalk events
30  """
31 
32  def event(self):
33  """
34  check if the xTalk flag is set and return 1 in this case
35  """
36 
37  svdEventInfo = Belle2.PyStoreObj('SVDEventInfo')
38 
39  if svdEventInfo.isCrossTalkEvent():
40 
41  self.return_value(1)
42 
43  else:
44 
45  self.return_value(0)
svd.crossTalkSkim_util.skimCrossTalkEventsModule.event
def event(self)
Definition: crossTalkSkim_util.py:32
Belle2::PyStoreObj
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:69
svd.crossTalkSkim_util.skimCrossTalkEventsModule
Definition: crossTalkSkim_util.py:27