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