5 from ROOT
import Belle2
6 from simulation
import add_simulation
11 set_random_seed(12345)
17 module which ckecks if two collections of ARICHDigits are equal
22 Use some digit information to sort the digits
23 Returns a python-list containing the sorted digits
27 py_list = [x
for x
in unsortedPyStoreArray]
39 load original ARICHDigits and the packed/unpacked ones, sort and compare them
49 digitsUnpacked_sorted = self.
sortDigits(digitsUnpacked)
52 if not len(digits_sorted) == len(digitsUnpacked_sorted):
53 B2FATAL(
"ARICHDigits: size not equal after packing and unpacking")
56 for i
in range(len(digits_sorted)):
58 digit = digits_sorted[i]
59 digitUnpacked = digitsUnpacked_sorted[i]
62 assert digit.getModuleID() == digitUnpacked.getModuleID()
63 assert digit.getChannelID() == digitUnpacked.getChannelID()
64 assert digit.getBitmap() == digitUnpacked.getBitmap()
69 eventinfosetter = register_module(
'EventInfoSetter')
70 eventinfosetter.param({
'evtNumList': [10]})
71 main.add_module(eventinfosetter)
73 particlegun = register_module(
'ParticleGun')
74 particlegun.param(
'pdgCodes', [13, -13])
75 particlegun.param(
'nTracks', 10)
76 particlegun.param(
'thetaGeneration',
'uniformCos')
77 particlegun.param(
'thetaParams', [20.0, 25.0])
79 main.add_module(particlegun)
81 add_simulation(main, components=[
'ARICH'])
82 set_module_parameters(main, type=
"Geometry", useDB=
False, components=[
"ARICH"])
84 Packer = register_module(
'ARICHPacker')
85 main.add_module(Packer)
87 unPacker = register_module(
'ARICHUnpacker')
88 unPacker.param(
'outputDigitsName',
'ARICHDigitsUnpacked')
89 main.add_module(unPacker)
93 progress = register_module(
'Progress')
94 main.add_module(progress)