FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
macro
detectors
lmd
geo
testTGeoHMatrices.C
Go to the documentation of this file.
1
void
testTGeoHMatrices
(){
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
}
i
Int_t i
Definition:
run_full.C:25
rotation
TGeoRotation rotation
Definition:
createRootGeoFile.C:81
testTGeoHMatrices
void testTGeoHMatrices()
Definition:
testTGeoHMatrices.C:1
trans
TGeoTranslation * trans
Definition:
createROOTEnDrcGeo.C:65
combi
TGeoCombiTrans * combi
Definition:
createROOTEnDrcGeo.C:66
Generated on Sun Aug 18 2019 03:02:04 for FairRoot/PandaRoot by
1.8.8