Belle II Software development
SVDShaperDigitsOrderingTest.py
1#!/usr/bin/env python3
2
3
10
11
18
19import basf2 as b2
20from ROOT import Belle2
21
22
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
50main = b2.create_path()
51
52'''
53# to run on 2017 testbeam data
54main.add_module('RootInput', branchNames='RawSVDs')
55main.add_module('Gearbox', fileName='testbeam/vxd/2017_geometry_1.xml')
56main.add_module('Geometry')
57main.add_module('SVDUnpacker', xmlMapFileName='testbeam/vxd/data/2017_svd_mapping.xml', GenerateShaperDigits=True, shutUpFTBError=1)
58'''
59
60main.add_module('EventInfoSetter')
61main.add_module('EventInfoPrinter')
62main.add_module('EvtGenInput')
63main.add_module('Gearbox')
64main.add_module('Geometry', components=['SVD'])
65main.add_module('FullSim')
66main.add_module('SVDDigitizer', GenerateShaperDigits=False)
67main.add_module('SVDPacker')
68main.add_module('SVDUnpacker', GenerateShaperDigits=True)
69
70# TEST MODULE
71main.add_module(testSVDShaperDigitOrdering())
72
73# Process events
74b2.process(main)
75
76# Print call statistics
77print(b2.statistics)
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72