]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliJet.h
New galice.cuts file from Marek
[u/mrichter/AliRoot.git] / RALICE / AliJet.h
1 #ifndef ALIJET_H
2 #define ALIJET_H
3 ///////////////////////////////////////////////////////////////////////////
4 // Class AliJet
5 // Creation and investigation of a jet of particle tracks.
6 // An AliJet can be constructed by adding AliTracks.
7 //
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
12 //
13 // AliTrack t1,t2,t3,t4;
14 //  ...
15 //  ... // code to fill the AliTrack data
16 //  ...
17 // AliJet j1(5);
18 // AliJet j2(12);
19 // j1.Add(t1);
20 // j1.Add(t2);
21 // j2.Add(t3);
22 // j2.Add(t4);
23 //
24 // j1.Info();
25 // j2.Info("sph");
26 //
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);
33 //
34 // Note : All quantities are in GeV, GeV/c or GeV/c**2
35 //
36 //--- NvE 10-jul-1997 UU-SAP Utrecht
37 //--- Modified : NvE 06-apr-1999 UU-SAP Utrecht to inherit from Ali4Vector
38 ///////////////////////////////////////////////////////////////////////////
39  
40 #include <iostream.h>
41 #include <math.h>
42  
43 #include "TObject.h"
44 #include "TObjArray.h"
45
46 #include "Ali4Vector.h"
47 #include "AliTrack.h"
48  
49 class AliJet : public TObject,public Ali4Vector
50 {
51  public:
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)
68
69  protected:
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
76  
77  ClassDef(AliJet,1) // Class definition to enable ROOT I/O
78 };
79 #endif