AliPhysics  6bc8652 (6bc8652)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliJetContainer.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 
16 #include <TClonesArray.h>
17 
18 #include "AliVEvent.h"
19 #include "AliLog.h"
20 #include "AliEMCALGeometry.h"
21 #include "AliParticleContainer.h"
22 #include "AliClusterContainer.h"
23 #include "AliLocalRhoParameter.h"
24 #include "AliTLorentzVector.h"
25 
26 #include "AliJetContainer.h"
27 
31 
37  fJetAcceptanceType(0),
38  fJetRadius(0),
39  fRhoName(),
40  fLocalRhoName(),
41  fRhoMassName(),
42  fFlavourSelection(0),
43  fJetAreaCut(-1),
44  fAreaEmcCut(-1),
45  fMinClusterPt(-1),
46  fMaxClusterPt(1000),
47  fMinTrackPt(-1),
48  fMaxTrackPt(100),
49  fZLeadingEmcCut(10.),
50  fZLeadingChCut(10.),
51  fNEFMinCut(-10.),
52  fNEFMaxCut(10.),
53  fLeadingHadronType(0),
54  fNLeadingJets(1),
55  fMinNConstituents(-1),
56  fJetTrigger(0),
57  fTagStatus(-1),
58  fParticleContainer(0),
59  fClusterContainer(0),
60  fRho(0),
61  fLocalRho(0),
62  fRhoMass(0),
63  fGeom(0),
64  fRunNumber(0),
65  fTpcHolePos(0),
66  fTpcHoleWidth(0)
67 {
68  fBaseClassName = "AliEmcalJet";
69  SetClassName("AliEmcalJet");
70 }
71 
78  fJetAcceptanceType(0),
79  fJetRadius(0),
80  fRhoName(),
81  fLocalRhoName(),
82  fRhoMassName(),
83  fFlavourSelection(0),
84  fJetAreaCut(-1),
85  fAreaEmcCut(-1),
86  fMinClusterPt(-1),
87  fMaxClusterPt(1000),
88  fMinTrackPt(-1),
89  fMaxTrackPt(100),
90  fZLeadingEmcCut(10.),
91  fZLeadingChCut(10.),
92  fNEFMinCut(-10.),
93  fNEFMaxCut(10.),
94  fLeadingHadronType(0),
95  fNLeadingJets(1),
96  fMinNConstituents(-1),
97  fJetTrigger(0),
98  fTagStatus(-1),
99  fParticleContainer(0),
100  fClusterContainer(0),
101  fRho(0),
102  fLocalRho(0),
103  fRhoMass(0),
104  fGeom(0),
105  fRunNumber(0),
106  fTpcHolePos(0),
107  fTpcHoleWidth(0)
108 {
109  fBaseClassName = "AliEmcalJet";
110  SetClassName("AliEmcalJet");
111  SetMinPt(1);
112 }
113 
128  AliParticleContainer* partCont, AliClusterContainer* clusCont, TString tag):
129  AliParticleContainer(GenerateJetName(jetType, jetAlgo, recoScheme, radius, partCont, clusCont, tag)),
130  fJetAcceptanceType(0),
131  fJetRadius(radius),
132  fRhoName(),
133  fLocalRhoName(),
134  fRhoMassName(),
135  fFlavourSelection(0),
136  fJetAreaCut(-1),
137  fAreaEmcCut(-1),
138  fMinClusterPt(-1),
139  fMaxClusterPt(1000),
140  fMinTrackPt(-1),
141  fMaxTrackPt(100),
142  fZLeadingEmcCut(10.),
143  fZLeadingChCut(10.),
144  fNEFMinCut(-10.),
145  fNEFMaxCut(10.),
146  fLeadingHadronType(0),
147  fNLeadingJets(1),
148  fMinNConstituents(-1),
149  fJetTrigger(0),
150  fTagStatus(-1),
151  fParticleContainer(partCont),
152  fClusterContainer(clusCont),
153  fRho(0),
154  fLocalRho(0),
155  fRhoMass(0),
156  fGeom(0),
157  fRunNumber(0)
158 {
159  fBaseClassName = "AliEmcalJet";
160  SetClassName("AliEmcalJet");
161  SetMinPt(1);
162 }
163 
168 void AliJetContainer::SetArray(const AliVEvent *event)
169 {
170  // Set jet array
171 
172  AliEmcalContainer::SetArray(event);
173 }
174 
182 void AliJetContainer::LoadRho(const AliVEvent *event)
183 {
184  if (!fRhoName.IsNull() && !fRho) {
185  fRho = dynamic_cast<AliRhoParameter*>(event->FindListObject(fRhoName));
186  if (!fRho) {
187  AliError(Form("%s: Could not retrieve rho %s!", GetName(), fRhoName.Data()));
188  return;
189  }
190  }
191 }
192 
201 void AliJetContainer::LoadLocalRho(const AliVEvent *event)
202 {
203  if (!fLocalRhoName.IsNull() && !fLocalRho) {
204  fLocalRho = dynamic_cast<AliLocalRhoParameter*>(event->FindListObject(fLocalRhoName));
205  if (!fLocalRho) {
206  AliError(Form("%s: Could not retrieve rho %s!", GetName(), fLocalRhoName.Data()));
207  return;
208  }
209  }
210 }
211 
220 void AliJetContainer::LoadRhoMass(const AliVEvent *event)
221 {
222  if (!fRhoMassName.IsNull() && !fRhoMass) {
223  fRhoMass = dynamic_cast<AliRhoParameter*>(event->FindListObject(fRhoMassName));
224  if (!fRhoMass) {
225  AliError(Form("%s: Could not retrieve rho_mass %s!", GetName(), fRhoMassName.Data()));
226  return;
227  }
228  }
229 }
230 
238 {
239  TString option(opt);
240  option.ToLower();
241 
242  Int_t tempID = fCurrentID;
243  ResetCurrentID();
244 
245  AliEmcalJet *jetMax = GetNextAcceptJet();
246  AliEmcalJet *jet = 0;
247 
248  if (option.Contains("rho")) {
249  while ((jet = GetNextAcceptJet())) {
250  if ( (jet->Pt()-jet->Area()*GetRhoVal()) > (jetMax->Pt()-jetMax->Area()*GetRhoVal()) )
251  jetMax = jet;
252  }
253  }
254  else {
255  while ((jet = GetNextAcceptJet())) {
256  if (jet->Pt() > jetMax->Pt()) jetMax = jet;
257  }
258  }
259 
260  fCurrentID = tempID;
261 
262  return jetMax;
263 }
264 
271 {
272  if (i < 0 || i > fClArray->GetEntriesFast()) return 0;
273  AliEmcalJet *jet = static_cast<AliEmcalJet*>(fClArray->At(i));
274  return jet;
275 
276 }
277 
285 {
286  UInt_t rejectionReason = 0;
287  AliEmcalJet *jet = GetJet(i);
288  if(!AcceptJet(jet, rejectionReason)) return 0;
289 
290  return jet;
291 }
292 
300 {
301  const Int_t njets = GetNEntries();
302  AliEmcalJet *jet = 0;
303  do {
304  fCurrentID++;
305  if (fCurrentID >= njets) break;
306  jet = GetAcceptJet(fCurrentID);
307  } while (!jet);
308 
309  return jet;
310 }
311 
319 {
320  const Int_t njets = GetNEntries();
321  AliEmcalJet *jet = 0;
322  do {
323  fCurrentID++;
324  if (fCurrentID >= njets) break;
325  jet = GetJet(fCurrentID);
326  } while (!jet);
327 
328 
329  return jet;
330 }
331 
339 {
340  AliEmcalJet *jet = GetJet(i);
341  return jet->Pt() - fRho->GetVal()*jet->Area();
342 }
343 
351 {
352  AliEmcalJet *jet = GetJet(i);
353 
354  return jet->Pt() - fLocalRho->GetLocalVal(jet->Phi(), fJetRadius)*jet->Area();
355 }
356 
364 Bool_t AliJetContainer::GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet* jet, Double_t mass) const
365 {
366  Double_t p = jet->P();
367  Double_t e = TMath::Sqrt(mass*mass + p*p);
368 
369  mom.SetPtEtaPhiE(jet->Pt(), jet->Eta(), jet->Phi(), e);
370 
371  return kTRUE;
372 }
373 
381 Bool_t AliJetContainer::GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet* jet) const
382 {
383  if (jet) {
384  if (fMassHypothesis >= 0) {
385  GetMomentumFromJet(mom, jet, fMassHypothesis);
386  }
387  else {
388  jet->GetMomentum(mom);
389  }
390  return kTRUE;
391  }
392  else {
393  mom.SetPtEtaPhiM(0, 0, 0, 0);
394  return kFALSE;
395  }
396 }
397 
406 Bool_t AliJetContainer::GetMomentum(TLorentzVector &mom, Int_t i) const
407 {
408  AliEmcalJet *jet = GetJet(i);
409  return GetMomentumFromJet(mom, jet);
410 }
411 
421 {
422  AliEmcalJet *jet = GetNextJet();
423  return GetMomentumFromJet(mom, jet);
424 }
425 
435 Bool_t AliJetContainer::GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
436 {
437  AliEmcalJet *jet = GetAcceptJet(i);
438  return GetMomentumFromJet(mom, jet);
439 }
440 
450 {
451  AliEmcalJet *jet = GetNextAcceptJet();
452  return GetMomentumFromJet(mom, jet);
453 }
454 
461 Bool_t AliJetContainer::AcceptJet(const AliEmcalJet *jet, UInt_t &rejectionReason) const
462 {
463  if (fTpcHolePos>0) {
464  Bool_t s = CheckTpcHolesOverlap(jet,rejectionReason);
465  if (!s) return kFALSE;
466  }
467 
468  Bool_t r = ApplyJetCuts(jet, rejectionReason);
469  if (!r) return kFALSE;
470 
471  AliTLorentzVector mom;
472  GetMomentumFromJet(mom, jet);
473 
474  return ApplyKinematicCuts(mom, rejectionReason);
475 }
476 
483 Bool_t AliJetContainer::AcceptJet(Int_t i, UInt_t &rejectionReason) const
484 {
485  if (fTpcHolePos>0) {
486  Bool_t s = CheckTpcHolesOverlap(GetJet(i),rejectionReason);
487  if (!s) return kFALSE;
488  }
489 
490  Bool_t r = ApplyJetCuts(GetJet(i), rejectionReason);
491  if (!r) return kFALSE;
492 
493  AliTLorentzVector mom;
494  GetMomentum(mom, i);
495 
496  return ApplyKinematicCuts(mom, rejectionReason);
497 }
498 
505 Bool_t AliJetContainer::ApplyJetCuts(const AliEmcalJet *jet, UInt_t &rejectionReason) const
506 {
507  // Return true if jet is accepted.
508 
509  if (!jet) {
510  AliDebug(11,"No jet found");
511  rejectionReason |= kNullObject;
512  return kFALSE;
513  }
514 
515  if (jet->TestBits(fBitMap) != (Int_t)fBitMap) {
516  AliDebug(11,"Cut rejecting jet: Bit map");
517  rejectionReason |= kBitMapCut;
518  return kFALSE;
519  }
520 
521  if (jet->Area() <= fJetAreaCut) {
522  AliDebug(11,"Cut rejecting jet: Area");
523  rejectionReason |= kAreaCut;
524  return kFALSE;
525  }
526 
527  if (jet->AreaEmc() < fAreaEmcCut) {
528  AliDebug(11,"Cut rejecting jet: AreaEmc");
529  rejectionReason |= kAreaEmcCut;
530  return kFALSE;
531  }
532 
534  AliDebug(11,"Cut rejecting jet: ZLeading");
535  rejectionReason |= kZLeadingChCut;
536  return kFALSE;
537  }
538 
539  if (fZLeadingEmcCut < 1 && GetZLeadingEmc(jet) > fZLeadingEmcCut) {
540  AliDebug(11,"Cut rejecting jet: ZLeadEmc");
541  rejectionReason |= kZLeadingEmcCut;
542  return kFALSE;
543  }
544 
545  if (jet->NEF() < fNEFMinCut || jet->NEF() > fNEFMaxCut) {
546  AliDebug(11,"Cut rejecting jet: NEF");
547  rejectionReason |= kNEFCut;
548  return kFALSE;
549  }
550 
552  AliDebug(11,"Cut rejecting jet: minimum number of constituents");
553  rejectionReason |= kMinNConstituents;
554  return kFALSE;
555  }
556 
557  if (fLeadingHadronType == 0) {
558  if (jet->MaxTrackPt() < fMinTrackPt) {
559  AliDebug(11,"Cut rejecting jet: Bias");
560  rejectionReason |= kMinLeadPtCut;
561  return kFALSE;
562  }
563  }
564  else if (fLeadingHadronType == 1) {
565  if (jet->MaxClusterPt() < fMinClusterPt) {
566  AliDebug(11,"Cut rejecting jet: Bias");
567  rejectionReason |= kMinLeadPtCut;
568  return kFALSE;
569  }
570  }
571  else {
572  if (jet->MaxTrackPt() < fMinTrackPt && jet->MaxClusterPt() < fMinClusterPt) {
573  AliDebug(11,"Cut rejecting jet: Bias");
574  rejectionReason |= kMinLeadPtCut;
575  return kFALSE;
576  }
577  }
578 
579  if (jet->MaxTrackPt() > fMaxTrackPt) {
580  AliDebug(11,"Cut rejecting jet: MaxTrackPt");
581  rejectionReason |= kMaxTrackPtCut;
582  return kFALSE;
583 
584  }
585 
586  if (jet->MaxClusterPt() > fMaxClusterPt) {
587  AliDebug(11,"Cut rejecting jet: MaxClusPt");
588  rejectionReason |= kMaxClusterPtCut;
589  return kFALSE;
590  }
591 
593  AliDebug(11,"Cut rejecting jet: Flavour");
594  rejectionReason |= kFlavourCut;
595  return kFALSE;
596  }
597 
598  if (fTagStatus>-1 && jet->GetTagStatus()!=fTagStatus) {
599  AliDebug(11,"Cut rejecting jet: tag status");
600  rejectionReason |= kTagStatus;
601  return kFALSE;
602  }
603 
604  // If user sets acceptance selection type, compare it to jet's acceptance type, bitwise
605  if (fJetAcceptanceType != 0) {
606  UInt_t jetAccType = jet->GetJetAcceptanceType();
607  UInt_t isAccepted = jetAccType & fJetAcceptanceType;
608  if (!isAccepted)
609  return kFALSE;
610  }
611 
612  return kTRUE;
613 }
614 
623 {
624  if (fLeadingHadronType == 0) // charged leading hadron
625  return jet->MaxTrackPt();
626  else if (fLeadingHadronType == 1) // neutral leading hadron
627  return jet->MaxClusterPt();
628  else // charged or neutral
629  return jet->MaxPartPt();
630 }
631 
638 void AliJetContainer::GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
639 {
640  Double_t maxClusterPt = 0;
641  Double_t maxClusterEta = 0;
642  Double_t maxClusterPhi = 0;
643 
644  Double_t maxTrackPt = 0;
645  Double_t maxTrackEta = 0;
646  Double_t maxTrackPhi = 0;
647 
648  if (fClusterContainer && fClusterContainer->GetArray() && (fLeadingHadronType == 1 || fLeadingHadronType == 2)) {
649  AliVCluster *cluster = jet->GetLeadingCluster(fClusterContainer->GetArray());
650  if (cluster) {
651  TLorentzVector nPart;
652  cluster->GetMomentum(nPart, const_cast<Double_t*>(fVertex));
653 
654  maxClusterEta = nPart.Eta();
655  maxClusterPhi = nPart.Phi();
656  maxClusterPt = nPart.Pt();
657  }
658  }
659 
660  if (fParticleContainer && fParticleContainer->GetArray() && (fLeadingHadronType == 0 || fLeadingHadronType == 2)) {
661  AliVParticle *track = jet->GetLeadingTrack(fParticleContainer->GetArray());
662  if (track) {
663  maxTrackEta = track->Eta();
664  maxTrackPhi = track->Phi();
665  maxTrackPt = track->Pt();
666  }
667  }
668 
669  if (maxTrackPt > maxClusterPt)
670  mom.SetPtEtaPhiM(maxTrackPt,maxTrackEta,maxTrackPhi,0.139);
671  else
672  mom.SetPtEtaPhiM(maxClusterPt,maxClusterEta,maxClusterPhi,0.139);
673 }
674 
682 {
683  if (fClusterContainer && fClusterContainer->GetArray()) {
684  TLorentzVector mom;
685 
686  AliVCluster *cluster = jet->GetLeadingCluster(fClusterContainer->GetArray());
687  if (cluster) {
688  cluster->GetMomentum(mom, fVertex);
689 
690  return GetZ(jet,mom);
691  }
692  else {
693  return -1;
694  }
695  }
696  else {
697  return -1;
698  }
699 }
700 
708 {
709 
710  if (fParticleContainer && fParticleContainer->GetArray() ) {
711  TLorentzVector mom;
712 
713  AliVParticle *track = jet->GetLeadingTrack(fParticleContainer->GetArray());
714  if (track) {
715  mom.SetPtEtaPhiM(track->Pt(),track->Eta(),track->Phi(),0.139);
716 
717  return GetZ(jet,mom);
718  }
719  else {
720  return -1;
721  }
722  }
723  else {
724  return -1;
725  }
726 }
727 
735 Double_t AliJetContainer::GetZ(const AliEmcalJet *jet, const TLorentzVector& mom) const
736 {
737  Double_t pJetSq = jet->Px()*jet->Px() + jet->Py()*jet->Py() + jet->Pz()*jet->Pz();
738 
739  if (pJetSq < 1e-6) {
740  AliWarning(Form("%s: strange, pjet*pjet seems to be zero pJetSq: %.3f",GetName(), pJetSq));
741  return 0;
742  }
743 
744  Double_t z = (mom.Px()*jet->Px() + mom.Py()*jet->Py() + mom.Pz()*jet->Pz()) / pJetSq;
745 
746  if (z < 0) {
747  AliWarning(Form("%s: z = %.3ff < 0, returning 0...",GetName(), z));
748  z = 0;
749  }
750 
751  return z;
752 }
753 
758 {
759  TString arrName = GetArrayName();
760  Printf("Print jet cuts for %s",arrName.Data());
761  Printf("PtBiasJetTrack: %f",fMinTrackPt);
762  Printf("PtBiasJetClus: %f",fMinClusterPt);
763  Printf("JetPtCut: %f", fMinPt);
764  Printf("JetPtCutMax: %f", fMaxPt);
765  Printf("JetAreaCut: %f",fJetAreaCut);
766  Printf("AreaEmcCut: %f",fAreaEmcCut);
767  Printf("JetMinEta: %f", fMinEta);
768  Printf("JetMaxEta: %f", fMaxEta);
769  Printf("JetMinPhi: %f", fMinPhi);
770  Printf("JetMaxPhi: %f", fMaxPhi);
771  Printf("MaxClusterPt: %f",fMaxClusterPt);
772  Printf("MaxTrackPt: %f",fMaxTrackPt);
773  Printf("LeadingHadronType: %d",fLeadingHadronType);
774  Printf("ZLeadingEmcCut: %f",fZLeadingEmcCut);
775  Printf("ZLeadingChCut: %f",fZLeadingChCut);
776 }
777 
782 {
783  fMinTrackPt = 0;
784  fMinClusterPt = 0;
785  fMinPt = 0;
786  fJetAreaCut = -1;
787  fAreaEmcCut = -1;
788  fMinEta = -0.9;
789  fMaxEta = 0.9;
790  fMinPhi = 0;
791  fMaxPhi = 10;
792  fMaxClusterPt = 1000;
793  fMaxTrackPt = 100;
794  fLeadingHadronType = 0;
795  fZLeadingEmcCut = 10.;
796  fZLeadingChCut = 10.;
797 }
798 
804 {
805  return accepted().GetEntries();
806 }
807 
818 {
819  AliEmcalJet *jet2 = jet1->ClosestJet();
820  if (!jet2) return -1;
821 
822  Double_t jetPt2 = jet2->Pt();
823  if (jetPt2 <= 0) return -1;
824 
825  Int_t bgeom = kTRUE;
826  if (!cont2) bgeom = kFALSE;
827  Double_t sumPt = 0.;
828  AliVParticle *vpf = 0x0;
829  Int_t iFound = 0;
830  for (Int_t icc = 0; icc < jet2->GetNumberOfTracks(); icc++) {
831  Int_t idx = (Int_t)jet2->TrackAt(icc);
832  //get particle
833  AliVParticle *p2 = 0x0;
834  if (bgeom) p2 = static_cast<AliVParticle*>(jet2->TrackAt(icc, cont2->GetArray()));
835  iFound = 0;
836  for (Int_t icf = 0; icf < jet1->GetNumberOfTracks(); icf++) {
837  if (!bgeom && idx == jet1->TrackAt(icf) && iFound == 0 ) {
838  iFound = 1;
839  vpf = static_cast<AliVParticle*>(jet1->TrackAt(icf, fParticleContainer->GetArray()));
840  if (vpf) sumPt += vpf->Pt();
841  continue;
842  }
843  if (bgeom){
844  vpf = static_cast<AliVParticle*>(jet1->TrackAt(icf, fParticleContainer->GetArray()));
845  if (!vpf) continue;
846  if (!SamePart(vpf, p2, 1.e-4)) continue; //not the same particle
847  sumPt += vpf->Pt();
848  }
849  }
850  }
851 
852  Double_t fraction = sumPt / jetPt2;
853 
854  return fraction;
855 }
856 
869 {
870  TString algoString;
871  switch (jetAlgo)
872  {
873  case kt_algorithm:
874  algoString = "KT";
875  break;
876  case antikt_algorithm:
877  algoString = "AKT";
878  break;
879  default:
880  ::Warning("AliJetContainer::GenerateJetName", "Unknown jet finding algorithm '%d'!", jetAlgo);
881  algoString = "";
882  }
883 
884  TString typeString;
885  switch (jetType) {
886  case kFullJet:
887  typeString = "Full";
888  break;
889  case kChargedJet:
890  typeString = "Charged";
891  break;
892  case kNeutralJet:
893  typeString = "Neutral";
894  break;
895  }
896 
897  TString radiusString = TString::Format("R%03.0f", radius*100.0);
898 
899  TString trackString;
900  if (jetType != kNeutralJet && partCont) {
901  trackString = "_" + TString(partCont->GetTitle());
902  }
903 
904  TString clusterString;
905  if (jetType != kChargedJet && clusCont) {
906  clusterString = "_" + TString(clusCont->GetTitle());
907  }
908 
909  TString recombSchemeString;
910  switch (recoScheme) {
911  case E_scheme:
912  recombSchemeString = "E_scheme";
913  break;
914  case pt_scheme:
915  recombSchemeString = "pt_scheme";
916  break;
917  case pt2_scheme:
918  recombSchemeString = "pt2_scheme";
919  break;
920  case Et_scheme:
921  recombSchemeString = "Et_scheme";
922  break;
923  case Et2_scheme:
924  recombSchemeString = "Et2_scheme";
925  break;
926  case BIpt_scheme:
927  recombSchemeString = "BIpt_scheme";
928  break;
929  case BIpt2_scheme:
930  recombSchemeString = "BIpt2_scheme";
931  break;
932  case external_scheme:
933  recombSchemeString = "ext_scheme";
934  break;
935  default:
936  ::Error("AliJetContainer::GenerateJetName", "Recombination %d scheme not recognized.", recoScheme);
937  }
938 
939  TString name = TString::Format("%s_%s%s%s%s%s_%s",
940  tag.Data(), algoString.Data(), typeString.Data(), radiusString.Data(), trackString.Data(), clusterString.Data(), recombSchemeString.Data());
941 
942  return name;
943 }
944 
951  return AliJetIterableContainer(this, false);
952 }
953 
960  return AliJetIterableContainer(this, true);
961 }
962 
969  return AliJetIterableMomentumContainer(this, false);
970 }
971 
978  return AliJetIterableMomentumContainer(this, true);
979 }
980 
986 const char* AliJetContainer::GetTitle() const
987 {
988  static TString jetString;
989 
990  if (GetMinPt() == 0) {
991  jetString = TString::Format("_%s_pT0000", GetArrayName().Data());
992  }
993  else if (GetMinPt() < 1.0) {
994  jetString = TString::Format("_%s_pT0%3.0f", GetArrayName().Data(), GetMinPt()*1000.0);
995  }
996  else {
997  jetString = TString::Format("_%s_pT%4.0f", GetArrayName().Data(), GetMinPt()*1000.0);
998  }
999 
1000  return jetString.Data();
1001 }
1002 
1009 {
1010  if (!jet) {
1011  AliDebug(11,"No jet found");
1012  rejectionReason |= kNullObject;
1013  return kFALSE;
1014  }
1015 
1016  Double_t disthole = RelativePhi(jet->Phi(), fTpcHolePos);
1017  if (TMath::Abs(disthole) < (fTpcHoleWidth + fJetRadius)){
1018  AliDebug(11,"Jet overlaps with TPC hole");
1019  rejectionReason |= kOverlapTpcHole;
1020  return kFALSE;
1021  }
1022 
1023  return kTRUE;
1024 }
Double_t AreaEmc() const
Definition: AliEmcalJet.h:122
Double_t Area() const
Definition: AliEmcalJet.h:117
const char * GetTitle() const
Float_t fMinTrackPt
maximum cluster constituent pt to accept the jet
Float_t fJetAreaCut
selection on jet flavour
Double_t GetRhoVal() const
Float_t fJetRadius
Jet acceptance type cut, see AliEmcalJet::JetAcceptanceType.
double Double_t
Definition: External.C:58
void LoadRho(const AliVEvent *event)
AliEmcalJet * ClosestJet() const
Definition: AliEmcalJet.h:213
AliRhoParameter * fRhoMass
! event rho mass for these jets
Int_t GetTagStatus() const
Definition: AliEmcalJet.h:224
virtual Bool_t ApplyJetCuts(const AliEmcalJet *clus, UInt_t &rejectionReason) const
Double_t Eta() const
Definition: AliEmcalJet.h:108
const char * GetTitle() const
AliRhoParameter * fRho
cluster container (jet constituents)
Double_t Py() const
Definition: AliEmcalJet.h:94
Double_t Phi() const
Definition: AliEmcalJet.h:104
Double_t mass
Double_t GetLocalVal(Double_t phi, Double_t r, Double_t n) const
Declaration of class AliTLorentzVector.
Float_t fNEFMinCut
maximum z,leading charged
Double_t GetJetPtCorrLocal(Int_t i) const
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
void LoadRhoMass(const AliVEvent *event)
AliParticleContainer * fParticleContainer
jet tag status
virtual Bool_t CheckTpcHolesOverlap(const AliEmcalJet *clus, UInt_t &rejectionReason) const
Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const
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:127
Container for particles within the EMCAL framework.
const AliJetIterableMomentumContainer all_momentum() const
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:126
AliLocalRhoParameter * fLocalRho
! event local rho for these jets
Double_t Px() const
Definition: AliEmcalJet.h:93
Float_t fAreaEmcCut
cut on jet area
void GetMomentum(TLorentzVector &vec) const
Int_t fLeadingHadronType
maximum NEF in a jet
Double_t fTpcHoleWidth
position(in radians) of the malfunctioning TPC sector
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
const AliJetIterableMomentumContainer accepted_momentum() const
int Int_t
Definition: External.C:63
AliVParticle * GetLeadingTrack(TClonesArray *tracks) const
unsigned int UInt_t
Definition: External.C:33
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
UInt_t GetJetAcceptanceType() const
Definition: AliEmcalJet.h:253
Float_t fMaxClusterPt
maximum cluster constituent pt to accept the jet
Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
const char * GetTitle() const
Float_t fMinClusterPt
minimum cut on jet emcal area
Double_t MaxTrackPt() const
Definition: AliEmcalJet.h:142
AliVCluster * GetLeadingCluster(TClonesArray *clusters) const
TString fLocalRhoName
Name of rho object.
Float_t fZLeadingChCut
maximum z,leading neutral
AliEmcalJet * GetNextAcceptJet()
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)
Double_t Pt() const
Definition: AliEmcalJet.h:96
AliEmcalJet * GetNextJet()
Double_t P() const
Definition: AliEmcalJet.h:97
TString fRhoMassName
Name of local rho object.
Double_t GetZLeadingCharged(const AliEmcalJet *jet) const
Short_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:147
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
Bool_t TestFlavourTag(Int_t tag) const
Definition: AliEmcalJet.h:239
EMCALIterableContainer::AliEmcalIterableContainerT< AliEmcalJet, EMCALIterableContainer::operator_star_object< AliEmcalJet > > AliJetIterableContainer
void SetArray(const AliVEvent *event)
void LoadLocalRho(const AliVEvent *event)
Int_t fTagStatus
jet trigger
EMCALIterableContainer::AliEmcalIterableContainerT< AliEmcalJet, EMCALIterableContainer::operator_star_pair< AliEmcalJet > > AliJetIterableMomentumContainer
Float_t fZLeadingEmcCut
maximum track constituent pt to accept the jet
AliEmcalJet * GetAcceptJet(Int_t i) const
Double_t MaxClusterPt() const
Definition: AliEmcalJet.h:141
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
Double_t GetZLeadingEmc(const AliEmcalJet *jet) const
Double_t Pz() const
Definition: AliEmcalJet.h:95
Float_t fMaxTrackPt
maximum track constituent pt to accept the jet
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector &mom, UInt_t &rejectionReason) const
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Float_t fNEFMaxCut
minimum NEF in a jet
Double_t NEF() const
Definition: AliEmcalJet.h:135
Bool_t GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet *jet, Double_t mass) const
AliClusterContainer * fClusterContainer
particle container (jet constituents)
Bool_t GetNextMomentum(TLorentzVector &mom)
Container structure for EMCAL clusters.
Int_t fMinNConstituents
how many jets are to be considered the leading jet(s)
Double_t MaxPartPt() const
Definition: AliEmcalJet.h:143
Container for jet within the EMCAL jet framework.
Double_t GetZ(const AliEmcalJet *jet, const TLorentzVector &mom) const
TString fRhoName
jet radius
AliEmcalJet * GetJet(Int_t i) const
const AliJetIterableContainer all() const
Double_t GetJetPtCorr(Int_t i) const
Int_t fFlavourSelection
Name of rho mass object.