1 // $Id: AliJBaseTrack.h,v 1.5 2008/05/08 15:19:52 djkim Exp $
3 ///////////////////////////////////////////////////
7 \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
9 \version $Revision: 1.5 $
10 \date $Date: 2008/05/08 15:19:52 $
12 ///////////////////////////////////////////////////
14 #ifndef ALIJBASETRACK_H
15 #define ALIJBASETRACK_H
21 #include "AliJConst.h"
22 #include "TLorentzVector.h"
24 class AliJBaseTrack : public TLorentzVector {
26 enum { kIsIsolated, kNFlag };
28 AliJBaseTrack(float px,float py, float pz, float e, Int_t id, Short_t ptype, Char_t charge); // constructor
29 AliJBaseTrack(const AliJBaseTrack& a);
30 AliJBaseTrack(const TLorentzVector & a);
31 virtual ~AliJBaseTrack(){;} //destructor
33 float GetTwoPiPhi() const {return Phi()>-kJPi/3 ? Phi() : kJTwoPi+Phi();}
34 TLorentzVector GetLorentzVector(){ return TLorentzVector( *this);}
36 Int_t GetID() const { return fID;}
37 Int_t GetLabel() const { return fLabel; }
38 Short_t GetParticleType() const { return fParticleType;}
39 ULong_t GetStatus() const { return fStatus; }
40 Short_t GetCharge() const { return fCharge; }
41 UInt_t GetFlags() const { return fFlags; }
42 Bool_t GetIsIsolated() const { return IsTrue(kIsIsolated);}
45 void SetID (const int id){fID=id;}
46 void SetLabel (const Int_t label ){ fLabel=label; }
47 void SetParticleType(const Short_t ptype){ fParticleType=ptype; }
48 void SetStatus (const ULong_t status){ fStatus=status; }
49 void SetCharge (const Char_t charge){ fCharge=charge; }
50 void SetFlags (const UInt_t bits ){ fFlags=bits; }
51 void SetIsIsolated(Bool_t tf){ SetFlag( kIsIsolated, tf); }
53 void Print(Option_t* option) const;
56 Bool_t IsTrue(int i ) const { return TESTBIT(fFlags, i); }
57 void SetFlag(int i, Bool_t t){ if(t){SETBIT(fFlags,i);}else{CLRBIT(fFlags, i);}}
60 AliJBaseTrack& operator=(const AliJBaseTrack& trk);
63 Int_t fID; // Unique track ID
64 Int_t fLabel; // Unique track label for MC-Data relation
65 Short_t fParticleType; // ParticleType
66 Char_t fCharge; // track charge for real data
67 ULong_t fStatus; // reconstruction status flags or MC status
68 UInt_t fFlags; // store series of any boolen value.
70 ClassDef(AliJBaseTrack,1)