From 8a935951d86110c49ea15728f4c3797bc2cda552 Mon Sep 17 00:00:00 2001 From: Ben Couturier <ben.couturier@cern.ch> Date: Mon, 28 May 2018 19:14:46 +0200 Subject: [PATCH] Added fix for toGlobalMatrix on DeVPSensor --- examples/DDDB/include/Detector/DeIOV.h | 5 +++++ examples/DDDB/include/Detector/DeVPSensor.h | 4 +++- examples/DDDB/include/Detector/DetectorElement.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/DDDB/include/Detector/DeIOV.h b/examples/DDDB/include/Detector/DeIOV.h index 26afa6d07..8d649a81e 100644 --- a/examples/DDDB/include/Detector/DeIOV.h +++ b/examples/DDDB/include/Detector/DeIOV.h @@ -132,6 +132,11 @@ namespace gaudi { { return detectorAlignment.worldToLocal(globalDirection); } XYZVector toGlobal( const XYZVector& localDirection ) const { return detectorAlignment.localToWorld(localDirection); } + + const TGeoHMatrix& toGlobalMatrix() const { + return detectorAlignment.worldTransformation(); + } + }; } // End namespace detail diff --git a/examples/DDDB/include/Detector/DeVPSensor.h b/examples/DDDB/include/Detector/DeVPSensor.h index 20a217095..02c10cd95 100644 --- a/examples/DDDB/include/Detector/DeVPSensor.h +++ b/examples/DDDB/include/Detector/DeVPSensor.h @@ -136,6 +136,7 @@ namespace gaudi { virtual void initialize() override; /// Printout method to stdout virtual void print(int indent, int flags) const override; + }; } // End namespace detail @@ -164,10 +165,11 @@ namespace gaudi { static_t& staticData() const { return access()->sensor_static; } //bool isLeft() const { return (ptr()->de_user & VP::RIGHT) == 0; } //bool isRight() const { return (ptr()->de_user & VP::RIGHT) != 0; } + }; /// For the full sensor object, we have to combine it with the geometry stuff: - typedef DetectorStaticElement<DeVPSensorElement> DeVPSensor; + typedef DetectorElement<DeVPSensorElement> DeVPSensor; } // End namespace gaudi #endif // DETECTOR_DEVPSENSORIOV_H diff --git a/examples/DDDB/include/Detector/DetectorElement.h b/examples/DDDB/include/Detector/DetectorElement.h index 85771e482..43aaa4ab6 100644 --- a/examples/DDDB/include/Detector/DetectorElement.h +++ b/examples/DDDB/include/Detector/DetectorElement.h @@ -357,7 +357,7 @@ namespace gaudi { const TGeoHMatrix& toLocalMatrix() const { return iovData().toLocalMatrix; } const TGeoHMatrix& toGlobalMatrix() const - { return iovData().toGlobalMatrix; } + { return iovData().toGlobalMatrix(); } const TGeoHMatrix& toLocalMatrixNominal() const { return iovData().toLocalMatrixNominal; } -- GitLab