kalmanalignment is hosted by Hepforge, IPPP Durham

/home/mweber/Dokumente/CMS/Alignment/kalmanalignment/trunk/simulation/ThreeDModel.cc File Reference

Definition of functions and procedures for 3D manipulation with matrices. More...

#include <iostream>
#include <TRandom.h>
#include <TMath.h>
#include "Utilities.h"
#include "ThreeDModel.h"

Functions

void FillRotMatrixKarimaki (HepMatrix &m, double alpha, double beta, double gamma)
void GetAnglesKarimaki (const HepMatrix &m, double &alpha, double &beta, double &gamma)
void testAnglesKarimaki ()
void FillRotMatrixPolar (HepMatrix &m, double theta, double phi)
void testAnglesPolar ()
void testMixedAngles (int num)

Detailed Description

Definition of functions and procedures for 3D manipulation with matrices.

Rotations are always defined to transform global coordinates to local coordinates. (GEANT convention).


Function Documentation

void FillRotMatrixKarimaki ( HepMatrix &  m,
double  alpha,
double  beta,
double  gamma 
)

Fill a rotation matrix with the Karimaki angles alpha, beta, gamma.

rotation matrix definition from Veikko Karimaki

void FillRotMatrixPolar ( HepMatrix &  m,
double  theta,
double  phi 
)

Fill a rotation matrix with polar angles. Only two angles (theta, phi) must be given, the third rotation angle is assumed to be zero. In order to get a vector in a global coordinate system with polar angle theta and azimuth angle phi, one has to apply the inverse rotation to a vector along z in the local coordinate frame (0, 0, 1).

void GetAnglesKarimaki ( const HepMatrix &  m,
double &  alpha,
double &  beta,
double &  gamma 
)

Extract from a rotation matrix the Karimaki angles alpha, beta, gamma.

void testAnglesKarimaki ( )

Test the Karimaki rotation matrices.

void testAnglesPolar ( )

Test polar angle functions (FillRotMatrixPolar)

void testMixedAngles ( int  num)

Test a matrix by generating a random matrix with polar angles and extract the Karimaki angles. Then the Karimaki angles are used to filled another matrix, and the two matrices are being compared.