36 TMatrixD tubeRot(3,3);
37 for (
int i=0; i<3; ++i) {
38 for (
int j=0; j<3; ++j) {
39 tubeRot(i,j) = matrix(i,j);
47 TMatrixD tubeEigen(tubeRot.EigenVectors(
values));
49 tubeAxis = std::sqrt(
values(0));
50 tubeRot(0,2) = tubeEigen(0,0);
51 tubeRot(1,2) = tubeEigen(1,0);
52 tubeRot(2,2) = tubeEigen(2,0);
53 tubeMajor = std::sqrt(
values(1));
54 tubeRot(0,0) = tubeEigen(0,1);
55 tubeRot(1,0) = tubeEigen(1,1);
56 tubeRot(2,0) = tubeEigen(2,1);
57 tubeMinor = std::sqrt(
values(2));
58 tubeRot(0,1) = tubeEigen(0,2);
59 tubeRot(1,1) = tubeEigen(1,2);
60 tubeRot(2,1) = tubeEigen(2,2);
63 tubeAxis = std::sqrt(
values(2));
64 tubeRot(0,2) = tubeEigen(0,2);
65 tubeRot(1,2) = tubeEigen(1,2);
66 tubeRot(2,2) = tubeEigen(2,2);
67 tubeMajor = std::sqrt(
values(0));
68 tubeRot(0,0) = tubeEigen(0,0);
69 tubeRot(1,0) = tubeEigen(1,0);
70 tubeRot(2,0) = tubeEigen(2,0);
71 tubeMinor = std::sqrt(
values(1));
72 tubeRot(0,1) = tubeEigen(0,1);
73 tubeRot(1,1) = tubeEigen(1,1);
74 tubeRot(2,1) = tubeEigen(2,1);
79 rot.SetMatrix(tubeRot.GetMatrixArray());
85 TGeoCombiTrans rotTrans(trans,rot);
86 SetTransMatrix(rotTrans);
90 tubeMajor =
std::max(1.5, tubeMajor);
91 tubeMinor =
std::max(1.5, tubeMinor);
98 TGeoManager* saveGeom = gGeoManager;
99 gGeoManager = GetGeoMangeur();
100 TGeoShape* geoShape =
new TGeoEltu(tubeMajor,tubeMinor,tubeAxis);
102 gGeoManager = saveGeom;
static int max(int a, int b)