From f19cd5ca39735035719eaaf199af401204599e6c Mon Sep 17 00:00:00 2001
From: Frank Gaede <frank.gaede@desy.de>
Date: Wed, 8 Jan 2014 15:30:01 +0000
Subject: [PATCH]  - fixed rotation for muon ( *deg in xml -> /rad in code for
 rotation ....)

---
 examples/noviceN04/src/Muon_geo.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/examples/noviceN04/src/Muon_geo.cc b/examples/noviceN04/src/Muon_geo.cc
index 5d9bce634..412b6cb8d 100644
--- a/examples/noviceN04/src/Muon_geo.cc
+++ b/examples/noviceN04/src/Muon_geo.cc
@@ -8,7 +8,10 @@
 //====================================================================
 #include "DD4hep/DetFactoryHelper.h"
 
+#include "DD4hep/TGeoUnits.h"
+
 using namespace std;
+using namespace tgeo ;
 using namespace DD4hep;
 using namespace DD4hep::Geometry;
 
@@ -37,14 +40,12 @@ static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens)  {
     
     double radius = x_det.radius() ;
     
-    double phi = deltaphi * i ;
+    double phi = deltaphi/rad * i ;
 
     Position trans( radius * sin( phi ) ,
 		    radius * cos( phi ) ,
 		    0. ) ;
 
-    // Rotation rot( 0, 0 , phi ) ;
-    // FG: RotationZ(phi) is not the same as rot( 0, 0 , phi )  !!!???
     PlacedVolume muon_phys = experimentalHall_log.placeVolume( muon_log , Transform3D( RotationZ(phi) , trans ) );
 
     muon_phys.addPhysVolID( "system", x_det.id() )  ;
-- 
GitLab