FairRoot/PandaRoot
Functions
testTGeoHMatrices.C File Reference

Go to the source code of this file.

Functions

void testTGeoHMatrices ()
 

Function Documentation

void testTGeoHMatrices ( )

Definition at line 1 of file testTGeoHMatrices.C.

References combi, i, rotation, and trans.

1  {
2  cout << "Checking where rotation and translation in a TGeoHMatrix are.\n";
3  TGeoHMatrix rotation;
4  TGeoHMatrix translation;
5  double trans[3] = {1,2,3};
6  rotation.RotateX(25.0);
7  translation.SetTranslation(trans);
8  TGeoHMatrix combiTrans = translation * rotation;
9 
10  cout << "matrix print function:\n";
11  combiTrans.Print();
12  cout << "last row was skipped.\n\n";
13 
14  cout << "homogenous matrix:\n";
15  double *combi = new double[16];
16  combiTrans.GetHomogenousMatrix(combi);
17  for(int i=0; i<16; i++){
18  if(i%4==0) cout << "\n";
19  cout << combi[i] << "\t";
20  }
21  cout << "\n\nwe can see the rotaion is unchanged, but the translation\n";
22  cout << "is now on the fourth row.\n";
23 }
Int_t i
Definition: run_full.C:25
TGeoRotation rotation
TGeoTranslation * trans
TGeoCombiTrans * combi