]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/EMCALTasks/AliEmcalJet.h
added id
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / AliEmcalJet.h
CommitLineData
914d486c 1#ifndef AliEmcalJet_H
2#define AliEmcalJet_H
7df864a3 3
688670de 4// $Id$
5
7efbea04 6#include "AliVParticle.h"
7#include <TLorentzVector.h>
8#include <TMath.h>
35789a2d 9#include <TArrayI.h>
7efbea04 10
914d486c 11class AliEmcalJet : public AliVParticle
7efbea04 12{
7df864a3 13 public:
914d486c 14 AliEmcalJet() : AliVParticle(), fPt(0), fEta(0), fPhi(0), fM(0), fNEF(0), fArea(0),
35789a2d 15 fNch(0), fNn(0), fMaxCPt(0), fMaxNPt(0), fClusterIDs(0), fTrackIDs(0) {;}
914d486c 16 AliEmcalJet(Double_t pt, Double_t eta, Double_t phi, Double_t m);
17 AliEmcalJet(Double_t px, Double_t py, Double_t pz);
18 AliEmcalJet(const AliEmcalJet &jet);
19 AliEmcalJet& operator=(const AliEmcalJet &jet);
7efbea04 20
21 Double_t Px() const { return fPt*TMath::Cos(fPhi); }
22 Double_t Py() const { return fPt*TMath::Cos(fPhi); }
23 Double_t Pz() const { return fPt*TMath::SinH(fEta); }
24 Double_t Pt() const { return fPt; }
25 Double_t P() const { return fPt*TMath::CosH(fEta); }
26 Bool_t PxPyPz(Double_t p[3]) const { p[0]=Px();p[1]=Py();p[2]=Pz(); return 1; }
27 Double_t Xv() const { return 0.; }
28 Double_t Yv() const { return 0.; }
29 Double_t Zv() const { return 0.; }
30 Bool_t XvYvZv(Double_t x[3]) const { x[0]=0;x[1]=0;x[2]=0; return 1; }
31 Double_t OneOverPt() const { return 1./fPt; }
32 Double_t Phi() const { return fPhi; }
33 Double_t Theta() const { return 2*TMath::ATan(TMath::Exp(-fEta)); }
34 Double_t E() const { Double_t p=P(); return TMath::Sqrt(M()*M()+p*p); }
35 Double_t M() const { return 0.13957; }
36 Double_t Eta() const { return fEta; }
37 Double_t Y() const { return 0.5*TMath::Log((E()+Pz())/(E()-Pz())); }
38 Short_t Charge() const { return 0; }
39 Int_t GetLabel() const { return -1; }
40 Int_t PdgCode() const { return 0; }
41 const Double_t *PID() const { return 0; }
7efbea04 42 void GetMom(TLorentzVector &vec) const;
43 void Print(Option_t* option = "") const;
688670de 44
9cffd2d0 45 Double_t Area() const { return fArea; }
46 Double_t NEF() const { return fNEF; }
47 UShort_t N() const { return fNch+fNn;}
688670de 48 Double32_t MaxTrackPt() const { return fMaxCPt; }
49 Double32_t MaxClusterPt() const { return fMaxNPt; }
50
51 void SetArea(Double_t a) { fArea = a; }
52 void SetNEF(Double_t nef) { fNEF = nef; }
53 void SetMaxTrackPt(Double32_t t) { fMaxCPt = t; }
54 void SetMaxClusterPt(Double32_t t) { fMaxNPt = t; }
7efbea04 55
35789a2d 56 void SetNumberOfClusters(Int_t n) { fClusterIDs->Set(n); }
57 void SetNumberOfTracks(Int_t n) { fTrackIDs->Set(n); }
58 void AddClusterAt(Int_t clus, Int_t idx) { fClusterIDs->AddAt(clus, idx); }
59 void AddTrackAt(Int_t track, Int_t idx) { fTrackIDs->AddAt(track, idx); }
60
61 Int_t GetNumberOfClusters() const { return fClusterIDs->GetSize(); }
62 Int_t GetNumberOfTracks() const { return fTrackIDs->GetSize(); }
63 Int_t ClusterAt(Int_t idx) const { return fClusterIDs->At(idx); }
64 Int_t TrackAt(Int_t idx) const { return fTrackIDs->At(idx); }
65
629e03fc 66 void SortConstituents();
67
7df864a3 68 protected:
7efbea04 69 Double32_t fPt; //[0,0,12] pt
70 Double32_t fEta; //[-1,1,12] eta
71 Double32_t fPhi; //[0,6.3,12] phi
72 Double32_t fM; //[0,0,8] mass
73 Double32_t fNEF; //[0,1,8] neutral energy fraction
74 Double32_t fArea; //[0,0,12] area
75 UShort_t fNch; // number of charged constituents
76 UShort_t fNn; // number of neutral constituents
77 Double32_t fMaxCPt; //[0,0,12] pt of maximum track
78 Double32_t fMaxNPt; //[0,0,12] pt of maximum cluster
35789a2d 79 TArrayI *fClusterIDs; // array of cluster constituents
80 TArrayI *fTrackIDs; // array of track constituents
7df864a3 81
35789a2d 82 ClassDef(AliEmcalJet,2) // ESD jet class in cylindrical coordinates
7df864a3 83};
f472e642 84#endif