3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////////////////
10 // Creation and investigation of a jet of particle tracks.
11 // An AliJet can be constructed by adding AliTracks.
13 // Coding example to make 2 jets j1 and j2.
14 // ----------------------------------------
15 // j1 contains the AliTracks 1 and 2
16 // j2 contains the AliTracks 3 and 4
18 // AliTrack t1,t2,t3,t4;
20 // ... // code to fill the AliTrack data
32 // Float_t e1=j1.GetEnergy();
33 // Float_t pnorm=j1->GetMomentum();
34 // Ali3Vector p=j1->Get3Momentum();
35 // Float_t m=j1.GetInvmass();
36 // Int_t ntk=j1.GetNtracks();
37 // AliTrack* tj=j1.GetTrack(1);
39 // Note : All quantities are in GeV, GeV/c or GeV/c**2
41 //--- NvE 10-jul-1997 UU-SAP Utrecht
42 //--- Modified : NvE 06-apr-1999 UU-SAP Utrecht to inherit from Ali4Vector
43 ///////////////////////////////////////////////////////////////////////////
49 #include "TObjArray.h"
51 #include "Ali4Vector.h"
54 class AliJet : public TObject,public Ali4Vector
57 AliJet(); // Default constructor
58 AliJet(Int_t n); // Create a Jet to hold initially n Tracks
59 ~AliJet(); // Default destructor
60 void Reset(); // Reset all values
61 virtual void Add(AliTrack& t); // Add a track to the jet
62 virtual void Add(AliTrack* t) { Add(*t); }
63 void Info(TString f); // Print jet information in coordinate frame f
64 void List(TString f="car"); // Print jet prim. track information for coord. frame f
65 void ListAll(TString f="car"); // Print jet prim. and decay track information for coord. frame f
66 Double_t GetEnergy(); // Provide the total jet energy
67 Double_t GetMomentum(); // Provide the value of the total jet 3-momentum
68 Ali3Vector Get3Momentum(); // Provide the total jet 3-momentum
69 Double_t GetInvmass(); // Provide the invariant mass
70 Float_t GetCharge(); // Provide the total charge of the jet
71 Int_t GetNtracks(); // Return the number of tracks in the jet
72 AliTrack* GetTrack(Int_t i); // Provide i-th track of the jet (1=first track)
75 void SetNtinit(Int_t n=2); // Set the initial max. number of tracks for this Jet
76 Int_t fNtinit; // The initial max. number of tracks for this jet
77 Int_t fNtmax; // The maximum number of tracks for this Jet
78 Float_t fQ; // The total charge of the jet
79 Int_t fNtrk; // The number of tracks in the jet
80 TObjArray* fTracks; // Array to hold the pointers to the tracks of the jet
82 ClassDef(AliJet,1) // Class definition to enable ROOT I/O