]>
Commit | Line | Data |
---|---|---|
d88f97cc | 1 | #ifndef ALIPOSITION_H |
2 | #define ALIPOSITION_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
f531a546 | 6 | // $Id$ |
3da30618 | 7 | |
d88f97cc | 8 | #include <math.h> |
9 | ||
10 | #include "TObject.h" | |
11 | #include "TString.h" | |
12 | ||
13 | #include "Ali3Vector.h" | |
a7dc0627 | 14 | #include "AliTimestamp.h" |
d88f97cc | 15 | |
16 | class AliPosition : public Ali3Vector | |
17 | { | |
18 | public: | |
959fbac5 | 19 | AliPosition(); // Default constructor |
20 | virtual ~AliPosition(); // Destructor | |
c72198f1 | 21 | AliPosition(const AliPosition& p); // Copy constructor |
1f241680 | 22 | void SetPosition(Double_t* r,TString f,TString u="rad"); // Store position r in frame f with ang units u |
25eefd00 | 23 | void GetPosition(Double_t* r,TString f,TString u="rad",Float_t s=-1) const; // Provide position r in frame f in ang units u |
1f241680 | 24 | void SetPosition(Float_t* r,TString f,TString u="rad"); // Store position r in frame f with ang units u |
25eefd00 | 25 | void GetPosition(Float_t* r,TString f,TString u="rad",Float_t s=-1) const; // Provide position r in frame f in ang units u |
959fbac5 | 26 | AliPosition& GetPosition(); // Provide position |
1c01b4f8 | 27 | void SetPosition(Ali3Vector& r); // Store position r |
25eefd00 | 28 | Double_t GetDistance(AliPosition& p,Float_t scale=-1); // Provide distance to position p |
29 | Double_t GetDistance(AliPosition* p,Float_t scale=-1) { return GetDistance(*p,scale); } | |
1f241680 | 30 | void SetPositionErrors(Double_t* r,TString f,TString u="rad"); // Store position r in frame f with ang units u |
25eefd00 | 31 | void GetPositionErrors(Double_t* r,TString f,TString u="rad",Float_t s=-1) const; // Provide position r in frame f in ang units u |
1f241680 | 32 | void SetPositionErrors(Float_t* r,TString f,TString u="rad"); // Store position r in frame f with ang units u |
25eefd00 | 33 | void GetPositionErrors(Float_t* r,TString f,TString u="rad",Float_t s=-1) const; // Provide position r in frame f in ang units u |
1c01b4f8 | 34 | void ResetPosition(); // Reset position and errors to 0 |
1f241680 | 35 | void SetUnitScale(Float_t s); // Set metric unit scale for the position coordinates |
36 | Float_t GetUnitScale() const; // Provide metric unit scale for the position coordinates | |
a7dc0627 | 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 | |
1f241680 | 40 | virtual void Data(TString f="car",TString u="rad") const; // Print position/time info for frame f and ang units u |
d88f97cc | 41 | |
261c0caf | 42 | protected: |
a7dc0627 | 43 | Float_t fScale; // The unit scale used for the position coordinates |
44 | AliTimestamp* fTstamp; // The timestamp for this position | |
261c0caf | 45 | |
25eefd00 | 46 | ClassDef(AliPosition,9) // Handling of positions (with timestamps) in various reference frames. |
d88f97cc | 47 | }; |
48 | #endif |