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