AliPhysics  e59a9ba (e59a9ba)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalJetTask.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, 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 
16 #include <vector>
17 
18 #include <TClonesArray.h>
19 #include <TMath.h>
20 #include <TRandom3.h>
21 
22 #include <AliVCluster.h>
23 #include <AliVEvent.h>
24 #include <AliVParticle.h>
25 #include <AliEMCALGeometry.h>
26 
27 #include "AliTLorentzVector.h"
28 #include "AliEmcalJet.h"
29 #include "AliEmcalParticle.h"
30 #include "AliFJWrapper.h"
31 #include "AliEmcalJetUtility.h"
32 #include "AliParticleContainer.h"
33 #include "AliClusterContainer.h"
34 
35 #include "AliEmcalJetTask.h"
36 
37 using std::cout;
38 using std::endl;
39 using std::cerr;
40 
44 
45 const Int_t AliEmcalJetTask::fgkConstIndexShift = 100000;
46 
53  fJetsTag(),
54  fJetAlgo(AliJetContainer::antikt_algorithm),
55  fJetType(AliJetContainer::kFullJet),
56  fRecombScheme(AliJetContainer::pt_scheme),
57  fRadius(0.4),
58  fMinJetArea(0.001),
59  fMinJetPt(1.0),
60  fJetPhiMin(-10),
61  fJetPhiMax(+10),
62  fJetEtaMin(-1),
63  fJetEtaMax(+1),
64  fGhostArea(0.005),
65  fTrackEfficiency(1.),
66  fUtilities(0),
67  fLocked(0),
68  fJetsName(),
69  fIsInit(0),
70  fIsPSelSet(0),
71  fIsEmcPart(0),
72  fLegacyMode(kFALSE),
73  fFillGhost(kFALSE),
74  fJets(0),
75  fFastJetWrapper("AliEmcalJetTask","AliEmcalJetTask")
76 {
77 }
78 
85  fJetsTag("Jets"),
86  fJetAlgo(AliJetContainer::antikt_algorithm),
87  fJetType(AliJetContainer::kFullJet),
88  fRecombScheme(AliJetContainer::pt_scheme),
89  fRadius(0.4),
90  fMinJetArea(0.001),
91  fMinJetPt(1.0),
92  fJetPhiMin(-10),
93  fJetPhiMax(+10),
94  fJetEtaMin(-1),
95  fJetEtaMax(+1),
96  fGhostArea(0.005),
97  fTrackEfficiency(1.),
98  fUtilities(0),
99  fLocked(0),
100  fJetsName(),
101  fIsInit(0),
102  fIsPSelSet(0),
103  fIsEmcPart(0),
104  fLegacyMode(kFALSE),
105  fFillGhost(kFALSE),
106  fJets(0),
107  fFastJetWrapper(name,name)
108 {
109 }
110 
115 {
116 }
117 
123 {
124  if (!fUtilities) fUtilities = new TObjArray();
125  if (fUtilities->FindObject(utility)) {
126  Error("AddUtility", "Jet utility %s already connected.", utility->GetName());
127  return utility;
128  }
129  fUtilities->Add(utility);
130  utility->SetJetTask(this);
131 
132  return utility;
133 }
134 
140 {
141  TIter next(fUtilities);
142  AliEmcalJetUtility *utility = 0;
143  while ((utility=static_cast<AliEmcalJetUtility*>(next()))) utility->Init();
144 }
145 
152 {
153  TIter next(fUtilities);
154  AliEmcalJetUtility *utility = 0;
155  while ((utility=static_cast<AliEmcalJetUtility*>(next()))) utility->Prepare(fFastJetWrapper);
156 }
157 
163 {
164  TIter next(fUtilities);
165  AliEmcalJetUtility *utility = 0;
166  while ((utility=static_cast<AliEmcalJetUtility*>(next()))) utility->ProcessJet(jet, ij, fFastJetWrapper);
167 }
168 
174 {
175  TIter next(fUtilities);
176  AliEmcalJetUtility *utility = 0;
177  while ((utility=static_cast<AliEmcalJetUtility*>(next()))) utility->Terminate(fFastJetWrapper);
178 }
179 
185 {
186  // clear the jet array (normally a null operation)
187  fJets->Delete();
188 
189  Int_t n = FindJets();
190 
191  if (n == 0) return kFALSE;
192 
193  FillJetBranch();
194 
195  return kTRUE;
196 }
197 
206 {
207  if (fParticleCollArray.GetEntriesFast() == 0 && fClusterCollArray.GetEntriesFast() == 0){
208  AliError("No tracks or clusters, returning.");
209  return 0;
210  }
211 
213 
214  AliDebug(2,Form("Jet type = %d", fJetType));
215 
216  Int_t iColl = 1;
217  TIter nextPartColl(&fParticleCollArray);
218  AliParticleContainer* tracks = 0;
219  while ((tracks = static_cast<AliParticleContainer*>(nextPartColl()))) {
220  AliDebug(2,Form("Tracks from collection %d: '%s'.", iColl-1, tracks->GetName()));
222  for (AliParticleIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
223  // artificial inefficiency
224  if (fTrackEfficiency < 1.) {
225  Double_t rnd = gRandom->Rndm();
226  if (fTrackEfficiency < rnd) {
227  AliDebug(2,Form("Track %d rejected due to artificial tracking inefficiency", it.current_index()));
228  continue;
229  }
230  }
231 
232  AliDebug(2,Form("Track %d accepted (label = %d, pt = %f)", it.current_index(), it->second->GetLabel(), it->first.Pt()));
233  Int_t uid = it.current_index() + fgkConstIndexShift * iColl;
234  fFastJetWrapper.AddInputVector(it->first.Px(), it->first.Py(), it->first.Pz(), it->first.E(), uid);
235  }
236  iColl++;
237  }
238 
239  iColl = 1;
240  TIter nextClusColl(&fClusterCollArray);
241  AliClusterContainer* clusters = 0;
242  while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
243  AliDebug(2,Form("Clusters from collection %d: '%s'.", iColl-1, clusters->GetName()));
245  for (AliClusterIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
246  AliDebug(2,Form("Cluster %d accepted (label = %d, energy = %.3f)", it.current_index(), it->second->GetLabel(), it->first.E()));
247  Int_t uid = -it.current_index() - fgkConstIndexShift * iColl;
248  fFastJetWrapper.AddInputVector(it->first.Px(), it->first.Py(), it->first.Pz(), it->first.E(), uid);
249  }
250  iColl++;
251  }
252 
253  if (fFastJetWrapper.GetInputVectors().size() == 0) return 0;
254 
255  // run jet finder
257 
258  return fFastJetWrapper.GetInclusiveJets().size();
259 }
260 
267 {
269 
270  // loop over fastjet jets
271  std::vector<fastjet::PseudoJet> jets_incl = fFastJetWrapper.GetInclusiveJets();
272  // sort jets according to jet pt
273  static Int_t indexes[9999] = {-1};
274  GetSortedArray(indexes, jets_incl);
275 
276  AliDebug(1,Form("%d jets found", (Int_t)jets_incl.size()));
277  for (UInt_t ijet = 0, jetCount = 0; ijet < jets_incl.size(); ++ijet) {
278  Int_t ij = indexes[ijet];
279  AliDebug(3,Form("Jet pt = %f, area = %f", jets_incl[ij].perp(), fFastJetWrapper.GetJetArea(ij)));
280 
281  if (jets_incl[ij].perp() < fMinJetPt) continue;
282  if (fFastJetWrapper.GetJetArea(ij) < fMinJetArea) continue;
283  if ((jets_incl[ij].eta() < fJetEtaMin) || (jets_incl[ij].eta() > fJetEtaMax) ||
284  (jets_incl[ij].phi() < fJetPhiMin) || (jets_incl[ij].phi() > fJetPhiMax))
285  continue;
286 
287  AliEmcalJet *jet = new ((*fJets)[jetCount])
288  AliEmcalJet(jets_incl[ij].perp(), jets_incl[ij].eta(), jets_incl[ij].phi(), jets_incl[ij].m());
289  jet->SetLabel(ij);
290 
291  fastjet::PseudoJet area(fFastJetWrapper.GetJetAreaVector(ij));
292  jet->SetArea(area.perp());
293  jet->SetAreaEta(area.eta());
294  jet->SetAreaPhi(area.phi());
295  jet->SetAreaE(area.E());
296 
297  // Fill constituent info
298  std::vector<fastjet::PseudoJet> constituents(fFastJetWrapper.GetJetConstituents(ij));
299  FillJetConstituents(jet, constituents, constituents);
300 
301  if (fGeom) {
302  if ((jet->Phi() > fGeom->GetArm1PhiMin() * TMath::DegToRad()) &&
303  (jet->Phi() < fGeom->GetArm1PhiMax() * TMath::DegToRad()) &&
304  (jet->Eta() > fGeom->GetArm1EtaMin()) &&
305  (jet->Eta() < fGeom->GetArm1EtaMax()))
306  jet->SetAxisInEmcal(kTRUE);
307  }
308 
309  ExecuteUtilities(jet, ij);
310 
311  AliDebug(2,Form("Added jet n. %d, pt = %f, area = %f, constituents = %d", jetCount, jet->Pt(), jet->Area(), jet->GetNumberOfConstituents()));
312  jetCount++;
313  }
314 
316 }
317 
324 Bool_t AliEmcalJetTask::GetSortedArray(Int_t indexes[], std::vector<fastjet::PseudoJet> array) const
325 {
326  static Float_t pt[9999] = {0};
327 
328  const Int_t n = (Int_t)array.size();
329 
330  if (n < 1)
331  return kFALSE;
332 
333  for (Int_t i = 0; i < n; i++)
334  pt[i] = array[i].perp();
335 
336  TMath::Sort(n, pt, indexes);
337 
338  return kTRUE;
339 }
340 
347 {
348  SetNeedEmcalGeom(kFALSE);
349 
350  if (fTrackEfficiency < 1.) {
351  if (gRandom) delete gRandom;
352  gRandom = new TRandom3(0);
353  }
354 
356 
357  // add jets to event if not yet there
358  if (!(InputEvent()->FindListObject(fJetsName))) {
359  fJets = new TClonesArray("AliEmcalJet");
360  fJets->SetName(fJetsName);
361  ::Info("AliEmcalJetTask::ExecOnce", "Jet collection with name '%s' has been added to the event.", fJetsName.Data());
362  InputEvent()->AddObject(fJets);
363  }
364  else {
365  AliError(Form("%s: Object with name %s already in event! Returning", GetName(), fJetsName.Data()));
366  return;
367  }
368 
369  // setup fj wrapper
370  fFastJetWrapper.SetAreaType(fastjet::active_area_explicit_ghosts);
376 
377  // setting legacy mode
378  if (fLegacyMode) {
380  }
381 
382  InitUtilities();
383 
385 }
386 
396 void AliEmcalJetTask::FillJetConstituents(AliEmcalJet *jet, std::vector<fastjet::PseudoJet>& constituents,
397  std::vector<fastjet::PseudoJet>& constituents_unsub, Int_t flag, TClonesArray *particles_sub)
398 {
399  Int_t nt = 0;
400  Int_t nc = 0;
401  Double_t neutralE = 0.;
402  Double_t maxCh = 0.;
403  Double_t maxNe = 0.;
404  Int_t gall = 0;
405  Int_t gemc = 0;
406  Int_t cemc = 0;
407  Int_t ncharged = 0;
408  Int_t nneutral = 0;
409  Double_t mcpt = 0.;
410  Double_t emcpt = 0.;
411 
412  Int_t uid = -1;
413 
414  jet->SetNumberOfTracks(constituents.size());
415  jet->SetNumberOfClusters(constituents.size());
416 
417  for (UInt_t ic = 0; ic < constituents.size(); ++ic) {
418 
419  if (flag == 0) {
420  uid = constituents[ic].user_index();
421  }
422  else {
423  if (constituents[ic].perp()<1.e-10) {
424  uid=-1;
425  }
426  else {
427  uid = GetIndexSub(constituents[ic].phi(), constituents_unsub);
428  }
429  if (uid==0) {
430  AliError("correspondence between un/subtracted constituent not found");
431  continue;
432  }
433  }
434 
435  AliDebug(3,Form("Processing constituent %d", uid));
436  if (uid == -1) { //ghost particle
437  ++gall;
438  if (fGeom) {
439  Double_t gphi = constituents[ic].phi();
440  if (gphi < 0) gphi += TMath::TwoPi();
441  gphi *= TMath::RadToDeg();
442  Double_t geta = constituents[ic].eta();
443  if ((gphi > fGeom->GetArm1PhiMin()) && (gphi < fGeom->GetArm1PhiMax()) &&
444  (geta > fGeom->GetArm1EtaMin()) && (geta < fGeom->GetArm1EtaMax()))
445  ++gemc;
446  }
447 
448  if (fFillGhost) jet->AddGhost(constituents[ic].px(),
449  constituents[ic].py(),
450  constituents[ic].pz(),
451  constituents[ic].e());
452  }
453  else if (uid >= fgkConstIndexShift) { // track constituent
454  Int_t iColl = uid / fgkConstIndexShift;
455  Int_t tid = uid - iColl * fgkConstIndexShift;
456  iColl--;
457  AliDebug(3,Form("Constituent %d is a track from collection %d and with ID %d", uid, iColl, tid));
458  AliParticleContainer* partCont = GetParticleContainer(iColl);
459  if (!partCont) {
460  AliError(Form("Could not find particle container %d",iColl));
461  continue;
462  }
463  AliVParticle *t = partCont->GetParticle(tid);
464  if (!t) {
465  AliError(Form("Could not find track %d",tid));
466  continue;
467  }
468 
469  Double_t cEta = t->Eta();
470  Double_t cPhi = t->Phi();
471  Double_t cPt = t->Pt();
472  Double_t cP = t->P();
473  if (t->Charge() == 0) {
474  neutralE += cP;
475  ++nneutral;
476  if (cPt > maxNe) maxNe = cPt;
477  } else {
478  ++ncharged;
479  if (cPt > maxCh) maxCh = cPt;
480  }
481 
482  // check if MC particle
483  if (TMath::Abs(t->GetLabel()) > fMinMCLabel) mcpt += cPt;
484 
485  if (fGeom) {
486  if (cPhi < 0) cPhi += TMath::TwoPi();
487  cPhi *= TMath::RadToDeg();
488  if ((cPhi > fGeom->GetArm1PhiMin()) && (cPhi < fGeom->GetArm1PhiMax()) &&
489  (cEta > fGeom->GetArm1EtaMin()) && (cEta < fGeom->GetArm1EtaMax())) {
490  emcpt += cPt;
491  ++cemc;
492  }
493  }
494 
495  if (flag == 0 || particles_sub == 0) {
496  jet->AddTrackAt(tid, nt);
497  }
498  else {
499  Int_t part_sub_id = particles_sub->GetEntriesFast();
500  AliEmcalParticle* part_sub = new ((*particles_sub)[part_sub_id]) AliEmcalParticle(dynamic_cast<AliVTrack*>(t)); // SA: probably need to be fixed!!
501  part_sub->SetPtEtaPhiM(constituents[ic].perp(),constituents[ic].eta(),constituents[ic].phi(),constituents[ic].m());
502  jet->AddTrackAt(part_sub_id, nt);
503  }
504 
505  ++nt;
506  }
507  else if (uid <= -fgkConstIndexShift) { // cluster constituent
508  Int_t iColl = -uid / fgkConstIndexShift;
509  Int_t cid = -uid - iColl * fgkConstIndexShift;
510  iColl--;
511  AliClusterContainer* clusCont = GetClusterContainer(iColl);
512  AliVCluster *c = clusCont->GetCluster(cid);
513 
514  if (!c) continue;
515 
517  clusCont->GetMomentum(nP, cid);
518 
519  Double_t cEta = nP.Eta();
520  Double_t cPhi = nP.Phi_0_2pi();
521  Double_t cPt = nP.Pt();
522  Double_t cP = nP.P();
523 
524  neutralE += cP;
525  if (cPt > maxNe) maxNe = cPt;
526 
527  // MC particle
528  if (TMath::Abs(c->GetLabel()) > fMinMCLabel) mcpt += c->GetMCEnergyFraction() > 1e-6 ? cPt * c->GetMCEnergyFraction() : cPt;
529 
530  if (fGeom) {
531  if (cPhi<0) cPhi += TMath::TwoPi();
532  cPhi *= TMath::RadToDeg();
533  if ((cPhi > fGeom->GetArm1PhiMin()) && (cPhi < fGeom->GetArm1PhiMax()) &&
534  (cEta > fGeom->GetArm1EtaMin()) && (cEta < fGeom->GetArm1EtaMax())) {
535  emcpt += cPt;
536  ++cemc;
537  }
538  }
539 
540  if (flag == 0 || particles_sub == 0) {
541  jet->AddClusterAt(cid, nc);
542  }
543  else {
544  Int_t part_sub_id = particles_sub->GetEntriesFast();
545  AliEmcalParticle* part_sub = new ((*particles_sub)[part_sub_id]) AliEmcalParticle(c);
546  part_sub->SetPtEtaPhiM(constituents[ic].perp(),constituents[ic].eta(),constituents[ic].phi(),constituents[ic].m());
547  jet->AddTrackAt(part_sub_id, nt);
548  }
549 
550  ++nc;
551  ++nneutral;
552  }
553  else {
554  AliError(Form("%s: No logical way to end up here (uid = %d).", GetName(), uid));
555  continue;
556  }
557  }
558 
559  jet->SetNumberOfTracks(nt);
560  jet->SetNumberOfClusters(nc);
561  jet->SetNEF(neutralE / jet->E());
562  jet->SetMaxChargedPt(maxCh);
563  jet->SetMaxNeutralPt(maxNe);
564  if (gall > 0) jet->SetAreaEmc(jet->Area() * gemc / gall);
565  else jet->SetAreaEmc(-1);
566  jet->SetNEmc(cemc);
567  jet->SetNumberOfCharged(ncharged);
568  jet->SetNumberOfNeutrals(nneutral);
569  jet->SetMCPt(mcpt);
570  jet->SetPtEmc(emcpt);
571  jet->SortConstituents();
572 }
573 
580 Int_t AliEmcalJetTask::GetIndexSub(Double_t phi_sub, std::vector<fastjet::PseudoJet>& constituents_unsub)
581 {
582  Double_t dphi=0;
583  Double_t phimin=100;
584  Int_t index=0;
585  for (UInt_t ii = 0; ii < constituents_unsub.size(); ii++) {
586  dphi=0;
587  Double_t phi_unsub = constituents_unsub[ii].phi();
588  dphi=phi_unsub-phi_sub;
589  if (dphi < -1*TMath::Pi()) dphi += (2*TMath::Pi());
590  else if (dphi > TMath::Pi()) dphi -= (2*TMath::Pi());
591  if(TMath::Abs(dphi)<phimin){ phimin=TMath::Abs(dphi);
592  index=ii;} }
593  if (constituents_unsub[index].user_index()!=-1) return constituents_unsub[index].user_index();
594 
595  return 0;
596 }
597 
605 {
606  if (fLocked) {
607  AliFatal("Jet finder task is locked! Changing properties is not allowed.");
608  return kTRUE;
609  }
610  else {
611  return kFALSE;
612  }
613 }
614 
621 void AliEmcalJetTask::SelectCollisionCandidates(UInt_t offlineTriggerMask)
622 {
623  if(!fIsPSelSet) {
624  fIsPSelSet = kTRUE;
625  fOfflineTriggerMask = offlineTriggerMask;
626  }
627  else {
628  AliWarning("Manually setting the event selection for jet finders is not allowed! Using trigger=old_trigger | your_trigger");
629  fOfflineTriggerMask = fOfflineTriggerMask | offlineTriggerMask;
630  }
631 }
632 
638 void AliEmcalJetTask::SetEtaRange(Double_t emi, Double_t ema)
639 {
640  if (IsLocked()) return;
641 
642  TIter nextPartColl(&fParticleCollArray);
643  AliParticleContainer* tracks = 0;
644  while ((tracks = static_cast<AliParticleContainer*>(nextPartColl()))) {
645  tracks->SetParticleEtaLimits(emi, ema);
646  }
647 }
648 
654 {
655  if (IsLocked()) return;
656 
657  TIter nextClusColl(&fClusterCollArray);
658  AliClusterContainer* clusters = 0;
659  while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
660  clusters->SetClusPtCut(min);
661  }
662 }
663 
669 {
670  if (IsLocked()) return;
671 
672  TIter nextClusColl(&fClusterCollArray);
673  AliClusterContainer* clusters = 0;
674  while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
675  clusters->SetClusECut(min);
676  }
677 }
678 
684 {
685  if (IsLocked()) return;
686 
687  TIter nextPartColl(&fParticleCollArray);
688  AliParticleContainer* tracks = 0;
689  while ((tracks = static_cast<AliParticleContainer*>(nextPartColl()))) {
690  tracks->SetParticlePtCut(min);
691  }
692 }
693 
699 void AliEmcalJetTask::SetPhiRange(Double_t pmi, Double_t pma)
700 {
701  if (IsLocked()) return;
702 
703  TIter nextPartColl(&fParticleCollArray);
704  AliParticleContainer* tracks = 0;
705  while ((tracks = static_cast<AliParticleContainer*>(nextPartColl()))) {
706  tracks->SetParticlePhiLimits(pmi, pma);
707  }
708 }
709 
716 fastjet::JetAlgorithm AliEmcalJetTask::ConvertToFJAlgo(EJetAlgo_t algo)
717 {
718  switch(algo) {
720  return fastjet::kt_algorithm;
722  return fastjet::antikt_algorithm;
724  return fastjet::cambridge_algorithm;
726  return fastjet::genkt_algorithm;
728  return fastjet::cambridge_for_passive_algorithm;
730  return fastjet::genkt_for_passive_algorithm;
732  return fastjet::plugin_algorithm;
734  return fastjet::undefined_jet_algorithm;
735 
736  default:
737  ::Error("AliEmcalJetTask::ConvertToFJAlgo", "Jet algorithm %d not recognized!!!", algo);
738  return fastjet::undefined_jet_algorithm;
739  }
740 }
741 
748 fastjet::RecombinationScheme AliEmcalJetTask::ConvertToFJRecoScheme(ERecoScheme_t reco)
749 {
750  switch(reco) {
752  return fastjet::E_scheme;
753 
755  return fastjet::pt_scheme;
756 
758  return fastjet::pt2_scheme;
759 
761  return fastjet::Et_scheme;
762 
764  return fastjet::Et2_scheme;
765 
767  return fastjet::BIpt_scheme;
768 
770  return fastjet::BIpt2_scheme;
771 
773  return fastjet::external_scheme;
774 
775  default:
776  ::Error("AliEmcalJetTask::ConvertToFJRecoScheme", "Recombination scheme %d not recognized!!!", reco);
777  return fastjet::external_scheme;
778  }
779 }
void SetMaxNeutralPt(Double32_t t)
Definition: AliEmcalJet.h:162
fastjet::PseudoJet GetJetAreaVector(UInt_t idx) const
Double_t Area() const
Definition: AliEmcalJet.h:97
TObjArray fClusterCollArray
cluster collection array
void AddTrackAt(Int_t track, Int_t idx)
Definition: AliEmcalJet.h:175
void SetParticlePtCut(Double_t cut)
TClonesArray * fJets
=true ghost particles will be filled in AliEmcalJet obj
virtual Int_t Run()
void SetEtaRange(Double_t emi, Double_t ema)
Bool_t IsLocked() const
Double_t Eta() const
Definition: AliEmcalJet.h:88
const AliClusterIterableMomentumContainer accepted_momentum() const
Base task in the EMCAL framework.
bidirectional stl iterator over the EMCAL iterable container
EJetType_t fJetType
Double_t Phi() const
Definition: AliEmcalJet.h:84
void FillJetConstituents(AliEmcalJet *jet, std::vector< fastjet::PseudoJet > &constituents, std::vector< fastjet::PseudoJet > &constituents_sub, Int_t flag=0, TClonesArray *particles_sub=0)
void AddClusterAt(Int_t clus, Int_t idx)
Definition: AliEmcalJet.h:174
Bool_t fFillGhost
=true to enable FJ 2.x behavior
AliEmcalJetUtility * AddUtility(AliEmcalJetUtility *utility)
Declaration of class AliTLorentzVector.
virtual void ProcessJet(AliEmcalJet *jet, Int_t ij, AliFJWrapper &fjw)=0
void SetArea(Double_t a)
Definition: AliEmcalJet.h:156
void ExecuteUtilities(AliEmcalJet *jet, Int_t ij)
void SetMaxRap(Double_t maxrap)
Definition: AliFJWrapper.h:100
virtual void Terminate(AliFJWrapper &fjw)=0
void SetAreaE(Double_t a)
Definition: AliEmcalJet.h:159
ERecoScheme_t fRecombScheme
void SetRecombScheme(const fastjet::RecombinationScheme &scheme)
Definition: AliFJWrapper.h:96
Double_t fTrackEfficiency
void SetMCPt(Double_t p)
Definition: AliEmcalJet.h:169
Double_t E() const
Definition: AliEmcalJet.h:86
virtual ~AliEmcalJetTask()
TRandom * gRandom
static FJRecoScheme ConvertToFJRecoScheme(ERecoScheme_t reco)
void SetLabel(Int_t l)
Definition: AliEmcalJet.h:155
General jet finder task implementing a wrapper for FastJet.
static TString GenerateJetName(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, AliParticleContainer *partCont, AliClusterContainer *clusCont, TString tag)
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:107
Container for particles within the EMCAL framework.
Bool_t fIsPSelSet
=true if already initialized
void SetR(Double_t r)
Definition: AliFJWrapper.h:101
TObjArray fParticleCollArray
particle/track collection array
AliParticleContainer * GetParticleContainer(Int_t i=0) const
const std::vector< fastjet::PseudoJet > & GetInclusiveJets() const
Definition: AliFJWrapper.h:33
Double_t GetJetArea(UInt_t idx) const
AliEMCALGeometry * fGeom
!emcal geometry
Double_t Phi_0_2pi() const
void SetLegacyMode(Bool_t mode)
Definition: AliFJWrapper.h:111
virtual AliVParticle * GetParticle(Int_t i=-1) const
TObjArray * fUtilities
void SetPtEtaPhiM(Double_t pt, Double_t eta, Double_t phi, Double_t m)
void SetAlgorithm(const fastjet::JetAlgorithm &algor)
Definition: AliFJWrapper.h:95
AliClusterContainer * GetClusterContainer(Int_t i=0) const
void SetMaxChargedPt(Double32_t t)
Definition: AliEmcalJet.h:163
virtual void Clear(const Option_t *="")
void SetNEF(Double_t nef)
Definition: AliEmcalJet.h:164
Bool_t GetSortedArray(Int_t indexes[], std::vector< fastjet::PseudoJet > array) const
void AddGhost(const Double_t dPx, const Double_t dPy, const Double_t dPz, const Double_t dE)
void SetNEmc(Int_t n)
Definition: AliEmcalJet.h:170
AliVCluster * GetCluster(Int_t i) const
virtual void Prepare(AliFJWrapper &fjw)=0
Int_t fMinMCLabel
minimum MC label value for the tracks/clusters being considered MC particles
void SetJetTask(AliEmcalJetTask *jetTask)
void SetMinJetClusE(Double_t min)
Double_t Pt() const
Definition: AliEmcalJet.h:76
void SelectCollisionCandidates(UInt_t offlineTriggerMask=AliVEvent::kMB)
void SetGhostArea(Double_t gharea)
Definition: AliFJWrapper.h:99
EJetAlgo_t fJetAlgo
void SetNumberOfCharged(Int_t n)
Definition: AliEmcalJet.h:167
std::vector< fastjet::PseudoJet > GetJetConstituents(UInt_t idx) const
void SetAreaEta(Double_t a)
Definition: AliEmcalJet.h:157
static FJJetAlgo ConvertToFJAlgo(EJetAlgo_t algo)
void SetParticleEtaLimits(Double_t min, Double_t max)
const std::vector< fastjet::PseudoJet > & GetInputVectors() const
Definition: AliFJWrapper.h:31
void SetMinJetTrackPt(Double_t min)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
const AliParticleIterableMomentumContainer accepted_momentum() const
void SetNeedEmcalGeom(Bool_t n)
Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster *vc, Double_t mass) const
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
void SetNumberOfTracks(Int_t n)
Definition: AliEmcalJet.h:166
Bool_t fLegacyMode
=true if emcal particles are given as input (for clusters)
void SetClusPtCut(Double_t cut)
virtual void AddInputVector(Double_t px, Double_t py, Double_t pz, Double_t E, Int_t index=-99999)
void SortConstituents()
void SetMinJetClusPt(Double_t min)
Int_t GetIndexSub(Double_t phi_sub, std::vector< fastjet::PseudoJet > &constituents_unsub)
void SetPhiRange(Double_t pmi, Double_t pma)
void SetClusECut(Double_t cut)
void SetAreaPhi(Double_t a)
Definition: AliEmcalJet.h:158
void SetAreaType(const fastjet::AreaType &atype)
Definition: AliFJWrapper.h:97
void SetParticlePhiLimits(Double_t min, Double_t max)
void SetPtEmc(Double_t pt)
Definition: AliEmcalJet.h:171
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.
AliFJWrapper fFastJetWrapper
jet collection
void SetNumberOfClusters(Int_t n)
Definition: AliEmcalJet.h:165
virtual void Init()=0
const Double_t phimin
void SetAxisInEmcal(Bool_t b)
Definition: AliEmcalJet.h:161
static const Int_t fgkConstIndexShift
fastjet wrapper
void SetAreaEmc(Double_t a)
Definition: AliEmcalJet.h:160
void SetNumberOfNeutrals(Int_t n)
Definition: AliEmcalJet.h:168