38 """ module initialization - after geometry, so GeoCache is ready """
41 print(
"Now testing hierarchy can compute nominal sensor positions...")
43 for sensor
in cache.getListOfSensors():
45 nominal = cache.getSensorInfo(sensor).getTransformation(
False)
49 reco = cache.getSensorInfo(sensor).getTransformation(
True)
53 assert (abs(nominal.GetRotationMatrix()[i] - reco.GetRotationMatrix()[i]) < 1.e-14)
56 assert (abs(nominal.GetTranslation()[i] - reco.GetTranslation()[i]) < 1.e-14)
59 """ test that moving a ladder moves the sensor in the event processing """
62 original_global_sensor_z = cache.getSensorInfo(
Belle2.VxdID(
"1.1.1")).pointToGlobal(ROOT.Math.XYZVector(0, 0, 0),
True).Z()
71 new_global_sensor_z = cache.getSensorInfo(
Belle2.VxdID(
"1.1.1")).pointToGlobal(ROOT.Math.XYZVector(0, 0, 0),
True).Z()
74 print(
"Now testing that moving a ladder moves a sensor correspondingly...")
75 assert (abs(new_global_sensor_z - original_global_sensor_z - self.
test_shift_z) < 1.e-14)