1 #ifndef ALIJETPARTICLE_H
2 #define ALIJETPARTICLE_H
5 //___________________________________________________________
6 /////////////////////////////////////////////////////////////
8 // class AliJetParticle //
10 // loizides@ikf.uni-frankfurt.de //
12 /////////////////////////////////////////////////////////////
18 class AliJetParticle : public TObject
22 AliJetParticle(const AliJetParticle& in);
23 AliJetParticle(const TParticle* p, Int_t idx, Int_t l=0, Int_t ncl=0);
24 AliJetParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx, Int_t l=0, Int_t ncl=0);
25 AliJetParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx, Int_t l, Int_t ncl,
26 Float_t pt, Float_t eta, Float_t phi);
27 virtual ~AliJetParticle(){};
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;}
35 void SetUID(Int_t id) {fIdxInEvent = id;}
36 void SetLabel(Int_t l){fLabel = l;}
37 void SetType(Int_t t) {fType = t;}
38 void SetNhits(Int_t t) {fNhits = t;}
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));
43 Float_t Theta () const {return (fPz==0)?TMath::PiOver2():TMath::ACos(fPz/P());}
45 Int_t GetUID() const {return fIdxInEvent;}
46 Int_t GetLabel() const {return fLabel;}
47 Int_t GetType() const {return fType;}
48 Int_t GetNhts() const {return fNhits;}
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;}
55 Float_t Pt() const {return fPt;}
56 Float_t Eta() const {return fEta;}
57 Float_t Phi() const {return fPhi;}
59 TParticle* Particle() const;
61 void Clear(Option_t *t="");
62 void Print(Option_t *t="") const;
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;
70 void Calculate(); //calculate values
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
77 Int_t fType; // -123 if marked
78 Int_t fLabel; // assigned label
79 Int_t fNhits; // number of clusters
80 Float_t fPt; // normally calculated
81 Float_t fEta; // normally calculated
82 Float_t fPhi; // normally calculated
84 ClassDef(AliJetParticle,3) // Basic Jet Particle class