8 #ifndef FAIRGEOROTATION_H
9 #define FAIRGEOROTATION_H
36 void setEulerAngles(
const Double_t,
const Double_t,
const Double_t);
37 inline void setElement(
const Double_t,
const Int_t);
51 inline Double_t
getElement(Int_t i, Int_t j)
const;
54 inline void print()
const;
55 TRotMatrix*
createTRotMatrix(
const Text_t* name =
"",
const Text_t* title =
"");
71 if (i >= 0 && i < 9) {
74 Error(
"operator()",
"bad index");
81 for (Int_t i = 0; i < 9; i++) {
89 for (Int_t i = 0; i < 9; i++) {
96 for (Int_t i = 0; i < 9; i++) {
103 for (Int_t i = 0; i < 9; i++) {
119 for (Int_t i = 0; i < 9; i++) {
129 if (
rot[i] != r(i)) {
141 if (
rot[i] != r(i)) {
152 rot[3] * v(0) +
rot[4] * v(1) +
rot[5] * v(2),
153 rot[6] * v(0) +
rot[7] * v(1) +
rot[8] * v(2));
159 for (Int_t kk = 0; kk < 9; kk++) {
162 for (Int_t i = 0; i < 3; i++) {
163 for (Int_t j = 0; j < 3; j++) {
165 for (Int_t k = 0; k < 3; k++) {
166 a[n] +=
rot[3 * i + k] * r(3 * k + j);
179 return (
rot[0] == 1. &&
rot[1] == 0. &&
rot[2] == 0. &&
rot[3] == 0. &&
rot[4] == 1. &&
rot[5] == 0. &&
rot[6] == 0.
180 &&
rot[7] == 0. &&
rot[8] == 1.)
188 for (Int_t i = 0; i < 3; i++) {
189 for (Int_t j = 0; j < 3; j++) {
190 a[j + 3 * i] =
rot[i + 3 * j];
201 + rot[6] * (rot[1] * rot[5] - rot[4] * rot[2]);
212 for (Int_t i = 0; i < 9; i++) {
219 for (Int_t i = 0; i < 9; i++) {
220 std::cout <<
rot[i] <<
" ";
FairGeoRotation inverse() const
void setEulerAngles(const Double_t, const Double_t, const Double_t)
Bool_t operator==(const FairGeoRotation &)
FairGeoRotation & invert()
Double_t operator()(Int_t) const
ClassDef(FairGeoRotation, 1)
void setMatrix(const Double_t *)
FairGeoRotation & transform(const FairGeoRotation &)
TRotMatrix * createTRotMatrix(const Text_t *name="", const Text_t *title="")
Bool_t operator!=(const FairGeoRotation &)
Double_t diff2(const FairGeoRotation &) const
FairGeoVector operator*(const FairGeoVector &) const
void setElement(const Double_t, const Int_t)
FairGeoRotation & operator*=(const FairGeoRotation &)
Double_t getElement(Int_t i, Int_t j) const
Double_t determinant() const
FairGeoRotation & operator=(const FairGeoRotation &)