Belle II Software
development
SVDShaperDigitsOrderingTest.py
1
#!/usr/bin/env python3
2
3
10
11
18
19
import
basf2
as
b2
20
from
ROOT
import
Belle2
21
22
23
class
testSVDShaperDigitOrdering
(b2.Module):
24
25
"""Module to check SVDShaperDigit ordering."""
26
27
def
__init__
(self):
28
'''initialize'''
29
30
super().
__init__
()
31
32
def
event
(self):
33
''' print shaper digits '''
34
35
sds =
Belle2.PyStoreArray
(
'SVDShaperDigits'
)
36
37
print(
'NEW EVENT!'
)
38
print(
'layer ladder sensor side strip'
)
39
40
for
sd
in
sds:
41
sensor = sd.getSensorID()
42
side =
'V'
43
if(sd.isUStrip()):
44
side =
'U'
45
46
print(str(sensor.getLayerNumber()) +
' '
+ str(sensor.getLadderNumber()) +
' '
+
47
str(sensor.getSensorNumber()) +
' '
+ side +
' '
+ str(sd.getCellID()))
48
49
50
main = b2.create_path()
51
52
'''
53
# to run on 2017 testbeam data
54
main.add_module('RootInput', branchNames='RawSVDs')
55
main.add_module('Gearbox', fileName='testbeam/vxd/2017_geometry_1.xml')
56
main.add_module('Geometry')
57
main.add_module('SVDUnpacker', xmlMapFileName='testbeam/vxd/data/2017_svd_mapping.xml', GenerateShaperDigits=True, shutUpFTBError=1)
58
'''
59
60
main.add_module(
'EventInfoSetter'
)
61
main.add_module(
'EventInfoPrinter'
)
62
main.add_module(
'EvtGenInput'
)
63
main.add_module(
'Gearbox'
)
64
main.add_module(
'Geometry'
, components=[
'SVD'
])
65
main.add_module(
'FullSim'
)
66
main.add_module(
'SVDDigitizer'
, GenerateShaperDigits=
False
)
67
main.add_module(
'SVDPacker'
)
68
main.add_module(
'SVDUnpacker'
, GenerateShaperDigits=
True
)
69
70
# TEST MODULE
71
main.add_module(
testSVDShaperDigitOrdering
())
72
73
# Process events
74
b2.process(main)
75
76
# Print call statistics
77
print(b2.statistics)
Belle2::PyStoreArray
A (simplified) python wrapper for StoreArray.
Definition:
PyStoreArray.h:72
SVDShaperDigitsOrderingTest.testSVDShaperDigitOrdering
Definition:
SVDShaperDigitsOrderingTest.py:23
SVDShaperDigitsOrderingTest.testSVDShaperDigitOrdering.__init__
def __init__(self)
Definition:
SVDShaperDigitsOrderingTest.py:27
SVDShaperDigitsOrderingTest.testSVDShaperDigitOrdering.event
def event(self)
Definition:
SVDShaperDigitsOrderingTest.py:32
svd
examples
SVDShaperDigitsOrderingTest.py
Generated on Tue Nov 12 2024 02:41:39 for Belle II Software by
1.9.6