module which ckecks if two collection of SVDShaperDigits are equal
Definition at line 22 of file svd_packer_unpacker.py.
◆ event()
load SVDShaperDigits of the simulation and the packed/unpacked ones
and compare them
Definition at line 45 of file svd_packer_unpacker.py.
46 """ load SVDShaperDigits of the simulation and the packed/unpacked ones
53 svdDigits_sorted = self.sortDigits(svdDigits)
54 svdDigitsPackedUnpacked_sorted = self.sortDigits(svdDigitsPackedUnpacked)
56 if not len(svdDigits_sorted) == len(svdDigitsPackedUnpacked_sorted):
57 b2.B2FATAL(
"SVDShaperDigits count not equal after packing and unpacking")
60 for i
in range(len(svdDigits_sorted)):
64 hit = svdDigits_sorted[i]
65 hitPackedUnpacked = svdDigitsPackedUnpacked_sorted[i]
68 assert hit.getTime() == hitPackedUnpacked.getTime()
69 assert hit.getIndex() == hitPackedUnpacked.getIndex()
73 assert numpy.isclose(hit.getCharge(), hitPackedUnpacked.getCharge())
76 assert hit.getSensorID().
getID() == hitPackedUnpacked.getSensorID().
getID()
77 assert hit.getSensorID().getLayerNumber() == hitPackedUnpacked.getSensorID().getLayerNumber()
78 assert hit.getSensorID().getLadderNumber() == hitPackedUnpacked.getSensorID().getLadderNumber()
79 assert hit.getSensorID().getSensorNumber() == hitPackedUnpacked.getSensorID().getSensorNumber()
80 assert hit.getSensorID().getSegmentNumber() == hitPackedUnpacked.getSensorID().getSegmentNumber()
A (simplified) python wrapper for StoreArray.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
◆ sortDigits()
def sortDigits |
( |
|
self, |
|
|
|
unsortedPyStoreArray |
|
) |
| |
use some digit information to sort the SVDShaperDigits list
Returns a python-list containing the SVDShaperDigits
Definition at line 28 of file svd_packer_unpacker.py.
The documentation for this class was generated from the following file: