]>
Commit | Line | Data |
---|---|---|
d88f97cc | 1 | #ifndef ALIPOSITION_H |
2 | #define ALIPOSITION_H | |
3 | /////////////////////////////////////////////////////////////////////////// | |
4 | // Class AliPosition | |
5 | // Handling of positions in various reference frames. | |
6 | // | |
7 | // This class is meant to serve as a base class for ALICE objects | |
8 | // that have a unique position in 3-dimensional space. | |
9 | // | |
10 | // Note : | |
11 | // ------ | |
12 | // Positions (r) and reference frames (f) are specified via | |
13 | // SetPosition(Float_t* r,TString f) under the following conventions : | |
14 | // | |
15 | // f="car" ==> r in Cartesian coordinates (x,y,z) | |
16 | // f="sph" ==> r in Spherical coordinates (r,theta,phi) | |
17 | // f="cyl" ==> r in Cylindrical coordinates (rho,phi,z) | |
18 | // | |
19 | // All angles are in radians. | |
20 | // | |
21 | // Example : | |
22 | // --------- | |
23 | // | |
24 | // AliPosition q; | |
25 | // Float_t pos[3]={-1,25,7}; | |
26 | // q.SetPosition(pos,"car"); | |
27 | // Float_t loc[3]; | |
28 | // q.GetPosition(loc,"sph"); | |
29 | // | |
30 | //--- NvE 06-feb-1999 UU-SAP Utrecht | |
31 | /////////////////////////////////////////////////////////////////////////// | |
32 | ||
33 | #include <iostream.h> | |
34 | #include <math.h> | |
35 | ||
36 | #include "TObject.h" | |
37 | #include "TString.h" | |
38 | ||
39 | #include "Ali3Vector.h" | |
40 | ||
41 | class AliPosition : public Ali3Vector | |
42 | { | |
43 | public: | |
44 | AliPosition(); // Default constructor | |
45 | virtual ~AliPosition(); // Destructor | |
46 | virtual void SetPosition(Double_t* r,TString f); // Store position r in frame f | |
47 | virtual void GetPosition(Double_t* r,TString f); // Provide position r in frame f | |
48 | virtual void SetPosition(Float_t* r,TString f); // Store position r in frame f | |
49 | virtual void GetPosition(Float_t* r,TString f); // Provide position r in frame f | |
50 | AliPosition& GetPosition(); // Provide position | |
51 | virtual void SetPosition(Ali3Vector& r); // Store position r | |
52 | ||
53 | ClassDef(AliPosition,1) // Class definition to enable ROOT I/O | |
54 | }; | |
55 | #endif |