module which ckecks if two collection of SVDShaperDigits are equal
Definition at line 16 of file svd_packer_unpacker.py.
◆ event()
load SVDShaperDigits of the simulation and the packed/unpacked ones
and compare them
Definition at line 39 of file svd_packer_unpacker.py.
40 """ load SVDShaperDigits of the simulation and the packed/unpacked ones
47 svdDigits_sorted = self.sortDigits(svdDigits)
48 svdDigitsPackedUnpacked_sorted = self.sortDigits(svdDigitsPackedUnpacked)
50 if not len(svdDigits_sorted) == len(svdDigitsPackedUnpacked_sorted):
51 B2FATAL(
"SVDShaperDigits count not equal after packing and unpacking")
54 for i
in range(len(svdDigits_sorted)):
58 hit = svdDigits_sorted[i]
59 hitPackedUnpacked = svdDigitsPackedUnpacked_sorted[i]
62 assert hit.getTime() == hitPackedUnpacked.getTime()
63 assert hit.getIndex() == hitPackedUnpacked.getIndex()
67 assert numpy.isclose(hit.getCharge(), hitPackedUnpacked.getCharge())
70 assert hit.getSensorID().
getID() == hitPackedUnpacked.getSensorID().
getID()
71 assert hit.getSensorID().getLayerNumber() == hitPackedUnpacked.getSensorID().getLayerNumber()
72 assert hit.getSensorID().getLadderNumber() == hitPackedUnpacked.getSensorID().getLadderNumber()
73 assert hit.getSensorID().getSensorNumber() == hitPackedUnpacked.getSensorID().getSensorNumber()
74 assert hit.getSensorID().getSegmentNumber() == hitPackedUnpacked.getSensorID().getSegmentNumber()
◆ sortDigits()
def sortDigits |
( |
|
self, |
|
|
|
unsortedPyStoreArray |
|
) |
| |
use some digit information to sort the SVDShaperDigits list
Returns a python-list containing the SVDShaperDigits
Definition at line 22 of file svd_packer_unpacker.py.
The documentation for this class was generated from the following file: