]>
Commit | Line | Data |
---|---|---|
d88f97cc | 1 | #ifndef ALIJET_H |
2 | #define ALIJET_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
d88f97cc | 8 | /////////////////////////////////////////////////////////////////////////// |
9 | // Class AliJet | |
10 | // Creation and investigation of a jet of particle tracks. | |
11 | // An AliJet can be constructed by adding AliTracks. | |
12 | // | |
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 | |
17 | // | |
18 | // AliTrack t1,t2,t3,t4; | |
19 | // ... | |
20 | // ... // code to fill the AliTrack data | |
21 | // ... | |
22 | // AliJet j1(5); | |
23 | // AliJet j2(12); | |
24 | // j1.Add(t1); | |
25 | // j1.Add(t2); | |
26 | // j2.Add(t3); | |
27 | // j2.Add(t4); | |
28 | // | |
29 | // j1.Info(); | |
30 | // j2.Info("sph"); | |
31 | // | |
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); | |
38 | // | |
39 | // Note : All quantities are in GeV, GeV/c or GeV/c**2 | |
40 | // | |
41 | //--- NvE 10-jul-1997 UU-SAP Utrecht | |
42 | //--- Modified : NvE 06-apr-1999 UU-SAP Utrecht to inherit from Ali4Vector | |
43 | /////////////////////////////////////////////////////////////////////////// | |
44 | ||
45 | #include <iostream.h> | |
46 | #include <math.h> | |
47 | ||
48 | #include "TObject.h" | |
49 | #include "TObjArray.h" | |
50 | ||
51 | #include "Ali4Vector.h" | |
52 | #include "AliTrack.h" | |
53 | ||
54 | class AliJet : public TObject,public Ali4Vector | |
55 | { | |
56 | public: | |
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) | |
73 | ||
74 | protected: | |
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 | |
81 | ||
82 | ClassDef(AliJet,1) // Class definition to enable ROOT I/O | |
83 | }; | |
84 | #endif |