Re: [ROOT] rotations in ROOT

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Dec 26 2000 - 15:16:04 MET


Dear Pasha,
As I am sure you know, the mini geometry packahe in Root is a small subset
of the Geant3 system including the rotation matrix definition.
The transformation functions in TNode
  TNode::Local2Master
  TNode::Master2Local 
are based on this system.

I agree with your request for an additional user interface.
>From your mail, I understand that you are willing to provide a set of new
functions and its interface with the existing TGeometry/TNode structure
::)

With all my best wishes

Rene Brun

On Mon, 25 Dec 2000, Pasha Murat (630)840-8237 FNAL (630)859-3463 home wrote:

> Dear Rooters,
> 
> I've been trying to solve a pretty simple problem of
> how  to define a subdetector, rotated wrt the global coordinate
> system and to transform components of a 3-vector (track momentum) 
> into the local system of this subdetector. This Christmas exersize 
> turned out to be couple of orders of magnitude more difficult than I
> expected, and here are the reasons:
> 
> - an illustrated way of describing the detector geometry suggests
>   using TRotMatrices to describe the rotations of coordinate systems.
>   However the only way to rotate a TVector3 using a TRotMatrix 
>   goes through convertion of a TRotMatrix into array of doubles and 
>   then coding  of multiplication formulae by hands
> - alternatively one can rotate a TVector3 using a TRotation, but
>   initialization-wise 
>   the latter class seems to be almost self-encapsulated - I didn't find 
>   an easy and intuitive way to initialise a TRotation object starting 
>   from either 6 angles (GEANT3 way), or 9 direction cosines (regular math
>   approach) - any help would be greatly appreciated.
> - one more comment about TRotMatrix: it is 9 doubles plus 2 strings
>   (name ant title), which make the object substantially more heavy. 
>   In case of complicated geometry, when one needs to define many 
>   rotation matrices this also leads to significant amount of waisted 
>   memory. I'm wondering if there is a real need for a rotation matrix 
>   to be named - to identify it uniquely it seems to be quite enough 
>   to give a TRotMatrix an integer ID... I also failed to find a use 
>   case of a TRotMatrix which needs a title...
> 
> Anyway, I ended up with deriving my own class from TRotation, but I believe,
> we can do much better than that. My favorite solution would be to have an 
> "anonymous" (nameless and  title-less) TRotMatrix with defined operations
> on the 3-vectors, but I'm not sure about all the
> implications, for example, if there are people building geometries of their
> detectors and relying on the rotation matrices being named etc. 
> Any other proposals?
> 				Merry Christmas to everybody, Pasha
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:40 MET