Skip to content
Snippets Groups Projects
Commit f19cd5ca authored by Frank Gaede's avatar Frank Gaede
Browse files

- fixed rotation for muon ( *deg in xml -> /rad in code for rotation ....)

parent 3275848c
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
//==================================================================== //====================================================================
#include "DD4hep/DetFactoryHelper.h" #include "DD4hep/DetFactoryHelper.h"
#include "DD4hep/TGeoUnits.h"
using namespace std; using namespace std;
using namespace tgeo ;
using namespace DD4hep; using namespace DD4hep;
using namespace DD4hep::Geometry; using namespace DD4hep::Geometry;
...@@ -37,14 +40,12 @@ static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { ...@@ -37,14 +40,12 @@ static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) {
double radius = x_det.radius() ; double radius = x_det.radius() ;
double phi = deltaphi * i ; double phi = deltaphi/rad * i ;
Position trans( radius * sin( phi ) , Position trans( radius * sin( phi ) ,
radius * cos( phi ) , radius * cos( phi ) ,
0. ) ; 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 ) ); PlacedVolume muon_phys = experimentalHall_log.placeVolume( muon_log , Transform3D( RotationZ(phi) , trans ) );
muon_phys.addPhysVolID( "system", x_det.id() ) ; muon_phys.addPhysVolID( "system", x_det.id() ) ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment