3 ///////////////////////////////////////////////////////////////////////////
5 // Creation and investigation of a jet of particle tracks.
6 // An AliJet can be constructed by adding AliTracks.
8 // Coding example to make 2 jets j1 and j2.
9 // ----------------------------------------
10 // j1 contains the AliTracks 1 and 2
11 // j2 contains the AliTracks 3 and 4
13 // AliTrack t1,t2,t3,t4;
15 // ... // code to fill the AliTrack data
27 // Float_t e1=j1.GetEnergy();
28 // Float_t pnorm=j1->GetMomentum();
29 // Ali3Vector p=j1->Get3Momentum();
30 // Float_t m=j1.GetInvmass();
31 // Int_t ntk=j1.GetNtracks();
32 // AliTrack* tj=j1.GetTrack(1);
34 // Note : All quantities are in GeV, GeV/c or GeV/c**2
36 //--- NvE 10-jul-1997 UU-SAP Utrecht
37 //--- Modified : NvE 06-apr-1999 UU-SAP Utrecht to inherit from Ali4Vector
38 ///////////////////////////////////////////////////////////////////////////
44 #include "TObjArray.h"
46 #include "Ali4Vector.h"
49 class AliJet : public TObject,public Ali4Vector
52 AliJet(); // Default constructor
53 AliJet(Int_t n); // Create a Jet to hold initially n Tracks
54 ~AliJet(); // Default destructor
55 void Reset(); // Reset all values
56 virtual void Add(AliTrack& t); // Add a track to the jet
57 virtual void Add(AliTrack* t) { Add(*t); }
58 void Info(TString f); // Print jet information in coordinate frame f
59 void List(TString f="car"); // Print jet prim. track information for coord. frame f
60 void ListAll(TString f="car"); // Print jet prim. and decay track information for coord. frame f
61 Double_t GetEnergy(); // Provide the total jet energy
62 Double_t GetMomentum(); // Provide the value of the total jet 3-momentum
63 Ali3Vector Get3Momentum(); // Provide the total jet 3-momentum
64 Double_t GetInvmass(); // Provide the invariant mass
65 Float_t GetCharge(); // Provide the total charge of the jet
66 Int_t GetNtracks(); // Return the number of tracks in the jet
67 AliTrack* GetTrack(Int_t i); // Provide i-th track of the jet (1=first track)
70 void SetNtinit(Int_t n=2); // Set the initial max. number of tracks for this Jet
71 Int_t fNtinit; // The initial max. number of tracks for this jet
72 Int_t fNtmax; // The maximum number of tracks for this Jet
73 Float_t fQ; // The total charge of the jet
74 Int_t fNtrk; // The number of tracks in the jet
75 TObjArray* fTracks; // Array to hold the pointers to the tracks of the jet
77 ClassDef(AliJet,1) // Class definition to enable ROOT I/O