]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliPosition.h
Splitting of the ITS libraries (M.Masera & E.Crescio)
[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 #include <math.h>
9  
10 #include "TObject.h"
11 #include "TString.h"
12
13 #include "Ali3Vector.h"
14 #include "AliTimestamp.h"
15  
16 class AliPosition : public Ali3Vector
17 {
18  public:
19   AliPosition();                                         // Default constructor
20   virtual ~AliPosition();                                // Destructor
21   AliPosition(const AliPosition& p);                     // Copy constructor
22   void SetPosition(Double_t* r,TString f);               // Store position r in frame f
23   void GetPosition(Double_t* r,TString f) const;         // Provide position r in frame f
24   void SetPosition(Float_t*  r,TString f);               // Store position r in frame f
25   void GetPosition(Float_t*  r,TString f) const;         // Provide position r in frame f
26   AliPosition& GetPosition();                            // Provide position
27   void SetPosition(Ali3Vector& r);                       // Store position r
28   Double_t GetDistance(AliPosition& p);                  // Provide distance to position p
29   Double_t GetDistance(AliPosition* p) { return GetDistance(*p); }
30   void SetPositionErrors(Double_t* r,TString f);         // Store position r in frame f
31   void GetPositionErrors(Double_t* r,TString f) const;   // Provide position r in frame f
32   void SetPositionErrors(Float_t*  r,TString f);         // Store position r in frame f
33   void GetPositionErrors(Float_t*  r,TString f) const;   // Provide position r in frame f
34   void ResetPosition();                                  // Reset position and errors to 0
35   void SetUnitScale(Float_t s);                          // Set unit scale for the position coordinates
36   Float_t GetUnitScale() const;                          // Provide unit scale for the position coordinates
37   void SetTimestamp(AliTimestamp& t);                    // Set the timestamp for this position
38   AliTimestamp* GetTimestamp();                          // Provide the timestamp for this position
39   void RemoveTimestamp();                                // Remove the timestamp from this position
40   virtual void Data(TString f="car") const;              // Print all position/time info for coord. frame f
41
42  protected:
43   Float_t fScale;        // The unit scale used for the position coordinates
44   AliTimestamp* fTstamp; // The timestamp for this position
45
46  ClassDef(AliPosition,7) // Handling of positions (with timestamps) in various reference frames.
47 };
48 #endif