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