]>
Commit | Line | Data |
---|---|---|
befe2c08 | 1 | #ifndef ALIALIGNOBJANGLES_H |
2 | #define ALIALIGNOBJANGLES_H | |
3 | ||
4 | /***************************************************************************** | |
5 | * AliAlignObjAngles: derived alignment class storing alignment information * | |
6 | * for a single volume in form of three doubles for the translation * | |
7 | * and three doubles for the rotation expressed with the euler angles * | |
8 | * in the xyz-convention (http://mathworld.wolfram.com/EulerAngles.html), * | |
9 | * also known as roll, pitch, yaw. PLEASE NOTE THE ANGLES SIGNS ARE * | |
10 | * INVERSE WITH RESPECT TO THIS REFERENCE!!! In this way the representation* | |
11 | * is fully consistent with the TGeo Rotation methods. * | |
12 | *****************************************************************************/ | |
13 | #include "TObject.h" | |
14 | #include "TString.h" | |
15 | #include "TGeoMatrix.h" | |
16 | ||
4de0fa4e | 17 | #include "AliAlignObj.h" |
18 | ||
befe2c08 | 19 | class AliAlignObjAngles : public AliAlignObj{ |
20 | public: | |
21 | AliAlignObjAngles(); | |
9c1d7300 | 22 | AliAlignObjAngles(const char* symname, UShort_t volUId, Double_t x, Double_t y, Double_t z, Double_t psi, Double_t theta, Double_t phi, Bool_t global) throw (const Char_t *); |
23 | AliAlignObjAngles(const char* symname, UShort_t volUId, TGeoMatrix& m, Bool_t global) throw (const Char_t *); | |
c5304981 | 24 | AliAlignObjAngles(const AliAlignObj& theAlignObj); |
25 | AliAlignObjAngles& operator= (const AliAlignObj& theAlignObj); | |
befe2c08 | 26 | virtual ~AliAlignObjAngles(); |
27 | ||
28 | //Setters | |
29 | virtual void SetTranslation(Double_t x, Double_t y, Double_t z){ | |
30 | fTranslation[0]=x; fTranslation[1]=y; fTranslation[2]=z;} | |
31 | virtual void SetTranslation(const TGeoMatrix& m); | |
32 | virtual void SetRotation(Double_t psi, Double_t theta, Double_t phi){ | |
33 | fRotation[0]=psi; fRotation[1]=theta; fRotation[2]=phi;} | |
34 | virtual Bool_t SetRotation(const TGeoMatrix& m); | |
befe2c08 | 35 | |
36 | //Getters | |
37 | virtual void GetTranslation(Double_t *tr) const { | |
38 | tr[0] = fTranslation[0]; tr[1] = fTranslation[1]; tr[2] = fTranslation[2];} | |
39 | virtual Bool_t GetAngles(Double_t* angles) const { | |
40 | angles[0] = fRotation[0]; angles[1] = fRotation[1]; | |
41 | angles[2] = fRotation[2]; return kTRUE;} | |
befe2c08 | 42 | virtual void GetMatrix(TGeoHMatrix& m) const; |
03b18860 | 43 | |
44 | virtual AliAlignObj& Inverse() const; | |
befe2c08 | 45 | |
46 | protected: | |
47 | Double_t fTranslation[3]; // Translation vector | |
48 | Double_t fRotation[3]; // Roll-pitch-yaw angles | |
49 | ||
50 | ClassDef(AliAlignObjAngles, 1) | |
51 | }; | |
52 | ||
53 | #endif |