AliPhysics  64f4410 (64f4410)
AliEmcalJet.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 #include "AliEmcalJet.h"
16 
17 #include "AliLog.h"
18 #include "Riostream.h"
19 
20 #include "AliParticleContainer.h"
21 #include "AliClusterContainer.h"
22 
24 ClassImp(AliEmcalJet);
26 
31  AliVParticle(),
32  fPt(0),
33  fEta(0),
34  fPhi(0),
35  fM(0),
36  fNEF(0),
37  fArea(0),
38  fAreaEta(0),
39  fAreaPhi(0),
40  fAreaE(0),
41  fAreaEmc(-1),
42  fAxisInEmcal(0),
43  fFlavourTagging(0),
44  fFlavourTracks(0),
45  fMaxCPt(0),
46  fMaxNPt(0),
47  fMCPt(0),
48  fNn(0),
49  fNch(0),
50  fPtEmc(0),
51  fNEmc(0),
52  fClusterIDs(),
53  fTrackIDs(),
54  fMatched(2),
55  fMatchingType(0),
56  fTaggedJet(0x0),
57  fTagStatus(-1),
58  fPtSub(0),
59  fPtSubVect(0),
60  fTriggers(0),
61  fLabel(-1),
62  fHasGhost(kFALSE),
63  fGhosts(),
64  fJetShapeProperties(0),
65  fJetAcceptanceType(0),
66  fParticleConstituents(),
67  fClusterConstituents()
68 {
69  fClosestJets[0] = 0;
70  fClosestJets[1] = 0;
71  fClosestJetsDist[0] = 999;
72  fClosestJetsDist[1] = 999;
73 }
74 
83  AliVParticle(),
84  fPt(TMath::Sqrt(px * px + py* py)),
85  fEta(TMath::ASinH(pz / fPt)),
86  fPhi(0),
87  fM(0),
88  fNEF(0),
89  fArea(0),
90  fAreaEta(0),
91  fAreaPhi(0),
92  fAreaE(0),
93  fAreaEmc(-1),
94  fAxisInEmcal(0),
95  fFlavourTagging(0),
96  fFlavourTracks(0),
97  fMaxCPt(0),
98  fMaxNPt(0),
99  fMCPt(0),
100  fNn(0),
101  fNch(0),
102  fPtEmc(0),
103  fNEmc(0),
104  fClusterIDs(),
105  fTrackIDs(),
106  fMatched(2),
107  fMatchingType(0),
108  fTaggedJet(0x0),
109  fTagStatus(-1),
110  fPtSub(0),
111  fPtSubVect(0),
112  fTriggers(0),
113  fLabel(-1),
114  fHasGhost(kFALSE),
115  fGhosts(),
120 {
121  if (fPt != 0) {
122  fPhi = TVector2::Phi_0_2pi(TMath::ATan2(py, px));
123  }
124 
125  fClosestJets[0] = 0;
126  fClosestJets[1] = 0;
127  fClosestJetsDist[0] = 999;
128  fClosestJetsDist[1] = 999;
129 }
130 
140  AliVParticle(),
141  fPt(pt),
142  fEta(eta),
143  fPhi(phi),
144  fM(m),
145  fNEF(0),
146  fArea(0),
147  fAreaEta(0),
148  fAreaPhi(0),
149  fAreaE(0),
150  fAreaEmc(-1),
151  fAxisInEmcal(0),
152  fFlavourTagging(0),
153  fFlavourTracks(0),
154  fMaxCPt(0),
155  fMaxNPt(0),
156  fMCPt(0),
157  fNn(0),
158  fNch(0),
159  fPtEmc(0),
160  fNEmc(0),
161  fClusterIDs(),
162  fTrackIDs(),
163  fMatched(2),
164  fMatchingType(0),
165  fTaggedJet(0x0),
166  fTagStatus(-1),
167  fPtSub(0),
168  fPtSubVect(0),
169  fTriggers(0),
170  fLabel(-1),
171  fHasGhost(kFALSE),
172  fGhosts(),
177 {
178  fPhi = TVector2::Phi_0_2pi(fPhi);
179 
180  fClosestJets[0] = 0;
181  fClosestJets[1] = 0;
182  fClosestJetsDist[0] = 999;
183  fClosestJetsDist[1] = 999;
184 }
185 
191  AliVParticle(jet),
192  fPt(jet.fPt),
193  fEta(jet.fEta),
194  fPhi(jet.fPhi),
195  fM(jet.fM),
196  fNEF(jet.fNEF),
197  fArea(jet.fArea),
198  fAreaEta(jet.fAreaEta),
199  fAreaPhi(jet.fAreaPhi),
200  fAreaE(jet.fAreaE),
201  fAreaEmc(jet.fAreaEmc),
204  fFlavourTracks((jet.fFlavourTracks) ? new TObjArray(*(jet.fFlavourTracks)) : 0),
205  fMaxCPt(jet.fMaxCPt),
206  fMaxNPt(jet.fMaxNPt),
207  fMCPt(jet.fMCPt),
208  fNn(jet.fNn),
209  fNch(jet.fNch),
210  fPtEmc(jet.fPtEmc),
211  fNEmc(jet.fNEmc),
213  fTrackIDs(jet.fTrackIDs),
214  fMatched(jet.fMatched),
216  fTaggedJet(jet.fTaggedJet),
217  fTagStatus(jet.fTagStatus),
218  fPtSub(jet.fPtSub),
219  fPtSubVect(jet.fPtSubVect),
220  fTriggers(jet.fTriggers),
221  fLabel(jet.fLabel),
222  fHasGhost(jet.fHasGhost),
223  fGhosts(jet.fGhosts),
228 
229 {
230  // Copy constructor.
231  fClosestJets[0] = jet.fClosestJets[0];
232  fClosestJets[1] = jet.fClosestJets[1];
235 
236  if (jet.fJetShapeProperties) {
238  }
239 }
240 
245 {
247 }
248 
255 {
256  if (this != &jet) {
257  AliVParticle::operator=(jet);
258  fPt = jet.fPt;
259  fEta = jet.fEta;
260  fPhi = jet.fPhi;
261  fM = jet.fM;
262  fNEF = jet.fNEF;
263  fArea = jet.fArea;
264  fAreaEta = jet.fAreaEta;
265  fAreaPhi = jet.fAreaPhi;
266  fAreaE = jet.fAreaE;
267  fAreaEmc = jet.fAreaEmc;
270  fFlavourTracks = (jet.fFlavourTracks) ? new TObjArray(*(jet.fFlavourTracks)) : 0;
271  fMaxCPt = jet.fMaxCPt;
272  fMaxNPt = jet.fMaxNPt;
273  fMCPt = jet.fMCPt;
274  fNn = jet.fNn;
275  fNch = jet.fNch;
276  fPtEmc = jet.fPtEmc;
277  fNEmc = jet.fNEmc;
278  fClusterIDs = jet.fClusterIDs;
279  fTrackIDs = jet.fTrackIDs;
280  fClosestJets[0] = jet.fClosestJets[0];
281  fClosestJets[1] = jet.fClosestJets[1];
284  fMatched = jet.fMatched;
285  fTaggedJet = jet.fTaggedJet;
286  fTagStatus = jet.fTagStatus;
287  fPtSub = jet.fPtSub;
288  fPtSubVect = jet.fPtSubVect;
289  fTriggers = jet.fTriggers;
290  fLabel = jet.fLabel;
291  fHasGhost = jet.fHasGhost;
292  fGhosts = jet.fGhosts;
293  if (jet.fJetShapeProperties) {
295  }
299  }
300 
301  return *this;
302 }
303 
310 {
311  //Return -1 if this is smaller than obj, 0 if objects are equal and 1 if this is larger than obj.
312 
313  if (obj == this) return 0;
314 
315  const AliEmcalJet* jet = dynamic_cast<const AliEmcalJet*>(obj);
316  if (!jet) return 0;
317 
318  if (Pt() > jet->Pt()) return -1;
319  else if (Pt() < jet->Pt()) return 1;
320  else return 0;
321 }
322 
327 void AliEmcalJet::GetMomentum(TLorentzVector& vec) const
328 {
329  vec.SetPtEtaPhiE(fPt, fEta, fPhi, E());
330 }
331 
340 {
341  Double_t ptcorr = fPt - rho * fArea;
342  if (save) fPtSub = ptcorr;
343  return ptcorr;
344 }
345 
354 {
355  Double_t dx = Px() - rho * fArea * TMath::Cos(fAreaPhi);
356  Double_t dy = Py() - rho * fArea * TMath::Sin(fAreaPhi);
357  //Double_t dz = Pz() - rho * fArea * TMath::SinH(fAreaEta);
358  Double_t ptcorr = TMath::Sqrt(dx * dx + dy * dy);
359  if (save) fPtSubVect = ptcorr;
360  return ptcorr;
361 }
362 
371 {
372  TLorentzVector vecCorr;
373  GetMomentum(vecCorr);
374  TLorentzVector vecBg;
375  vecBg.SetPtEtaPhiE(fArea, fAreaEta, fAreaPhi, fAreaE);
376  vecBg *= rho;
377  vecCorr -= vecBg;
378  if (save) {
379  Double_t dPhi = TMath::Abs(TVector2::Phi_mpi_pi(Phi() - vecCorr.Phi()));
380  Int_t signum = dPhi <= TMath::PiOver2() ? 1 : -1;
381  fPtSubVect = signum * vecCorr.Pt();
382  }
383  return vecCorr;
384 }
385 
391 {
392  std::sort(fClusterIDs.GetArray(), fClusterIDs.GetArray() + fClusterIDs.GetSize());
393  std::sort(fTrackIDs.GetArray(), fTrackIDs.GetArray() + fTrackIDs.GetSize());
394 }
395 
401 Double_t AliEmcalJet::DeltaR(const AliVParticle* part) const
402 {
403  Double_t dPhi = Phi() - part->Phi();
404  Double_t dEta = Eta() - part->Eta();
405  dPhi = TVector2::Phi_mpi_pi(dPhi);
406  return TMath::Sqrt(dPhi * dPhi + dEta * dEta);
407 }
408 
424 std::vector<int> AliEmcalJet::GetPtSortedTrackConstituentIndexes(TClonesArray* tracks) const
425 {
426  typedef std::pair<Double_t, Int_t> ptidx_pair;
427 
428  // Create vector for Pt sorting
429  std::vector<ptidx_pair> pair_list;
430 
431  for (Int_t i_entry = 0; i_entry < GetNumberOfTracks(); i_entry++) {
432  AliVParticle* track = Track(i_entry);
433  if (!track) {
434  AliError(Form("Unable to find jet track %d in collection %s (pos in collection %d, max %d)", i_entry, tracks->GetName(), TrackAt(i_entry), tracks->GetEntriesFast()));
435  continue;
436  }
437  pair_list.push_back(std::make_pair(track->Pt(), i_entry));
438  }
439 
440  std::stable_sort(pair_list.begin() , pair_list.end() , sort_descend());
441 
442  // return a vector of indexes of constituents (sorted descending by pt)
443  std::vector <int> index_sorted_list;
444 
445  // populating the return object with indexes of sorted tracks
446  for (auto it : pair_list) index_sorted_list.push_back(it.second);
447 
448  return index_sorted_list;
449 }
450 
458 Double_t AliEmcalJet::GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz) const
459 {
460  Double_t pJetSq = P();
461  pJetSq *= pJetSq;
462 
463  if (pJetSq > 1e-6) {
464  return (trkPx * Px() + trkPy * Py() + trkPz * Pz()) / pJetSq;
465  }
466  else {
467  AliWarning(Form("%s: strange, pjet*pjet seems to be zero pJetSq: %f", GetName(), pJetSq));
468  return -1;
469  }
470 }
471 
477 Double_t AliEmcalJet::GetZ(const AliVParticle* trk) const
478 {
479  return GetZ(trk->Px(), trk->Py(), trk->Pz());
480 }
481 
487 AliVParticle* AliEmcalJet::GetLeadingTrack(TClonesArray* tracks) const
488 {
489  AliVParticle* maxTrack = 0;
490  for (Int_t i = 0; i < GetNumberOfTracks(); i++) {
491  AliVParticle* track = Track(i);
492  if (!track) {
493  AliError(Form("Unable to find jet track %d (global index %d) in the jet", i, TrackAt(i)));
494  continue;
495  }
496  if (!maxTrack || track->Pt() > maxTrack->Pt())
497  maxTrack = track;
498  }
499 
500  return maxTrack;
501 }
502 
508 AliVCluster* AliEmcalJet::GetLeadingCluster(TClonesArray* clusters) const
509 {
510  AliVCluster* maxCluster = 0;
511  for (Int_t i = 0; i < GetNumberOfClusters(); i++) {
512  AliVCluster* cluster = Cluster(i);
513  if (!cluster) {
514  AliError(Form("Unable to find jet cluster %d (global index %d) in the jet", i, ClusterAt(i)));
515  continue;
516  }
517  if (!maxCluster || cluster->E() > maxCluster->E())
518  maxCluster = cluster;
519  }
520 
521  return maxCluster;
522 }
523 
528 {
529  fClosestJets[0] = 0;
530  fClosestJets[1] = 0;
531  fClosestJetsDist[0] = 999;
532  fClosestJetsDist[1] = 999;
533  fMatched = 2;
534 }
535 
542 {
543  for (Int_t i = 0; i < fTrackIDs.GetSize(); i++) {
544  if (it == fTrackIDs[i]) return i;
545  }
546  return -1;
547 }
548 
555 {
556  for (Int_t i = 0; i < fClusterIDs.GetSize(); i++) {
557  if (ic == fClusterIDs[i]) return i;
558  }
559  return -1;
560 }
561 
575  return TString::Format("Jet pT = %.2f, eta = %.2f, phi = %.2f, max charged pT = %.2f, max neutral pT = %.2f, N tracks = %d, N clusters = %d, Area = %.2f, NEF = %.2f",
577 }
578 
585 void AliEmcalJet::Print(Option_t* /*opt*/) const
586 {
587  Printf("%s\n", toString().Data());
588 }
589 
596 std::ostream &AliEmcalJet::Print(std::ostream &in) const {
597  in << toString().Data();
598  return in;
599 }
600 
606 void AliEmcalJet::PrintConstituents(TClonesArray* tracks, TClonesArray* clusters) const
607 {
608  for (Int_t i = 0; i < GetNumberOfTracks(); i++) {
609  AliVParticle* part = Track(i);
610  if (part) {
611  Printf("Track %d (index = %d) pT = %.2f, eta = %.2f, phi = %.2f, PDG code = %d", i, TrackAt(i), part->Pt(), part->Eta(), part->Phi(), part->PdgCode());
612  }
613  }
614 
615  for (Int_t i = 0; i < GetNumberOfClusters(); i++) {
616  AliVCluster* clus = Cluster(i);
617  if (clus) {
618  Printf("Cluster %d (index = %d) E = %.2f", i, ClusterAt(i), clus->E());
619  }
620  }
621 }
622 
629 {
630  if (P() < 1e-6) return 0.;
631  AliVParticle* hftrack = GetFlavourTrack(i);
632  return hftrack != 0 ? hftrack->P() / P() : 0.;
633 }
634 
642 std::ostream &operator<<(std::ostream &in, const AliEmcalJet &myjet) {
643  std::ostream &result = myjet.Print(in);
644  return result;
645 }
646 
655 void AliEmcalJet::AddGhost(const Double_t dPx, const Double_t dPy, const Double_t dPz, const Double_t dE)
656 {
657  TLorentzVector ghost(dPx, dPy, dPz, dE);
658  fGhosts.push_back(ghost);
659  if (!fHasGhost) fHasGhost = kTRUE;
660  return;
661 }
662 
666 void AliEmcalJet::Clear(Option_t */*option*/)
667 {
668  fClusterIDs.Set(0);
669  fTrackIDs.Set(0);
670  fClosestJets[0] = 0;
671  fClosestJets[1] = 0;
672  fClosestJetsDist[0] = 0;
673  fClosestJetsDist[1] = 0;
674  fMatched = 0;
675  fPtSub = 0;
676  fGhosts.clear();
677  fHasGhost = kFALSE;
678  fClusterConstituents.clear();
679  fParticleConstituents.clear();
680 }
681 
690 AliVParticle* AliEmcalJet::Track(Int_t idx) const
691 {
693 }
694 
702 AliVParticle* AliEmcalJet::TrackAt(Int_t idx, TClonesArray *ta) const
703 {
704  if (!ta) return 0;
706  if (res.second != ta) {
707  AliWarning(Form("TClonesArray %s that was passed does not correspond to the passed index! The index belongs to a different TClonesArray named %s! Returning the object corresponding to the index (not the passed TClonesArray)! Consider fixing by updating to jet->Track(index).", ta->GetName(), res.second->GetName()));
708  }
709  return dynamic_cast<AliVParticle*>(res.second->At(res.first));
710 }
711 
718 Int_t AliEmcalJet::ContainsTrack(AliVParticle* track, TClonesArray* tracks) const
719 {
720  if (!tracks || !track) return 0;
721  return ContainsTrack(tracks->IndexOf(track));
722 }
723 
732 AliVCluster* AliEmcalJet::Cluster(Int_t idx) const
733 {
735 }
736 
744 AliVCluster* AliEmcalJet::ClusterAt(Int_t idx, TClonesArray *ca) const
745 {
746  if (!ca) return 0;
747 
749  if (res.second != ca) {
750  AliWarning(Form("TClonesArray %s that was passed does not correspond to the passed index! The index belongs to a different TClonesArray named %s! Returning the object corresponding to the index (not the passed TClonesArray)! Consider fixing by updating to jet->Cluster(index).", ca->GetName(), res.second->GetName()));
751  }
752  return dynamic_cast<AliVCluster*>(res.second->At(res.first));
753 }
754 
761 Int_t AliEmcalJet::ContainsCluster(AliVCluster* cluster, TClonesArray* clusters) const
762 {
763  if (!clusters || !cluster) return 0;
764  return ContainsCluster(clusters->IndexOf(cluster));
765 }
766 
768  return (icl < fClusterConstituents.size()) ? &fClusterConstituents[icl] : nullptr;
769 }
770 
772  return (ipart < fParticleConstituents.size()) ? &fParticleConstituents[ipart] : nullptr;
773 }
774 
776  if(!fClusterConstituents.size()) return nullptr;
777  const PWG::JETFW::AliEmcalClusterJetConstituent *leading(nullptr);
778  for(const auto &c : fClusterConstituents) {
779  if(!leading) leading = &c;
780  else {
781  if(c.E() > leading->E()) leading = &c;
782  }
783  }
784  return leading;
785 }
786 
788  if(!fParticleConstituents.size()) return nullptr;
789  const PWG::JETFW::AliEmcalParticleJetConstituent *leading(nullptr);
790  for(const auto &p : fParticleConstituents) {
791  if(!leading) leading = &p;
792  else {
793  if(p.Pt() > leading->Pt()) leading = &p;
794  }
795  }
796  return leading;
797 }
798 
799 bool AliEmcalJet::HasClusterConstituent(const AliVCluster *const clust) const {
801  bool found(false);
802  for(auto c : fClusterConstituents) {
803  if(test == c) {
804  found = true;
805  break;
806  }
807  }
808  return found;
809 }
810 
811 bool AliEmcalJet::HasParticleConstituent(const AliVParticle *const part) const {
813  bool found(false);
814  for(auto p : fParticleConstituents) {
815  if(test == p) {
816  found = true;
817  break;
818  }
819  }
820  return found;
821 }
822 
823 
829 Double_t AliEmcalJet::GetXi(const AliVParticle* trk) const
830 {
831  return TMath::Log(1 / GetZ(trk));
832 }
833 
841 Double_t AliEmcalJet::GetXi( const Double_t trkPx, const Double_t trkPy, const Double_t trkPz ) const
842 {
843  return TMath::Log(1 / GetZ(trkPx, trkPy, trkPz));
844 }
845 
850 void AliEmcalJet::AddFlavourTrack(AliVParticle* hftrack)
851 {
853  fFlavourTracks->Add(hftrack);
854 }
855 
856 void AliEmcalJet::AddParticleConstituent(const AliVParticle *const part, Bool_t isEmbedding, UInt_t globalIndex) {
858  constituent.SetIsFromEmbeddedEvent(isEmbedding);
859  constituent.SetGlobalIndex(globalIndex);
860  AddParticleConstituent(constituent);
861 }
862 
864  fParticleConstituents.emplace_back(part);
865 }
866 
867 
868 void AliEmcalJet::AddClusterConstituent(const AliVCluster *const clust, AliVCluster::VCluUserDefEnergy_t endef, Double_t *pvec, Bool_t isEmbedding, UInt_t globalIndex) {
869  PWG::JETFW::AliEmcalClusterJetConstituent constituent(clust, endef, pvec);
870  constituent.SetIsFromEmbeddedEvent(isEmbedding);
871  constituent.SetGlobalIndex(globalIndex);
872  AddClusterConstituent(constituent);
873 }
874 
876  fClusterConstituents.emplace_back(clust);
877 }
878 
884 AliVParticle* AliEmcalJet::GetFlavourTrack(Int_t i) const
885 {
886  if (!fFlavourTracks || i < 0 || i >= fFlavourTracks->GetEntriesFast()) return 0;
887 
888  return static_cast<AliVParticle*>(fFlavourTracks->At(i));
889 }
890 
897 {
898  if (!fFlavourTracks || i < 0 || i >= fFlavourTracks->GetEntriesFast()) return 0;
899 
900  return static_cast<AliVParticle*>(fFlavourTracks->RemoveAt(i));
901 }
TArrayI fTrackIDs
Array containing ids of track constituents.
Definition: AliEmcalJet.h:404
Double_t fPtSubVect
! Background vector subtracted pt (not stored set from outside)
Definition: AliEmcalJet.h:412
const PWG::JETFW::AliEmcalParticleJetConstituent * ParticleConstituentAt(unsigned int ipart) const
Access to the -particle constituent.
Double_t Area() const
Definition: AliEmcalJet.h:130
std::pair< Double_t, Int_t > ptidx_pair
(pt,index) pair
double Double_t
Definition: External.C:58
Int_t fTagStatus
! Status of tagging -1: NA 0: not tagged 1: tagged
Definition: AliEmcalJet.h:410
AliVParticle * GetLeadingTrack(TClonesArray *tracks=0) const
Double_t GetXi(const AliVParticle *trk) const
Simple C structure to allow sorting in descending order.
Definition: AliEmcalJet.h:430
Double32_t fAreaE
Jet temporal area component.
Definition: AliEmcalJet.h:387
TArrayI fClusterIDs
Array containing ids of cluster constituents.
Definition: AliEmcalJet.h:403
virtual double E() const
Access to constituent energy.
Double_t Eta() const
Definition: AliEmcalJet.h:121
Int_t fLabel
! Label to inclusive jet for constituent subtracted jet
Definition: AliEmcalJet.h:414
Double_t fPtSub
! Background subtracted pt (not stored set from outside)
Definition: AliEmcalJet.h:411
Double_t Py() const
Definition: AliEmcalJet.h:107
void Clear(Option_t *="")
std::pair< int, U * > LocalIndexFromGlobalIndex(const int globalIndex) const
Double_t Phi() const
Definition: AliEmcalJet.h:117
Bool_t fHasGhost
! Whether ghost particle are included within the constituents
Definition: AliEmcalJet.h:416
std::vector< PWG::JETFW::AliEmcalParticleJetConstituent > fParticleConstituents
List of particle constituents.
Definition: AliEmcalJet.h:422
Int_t ClusterAt(Int_t idx) const
Definition: AliEmcalJet.h:137
AliEmcalJetShapeProperties * fJetShapeProperties
! Pointer to the jet shape properties
Definition: AliEmcalJet.h:419
AliVParticle * Track(Int_t idx) const
TCanvas * c
Definition: TestFitELoss.C:172
Double_t MaxChargedPt() const
Definition: AliEmcalJet.h:147
AliEmcalJet & operator=(const AliEmcalJet &jet)
const PWG::JETFW::AliEmcalClusterJetConstituent * ClusterConstituentAt(unsigned int icl) const
Access to the -cluster constituent.
Double_t GetFlavourTrackZ(Int_t i=0) const
std::vector< PWG::JETFW::AliEmcalClusterJetConstituent > fClusterConstituents
List of cluster constituents.
Definition: AliEmcalJet.h:423
Double_t E() const
Definition: AliEmcalJet.h:119
const PWG::JETFW::AliEmcalParticleJetConstituent * GetLeadingParticleConstituent() const
Get the leading particle constituent.
AliVParticle * GetFlavourTrack(Int_t i=0) const
AliVParticle * RemoveFlavourTrack(Int_t i=0)
Int_t ContainsCluster(AliVCluster *cluster, TClonesArray *clusters) const
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:160
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:139
Double_t Px() const
Definition: AliEmcalJet.h:106
void AddParticleConstituent(const AliVParticle *const part, Bool_t isFromEmbeddedEvent, UInt_t globalIndex)
Add new particle (track / mc particle) constituent to the given jet Note: this will append the consti...
std::ostream & Print(std::ostream &in) const
void ResetMatching()
void GetMomentum(TLorentzVector &vec) const
Double32_t fMCPt
Pt from MC particles contributing to the jet.
Definition: AliEmcalJet.h:397
Double32_t fMaxNPt
Pt of maximum neutral constituent.
Definition: AliEmcalJet.h:396
Double32_t fM
Jet mass.
Definition: AliEmcalJet.h:377
int Int_t
Definition: External.C:63
UShort_t GetNumberOfClusters() const
Definition: AliEmcalJet.h:138
friend std::ostream & operator<<(std::ostream &in, const AliEmcalJet &myjet)
unsigned int UInt_t
Definition: External.C:33
Double32_t fAreaPhi
Jet phi area.
Definition: AliEmcalJet.h:385
void AddFlavourTrack(AliVParticle *hftrack)
void AddClusterConstituent(const AliVCluster *const clust, AliVCluster::VCluUserDefEnergy_t endef, Double_t *pvec, Bool_t isFromEmbeddedEvent, UInt_t globalIndex)
Add new cluster constituent to the given jet Note: this will append the constituent. No sorting according to particle is done.
UShort_t fMatched
! 0 or 1 if it is matched with one of the closest jets; 2 if it is not matched
Definition: AliEmcalJet.h:407
std::vector< TLorentzVector > fGhosts
! Vector containing the ghost particles
Definition: AliEmcalJet.h:417
TString toString() const
Double_t PtSubVect() const
Definition: AliEmcalJet.h:159
static const AliEmcalContainerIndexMap< TClonesArray, AliVCluster > & GetEmcalContainerIndexMap()
Get the EMCal container utils associated with particle containers.
Double32_t fArea
Jet transverse area.
Definition: AliEmcalJet.h:381
void SetGlobalIndex(ULong_t index)
Set the index in the globl.
AliEmcalJet * fTaggedJet
! Jet tagged to this jet
Definition: AliEmcalJet.h:409
Int_t ContainsTrack(AliVParticle *track, TClonesArray *tracks) const
TLorentzVector SubtractRhoVect(Double_t rho, Bool_t save=kFALSE)
virtual ~AliEmcalJet()
Double_t PtSub() const
Definition: AliEmcalJet.h:158
V * GetObjectFromGlobalIndex(const int globalIndex) const
bool HasParticleConstituent(const AliVParticle *const part) const
Checks whether a given particle is a jet constituent.
AliVCluster * GetLeadingCluster(TClonesArray *clusters=0) const
Double32_t fAreaEta
Jet eta area.
Definition: AliEmcalJet.h:383
Double_t MaxNeutralPt() const
Definition: AliEmcalJet.h:146
void AddGhost(const Double_t dPx, const Double_t dPy, const Double_t dPz, const Double_t dE)
Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz) const
void PrintConstituents(TClonesArray *tracks=0, TClonesArray *clusters=0) const
Int_t fFlavourTagging
Tag jet with a flavor (use bits defined in enum EFlavourTag)
Definition: AliEmcalJet.h:391
Implementation of a jet constituent for constituent clusters.
Double_t DeltaR(const AliVParticle *part) const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
UInt_t fJetAcceptanceType
! Jet acceptance type (stored bitwise)
Definition: AliEmcalJet.h:420
Double_t Pt() const
Definition: AliEmcalJet.h:109
Double32_t fPtEmc
Pt in EMCAL acceptance.
Definition: AliEmcalJet.h:401
This class contains the derivative subtraction operators for jet shapes.
const PWG::JETFW::AliEmcalClusterJetConstituent * GetLeadingClusterConstituent() const
Get the leading cluster constituent.
Double32_t fPt
Jet transverse momentum.
Definition: AliEmcalJet.h:371
virtual double Pt() const
Access to transverse momentum.
Double_t P() const
Definition: AliEmcalJet.h:110
Double32_t fEta
Jet pseudo-rapidity.
Definition: AliEmcalJet.h:373
Double32_t fMaxCPt
Pt of maximum charged constituent.
Definition: AliEmcalJet.h:394
Double32_t fAreaEmc
Area on EMCAL surface (determined by ghosts in EMCal acceptance)
Definition: AliEmcalJet.h:389
AliVCluster * Cluster(Int_t idx) const
void SetIsFromEmbeddedEvent(Bool_t isEmbedded)
Specify whether constituent is from embedded event.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Int_t fNn
Number of neutral constituents.
Definition: AliEmcalJet.h:398
Double_t Pz() const
Definition: AliEmcalJet.h:108
const char Option_t
Definition: External.C:48
UInt_t fTriggers
! Triggers that the jet might have fired (AliVEvent::EOfflineTriggerTypes)
Definition: AliEmcalJet.h:413
void test(int runnumber=195345)
Bool_t fAxisInEmcal
Whether the jet axis is inside the EMCAL acceptance.
Definition: AliEmcalJet.h:390
void SortConstituents()
Int_t fNEmc
Number of constituents in EMCAL acceptance.
Definition: AliEmcalJet.h:402
Double32_t fPhi
Jet axis azimuthal angle.
Definition: AliEmcalJet.h:375
AliEmcalJet * fClosestJets[2]
! If this is MC it contains the two closest detector level jets in order of distance and viceversa ...
Definition: AliEmcalJet.h:405
bool Bool_t
Definition: External.C:53
Double_t NEF() const
Definition: AliEmcalJet.h:148
bool HasClusterConstituent(const AliVCluster *const clust) const
Checks whether a given cluster is a constituent of the jet.
Double32_t fNEF
Jet Neutral Energy Fraction.
Definition: AliEmcalJet.h:379
Double32_t fClosestJetsDist[2]
! Distance from the two closest jets
Definition: AliEmcalJet.h:406
UShort_t fMatchingType
! Matching type
Definition: AliEmcalJet.h:408
Int_t Compare(const TObject *obj) const
std::vector< int > GetPtSortedTrackConstituentIndexes(TClonesArray *tracks) const
TObjArray * fFlavourTracks
Definition: AliEmcalJet.h:392
static const AliEmcalContainerIndexMap< TClonesArray, AliVParticle > & GetEmcalContainerIndexMap()
Get the EMCal container utils associated with particle containers.