]>
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" |
7efbea04 | 13 | |
914d486c | 14 | class AliEmcalJet : public AliVParticle |
7efbea04 | 15 | { |
7df864a3 | 16 | public: |
96919f91 | 17 | AliEmcalJet(); |
914d486c | 18 | AliEmcalJet(Double_t px, Double_t py, Double_t pz); |
101cefde | 19 | AliEmcalJet(Double_t pt, Double_t eta, Double_t phi, Double_t m); |
914d486c | 20 | AliEmcalJet(const AliEmcalJet &jet); |
21 | AliEmcalJet& operator=(const AliEmcalJet &jet); | |
7efbea04 | 22 | |
a55e4f1d | 23 | Double_t Px() const { return fPt*TMath::Cos(fPhi); } |
da1bd0e7 | 24 | Double_t Py() const { return fPt*TMath::Sin(fPhi); } |
a55e4f1d | 25 | Double_t Pz() const { return fPt*TMath::SinH(fEta); } |
26 | Double_t Pt() const { return fPt; } | |
27 | Double_t P() const { return fPt*TMath::CosH(fEta); } | |
28 | Bool_t PxPyPz(Double_t p[3]) const { p[0]=Px();p[1]=Py();p[2]=Pz(); return 1; } | |
29 | Double_t Xv() const { return 0.; } | |
30 | Double_t Yv() const { return 0.; } | |
31 | Double_t Zv() const { return 0.; } | |
32 | Bool_t XvYvZv(Double_t x[3]) const { x[0]=0;x[1]=0;x[2]=0; return 1; } | |
33 | Double_t OneOverPt() const { return 1./fPt; } | |
34 | Double_t Phi() const { return fPhi; } | |
35 | Double_t Theta() const { return 2*TMath::ATan(TMath::Exp(-fEta)); } | |
36 | Double_t E() const { Double_t p=P(); return TMath::Sqrt(M()*M()+p*p); } | |
37 | Double_t M() const { return 0.13957; } | |
38 | Double_t Eta() const { return fEta; } | |
39 | Double_t Y() const { return 0.5*TMath::Log((E()+Pz())/(E()-Pz())); } | |
40 | Short_t Charge() const { return 0; } | |
41 | Int_t GetLabel() const { return -1; } | |
42 | Int_t PdgCode() const { return 0; } | |
43 | const Double_t *PID() const { return 0; } | |
44 | void GetMom(TLorentzVector &vec) const; | |
45 | void Print(Option_t* option = "") const; | |
688670de | 46 | |
a55e4f1d | 47 | Double_t Area() const { return fArea; } |
db8a0184 | 48 | Double_t AreaPt() const { return fArea; } |
49 | Double_t AreaEta() const { return fAreaEta; } | |
50 | Double_t AreaPhi() const { return fAreaPhi; } | |
101cefde | 51 | Double_t AreaEmc() const { return fAreaEmc; } |
52 | Bool_t AxisInEmcal() const { return fAxisInEmcal; } | |
db8a0184 | 53 | Int_t Compare(const TObject* obj) const; |
54 | AliEmcalJet* ClosestJet() const { return fClosestJets[0]; } | |
55 | Double_t ClosestJetDistance() const { return fClosestJetsDist[0]; } | |
a55e4f1d | 56 | Short_t ClusterAt(Int_t idx) const { return fClusterIDs.At(idx); } |
8895e61b | 57 | AliVCluster *ClusterAt(Int_t idx, TClonesArray *ca) const { if (!ca) return 0; return dynamic_cast<AliVCluster*>(ca->At(ClusterAt(idx))); } |
db8a0184 | 58 | UShort_t GetNumberOfClusters() const { return fClusterIDs.GetSize(); } |
96919f91 | 59 | UShort_t GetNumberOfTracks() const { return fTrackIDs.GetSize(); } |
101cefde | 60 | Double_t FracEmcalArea() const { return fAreaEmc/fArea; } |
101cefde | 61 | Bool_t IsInsideEmcal() const { return (fAreaEmc/fArea>0.999); } |
62 | Bool_t IsInEmcal() const { return (fAreaEmc>0); } | |
db8a0184 | 63 | Bool_t IsMC() const { return (Bool_t)(MCPt() > 0); } |
64 | Bool_t IsSortable() const { return kTRUE; } | |
96919f91 | 65 | Double_t MaxNeutralPt() const { return fMaxNPt; } |
66 | Double_t MaxChargedPt() const { return fMaxCPt; } | |
a55e4f1d | 67 | Double_t NEF() const { return fNEF; } |
96919f91 | 68 | UShort_t Nn() const { return fNn; } |
69 | UShort_t Nch() const { return fNch; } | |
a55e4f1d | 70 | UShort_t N() const { return Nch()+Nn(); } |
8895e61b | 71 | Int_t NEmc() const { return fNEmc; } |
96919f91 | 72 | Double_t MCPt() const { return fMCPt; } |
96919f91 | 73 | AliEmcalJet* MatchedJet() const { return fMatched < 2 ? fClosestJets[fMatched] : 0; } |
96919f91 | 74 | Double_t MaxClusterPt() const { return MaxNeutralPt(); } |
75 | Double_t MaxTrackPt() const { return MaxChargedPt(); } | |
e44e8726 | 76 | Double_t MaxPartPt() const { return fMaxCPt < fMaxNPt ? fMaxNPt : fMaxCPt; } |
8895e61b | 77 | Double_t PtEmc() const { return fPtEmc; } |
78 | Double_t PtSub() const { return fPtSub; } | |
79 | Double_t PtSub(Double_t rho) const { return fPt - fArea*rho; } | |
db8a0184 | 80 | Double_t PtSubVect(Double_t rho) const; |
81 | AliEmcalJet* SecondClosestJet() const { return fClosestJets[1]; } | |
82 | Double_t SecondClosestJetDistance() const { return fClosestJetsDist[1]; } | |
83 | Short_t TrackAt(Int_t idx) const { return fTrackIDs.At(idx); } | |
84 | AliVParticle *TrackAt(Int_t idx, TClonesArray *ta) const { if (!ta) return 0; return dynamic_cast<AliVParticle*>(ta->At(TrackAt(idx))); } | |
35789a2d | 85 | |
a55e4f1d | 86 | void AddClusterAt(Int_t clus, Int_t idx){ fClusterIDs.AddAt(clus, idx); } |
87 | void AddTrackAt(Int_t track, Int_t idx) { fTrackIDs.AddAt(track, idx); } | |
038f0049 | 88 | void Clear(Option_t */*option*/="") { fClusterIDs.Set(0); fTrackIDs.Set(0); fClosestJets[0] = 0; fClosestJets[1] = 0; |
89 | fClosestJetsDist[0] = 0; fClosestJetsDist[1] = 0; fMatched = 0; fPtSub = 0; } | |
101cefde | 90 | void SetArea(Double_t a) { fArea = a; } |
db8a0184 | 91 | void SetAreaEta(Double_t a) { fAreaEta = a; } |
92 | void SetAreaPhi(Double_t a) { fAreaPhi = a; } | |
101cefde | 93 | void SetAreaEmc(Double_t a) { fAreaEmc = a; } |
94 | void SetAxisInEmcal(Bool_t b) { fAxisInEmcal = b; } | |
96919f91 | 95 | void SetMaxNeutralPt(Double32_t t) { fMaxNPt = t; } |
96 | void SetMaxChargedPt(Double32_t t) { fMaxCPt = t; } | |
101cefde | 97 | void SetNEF(Double_t nef) { fNEF = nef; } |
a55e4f1d | 98 | void SetNumberOfClusters(Int_t n) { fClusterIDs.Set(n); } |
99 | void SetNumberOfTracks(Int_t n) { fTrackIDs.Set(n); } | |
96919f91 | 100 | void SetNumberOfCharged(Int_t n) { fNch = n; } |
101 | void SetNumberOfNeutrals(Int_t n) { fNn = n; } | |
102 | void SetMCPt(Double_t p) { fMCPt = p; } | |
a55e4f1d | 103 | void SortConstituents(); |
96919f91 | 104 | void SetClosestJet(AliEmcalJet *j, Double_t d) { fClosestJets[0] = j; fClosestJetsDist[0] = d; } |
105 | void SetSecondClosestJet(AliEmcalJet *j, Double_t d) { fClosestJets[1] = j; fClosestJetsDist[1] = d; } | |
db8a0184 | 106 | void SetMatchedToClosest() { fMatched = 0; } |
107 | void SetMatchedToSecondClosest() { fMatched = 1; } | |
108 | void SetNEmc(Int_t n) { fNEmc = n; } | |
109 | void SetPtEmc(Double_t pt) { fPtEmc = pt; } | |
110 | void SetPtSub(Double_t ps) { fPtSub = ps; } | |
111 | void SetPtSubVect(Double_t ps) { fPtVectSub = ps; } | |
629e03fc | 112 | |
7df864a3 | 113 | protected: |
43a9dcd0 | 114 | Double32_t fPt; //[0,0,12] pt |
115 | Double32_t fEta; //[-1,1,12] eta | |
116 | Double32_t fPhi; //[0,6.3,12] phi | |
117 | Double32_t fM; //[0,0,8] mass | |
118 | Double32_t fNEF; //[0,1,8] neutral energy fraction | |
119 | Double32_t fArea; //[0,0,12] area | |
db8a0184 | 120 | Double32_t fAreaEta; //[0,0,12] area eta |
121 | Double32_t fAreaPhi; //[0,0,12] area phi | |
43a9dcd0 | 122 | Double32_t fAreaEmc; //[0,0,12] area on EMCAL surface (determined from ghosts) |
123 | Bool_t fAxisInEmcal; // =true if jet axis inside EMCAL acceptance | |
124 | Double32_t fMaxCPt; //[0,0,12] pt of maximum charged constituent | |
125 | Double32_t fMaxNPt; //[0,0,12] pt of maximum neutral constituent | |
126 | Double32_t fMCPt; // pt from MC particles contributing to the jet | |
127 | Int_t fNn; // number of neutral constituents | |
128 | Int_t fNch; // number of charged constituents | |
8895e61b | 129 | Double32_t fPtEmc; //[0,0,12] pt in EMCAL acceptance |
130 | Int_t fNEmc; // number of constituents in EMCAL acceptance | |
43a9dcd0 | 131 | TArrayS fClusterIDs; // array of cluster constituents |
132 | TArrayS fTrackIDs; // array of track constituents | |
133 | AliEmcalJet *fClosestJets[2]; //! if this is MC it contains the two closest detector level jets in order of distance and viceversa | |
134 | Double32_t fClosestJetsDist[2]; //! distance to closest jets (see above) | |
135 | UShort_t fMatched; //! 0,1 if it is matched with one of the closest jets; 2 if it is not matched | |
8895e61b | 136 | Double_t fPtSub; //! background subtracted pt (not stored set from outside) |
db8a0184 | 137 | Double_t fPtVectSub; //! background vector subtracted pt (not stored set from outside) |
7df864a3 | 138 | |
db8a0184 | 139 | ClassDef(AliEmcalJet,8) // Emcal jet class in cylindrical coordinates |
7df864a3 | 140 | }; |
f472e642 | 141 | #endif |