From d2a80f6de073ef2edb1aec8319c83a1c5bce13f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch> Date: Fri, 14 Aug 2020 15:43:35 +0200 Subject: [PATCH 1/2] move from HepRotation to Transform3D --- .../AGDD/AGDDHandlers/src/posXYZHandler.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/DetectorDescription/AGDD/AGDDHandlers/src/posXYZHandler.cxx b/DetectorDescription/AGDD/AGDDHandlers/src/posXYZHandler.cxx index 6b2a8afd7b47..294e5c41e826 100644 --- a/DetectorDescription/AGDD/AGDDHandlers/src/posXYZHandler.cxx +++ b/DetectorDescription/AGDD/AGDDHandlers/src/posXYZHandler.cxx @@ -26,7 +26,7 @@ void posXYZHandler::ElementHandle() if (res) std::cout<<" symmetry implemented for "<<volume<<std::endl; std::string sRot=""; CLHEP::Hep3Vector cvec; - CLHEP::HepRotation crot; + GeoTrf::Transform3D crot = GeoTrf::Transform3D::Identity(); std::vector<double> X_Y_Z=getAttributeAsVector("X_Y_Z",posRet); if (posRet) { @@ -35,10 +35,7 @@ void posXYZHandler::ElementHandle() std::vector<double> rot=getAttributeAsVector("rot",rotRet); if (rotRet) { - crot=CLHEP::HepRotation(); - crot.rotateX(rot[0]*GeoModelKernelUnits::degree); - crot.rotateY(rot[1]*GeoModelKernelUnits::degree); - crot.rotateZ(rot[2]*GeoModelKernelUnits::degree); + crot = crot*GeoTrf::RotateZ3D(rot[2]*GeoModelKernelUnits::degree)*GeoTrf::RotateY3D(rot[1]*GeoModelKernelUnits::degree)*GeoTrf::RotateX3D(rot[0]*GeoModelKernelUnits::degree); } if (s_printFlag) { std::cout<<" posXYV "<<volume; @@ -46,6 +43,6 @@ void posXYZHandler::ElementHandle() if (rotRet) std::cout<<" rot= ("<<rot[0]<<";"<<rot[1]<<";"<<rot[2]<<")"; std::cout<<std::endl; } - AGDDPositioner *p=new AGDDPositioner(volume,Amg::CLHEPTransformToEigen(HepGeom::Transform3D(crot,cvec))); + AGDDPositioner *p=new AGDDPositioner(volume,Amg::CLHEPTranslationToEigen(cvec)*crot); globals::currentPositioner=p; } -- GitLab From 45fc4544237b71755290d7ece09b74e1a4c4a56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch> Date: Mon, 24 Aug 2020 14:11:05 +0200 Subject: [PATCH 2/2] update muon count when using Eigen in posXYZ handler --- Tools/PROCTools/data/master_q431_AOD_digest.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/PROCTools/data/master_q431_AOD_digest.ref b/Tools/PROCTools/data/master_q431_AOD_digest.ref index 1eab7e7717be..9f9d787e64b9 100644 --- a/Tools/PROCTools/data/master_q431_AOD_digest.ref +++ b/Tools/PROCTools/data/master_q431_AOD_digest.ref @@ -14,7 +14,7 @@ 330470 1183746343 492 465 12 0 330470 1183746710 6 0 0 0 330470 1183751782 239 235 5 0 - 330470 1183752624 347 342 8 2 + 330470 1183752624 347 342 8 3 330470 1183753006 357 377 11 3 330470 1183754806 470 406 14 0 330470 1183769295 342 318 8 2 -- GitLab