How do I set a 3x3 matrix to be used for a TRotation? In the documentation it says:There is no direct way to set the matrix elements - to ensure that a TRotation object always describes a real rotation.
Am I missing something? The default TRotation matrix is an identity matrix, how does one actually use this function?
ROOT User’s Guide -> Physics Vectors -> TRotation
ROOT User’s Guide -> Physics Vectors -> TVector3 -> Rotation by TRotation Class
${ROOTSYS}/test/stressVector.cxx
${ROOTSYS}/test/TestVectors.cxx
BTW. I think one could improve the documentation … “In order to ensure that a TRotation object always describes a real valid rotation, we do not provide any direct way to set its matrix elements explicitly.”
Thank you for the links.
I still do not understand why the ability to set the matrices is not provided. The problem I have us a common one. I have a set of vectors in one coordinate system (beam) and want to get the coordinates in a different, rotated system (the detector coordinate system). I know the rotation matrix between the two systems, if I can define my TRotation matrix, I can directly use:
https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#rotation-of-tvector3
Thanks again!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.