]>
Commit | Line | Data |
---|---|---|
37dde34e | 1 | // $Id: AliJBaseTrack.h,v 1.5 2008/05/08 15:19:52 djkim Exp $ |
2 | ||
3 | /////////////////////////////////////////////////// | |
4 | /* | |
5 | \file AliJBaseTrack.h | |
6 | \brief | |
7 | \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla) | |
8 | \email: djkim@jyu.fi | |
9 | \version $Revision: 1.5 $ | |
10 | \date $Date: 2008/05/08 15:19:52 $ | |
11 | */ | |
12 | /////////////////////////////////////////////////// | |
13 | ||
14 | #ifndef ALIJBASETRACK_H | |
15 | #define ALIJBASETRACK_H | |
16 | ||
17 | #ifndef ROOT_TObject | |
18 | #include <TObject.h> | |
19 | #endif | |
20 | ||
21 | #include "AliJConst.h" | |
22 | #include "TLorentzVector.h" | |
23 | ||
24 | class AliJBaseTrack : public TLorentzVector { | |
25 | public: | |
26 | enum { kIsIsolated, kNFlag }; | |
27 | AliJBaseTrack(); | |
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 | |
32 | ||
33 | float GetTwoPiPhi() const {return Phi()>-kJPi/3 ? Phi() : kJTwoPi+Phi();} | |
34 | TLorentzVector GetLorentzVector(){ return TLorentzVector( *this);} | |
35 | ||
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);} | |
43 | ||
44 | ||
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); } | |
52 | ||
53 | void Print(Option_t* option) const; | |
54 | ||
55 | // Handel BitsData | |
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);}} | |
58 | ||
59 | // Operators | |
60 | AliJBaseTrack& operator=(const AliJBaseTrack& trk); | |
61 | ||
62 | protected: | |
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. | |
69 | ||
70 | ClassDef(AliJBaseTrack,1) | |
71 | }; | |
72 | ||
73 | #endif | |
74 |