32 const std::shared_ptr<GLogger> logger;
33 GVolume volume(logger,
"test", {
34 "modified",
"G4Box",
"1*cm, 1*cm, 1*cm",
"G4_AIR",
"root",
35 "1*cm, 2*cm, 3*cm",
"0*deg, 0*deg, 0*deg",
"active",
"NULL",
36 "1",
"1",
"778899",
"1",
"NULL",
"NULL",
"NULL",
"NULL",
"NULL",
37 "1",
"modifier transform test",
"default",
"1"
40 volume.applyTilt(
"0*deg, 0*deg, 90*deg");
42 const auto position = TransformProbe::getPosition(&volume);
43 if (!close_to(position.x(), 5.0 * CLHEP::cm) ||
44 !close_to(position.y(), 7.0 * CLHEP::cm) ||
45 !close_to(position.z(), 9.0 * CLHEP::cm)) {
49 std::unique_ptr<G4RotationMatrix> rotation(TransformProbe::getRotation(&volume));
50 const auto rotated = *rotation * G4ThreeVector(1.0, 0.0, 0.0);
51 if (!close_to(rotated.x(), 0.0) || !close_to(rotated.y(), 1.0) || !close_to(rotated.z(), 0.0)) {