Message: Re: Trouble with G4SubtractionSolid -- pipe at angle to wall Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Trouble with G4SubtractionSolid -- pipe at angle to wall 

Forum: Geometry
Re: Question Trouble with G4SubtractionSolid -- pipe at angle to wall (Michael H. Kelsey)
Re: None Re: Trouble with G4SubtractionSolid -- pipe at angle to wall (John Allison)
Date: 15 Jan, 2011
From: Michael H. Kelsey <Michael H. Kelsey>

John Allison writes:
> Quick reply from a non-expert...
> 
> Some geometry functions don't keep the rotation matrix - only the
> pointer.

Hi, John.  That was my first thought as well; when I tried using a pointer,
it made no difference.  I then traced the G4SubtractionSolid ctor back
through its inheritance.  Ultimately, the G4RotationMatrix* is passed into
the constructor of G4AffineTransform, which simply copies the data members
into its own local table.  So the pointer is not saved (even though it is
stupidly passed as non-const), and just encourages users to create memory
leaks :-(

> or use an alternative constructor that takes a G4Transform3D - in that
> case it makes its own rotation matrix and keeps it.

Ironically, I had started out by using G4Transform3D::inverse(), and that
wasn't working, so I switched to trying to build the roation myself.  

I think I may have discovered the problem, and it is (in my opinion) a bug
in CLHEP::HepRotation.  Once I confirm it, I'll follow up with a detailed
post.

      -- Mike

 Add Message Add Message
to: "Re: Trouble with G4SubtractionSolid -- pipe at angle to wall"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]