]> git.uio.no Git - u/mrichter/AliRoot.git/blob - JETAN/AliJetParticle.h
Modified plots and made jet finder use SDigits
[u/mrichter/AliRoot.git] / JETAN / AliJetParticle.h
1 #ifndef ALIJETPARTICLE_H
2 #define ALIJETPARTICLE_H
3 /* $Id$ */
4
5 //___________________________________________________________
6 /////////////////////////////////////////////////////////////
7 //
8 // class AliJetParticle
9 //
10 // loizides@ikf.uni-frankfurt.de
11 //
12 /////////////////////////////////////////////////////////////
13
14 #include <TObject.h>
15 #include <TMath.h>
16 class TParticle;
17
18 class AliJetParticle : public TObject
19 {
20   public:
21   AliJetParticle();
22   AliJetParticle(const AliJetParticle& in); 
23   AliJetParticle(const TParticle* p, Int_t idx, Int_t l=0);
24   AliJetParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx, Int_t l=0);
25   AliJetParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx, Int_t l,
26                  Float_t pt, Float_t eta, Float_t phi);
27   virtual ~AliJetParticle(){};
28
29   void SetMomentum(Float_t px, Float_t py, Float_t pz, Float_t e)
30                     {fPx=px; fPy=py; fPz=pz; fE=e; Calculate();}
31   void SetMomentum(Float_t px, Float_t py, Float_t pz, Float_t e,
32                    Float_t pt, Float_t phi, Float_t eta)
33                     {fPx=px;fPy=py;fPz=pz;fE=e;fPt=pt;fEta=eta;fPhi=phi;}
34   
35   void SetUID(Int_t id) {fIdxInEvent = id;}
36   void SetLabel(Int_t l){fLabel = l;}
37   
38   Float_t P()      const {return TMath::Sqrt(fPx*fPx+fPy*fPy+fPz*fPz);}
39   Float_t Y()      const {if (fE  != fPz) return 0.5*TMath::Log((fE+fPz)/(fE-fPz));
40                                     else return 1.e30;}
41   Float_t Theta () const {return (fPz==0)?TMath::PiOver2():TMath::ACos(fPz/P());}
42
43   Int_t GetUID()   const {return fIdxInEvent;}
44   Int_t GetLabel() const {return fLabel;}
45
46   Float_t Px()     const {return fPx;}
47   Float_t Py()     const {return fPy;}
48   Float_t Pz()     const {return fPz;}
49   Float_t Energy() const {return fE;}
50
51   Float_t Pt()     const {return fPt;}
52   Float_t Eta()    const {return fEta;}
53   Float_t Phi()    const {return fPhi;} 
54
55   void Clear(Option_t *t="");
56   void Print(Option_t *t="") const;
57
58   protected:
59   void Calculate();     //calculate values
60
61   Float_t fPx;          // x component of momentum at vertex
62   Float_t fPy;          // y component of momentum at vertex
63   Float_t fPz;          // z component of momentum at vertex
64   Float_t fE;           // total energy
65   Int_t   fIdxInEvent;  // index of particle as appeared in complete event
66   Int_t   fLabel;
67   Float_t fPt;          // normally calculated 
68   Float_t fEta;         // normally calculated 
69   Float_t fPhi;         // normally calculated 
70
71   ClassDef(AliJetParticle,1)  // Basic Jet Particle class
72 };
73 #endif