1 #ifndef ALIALIGNOBJANGLES_H
2 #define ALIALIGNOBJANGLES_H
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 *****************************************************************************/
15 #include "TGeoMatrix.h"
17 #include "AliAlignObj.h"
19 class AliAlignObjAngles : public AliAlignObj{
22 AliAlignObjAngles(const char* volpath, UShort_t voluid, Double_t x, Double_t y, Double_t z, Double_t psi, Double_t theta, Double_t phi);
23 AliAlignObjAngles(const char* volpath, ELayerID detId, Int_t volId, Double_t x, Double_t y, Double_t z, Double_t psi, Double_t theta, Double_t phi, Bool_t global=1) throw (const Char_t *);
24 AliAlignObjAngles(const char* volpath, UShort_t voluid, TGeoMatrix& m);
25 AliAlignObjAngles(const char* volpath, ELayerID layerId, Int_t volId, TGeoMatrix& m);
26 AliAlignObjAngles(const AliAlignObj& theAlignObj);
27 AliAlignObjAngles& operator= (const AliAlignObj& theAlignObj);
28 virtual ~AliAlignObjAngles();
31 virtual void SetTranslation(Double_t x, Double_t y, Double_t z){
32 fTranslation[0]=x; fTranslation[1]=y; fTranslation[2]=z;}
33 virtual void SetTranslation(const TGeoMatrix& m);
34 virtual void SetRotation(Double_t psi, Double_t theta, Double_t phi){
35 fRotation[0]=psi; fRotation[1]=theta; fRotation[2]=phi;}
36 virtual Bool_t SetRotation(const TGeoMatrix& m);
37 virtual void SetMatrix(const TGeoMatrix& m);
38 virtual void SetPars(Double_t x, Double_t y, Double_t z, Double_t psi,
39 Double_t theta, Double_t phi){
40 fTranslation[0]=x; fTranslation[1]=y; fTranslation[2]=z;
41 fRotation[0]=psi; fRotation[1]=theta; fRotation[2]=phi;}
44 virtual void GetTranslation(Double_t *tr) const {
45 tr[0] = fTranslation[0]; tr[1] = fTranslation[1]; tr[2] = fTranslation[2];}
46 virtual Bool_t GetAngles(Double_t* angles) const {
47 angles[0] = fRotation[0]; angles[1] = fRotation[1];
48 angles[2] = fRotation[2]; return kTRUE;}
49 virtual void GetPars(Double_t tr[], Double_t angles[]) const;
50 virtual void GetMatrix(TGeoHMatrix& m) const;
52 virtual AliAlignObj& Inverse() const;
55 Double_t fTranslation[3]; // Translation vector
56 Double_t fRotation[3]; // Roll-pitch-yaw angles
58 ClassDef(AliAlignObjAngles, 1)