30 #include <TClonesArray.h> 35 #include <THnSparse.h> 40 #include <AliVCluster.h> 41 #include <AliVParticle.h> 44 #include "AliAnalysisManager.h" 45 #include <AliVEventHandler.h> 52 #include "AliEMCALGeometry.h" 53 #include "AliOADBContainer.h" 55 #include "AliEMCALTriggerPatchInfo.h" 57 #include "AliMCEvent.h" 70 fPlotJetHistograms(kFALSE),
71 fPlotClusterHistograms(kFALSE),
72 fPlotParticleCompositionHistograms(kFALSE),
73 fComputeBackground(kFALSE),
74 fDoTriggerSimulation(kFALSE),
75 fPlotMatchedJetHistograms(kFALSE),
76 fComputeMBDownscaling(kFALSE),
88 fTrackMatchingDeltaEtaMax(0.015),
89 fTrackMatchingDeltaPhiMax(0.030),
95 fUseAliEventCuts(kTRUE),
98 fUseManualEventCuts(kFALSE),
242 if (embeddingHelper) {
251 while ((obj = next())) {
271 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
274 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
275 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
281 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
282 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
291 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtEMCal", jets->GetArrayName().Data());
292 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF";
293 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
295 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtDCal", jets->GetArrayName().Data());
296 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF";
297 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
301 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
302 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
303 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 2, -0.5, 1.5,
"s");
307 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
308 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
312 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
313 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
317 nbinsx = 20; minx = 0; maxx = 100;
319 nbinsz = 50; minz = 0; maxz = 1.;
321 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPtEMCal", jets->GetArrayName().Data());
322 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading}";
323 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
325 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPtDCal", jets->GetArrayName().Data());
326 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading}";
327 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
330 nbinsx = 20; minx = 0; maxx = 100;
332 nbinsz = 50; minz = 0; maxz = 1.;
334 histname = TString::Format(
"%s/JetHistograms/hZVsPtEMCal", jets->GetArrayName().Data());
335 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}";
336 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
338 histname = TString::Format(
"%s/JetHistograms/hZVsPtDCal", jets->GetArrayName().Data());
339 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}";
340 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
343 nbinsx = 20; minx = 0; maxx = 100;
345 nbinsz = 50; minz = 0; maxz =
fMaxPt;
347 histname = TString::Format(
"%s/JetHistograms/hNConstVsPtEMCal", jets->GetArrayName().Data());
348 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents";
349 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
351 histname = TString::Format(
"%s/JetHistograms/hNConstVsPtDCal", jets->GetArrayName().Data());
352 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents";
353 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
356 nbinsx = 20; minx = 0; maxx = 100;
360 histname = TString::Format(
"%s/JetHistograms/hDeltaEHadCorr", jets->GetArrayName().Data());
361 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#sum#it{E}_{nonlincorr} - #it{E}_{hadcorr}";
362 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
366 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
367 title = histname +
";#it{E}_{patch,med};type;#it{p}_{T}^{corr} (GeV/#it{c});Centrality (%)";
378 histname =
"Trigger/hMBDownscaleFactor";
379 title = histname +
";Downscale factor;counts";
393 const Int_t nRcorrBins = 50;
395 const Int_t nCellBins = 30;
397 const Int_t nMatchedTrackBins = 5;
399 const Int_t nDeltaEtaBins = 60;
406 histname =
"ClusterHistograms/hM02";
407 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); M02";
411 histname =
"ClusterHistograms/hNcellsM02G04";
412 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); Ncells";
415 histname =
"ClusterHistograms/hNcellsM02L04";
416 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); Ncells";
423 histname =
"ClusterHistograms/hMatchedTrackPt";
424 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); #Sigma#it{p}_{track} (GeV/c)";
427 histname =
"ClusterHistograms/hMatchedTrackPtM02G04";
428 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); #Sigma#it{p}_{track} (GeV/c)";
431 histname =
"ClusterHistograms/hMatchedTrackPtM02L04";
432 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); #Sigma#it{p}_{track} (GeV/c)";
436 histname =
"ClusterHistograms/hMatchedTrackN";
437 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); N_{tracks}";
440 histname =
"ClusterHistograms/hMatchedTrackNM02G04";
441 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); N_{tracks}";
444 histname =
"ClusterHistograms/hMatchedTrackNM02L04";
445 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); N_{tracks}";
449 histname =
"ClusterHistograms/hM02Matched";
450 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); M02";
454 histname =
"ClusterHistograms/hM02Unmatched";
455 htitle = histname +
";Centrality (%);#it{E}_{clus} (GeV); M02";
459 histname =
"ClusterHistograms/hDeltaEtaCentral";
460 htitle = histname +
";#eta_{track} - #eta_{clus};#it{E}_{clus} (GeV); M02";
463 histname =
"ClusterHistograms/hDeltaEtaPeripheral";
464 htitle = histname +
";#eta_{track} - #eta_{clus};#it{E}_{clus} (GeV); M02";
471 histname =
"ClusterHistograms/hEoverPM02Central";
472 htitle = histname +
";#it{E}_{clus} (GeV); #it{E}_{clus} / #Sigma#it{p}_{track} (GeV); M02";
475 histname =
"ClusterHistograms/hEoverPM02Peripheral";
476 htitle = histname +
";#it{E}_{clus} (GeV); #it{E}_{clus} / #Sigma#it{p}_{track} (GeV); M02";
483 histname =
"ClusterHistograms/hRcorrVsCent";
484 htitle = histname +
";Centrality (%);#Sigma#it{p}_{track} (GeV); R_{corr} = #frac{#DeltaE_{clus}}{#Sigmap_{track}}";
488 histname =
"ClusterHistograms/hRcorr0-10";
489 htitle = histname +
";#it{E}_{clus} (GeV);#Sigma#it{p}_{track} (GeV); R_{corr} = #frac{#DeltaE_{clus}}{#Sigmap_{track}}";
493 histname =
"ClusterHistograms/hRcorr50-90";
494 htitle = histname +
";#it{E}_{clus} (GeV);#Sigma#it{p}_{track} (GeV); R_{corr} = #frac{#DeltaE_{clus}}{#Sigmap_{track}}";
498 histname =
"ClusterHistograms/hRcorrClusVsCent";
499 htitle = histname +
";Centrality (%);#Sigma#it{p}_{track} (GeV); #frac{#DeltaE_{clus}}{E_{clus}}";
503 histname =
"ClusterHistograms/hRcorrClus0-10";
504 htitle = histname +
";#it{E}_{clus} (GeV);#Sigma#it{p}_{track} (GeV); #frac{#DeltaE_{clus}}{E_{clus}}";
508 histname =
"ClusterHistograms/hRcorrClus50-90";
509 htitle = histname +
";#it{E}_{clus} (GeV);#Sigma#it{p}_{track} (GeV); #frac{#DeltaE_{clus}}{E_{clus}}";
513 histname =
"ClusterHistograms/hTrackMultiplicity";
514 htitle = histname +
";N_{tracks};Centrality (%)";
527 const Int_t nRejBins = 32;
530 const Int_t nContributorTypes = 11;
532 const Int_t nParticleTypes = 17;
535 AliEmcalContainer* cont = 0;
537 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
539 histname =
"ClusterHistogramsMC/hClusterRejectionReasonMC";
540 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
546 histname =
"ClusterHistogramsMC/hM02VsParticleTypeCentral";
547 htitle = histname +
";M02;#it{E}_{clus} (GeV); Particle type";
551 histname =
"ClusterHistogramsMC/hM02VsParticleTypePeripheral";
552 htitle = histname +
";M02;#it{E}_{clus} (GeV); Particle type";
557 histname =
"ClusterHistogramsMC/hPhotonHadronPhotonEnergy";
558 htitle = histname +
";Centrality (%);M02;#it{E}_{photon} (GeV)";
562 histname =
"ClusterHistogramsMC/hHadronPhotonHadronEnergy";
563 htitle = histname +
";Centrality (%);M02;#it{E}_{hadron} (GeV)";
579 min[dim] = fM02HistBins[0];
583 title[dim] =
"#it{E}_{clus} (GeV)";
586 min[dim] = fPtHistBins[0];
590 title[dim] =
"Contributor type";
591 nbins[dim] = nContributorTypes;
594 binEdges[dim] = contributorTypeBins;
597 title[dim] =
"#it{p}_{T,jet}^{corr}";
604 TString thnname =
"JetPerformanceMC/hM02VsContributorTypeJets";
606 for (
Int_t i = 0; i < dim; i++) {
607 hn->GetAxis(i)->SetTitle(title[i]);
608 hn->SetBinEdges(i, binEdges[i]);
615 title[dim] =
"#it{p}_{T,jet}^{corr}";
622 title[dim] =
"Contributor type";
623 nbins[dim] = nContributorTypes;
626 binEdges[dim] = contributorTypeBins;
636 title[dim] =
"#it{p}_{T,sum} (GeV)";
639 min[dim] = fPtHistBins[0];
643 thnname =
"JetPerformanceMC/hJetComposition";
645 for (
Int_t i = 0; i < dim; i++) {
646 thn->GetAxis(i)->SetTitle(title[i]);
647 thn->SetBinEdges(i, binEdges[i]);
653 histname =
"JetPerformance/hHadCaloEnergyUnmatched";
654 htitle = histname +
";#it{p}_{T,jet} (GeV);#it{p}_{T,had} (GeV)";
658 histname =
"JetPerformance/hHadCaloEnergyMatchedNonlincorr";
659 htitle = histname +
";#it{p}_{T,jet} (GeV);#it{p}_{T,had} (GeV)";
663 histname =
"JetPerformance/hHadCaloEnergyMatchedHadCorr";
664 htitle = histname +
";#it{p}_{T,jet} (GeV);#it{p}_{T,had} (GeV)";
676 axis->SetBinLabel(1,
"SinglePhoton");
677 axis->SetBinLabel(2,
"SingleElectron");
678 axis->SetBinLabel(3,
"SingleChargedPion");
679 axis->SetBinLabel(4,
"SingleProton");
680 axis->SetBinLabel(5,
"SingleAntiProton");
681 axis->SetBinLabel(6,
"SingleChargedKaon");
682 axis->SetBinLabel(7,
"SingleK0L");
683 axis->SetBinLabel(8,
"SingleNeutron");
684 axis->SetBinLabel(9,
"SingleAntiNeutron");
685 axis->SetBinLabel(10,
"SingleOther");
686 axis->SetBinLabel(11,
"PhotonHadron");
687 axis->SetBinLabel(12,
"HadronPhoton");
688 axis->SetBinLabel(13,
"MergedPi0");
689 axis->SetBinLabel(14,
"PhotonPhotonOther");
690 axis->SetBinLabel(15,
"HadronHadron");
691 axis->SetBinLabel(16,
"TwoContributorsOther");
692 axis->SetBinLabel(17,
"MoreThanTwoContributors");
706 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
709 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
710 title = histname +
";Centrality;Scale factor;counts";
713 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
714 title = histname +
";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
717 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCalFid", jets->GetArrayName().Data());
718 title = histname +
";Centrality;Scale factor;counts";
722 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorDCal", jets->GetArrayName().Data());
723 title = histname +
";Centrality;Scale factor;counts";
726 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtDCal", jets->GetArrayName().Data());
727 title = histname +
";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
730 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorDCalFid", jets->GetArrayName().Data());
731 title = histname +
";Centrality;Scale factor;counts";
751 histname =
"TriggerSimHistograms/hEtaVsPhi";
752 title = histname +
";#eta_{patch} (rad);#phi_{patch} (rad)";
756 histname =
"TriggerSimHistograms/hNPatches";
757 title = histname +
";#it{N}_{patches};type";
761 histname =
"TriggerSimHistograms/hPatchE";
762 title = histname +
";Centrality (%);#it{E}_{patch} (GeV)";
766 histname =
"TriggerSimHistograms/hPatchMedianE";
767 title = histname +
";Centrality (%);#it{E}_{patch,med} (GeV);type";
768 fHistManager.
CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
774 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
777 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
778 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
784 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
785 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
794 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtEMCal", jets->GetArrayName().Data());
795 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF";
796 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
798 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtDCal", jets->GetArrayName().Data());
799 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF";
800 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
803 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
804 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
808 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
809 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
813 nbinsx = 20; minx = 0; maxx = 100;
815 nbinsz = 50; minz = 0; maxz = 1.;
817 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPtEMCal", jets->GetArrayName().Data());
818 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading}";
819 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
821 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPtDCal", jets->GetArrayName().Data());
822 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading}";
823 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
826 nbinsx = 20; minx = 0; maxx = 100;
828 nbinsz = 50; minz = 0; maxz = 1.;
830 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPtEMCal", jets->GetArrayName().Data());
831 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}";
832 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
834 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPtDCal", jets->GetArrayName().Data());
835 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}";
836 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
839 nbinsx = 20; minx = 0; maxx = 100;
841 nbinsz = 50; minz = 0; maxz =
fMaxPt;
843 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPtEMCal", jets->GetArrayName().Data());
844 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents";
845 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
847 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPtDCal", jets->GetArrayName().Data());
848 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents";
849 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
869 histname =
"MatchedJetHistograms/hResponseMatrixEMCal";
870 title = histname +
";Centrality (%);#it{p}_{T}^{truth} (GeV/#it{c});#it{p}_{T,corr}^{det} (GeV/#it{c})";
871 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
873 histname =
"MatchedJetHistograms/hResponseMatrixDCal";
874 title = histname +
";Centrality (%);#it{p}_{T}^{truth} (GeV/#it{c});#it{p}_{T,corr}^{det} (GeV/#it{c})";
875 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
878 nbinsx = 20; minx = 0; maxx = 100;
880 nbinsz = 250; minz = -5.; maxz = 5.;
882 histname =
"MatchedJetHistograms/hJESshiftEMCal";
883 title = histname +
";Centrality (%);#it{p}_{T}^{truth} (GeV/#it{c});#frac{#it{p}_{T,corr}^{det} - #it{p}_{T}^{truth}}{#it{p}_{T}^{truth}}";
884 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
886 histname =
"MatchedJetHistograms/hJESshiftDCal";
887 title = histname +
";Centrality (%);#it{p}_{T}^{truth} (GeV/#it{c});#frac{#it{p}_{T,corr}^{det} - #it{p}_{T}^{truth}}{#it{p}_{T}^{truth}}";
888 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
891 nbinsx = 20; minx = 0; maxx = 100;
893 nbinsz = 50; minz = 0; maxz = 1.;
895 histname =
"MatchedJetHistograms/hNEFVsPt";
896 title = histname +
";Centrality (%);#it{p}_{T,corr}^{det} (GeV/#it{c});Calo energy fraction";
897 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
900 nbinsx = 20; minx = 0; maxx = 100;
902 nbinsz = 50; minz = 0; maxz = 1.;
904 histname =
"MatchedJetHistograms/hZLeadingVsPt";
905 title = histname +
";Centrality (%);#it{p}_{T,corr}^{det} (GeV/#it{c});#it{z}_{leading}";
906 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
909 nbinsx = 20; minx = 0; maxx = 100;
911 nbinsz = 50; minz = 0; maxz = 1.;
913 histname =
"MatchedJetHistograms/hMatchingDistance";
914 title = histname +
";Centrality (%);#it{p}_{T}^{truth} (GeV/#it{c});R";
915 fHistManager.
CreateTH3(histname.Data(), title.Data(),
nbinsx, minx, maxx,
nbinsy, miny, maxy, nbinsz, minz, maxz);
940 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
941 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
942 GetName(), cls.GetName(),
"EmcalTriggers"));
947 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
967 TString triggerNameMB1 =
"CINT7-B-NOPF-CENT";
968 TString triggerNameMB2 =
"CV0L7-B-NOPF-CENT";
969 TString triggerNameJE =
"CINT7EJ1-B-NOPF-CENTNOPMD";
974 for (
auto i : runtriggers) {
975 if (i.EqualTo(triggerNameMB1) || i.EqualTo(triggerNameMB2)) {
984 TString histname =
"Trigger/hMBDownscaleFactor";
1021 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
1022 TString jetContName = jetCont->GetName();
1057 TClass cls(objname);
1058 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1059 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1060 GetName(), cls.GetName(),
"EmcalTriggers"));
1065 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1070 std::vector<Double_t> vecEMCal;
1071 std::vector<Double_t> vecDCal;
1073 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1076 if(!recpatch->IsJetHighSimple())
continue;
1078 histname =
"TriggerSimHistograms/hEtaVsPhi";
1081 histname =
"TriggerSimHistograms/hPatchE";
1084 if (recpatch->IsEMCal()) {
1085 vecEMCal.push_back(recpatch->GetPatchE());
1087 vecDCal.push_back(recpatch->GetPatchE());
1094 const Int_t nBkgPatchesEMCal = vecEMCal.size();
1095 const Int_t nBkgPatchesDCal = vecDCal.size();
1096 fMedianEMCal = TMath::Median(nBkgPatchesEMCal, &vecEMCal[0]);
1097 fMedianDCal = TMath::Median(nBkgPatchesDCal, &vecDCal[0]);
1099 histname =
"TriggerSimHistograms/hPatchMedianE";
1103 histname =
"TriggerSimHistograms/hNPatches";
1111 for(
auto p : *fTriggerPatchInfo){
1112 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1115 if(!recpatch->IsJetHighSimple())
continue;
1117 if (recpatch->IsEMCal()) {
1118 if ((recpatch->GetPatchE() -
fMedianDCal) > threshold) {
1123 if ((recpatch->GetPatchE() -
fMedianEMCal) > threshold) {
1171 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1172 TString jetContName = jets->GetName();
1177 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
1181 for (
auto jet : jets->
all()) {
1187 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
1192 UInt_t rejectionReason = 0;
1193 if (!jets->
AcceptJet(jet, rejectionReason)) {
1194 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1195 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1207 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtEMCal", jets->GetArrayName().Data());
1209 else if (type ==
kDCal) {
1210 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtDCal", jets->GetArrayName().Data());
1216 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
1221 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1226 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPtEMCal", jets->GetArrayName().Data());
1228 else if (type ==
kDCal) {
1229 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPtDCal", jets->GetArrayName().Data());
1231 TLorentzVector leadPart;
1234 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
1239 histname = TString::Format(
"%s/JetHistograms/hZVsPtEMCal", jets->GetArrayName().Data());
1241 else if (type ==
kDCal) {
1242 histname = TString::Format(
"%s/JetHistograms/hZVsPtDCal", jets->GetArrayName().Data());
1244 const AliVTrack* track;
1245 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
1246 track =
static_cast<AliVTrack*
>(jet->Track(i));
1247 z = track->Pt() / TMath::Abs(corrPt);
1253 histname = TString::Format(
"%s/JetHistograms/hNConstVsPtEMCal", jets->GetArrayName().Data());
1255 else if (type ==
kDCal) {
1256 histname = TString::Format(
"%s/JetHistograms/hNConstVsPtDCal", jets->GetArrayName().Data());
1262 const AliVCluster* clus =
nullptr;
1263 Int_t nClusters = jet->GetNumberOfClusters();
1264 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1265 clus = jet->Cluster(iClus);
1266 deltaEhadcorr += (clus->GetNonLinCorrEnergy() - clus->GetHadCorrEnergy());
1269 histname = TString::Format(
"%s/JetHistograms/hDeltaEHadCorr", jets->GetArrayName().Data());
1275 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
1296 const AliVCluster* clus;
1300 Double_t clusPhi = it.first.Phi_0_2pi();
1304 if (!clus->IsEMCAL()) {
1310 Int_t nTracksMatched = 0;
1311 const AliVTrack* track =
nullptr;
1312 for (
Int_t itrack=0; itrack < clus->GetNTracksMatched(); itrack++) {
1313 track =
dynamic_cast<AliVTrack*
>(clus->GetTrackMatched(itrack));
1318 Double_t trackPhi = TVector2::Phi_0_2pi(track->GetTrackPhiOnEMCal());
1319 Double_t trackEta = track->GetTrackEtaOnEMCal();
1320 Double_t deta = TMath::Abs(clusEta - trackEta);
1321 Double_t dphi = TMath::Abs(clusPhi - trackPhi);
1324 trackPSum += track->P();
1330 if (trackPSum > 1e-3) {
1331 EoverP = clus->GetNonLinCorrEnergy() / trackPSum;
1334 Double_t deltaE = clus->GetNonLinCorrEnergy() - clus->GetHadCorrEnergy();
1336 if (trackPSum > 1e-3) {
1337 Rcorr = deltaE / trackPSum;
1339 Double_t RcorrClus = deltaE / clus->GetNonLinCorrEnergy();
1345 histname =
"ClusterHistograms/hM02";
1349 if (clus->GetM02() > 0.4) {
1350 histname =
"ClusterHistograms/hNcellsM02G04";
1353 if (clus->GetM02() > 0.1 && clus->GetM02() < 0.4) {
1354 histname =
"ClusterHistograms/hNcellsM02L04";
1362 histname =
"ClusterHistograms/hMatchedTrackPt";
1365 if (clus->GetM02() > 0.4) {
1366 histname =
"ClusterHistograms/hMatchedTrackPtM02G04";
1369 if (clus->GetM02() > 0.1 && clus->GetM02() < 0.4) {
1370 histname =
"ClusterHistograms/hMatchedTrackPtM02L04";
1375 histname =
"ClusterHistograms/hMatchedTrackN";
1378 if (clus->GetM02() > 0.4) {
1379 histname =
"ClusterHistograms/hMatchedTrackNM02G04";
1382 if (clus->GetM02() > 0.1 && clus->GetM02() < 0.4) {
1383 histname =
"ClusterHistograms/hMatchedTrackNM02L04";
1388 histname =
"ClusterHistograms/hM02Matched";
1389 if (nTracksMatched > 0) {
1394 histname =
"ClusterHistograms/hM02Unmatched";
1395 if (nTracksMatched == 0) {
1400 if (nTracksMatched == 1) {
1402 const AliVTrack* track =
dynamic_cast<AliVTrack*
>(clus->GetTrackMatched(0));
1404 Double_t trackEta = track->GetTrackEtaOnEMCal();
1405 Double_t deta = trackEta - clusEta;
1408 histname =
"ClusterHistograms/hDeltaEtaCentral";
1413 histname =
"ClusterHistograms/hDeltaEtaPeripheral";
1424 histname =
"ClusterHistograms/hEoverPM02Central";
1428 histname =
"ClusterHistograms/hEoverPM02Peripheral";
1436 histname =
"ClusterHistograms/hRcorrVsCent";
1441 histname =
"ClusterHistograms/hRcorr0-10";
1447 histname =
"ClusterHistograms/hRcorr50-90";
1452 histname =
"ClusterHistograms/hRcorrClusVsCent";
1457 histname =
"ClusterHistograms/hRcorrClus0-10";
1463 histname =
"ClusterHistograms/hRcorrClus50-90";
1470 histname =
"ClusterHistograms/hTrackMultiplicity";
1483 const AliMCEvent* mcevent =
nullptr;
1485 mcevent = MCEvent();
1508 const AliVCluster* clus;
1509 std::vector<ContributorType> vecContributorTypes;
1510 std::vector<Int_t> vecContributorLabels;
1516 if (!clus->IsEMCAL()) {
1523 const Int_t nLabels = clus->GetNLabels();
1526 vecContributorTypes.clear();
1527 vecContributorLabels.clear();
1528 for (
Int_t iLabel=0; iLabel<nLabels; iLabel++) {
1530 Int_t label = clus->GetLabels()[iLabel];
1531 if (TMath::Abs(label) > 0) {
1534 vecContributorTypes.push_back(contributorType);
1535 vecContributorLabels.push_back(label);
1540 Int_t nLabelsPhysPrim = vecContributorTypes.size();
1542 if (nLabelsPhysPrim == 1) {
1544 contributorType = vecContributorTypes[0];
1546 if (contributorType ==
kPhoton) {
1549 else if (contributorType ==
kElectron) {
1555 else if (contributorType ==
kProton) {
1564 else if (contributorType ==
kK0L) {
1567 else if (contributorType ==
kNeutron) {
1578 else if (nLabelsPhysPrim == 2) {
1586 Double_t frac1 = clus->GetClusterMCEdepFraction(1);
1594 if (isHadron1 && isHadron2) {
1597 else if (isPhoton1 && isHadron2) {
1601 Double_t photonEnergy = clus->GetNonLinCorrEnergy() * (1 - frac1);
1602 histname =
"ClusterHistogramsMC/hPhotonHadronPhotonEnergy";
1605 else if (isHadron1 && isPhoton2) {
1609 Double_t hadronEnergy = clus->GetNonLinCorrEnergy() * (1 - frac1);
1610 histname =
"ClusterHistogramsMC/hHadronPhotonHadronEnergy";
1613 else if (isPhoton1 && isPhoton2) {
1621 if (part1 && part2) {
1622 Int_t iMother1 = part1->GetMother();
1623 Int_t iMother2 = part2->GetMother();
1624 AliVParticle *mother1 = mcevent->GetTrack(iMother1);
1625 AliVParticle *mother2 = mcevent->GetTrack(iMother2);
1627 if (mother1 && mother2) {
1628 if ( (mother1->PdgCode() == 111) && (mother2->PdgCode() == 111) ) {
1629 if (iMother1 == iMother2) {
1641 else if (nLabelsPhysPrim > 2) {
1647 histname =
"ClusterHistogramsMC/hM02VsParticleTypeCentral";
1648 fHistManager.
FillTH3(histname, clus->GetM02(), clus->GetNonLinCorrEnergy(), particleType);
1651 histname =
"ClusterHistogramsMC/hM02VsParticleTypePeripheral";
1652 fHistManager.
FillTH3(histname, clus->GetM02(), clus->GetNonLinCorrEnergy(), particleType);
1665 const AliVCluster* clus;
1667 for (
const auto jet : jets->
accepted()) {
1672 Double_t hadCaloEnergyUnmatched = 0;
1673 Double_t hadCaloEnergyMatchedNonlincorr = 0;
1674 Double_t hadCaloEnergyMatchedHadCorr = 0;
1677 Int_t nClusters = jet->GetNumberOfClusters();
1678 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1680 clus = jet->Cluster(iClus);
1684 Int_t label = TMath::Abs(clus->GetLabel());
1690 histname =
"JetPerformanceMC/hM02VsContributorTypeJets";
1691 Double_t x[4] = {clus->GetM02(), clus->GetNonLinCorrEnergy(), contributorType, jetPt};
1697 Bool_t hasMatchedTrack = (clus->GetNTracksMatched() > 0);
1699 if (hasMatchedTrack) {
1700 hadCaloEnergyMatchedNonlincorr += clus->GetNonLinCorrEnergy();
1701 hadCaloEnergyMatchedHadCorr += clus->GetHadCorrEnergy();
1704 hadCaloEnergyUnmatched += clus->GetNonLinCorrEnergy();
1713 histname =
"JetPerformance/hHadCaloEnergyUnmatched";
1717 histname =
"JetPerformance/hHadCaloEnergyMatchedNonlincorr";
1721 histname =
"JetPerformance/hHadCaloEnergyMatchedHadCorr";
1725 histname =
"JetPerformanceMC/hJetComposition";
1726 for (
Int_t type = 0; type < 8; type++) {
1733 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1735 clus = jet->Cluster(iClus);
1737 Int_t label = TMath::Abs(clus->GetLabel());
1742 if (type == contributorType) {
1744 pTsum += clus->GetNonLinCorrEnergy();
1749 Double_t x[4] = {jetPt, 1.*type, nSum, pTsum};
1769 Double_t phiMinEMCal =
fGeom->GetArm1PhiMin() * TMath::DegToRad();
1770 Double_t phiMaxEMCal =
fGeom->GetEMCALPhiMax() * TMath::DegToRad();
1771 Double_t phiMinDCal =
fGeom->GetDCALPhiMin() * TMath::DegToRad();
1772 Double_t phiMaxDCal =
fGeom->GetDCALPhiMax() * TMath::DegToRad();
1774 Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
1775 Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
1776 Double_t accDCal = 2 * (etaEMCal - etaMinDCal) * (phiMaxDCal - phiMinDCal);
1781 while ((jetCont = static_cast<AliJetContainer*>(nextJetColl()))) {
1784 TRandom3* r =
new TRandom3(0);
1786 Double_t etaEMCalfid = etaEMCal - jetR;
1787 Double_t etaMinDCalfid = etaMinDCal + jetR;
1788 Double_t phiMinEMCalfid = phiMinEMCal + jetR;
1789 Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
1790 Double_t phiMinDCalfid = phiMinDCal + jetR;
1791 Double_t phiMaxDCalfid = phiMaxDCal - jetR;
1792 Double_t accEMCalfid = 2 * etaEMCalfid * (phiMaxEMCalfid - phiMinEMCalfid);
1793 Double_t accDCalfid = 2 * (etaEMCalfid - etaMinDCalfid) * (phiMaxDCalfid - phiMinDCalfid);
1794 if ( (etaEMCalfid - etaMinDCalfid) < 0) {
1799 Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
1800 Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
1803 Double_t etaDCalRC = r->Uniform(etaMinDCalfid, etaEMCalfid);
1804 Double_t sign = r->Uniform(-1., 1.);
1806 etaDCalRC = -1*etaDCalRC;
1808 Double_t phiDCalRC = r->Uniform(phiMinDCalfid, phiMaxDCalfid);
1835 while ((partCont = static_cast<AliParticleContainer*>(nextPartCont()))) {
1837 TString partContName = partCont->GetName();
1838 if (!partContName.CompareTo(
"tracks")) {
1844 track = trackIterator.first;
1845 trackEta = track.Eta();
1847 trackPt = track.Pt();
1850 if (TMath::Abs(trackEta) < etaTPC) {
1851 trackPtSumTPC += trackPt;
1855 if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
1856 trackPtSumEMCal += trackPt;
1860 if (TMath::Abs(trackEta) < etaEMCalfid && trackPhi > phiMinEMCalfid && trackPhi < phiMaxEMCalfid) {
1861 trackPtSumEMCalfid += trackPt;
1865 if (TMath::Abs(trackEta) > etaMinDCal && TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinDCal && trackPhi < phiMaxDCal) {
1866 trackPtSumDCal += trackPt;
1870 if (TMath::Abs(trackEta) > etaMinDCalfid && TMath::Abs(trackEta) < etaEMCalfid && trackPhi > phiMinDCalfid && trackPhi < phiMaxDCalfid) {
1871 trackPtSumDCalfid += trackPt;
1875 deltaR =
GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
1876 if (deltaR < jetR) {
1877 trackPtSumEMCalRC += trackPt;
1881 deltaR =
GetDeltaR(&track, etaDCalRC, phiDCalRC);
1882 if (deltaR < jetR) {
1883 trackPtSumDCalRC += trackPt;
1899 clus = clusIterator.first;
1900 clusEta = clus.Eta();
1905 if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
1906 clusPtSumEMCal += clusPt;
1910 if (TMath::Abs(clusEta) < etaEMCalfid && clusPhi > phiMinEMCalfid && clusPhi < phiMaxEMCalfid) {
1911 clusPtSumEMCalfid += clusPt;
1915 if (TMath::Abs(clusEta) > etaMinDCal && TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinDCal && clusPhi < phiMaxDCal) {
1916 clusPtSumDCal += clusPt;
1920 if (TMath::Abs(clusEta) > etaMinDCalfid && TMath::Abs(clusEta) < etaEMCalfid && clusPhi > phiMinDCalfid && clusPhi < phiMaxDCalfid) {
1921 clusPtSumDCalfid += clusPt;
1925 deltaR =
GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
1926 if (deltaR < jetR) {
1927 clusPtSumEMCalRC += clusPt;
1931 deltaR =
GetDeltaR(&clus, etaDCalRC, phiDCalRC);
1932 if (deltaR < jetR) {
1933 clusPtSumDCalRC += clusPt;
1940 Double_t numerator = (trackPtSumEMCal + clusPtSumEMCal) / accEMCal;
1941 Double_t denominator = trackPtSumTPC / accTPC;
1942 Double_t scaleFactor = numerator / denominator;
1943 TString histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1947 if (accEMCalfid > 1e-3) {
1948 numerator = (trackPtSumEMCalfid + clusPtSumEMCalfid) / accEMCalfid;
1949 scaleFactor = numerator / denominator;
1950 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCalFid", jetCont->GetArrayName().Data());
1955 numerator = (trackPtSumDCal + clusPtSumDCal) / accDCal;
1956 scaleFactor = numerator / denominator;
1957 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorDCal", jetCont->GetArrayName().Data());
1961 if (accDCalfid > 1e-3) {
1962 numerator = (trackPtSumDCalfid + clusPtSumDCalfid) / accDCalfid;
1963 scaleFactor = numerator / denominator;
1964 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorDCalFid", jetCont->GetArrayName().Data());
1972 Double_t deltaPt = trackPtSumEMCalRC + clusPtSumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1973 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1977 if (accDCalfid > 1e-3) {
1978 deltaPt = trackPtSumDCalRC + clusPtSumDCalRC - rho * TMath::Pi() * jetR * jetR;
1979 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtDCal", jetCont->GetArrayName().Data());
1998 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1999 TString jetContName = jets->GetName();
2004 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
2008 for (
auto jet : jets->
all()) {
2014 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
2018 UInt_t rejectionReason = 0;
2019 if (!jets->
AcceptJet(jet, rejectionReason)) {
2020 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
2021 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
2033 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtEMCal", jets->GetArrayName().Data());
2035 else if (type ==
kDCal) {
2036 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtDCal", jets->GetArrayName().Data());
2041 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
2046 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPtEMCal", jets->GetArrayName().Data());
2048 else if (type ==
kDCal) {
2049 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPtDCal", jets->GetArrayName().Data());
2051 TLorentzVector leadPart;
2054 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2059 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPtEMCal", jets->GetArrayName().Data());
2061 else if (type ==
kDCal) {
2062 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPtDCal", jets->GetArrayName().Data());
2064 const AliVTrack* track;
2065 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
2066 track =
static_cast<AliVTrack*
>(jet->Track(i));
2067 z = track->Pt() / TMath::Abs(corrPt);
2073 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPtEMCal", jets->GetArrayName().Data());
2075 else if (type ==
kDCal) {
2076 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPtDCal", jets->GetArrayName().Data());
2095 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2096 TString jetContName = jets->GetName();
2099 if (jetContName.Contains(
"mcparticles")) {
2108 for (
auto jet : jets->
accepted()) {
2127 histname =
"MatchedJetHistograms/hResponseMatrixEMCal";
2129 else if (type ==
kDCal) {
2130 histname =
"MatchedJetHistograms/hResponseMatrixDCal";
2136 histname =
"MatchedJetHistograms/hJESshiftEMCal";
2138 else if (type ==
kDCal) {
2139 histname =
"MatchedJetHistograms/hJESshiftDCal";
2144 histname =
"MatchedJetHistograms/hNEFVsPt";
2148 histname =
"MatchedJetHistograms/hZLeadingVsPt";
2149 TLorentzVector leadPart;
2152 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2156 histname =
"MatchedJetHistograms/hMatchingDistance";
2173 TString histname =
"ClusterHistogramsMC/hClusterRejectionReasonMC";
2174 UInt_t rejectionReason = 0;
2177 return contributorType;
2180 if (part->GetGeneratorIndex() == 0) {
2188 else if (TMath::Abs(pdg) == 211) {
2191 else if (pdg == 2212) {
2194 else if (pdg == -2212) {
2197 else if (TMath::Abs(pdg) == 321) {
2200 else if (pdg == 130) {
2201 contributorType =
kK0L;
2203 else if (pdg == 2112) {
2206 else if (pdg == -2112) {
2209 else if (TMath::Abs(pdg) == 11) {
2212 else if (TMath::Abs(pdg) == 13) {
2213 contributorType =
kMuon;
2216 contributorType =
kOther;
2220 return contributorType;
2229 Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
2230 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
2272 const char *ntracks,
2273 const char *nclusters,
2274 const char *nGenLev,
2284 ::Error(
"AddTaskEmcalJetPerformance",
"No analysis manager to connect to.");
2290 AliVEventHandler* handler = mgr->GetInputEventHandler();
2293 ::Error(
"AddTaskEmcalJetPerformance",
"This task requires an input event handler");
2305 if (handler->InheritsFrom(
"AliESDInputHandler")) {
2308 else if (handler->InheritsFrom(
"AliAODInputHandler")) {
2319 if (trackName ==
"usedefault") {
2320 if (dataType ==
kESD) {
2321 trackName =
"Tracks";
2323 else if (dataType == kAOD) {
2324 trackName =
"tracks";
2331 if (clusName ==
"usedefault") {
2332 if (dataType ==
kESD) {
2333 clusName =
"CaloClusters";
2335 else if (dataType == kAOD) {
2336 clusName =
"caloClusters";
2343 TString name(
"AliAnalysisTaskEmcalJetPerformance");
2344 if (!trackName.IsNull()) {
2348 if (!clusName.IsNull()) {
2352 if (strcmp(suffix,
"") != 0) {
2365 if (trackName ==
"mcparticles") {
2367 partCont = mcpartCont;
2369 else if (trackName ==
"tracks" || trackName ==
"Tracks") {
2371 partCont = trackCont;
2377 if (nGenLev && strcmp(nGenLev,
"")!=0) {
2385 if (!clusName.IsNull()) {
2399 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer() ;
2401 contname +=
"_histos";
2402 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contname.Data(),
2403 TList::Class(),AliAnalysisManager::kOutputContainer,
2404 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
2405 mgr->ConnectInput (task, 0, cinput1 );
2406 mgr->ConnectOutput (task, 1, coutput1 );
TObjArray fClusterCollArray
cluster collection array
void SetParticlePtCut(Double_t cut)
Double_t GetRhoVal() const
const TString & GetRhoName() const
AliJetContainer * GetJetContainer(Int_t i=0) const
UInt_t fOffTrigger
offline trigger for event selection
void AdoptParticleContainer(AliParticleContainer *cont)
const AliClusterIterableMomentumContainer accepted_momentum() const
Container with name, TClonesArray and cuts for particles.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
AliEmcalJet * MatchedJet() const
Declaration of class AliTLorentzVector.
static AliEmcalDownscaleFactorsOCDB * Instance()
void FillTH3(const char *hname, double x, double y, double z, double weight=1., Option_t *opt="")
Fill a 3D histogram within the container.
Declaration of class AliAnalysisTaskEmcalEmbeddingHelper.
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
Double_t GetDownscaleFactorForTriggerClass(const TString &trigger) const
TString part
use mixed event to constrain combinatorial background
Container for particles within the EMCAL framework.
void SetCaloTriggerPatchInfoName(const char *n)
void AdoptClusterContainer(AliClusterContainer *cont)
TObjArray fParticleCollArray
particle/track collection array
virtual Bool_t AcceptMCParticle(const AliAODMCParticle *vp, UInt_t &rejectionReason) const
bool AddQAPlotsToList(TList *list)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
void SetRun(int runnumber)
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
bool IsInitialized() const
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
THashList * GetListOfHistograms() const
Get the list of histograms.
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
AliEMCALGeometry * fGeom
!emcal geometry
UInt_t GetJetAcceptanceType() const
Double_t Phi_0_2pi() const
Implementation of task to embed external events.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
Double_t fCent
!event centrality
Int_t GetNAcceptedTracks()
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
Calculates the fraction of momentum z of part 1 w.r.t. part 2 in the direction of part 2...
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
TObjArray fJetCollArray
jet collection array
AliRhoParameter * GetRhoParameter()
void RecordEmbeddedEventProperties()
virtual Bool_t IsEventSelected()
Performing event selection.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
std::vector< TString > GetTriggerClasses() const
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
Handler for downscale factors for various triggers obtained from the OCDB.
AliMCParticleContainer * GetMCParticleContainer(Int_t i=0) const
void SelectPhysicalPrimaries(Bool_t s)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
const AliTrackIterableMomentumContainer accepted_momentum() const
Int_t GetRunNumber(TString)
void SetClusPtCut(Double_t cut)
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
EDataType_t
Switch for the data type.
DCal acceptance – spans ONLY DCal (no PHOS or gap)
void SetClusECut(Double_t cut)
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Create a new THnSparse within the container.
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
virtual AliAODMCParticle * GetMCParticleWithLabel(Int_t lab) const
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
Container for jet within the EMCAL jet framework.
TH3 * CreateTH3(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int nbinsz, double zmin, double zmax, Option_t *opt="")
Create a new TH2 within the container.
const AliJetIterableContainer all() const
static const AliAnalysisTaskEmcalEmbeddingHelper * GetInstance()