]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/jetan2004/AliJetParticle.h
L3 becomes HLT
[u/mrichter/AliRoot.git] / JETAN / jetan2004 / AliJetParticle.h
CommitLineData
d7c6ab14 1#ifndef ALIJETPARTICLE_H
2#define ALIJETPARTICLE_H
3/* $Id$ */
4
5//___________________________________________________________
6/////////////////////////////////////////////////////////////
03747640 7// //
8// class AliJetParticle //
9// //
10// loizides@ikf.uni-frankfurt.de //
11// //
d7c6ab14 12/////////////////////////////////////////////////////////////
13
14#include <TObject.h>
15#include <TMath.h>
16class TParticle;
17
18class AliJetParticle : public TObject
19{
20 public:
21 AliJetParticle();
22 AliJetParticle(const AliJetParticle& in);
75a0c43e 23 AliJetParticle(const TParticle* p, Int_t idx, Int_t l=-1, Int_t ncl=0);
24 AliJetParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx, Int_t l=-1, Int_t ncl=0);
301a24f1 25 AliJetParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx, Int_t l, Int_t ncl,
d7c6ab14 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;}
317552c8 37 void SetType(Int_t t) {fType = t;}
301a24f1 38 void SetNhits(Int_t t) {fNhits = t;}
317552c8 39
d7c6ab14 40 Float_t P() const {return TMath::Sqrt(fPx*fPx+fPy*fPy+fPz*fPz);}
41 Float_t Y() const {if (fE != fPz) return 0.5*TMath::Log((fE+fPz)/(fE-fPz));
42 else return 1.e30;}
43 Float_t Theta () const {return (fPz==0)?TMath::PiOver2():TMath::ACos(fPz/P());}
44
45 Int_t GetUID() const {return fIdxInEvent;}
46 Int_t GetLabel() const {return fLabel;}
301a24f1 47 Int_t GetType() const {return fType;}
48 Int_t GetNhts() const {return fNhits;}
d7c6ab14 49
50 Float_t Px() const {return fPx;}
51 Float_t Py() const {return fPy;}
52 Float_t Pz() const {return fPz;}
53 Float_t Energy() const {return fE;}
54
55 Float_t Pt() const {return fPt;}
56 Float_t Eta() const {return fEta;}
57 Float_t Phi() const {return fPhi;}
58
301a24f1 59 TParticle* Particle() const;
60
d7c6ab14 61 void Clear(Option_t *t="");
62 void Print(Option_t *t="") const;
f83e88f6 63 ULong_t Hash() const {return fIdxInEvent;}
64 Bool_t IsEqual(const TObject *obj) const
65 {return fIdxInEvent == ((AliJetParticle*)obj)->GetUID();}
66 Bool_t IsSortable() const {return kTRUE;}
67 Int_t Compare(const TObject *obj) const;
d7c6ab14 68
69 protected:
70 void Calculate(); //calculate values
71
72 Float_t fPx; // x component of momentum at vertex
73 Float_t fPy; // y component of momentum at vertex
74 Float_t fPz; // z component of momentum at vertex
75 Float_t fE; // total energy
76 Int_t fIdxInEvent; // index of particle as appeared in complete event
301a24f1 77 Int_t fType; // -123 if marked
317552c8 78 Int_t fLabel; // assigned label
301a24f1 79 Int_t fNhits; // number of clusters
d7c6ab14 80 Float_t fPt; // normally calculated
81 Float_t fEta; // normally calculated
82 Float_t fPhi; // normally calculated
83
301a24f1 84 ClassDef(AliJetParticle,3) // Basic Jet Particle class
d7c6ab14 85};
86#endif