Macro to rewrite Track References ordered (S.Radomski)
[u/mrichter/AliRoot.git] / STEER / AliTrackReference.h
CommitLineData
aab9c8d5 1#ifndef ALITRACKREFERENCE_H
2#define ALITRACKREFERENCE_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 "TObject.h"
688d460d 9#include "TMath.h"
aab9c8d5 10
11class AliTrackReference : public TObject {
12public:
13 AliTrackReference();
14 virtual ~AliTrackReference() {}
15 virtual Int_t GetTrack() const {return fTrack;}
688d460d 16 virtual Int_t Label() const {return fTrack;}
aab9c8d5 17 virtual void SetTrack(Int_t track) {fTrack=track;}
688d460d 18 virtual void SetLabel(Int_t track) {fTrack=track;}
4930c251 19 virtual void SetLength(Float_t length){fLength=length;}
688d460d 20 virtual Float_t GetLength(){return fLength;}
aab9c8d5 21 virtual Float_t X() const {return fX;}
22 virtual Float_t Y() const {return fY;}
23 virtual Float_t Z() const {return fZ;}
688d460d 24 virtual Float_t R() const {return TMath::Sqrt(fX*fX+fY*fY);}
aab9c8d5 25 virtual Float_t Px() const {return fPx;}
26 virtual Float_t Py() const {return fPy;}
27 virtual Float_t Pz() const {return fPz;}
688d460d 28 virtual Float_t Pt() const {return TMath::Sqrt(fPx*fPx+fPy*fPy);}
29 virtual Float_t Phi() const {return TMath::Pi()+TMath::ATan2(-fPy,-fPx);}
30 virtual Float_t Theta() const {return (fZ==0)?TMath::Pi()/2:TMath::ACos(fZ/TMath::Sqrt(fX*fX+fY*fY+fZ*fZ)); }
aab9c8d5 31 virtual void SetPosition(Float_t x, Float_t y, Float_t z){fX=x; fY=y; fZ=z;}
32 virtual void SetMomentum(Float_t px, Float_t py, Float_t pz){fPx=px; fPy=py; fPz=pz;}
688d460d 33
aab9c8d5 34protected:
35 Int_t fTrack; // Track number
36 Float_t fX; // X reference position of the track
37 Float_t fY; // Y reference position of the track
38 Float_t fZ; // Z reference position of the track
39 Float_t fPx; // momentum
40 Float_t fPy; // momentum
41 Float_t fPz; // momentum
4930c251 42 Float_t fLength; // track lenght from its origin
aab9c8d5 43
610e7f47 44 ClassDef(AliTrackReference,2) //Base class for all Alice track references
aab9c8d5 45};
46#endif