18 #include <TClonesArray.h>
23 #include <THnSparse.h>
28 #include <AliVCluster.h>
29 #include <AliVParticle.h>
38 #include "AliEMCALGeometry.h"
40 #include "AliPHOSGeometry.h"
41 #include "AliOADBContainer.h"
42 #include "AliEMCALTriggerPatchInfo.h"
59 fUseManualEventCuts(kFALSE),
60 fUseAliEventCuts(kTRUE),
64 fDijetLeadingHadronPt(0),
70 fPlotJetHistograms(kFALSE),
71 fPlotDijetCandHistograms(kFALSE),
72 fPlotDijetImbalanceHistograms(kFALSE),
73 fComputeBackground(kFALSE),
74 fDoMomentumBalance(kFALSE),
75 fDoGeometricalMatching(kFALSE),
77 fTrackConstituentThreshold(0),
78 fClusterConstituentThreshold(0),
82 fLoadBackgroundScalingWeights(kTRUE),
83 fBackgroundScalingWeights(0),
84 fGapJetScalingWeights(0),
85 fComputeMBDownscaling(kFALSE),
87 fDoTriggerSimulation(kFALSE),
91 fPlotNeutralJets(kFALSE),
92 fPlotClustersInJets(kFALSE),
93 fPlotClusterTHnSparse(kTRUE),
94 fPlotClusWithoutNonLinCorr(kFALSE),
114 fUseManualEventCuts(kFALSE),
115 fUseAliEventCuts(kTRUE),
119 fDijetLeadingHadronPt(0),
125 fPlotJetHistograms(kFALSE),
126 fPlotDijetCandHistograms(kFALSE),
127 fPlotDijetImbalanceHistograms(kFALSE),
128 fComputeBackground(kFALSE),
129 fDoMomentumBalance(kFALSE),
130 fDoGeometricalMatching(kFALSE),
132 fTrackConstituentThreshold(0),
133 fClusterConstituentThreshold(0),
134 fMBUpscaleFactor(1.),
137 fLoadBackgroundScalingWeights(kTRUE),
138 fBackgroundScalingWeights(0),
139 fGapJetScalingWeights(0),
140 fComputeMBDownscaling(kFALSE),
141 fDoCaloStudy(kFALSE),
142 fDoTriggerSimulation(kFALSE),
146 fPlotNeutralJets(kFALSE),
147 fPlotClustersInJets(kFALSE),
148 fPlotClusterTHnSparse(kTRUE),
149 fPlotClusWithoutNonLinCorr(kFALSE),
150 fPlotExotics(kFALSE),
208 while ((obj = next())) {
236 if (embeddingHelper) {
259 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
262 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
263 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
269 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
270 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
275 histname = TString::Format(
"%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
276 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
277 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5);
280 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
281 title = histname +
";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
283 Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
288 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
289 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
290 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5,
"s");
293 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
294 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
298 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
299 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
303 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
304 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
311 histname = TString::Format(
"%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
312 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
319 histname = TString::Format(
"%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
320 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
328 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
329 title = histname +
";#it{E}_{patch,med};type;#it{p}_{T}^{corr} (GeV/#it{c});Centrality (%)";
339 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
340 title = histname +
";Centrality;Scale factor;counts";
343 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
344 title = histname +
";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
347 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jets->GetArrayName().Data());
348 title = histname +
";#eta;#phi;Centrality;Scale factor;";
351 Double_t max[4] = {0.5,6., 100, 20};
354 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jets->GetArrayName().Data());
355 title = histname +
";#eta;#phi;Centrality;#delta#it{p}_{T} (GeV/#it{c})";
357 Double_t minDpT[4] = {-0.5,1., 0, -50};
358 Double_t maxDpT[4] = {0.5,6., 100, 150};
367 histname =
"Trigger/hMBDownscaleFactor";
368 title = histname +
";Downscale factor;counts";
384 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
393 axisTitle[dim] =
"Centrality (%)";
401 axisTitle[dim] =
"LeadingHadronRequired";
408 axisTitle[dim] =
"#it{p}_{T,trig jet} (GeV/#it{c})";
409 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
415 axisTitle[dim] =
"#it{p}_{T,ass jet} (GeV/#it{c})";
416 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
422 axisTitle[dim] =
"#phi_{trig jet}";
423 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
425 max[dim] = TMath::TwoPi();
429 axisTitle[dim] =
"#phi_{ass jet}";
430 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
432 max[dim] = TMath::TwoPi();
436 axisTitle[dim] =
"#eta_{trig jet}";
437 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
443 axisTitle[dim] =
"#eta_{ass jet}";
444 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
450 TString thnname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
452 for (
Int_t i = 0; i < dim; i++) {
453 hn->GetAxis(i)->SetTitle(axisTitle[i]);
454 hn->SetBinEdges(i, binEdges[i]);
467 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
479 axisTitle[dim] =
"Centrality (%)";
487 axisTitle[dim] =
"#Delta#phi";
494 axisTitle[dim] =
"#Delta#eta";
501 axisTitle[dim] =
"A_{J}";
508 axisTitle[dim] =
"x_{J}";
515 axisTitle[dim] =
"k_{Ty} (GeV)";
522 axisTitle[dim] =
"N_{tracks, trig jet}";
529 axisTitle[dim] =
"N_{tracks, ass jet}";
536 TString thnname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
538 for (
Int_t i = 0; i < dim; i++) {
539 hn->GetAxis(i)->SetTitle(axisTitle[i]);
540 hn->SetBinEdges(i, binEdges[i]);
548 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
549 TString title = histname +
";Centrality (%);#it{p}_{T,1}^{corr} (GeV/#it{c});#it{p}_{T,2}^{corr} (GeV/#it{c})";
550 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt,
nPtBins, 0,
fMaxPt,
"s");
555 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
556 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
563 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
564 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
571 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
572 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
579 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
580 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
595 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
605 axisTitle[dim] =
"A_{J}";
612 axisTitle[dim] =
"#Delta#phi";
619 axisTitle[dim] =
"#it{p}_{T,particle} (GeV/#it{c})";
629 max[dim] = pTParticleBins[nbins[dim]];
630 binEdges[dim] = pTParticleBins;
633 axisTitle[dim] =
"#it{p}_{T}#parallel (GeV/#it{c})";
642 max[dim] = pTParallelBins[nbins[dim]];
643 binEdges[dim] = pTParallelBins;
646 TString thnname = TString::Format(
"%s/MomentumBalance", jets->GetArrayName().Data());
648 for (
Int_t i = 0; i < dim; i++) {
649 hn->GetAxis(i)->SetTitle(axisTitle[i]);
650 hn->SetBinEdges(i, binEdges[i]);
669 axisTitle[dim] =
"Centrality (%)";
677 axisTitle[dim] =
"isSwitched";
684 axisTitle[dim] =
"#DeltaR_{trig}";
691 axisTitle[dim] =
"#DeltaR_{ass}";
698 axisTitle[dim] =
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
705 axisTitle[dim] =
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
712 axisTitle[dim] =
"A_{J} low-threshold";
719 axisTitle[dim] =
"A_{J} hard-core";
726 TString thnname =
"GeometricalMatching";
728 for (
Int_t i = 0; i < dim; i++) {
729 hn->GetAxis(i)->SetTitle(axisTitle[i]);
730 hn->SetBinEdges(i, binEdges[i]);
736 histname =
"GeometricalMatchingEfficiency";
737 title = histname +
";isMatched;counts";
752 const Int_t nRejBins = 32;
755 const Int_t nExBins = 200;
759 AliEmcalContainer* cont = 0;
761 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
764 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
765 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
769 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
770 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
775 const Int_t nEmcalSM = 20;
776 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
777 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
778 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
782 for (
Int_t sm = 1; sm < 5; sm++) {
783 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
784 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
798 title[dim] =
"Centrality %";
820 title[dim] =
"#it{E}_{clus} (GeV)";
827 title[dim] =
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
834 title[dim] =
"Matched track";
848 title[dim] =
"Ncells";
855 title[dim] =
"Dispersion cut";
862 TString thnname = TString::Format(
"%s/clusterObservables", cont->GetArrayName().Data());
864 for (
Int_t i = 0; i < dim; i++) {
865 hn->GetAxis(i)->SetTitle(title[i]);
866 hn->SetBinEdges(i, binEdges[i]);
871 histname = TString::Format(
"%s/hFcrossEMCal", cont->GetArrayName().Data());
872 htitle = histname +
";Centrality (%);Fcross;#it{E}_{clus} (GeV/)";
879 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
884 Int_t nbinsJet[30] = {0};
891 axisTitle[dimJet] =
"Centrality (%)";
899 axisTitle[dimJet] =
"#eta_{jet}";
900 nbinsJet[dimJet] = 28;
901 minJet[dimJet] = -0.7;
902 maxJet[dimJet] = 0.7;
906 axisTitle[dimJet] =
"#phi_{jet} (rad)";
907 nbinsJet[dimJet] = 100;
913 axisTitle[dimJet] =
"#it{E}_{T} (GeV)";
920 axisTitle[dimJet] =
"#rho (GeV/#it{c})";
921 nbinsJet[dimJet] = 100;
923 maxJet[dimJet] = 1000.;
927 axisTitle[dimJet] =
"N_{clusters}";
928 nbinsJet[dimJet] = 20;
929 minJet[dimJet] = -0.5;
930 maxJet[dimJet] = 19.5;
934 TString thnname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
936 for (
Int_t i = 0; i < dimJet; i++) {
937 hn->GetAxis(i)->SetTitle(axisTitle[i]);
938 hn->SetBinEdges(i, binEdgesJet[i]);
953 title[dim] =
"Centrality %";
961 title[dim] =
"#it{E}_{clus} (GeV)";
968 title[dim] =
"#it{p}_{T,jet}^{corr}";
975 title[dim] =
"#eta_{jet}";
982 title[dim] =
"#phi_{jet}";
989 TString thnname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
991 for (
Int_t i = 0; i < dim; i++) {
992 hn->GetAxis(i)->SetTitle(title[i]);
993 hn->SetBinEdges(i, binEdges[i]);
997 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
998 htitle = histname +
";type;#it{p}_{T}^{corr} (GeV/#it{c});#Delta_{JES}";
999 fHistManager.
CreateTH3(histname.Data(), htitle.Data(), 3, -0.5, 2.5,
nPtBins, 0,
fMaxPt, 100, 0, 20);
1007 histname = TString::Format(
"Cells/hCellEnergyAll");
1008 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
1012 histname = TString::Format(
"Cells/hCellEnergyAccepted");
1013 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
1017 histname = TString::Format(
"Cells/hCellEnergyLeading");
1018 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
1022 const Int_t nEmcalSM = 20;
1023 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
1024 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
1025 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
1029 for (
Int_t sm = 1; sm < 5; sm++) {
1030 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
1031 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
1051 histname =
"TriggerSimHistograms/hEtaVsPhi";
1052 title = histname +
";#eta_{patch} (rad);#phi_{patch} (rad)";
1056 histname =
"TriggerSimHistograms/hNPatches";
1057 title = histname +
";#it{N}_{patches};type";
1061 histname =
"TriggerSimHistograms/hPatchE";
1062 title = histname +
";Centrality (%);#it{E}_{patch} (GeV)";
1066 histname =
"TriggerSimHistograms/hPatchMedianE";
1067 title = histname +
";Centrality (%);#it{E}_{patch,med} (GeV);type";
1068 fHistManager.
CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
1071 histname =
"TriggerSimHistograms/hMedPatchDijet";
1072 title = histname +
";Centrality (%);#it{p}_{T,trig}^{corr} (GeV/#it{c});#it{E}_{patch,med} (GeV);type";
1073 Int_t nbinsD[4] = {50, 40, 100, 2};
1074 Double_t minD[4] = {0, 0, 0, -0.5};
1075 Double_t maxD[4] = {100, 200, 50, 1.5};
1082 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1085 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1086 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
1092 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
1093 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
1098 histname = TString::Format(
"%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
1099 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
1100 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5);
1103 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1104 title = histname +
";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
1106 Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
1111 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1112 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
1116 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
1117 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
1121 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1122 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
1124 Double_t min2[4] = {0, 0, 0, -0.5};
1129 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
1130 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
1132 Double_t min3[4] = {0, 0, 0, -0.5};
1137 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
1138 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
1140 Double_t min4[4] = {0, 0, 0, -0.5};
1155 if (fname.BeginsWith(
"alien://")) {
1156 TGrid::Connect(
"alien://");
1159 TFile*
file = TFile::Open(path);
1161 if (!file || file->IsZombie()) {
1162 ::Error(
"AliAnalysisTaskEmcalDijetImbalance",
"Could not open background scaling histogram");
1167 TH2D* h1 =
dynamic_cast<TH2D*
>(file->Get(name1));
1170 ::Info(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s loaded from file %s.", name1, path);
1173 ::Error(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s not found in file %s.", name1, path);
1180 TH2D* h2 =
dynamic_cast<TH2D*
>(file->Get(name2));
1183 ::Info(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Jet pT scaling histogram %s loaded from file %s.", name2, path);
1186 ::Error(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Jet pT scaling histogram %s not found in file %s.", name2, path);
1216 fPHOSGeo = AliPHOSGeometry::GetInstance();
1218 AliInfo(
"Found instance of PHOS geometry!");
1221 AliInfo(
"Creating PHOS geometry!");
1222 Int_t runNum = InputEvent()->GetRunNumber();
1224 fPHOSGeo = AliPHOSGeometry::GetInstance(
"IHEP");
1226 fPHOSGeo = AliPHOSGeometry::GetInstance(
"Run2");
1229 AliOADBContainer geomContainer(
"phosGeo");
1230 geomContainer.InitFromFile(
"$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root",
"PHOSMCRotationMatrixes");
1231 TObjArray* matrixes = (
TObjArray*)geomContainer.GetObject(runNum,
"PHOSRotationMatrixes");
1232 for(
Int_t mod=0; mod<6; mod++) {
1233 if(!matrixes->At(mod))
continue;
1234 fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
1235 printf(
".........Adding Matrix(%d), geo=%p\n",mod,
fPHOSGeo);
1236 ((TGeoHMatrix*)matrixes->At(mod))->
Print();
1246 TClass cls(objname);
1247 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1248 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1249 GetName(), cls.GetName(),
"EmcalTriggers"));
1254 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1280 TString triggerNameMB1 =
"CINT7-B-NOPF-CENT";
1281 TString triggerNameMB2 =
"CV0L7-B-NOPF-CENT";
1282 TString triggerNameJE =
"CINT7EJ1-B-NOPF-CENTNOPMD";
1287 for (
auto i : runtriggers) {
1288 if (i.EqualTo(triggerNameMB1) || i.EqualTo(triggerNameMB2)) {
1297 TString histname =
"Trigger/hMBDownscaleFactor";
1334 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
1335 TString jetContName = jetCont->GetName();
1336 if (jetContName.Contains(
"HardCore"))
continue;
1344 for (
Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
1347 FindDijet(jetCont, leadingHadronCutType);
1368 histname = TString::Format(
"%s/MomentumBalance", jetCont->GetArrayName().Data());
1411 if(!trigJet)
return;
1428 for(
auto assJetCand : jetCont->
accepted()) {
1429 if (!assJetCand)
continue;
1431 if ( TMath::Abs(trigJet->
Phi() - assJetCand->Phi()) <
fDeltaPhiMin )
continue;
1434 if ( assJetCandPt < assJetPt )
continue;
1436 assJet = assJetCand;
1438 if (!assJet)
return;
1466 track = trackIterator.second;
1476 Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
1477 Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
1478 Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
1483 deltaPhi = trackPhi - trigJetPhi;
1484 balancePt = trackPt * TMath::Cos(deltaPhi);
1487 deltaPhi = trackPhi - assJetPhi;
1488 balancePt = -trackPt * TMath::Cos(deltaPhi);
1502 TString jetContAllName = Form(
"Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (
int) (
fMatchingJetR*10) );
1508 TString jetContHardCoreName = Form(
"JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (
int) (
fMatchingJetR*10), trackThreshold, clusThreshold);
1529 TClass cls(objname);
1530 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1531 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1532 GetName(), cls.GetName(),
"EmcalTriggers"));
1537 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1542 std::vector<Double_t> vecEMCal;
1543 std::vector<Double_t> vecDCal;
1545 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1548 if(!recpatch->IsJetHighSimple())
continue;
1550 histname =
"TriggerSimHistograms/hEtaVsPhi";
1553 histname =
"TriggerSimHistograms/hPatchE";
1556 if (recpatch->IsEMCal()) {
1557 vecEMCal.push_back(recpatch->GetPatchE());
1559 vecDCal.push_back(recpatch->GetPatchE());
1566 const Int_t nBkgPatchesEMCal = vecEMCal.size();
1567 const Int_t nBkgPatchesDCal = vecDCal.size();
1568 fMedianEMCal = TMath::Median(nBkgPatchesEMCal, &vecEMCal[0]);
1569 fMedianDCal = TMath::Median(nBkgPatchesDCal, &vecDCal[0]);
1571 histname =
"TriggerSimHistograms/hPatchMedianE";
1575 histname =
"TriggerSimHistograms/hNPatches";
1581 histname =
"TriggerSimHistograms/hMedPatchDijet";
1592 for(
auto p : *fTriggerPatchInfo){
1593 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1596 if(!recpatch->IsJetHighSimple())
continue;
1598 if (recpatch->IsEMCal()) {
1599 if ((recpatch->GetPatchE() -
fMedianDCal) > threshold) {
1604 if ((recpatch->GetPatchE() -
fMedianEMCal) > threshold) {
1628 for(
auto matchingTrigJetCand : jetCont->
accepted()) {
1629 if (!matchingTrigJetCand)
continue;
1631 if (matchingTrigJet) {
1632 if (
GetJetPt(jetCont, matchingTrigJetCand) <
GetJetPt(jetCont, matchingTrigJet) )
continue;
1634 matchingTrigJet = matchingTrigJetCand;
1636 if (!matchingTrigJet)
return;
1640 for(
auto matchingAssJetCand : jetCont->
accepted()) {
1641 if (!matchingAssJetCand)
continue;
1643 if (matchingAssJet) {
1644 if (
GetJetPt(jetCont, matchingAssJetCand) <
GetJetPt(jetCont, matchingAssJet) )
continue;
1646 matchingAssJet = matchingAssJetCand;
1650 if (matchingAssJet) {
1653 if (
GetJetPt(jetCont, matchingTrigJet) <
GetJetPt(jetCont, matchingAssJet) ) {
1694 Double_t phiMinEMCal =
fGeom->GetArm1PhiMin() * TMath::DegToRad();
1695 Double_t phiMaxEMCal =
fGeom->GetEMCALPhiMax() * TMath::DegToRad();
1696 Double_t phiMinDCal =
fGeom->GetDCALPhiMin() * TMath::DegToRad();
1697 Double_t phiMaxDCal =
fGeom->GetDCALPhiMax() * TMath::DegToRad();
1698 Double_t phiMinPHOS = 250 * TMath::DegToRad();
1699 Double_t phiMaxPHOS = 320 * TMath::DegToRad();
1701 Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
1702 Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
1703 Double_t accDCalRegion = 2 * etaEMCal * (phiMaxDCal - phiMinDCal);
1706 TRandom3* r =
new TRandom3(0);
1708 Double_t accRC = TMath::Pi() * jetR * jetR;
1709 Double_t etaEMCalfid = etaEMCal - jetR;
1710 Double_t phiMinEMCalfid = phiMinEMCal + jetR;
1711 Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
1712 Double_t phiMinDCalRegionfid = phiMinDCal + jetR;
1713 Double_t phiMaxDCalRegionfid = phiMaxDCal - jetR;
1716 Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
1717 Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
1725 etaMin = -etaEMCalfid + etaBin*etaStep;
1726 etaMax = etaMin + etaStep;
1727 etaDCalRC[etaBin] = r->Uniform(etaMin, etaMax);
1735 phiMin = 1 + phiBin*phiStep;
1736 phiMax = phiMin + phiStep;
1737 phiDCalRC[phiBin] = r->Uniform(phiMin, phiMax);
1748 std::vector<std::vector<Double_t>> trackPtSumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1749 std::vector<std::vector<Double_t>> clusESumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1763 track = trackIterator.first;
1764 trackEta = track.Eta();
1766 trackPt = track.Pt();
1769 if (TMath::Abs(trackEta) < etaTPC) {
1770 trackPtSumTPC += trackPt;
1774 if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
1775 trackPtSumEMCal += trackPt;
1779 deltaR =
GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
1780 if (deltaR < jetR) {
1781 trackPtSumEMCalRC += trackPt;
1787 deltaR =
GetDeltaR(&track, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1788 if (deltaR < jetR) {
1789 trackPtSumDCalRC[etaBin][phiBin] += trackPt;
1806 clus = clusIterator.first;
1807 clusEta = clus.Eta();
1812 if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
1813 clusESumEMCal += clusE;
1817 deltaR =
GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
1818 if (deltaR < jetR) {
1819 clusESumEMCalRC += clusE;
1825 deltaR =
GetDeltaR(&clus, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1826 if (deltaR < jetR) {
1827 clusESumDCalRC[etaBin][phiBin] += clusE;
1835 Double_t numerator = (trackPtSumEMCal + clusESumEMCal) / accEMCal;
1836 Double_t denominator = trackPtSumTPC / accTPC;
1837 Double_t scaleFactor = numerator / denominator;
1838 TString histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1844 numerator = (trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin]) / accRC;
1845 scaleFactor = numerator / denominator;
1846 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jetCont->GetArrayName().Data());
1847 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, scaleFactor};
1854 Double_t deltaPt = trackPtSumEMCalRC + clusESumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1855 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1866 deltaPt = trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin] - rho * accRC;
1867 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jetCont->GetArrayName().Data());
1868 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, deltaPt};
1887 jetPt = jetPt * (1 + sf * jet->
NEF());
1895 TString jetContName = jetCont->GetName();
1896 if (jetContName.Contains(
"HardCore")) pT = jet->
Pt();
1909 for(
auto jetCand : jetCont->
accepted()) {
1910 if (!jetCand)
continue;
1914 if ( jetCandPt < leadingJetPt )
continue;
1916 leadingJet = jetCand;
1933 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1943 Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
1944 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1992 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1993 TString jetContName = jets->GetName();
1994 if (jetContName.Contains(
"HardCore"))
continue;
1998 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
2002 for (
auto jet : jets->
all()) {
2008 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
2013 UInt_t rejectionReason = 0;
2014 if (!jets->
AcceptJet(jet, rejectionReason)) {
2015 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
2016 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
2024 histname = TString::Format(
"%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
2028 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
2029 Double_t x[6] = {
fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
2033 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
2037 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
2041 TLorentzVector leadPart;
2044 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2045 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2050 histname = TString::Format(
"%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
2052 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
2053 track =
static_cast<AliVTrack*
>(jet->Track(i));
2054 z = track->Pt() / TMath::Abs(corrPt);
2060 histname = TString::Format(
"%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
2061 Double_t a[4] = {
fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
2066 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
2090 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2091 TString jetContName = jets->GetName();
2092 if (jetContName.Contains(
"HardCore"))
continue;
2096 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
2100 for (
auto jet : jets->
all()) {
2106 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
2111 UInt_t rejectionReason = 0;
2112 if (!jets->
AcceptJet(jet, rejectionReason)) {
2113 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
2114 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
2122 histname = TString::Format(
"%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
2126 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
2127 Double_t x[6] = {
fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
2131 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
2135 TLorentzVector leadPart;
2138 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2139 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2144 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
2146 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
2147 track =
static_cast<AliVTrack*
>(jet->Track(i));
2148 z = track->Pt() / TMath::Abs(corrPt);
2154 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
2155 Double_t a[4] = {
fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
2169 TString histname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
2171 if (!histJetObservables)
return;
2172 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2173 TString title(histJetObservables->GetAxis(n)->GetTitle());
2174 if (
title==
"Centrality (%)")
2175 contents[n] =
fCent;
2176 else if (
title==
"LeadingHadronRequired")
2178 else if (
title==
"#it{p}_{T,trig jet} (GeV/#it{c})")
2180 else if (
title==
"#it{p}_{T,ass jet} (GeV/#it{c})")
2182 else if (
title==
"#phi_{trig jet}")
2184 else if (
title==
"#phi_{ass jet}")
2186 else if (
title==
"#eta_{trig jet}")
2188 else if (
title==
"#eta_{ass jet}")
2191 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2193 histJetObservables->Fill(contents);
2204 TString histname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
2206 if (!histJetObservables)
return;
2207 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2208 TString title(histJetObservables->GetAxis(n)->GetTitle());
2209 if (
title==
"Centrality (%)")
2210 contents[n] =
fCent;
2211 else if (
title==
"#Delta#phi")
2213 else if (
title==
"#Delta#eta")
2215 else if (
title==
"A_{J}")
2217 else if (
title==
"x_{J}")
2219 else if (
title==
"k_{Ty} (GeV)")
2221 else if (
title==
"N_{tracks, trig jet}")
2223 else if (
title==
"N_{tracks, ass jet}")
2226 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2228 histJetObservables->Fill(contents);
2232 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
2240 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
2245 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2246 TLorentzVector leadPart;
2249 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2254 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
2257 track =
static_cast<AliVTrack*
>(trigJet->
Track(i));
2264 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
2277 if (!histJetObservables)
return;
2278 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2279 TString title(histJetObservables->GetAxis(n)->GetTitle());
2282 else if (
title==
"#Delta#phi")
2283 contents[n] = deltaPhi;
2284 else if (
title==
"#it{p}_{T,particle} (GeV/#it{c})")
2285 contents[n] = trackPt;
2286 else if (
title==
"#it{p}_{T}#parallel (GeV/#it{c})")
2287 contents[n] = balancePt;
2289 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2291 histJetObservables->Fill(contents);
2300 TString histname =
"GeometricalMatchingEfficiency";
2310 TString thnname =
"GeometricalMatching";
2313 if (!histJetObservables)
return;
2314 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2315 TString title(histJetObservables->GetAxis(n)->GetTitle());
2316 if (
title==
"Centrality (%)")
2317 contents[n] =
fCent;
2318 else if (
title==
"isSwitched")
2319 contents[n] = isSwitched;
2320 else if (
title==
"#DeltaR_{trig}")
2321 contents[n] = trigDeltaR;
2322 else if (
title==
"#DeltaR_{ass}")
2323 contents[n] = assDeltaR;
2324 else if (
title==
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2326 else if (
title==
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2328 else if (
title==
"A_{J} low-threshold")
2330 else if (
title==
"A_{J} hard-core")
2333 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2335 histJetObservables->Fill(contents);
2357 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
2362 while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
2368 if (it->second->IsEMCAL()) {
2369 Double_t phi = it->first.Phi_0_2pi();
2373 }
else if (isDcal == 1) {
2376 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2381 if (it->second->IsEMCAL()) {
2382 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
2383 UInt_t rejectionReason = 0;
2384 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
2385 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2388 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2389 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
2390 UInt_t rejectionReason = 0;
2391 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
2392 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2402 if (it->second->IsEMCAL()) {
2404 Ehadcorr = it->second->GetHadCorrEnergy();
2405 Enonlin = it->second->GetNonLinCorrEnergy();
2407 Enonlin = it->second->E();
2411 histname = TString::Format(
"%s/hFcrossEMCal", clusters->GetArrayName().Data());
2416 Int_t sm =
fGeom->GetSuperModuleNumber(it->second->GetCellAbsId(0));
2417 if (sm >=0 && sm < 20) {
2418 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2422 AliError(Form(
"Supermodule %d does not exist!", sm));
2426 histname = TString::Format(
"Cells/hCellEnergyAccepted");
2428 for (
Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2429 absId = it->second->GetCellAbsId(iCell);
2432 if (ecell > leadEcell) {
2437 histname = TString::Format(
"Cells/hCellEnergyLeading");
2440 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2442 Ehadcorr = it->second->GetCoreEnergy();
2443 Enonlin = it->second->E();
2447 fPHOSGeo->AbsToRelNumbering(it->second->GetCellAbsId(0), relid);
2448 Int_t sm = relid[0];
2449 if (sm >=1 && sm < 5) {
2450 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2454 AliError(Form(
"Supermodule %d does not exist!", sm));
2459 histname = TString::Format(
"Cells/hCellEnergyAccepted");
2461 for (
Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2462 absId = it->second->GetCellAbsId(iCell);
2463 ecell = phosCaloCells->GetCellAmplitude(absId);
2465 if (ecell > leadEcell) {
2470 histname = TString::Format(
"Cells/hCellEnergyLeading");
2475 Int_t hasMatchedTrack = -1;
2476 Int_t nMatchedTracks = it->second->GetNTracksMatched();
2477 if (nMatchedTracks == 0) {
2478 hasMatchedTrack = 0;
2479 }
else if (nMatchedTracks > 0) {
2480 hasMatchedTrack = 1;
2484 Int_t passedDispersionCut = 0;
2485 if (it->second->Chi2() < 2.5*2.5) {
2486 passedDispersionCut = 1;
2491 histname = TString::Format(
"%s/clusterObservables", clusters->GetArrayName().Data());
2493 if (!histClusterObservables)
return;
2494 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
2495 TString title(histClusterObservables->GetAxis(i)->GetTitle());
2496 if (
title==
"Centrality %")
2497 contents[i] =
fCent;
2498 else if (
title==
"#eta")
2499 contents[i] = it->first.Eta();
2500 else if (
title==
"#phi")
2501 contents[i] = it->first.Phi_0_2pi();
2502 else if (
title==
"#it{E}_{clus} (GeV)")
2503 contents[i] = Enonlin;
2504 else if (
title==
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
2505 contents[i] = Ehadcorr;
2506 else if (
title==
"Matched track")
2507 contents[i] = hasMatchedTrack;
2508 else if (
title==
"M02")
2509 contents[i] = it->second->GetM02();
2510 else if (
title==
"Ncells")
2511 contents[i] = it->second->GetNCells();
2512 else if (
title==
"Dispersion cut")
2513 contents[i] = passedDispersionCut;
2515 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2517 histClusterObservables->Fill(contents);
2526 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2528 for (
auto jet : jets->
accepted()) {
2533 histname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
2535 if (!histJetObservables)
return;
2536 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
2537 TString title(histJetObservables->GetAxis(i)->GetTitle());
2538 if (
title==
"Centrality (%)")
2539 contents[i] =
fCent;
2540 else if (
title==
"#eta_{jet}")
2541 contents[i] = jet->Eta();
2542 else if (
title==
"#phi_{jet} (rad)")
2543 contents[i] = jet->Phi_0_2pi();
2544 else if (
title==
"#it{E}_{T} (GeV)")
2545 contents[i] = jet->Pt();
2546 else if (
title==
"#rho (GeV/#it{c})")
2547 contents[i] = jet->Pt() / jet->Area();
2548 else if (
title==
"N_{clusters}")
2549 contents[i] = jet->GetNumberOfClusters();
2551 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2553 histJetObservables->Fill(contents);
2559 histname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
2560 Int_t nClusters = jet->GetNumberOfClusters();
2562 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
2563 clus = jet->Cluster(iClus);
2575 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
2576 clus = jet->Cluster(iClus);
2579 shift = 0.79 * TMath::Exp(-0.5 * ((eclus - 3.81) / 1.50)*((eclus - 3.81) / 1.50) );
2583 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
2604 histname = TString::Format(
"Cells/hCellEnergyAll");
2608 sm =
fGeom->GetSuperModuleNumber(absId);
2609 if (sm >=0 && sm < 20) {
2610 patchSumEMCal[sm] += ecell;
2615 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
2617 absId = phosCaloCells->GetCellNumber(i);
2618 ecell = phosCaloCells->GetCellAmplitude(absId);
2621 histname = TString::Format(
"Cells/hCellEnergyAll");
2625 fPHOSGeo->AbsToRelNumbering(absId, relid);
2627 if (sm >=1 && sm < 5) {
2628 patchSumPHOS[sm-1] += ecell;
2633 for (
Int_t sm = 0; sm < 20; sm++) {
2634 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
2638 for (
Int_t sm = 1; sm < 5; sm++) {
2639 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
2648 Int_t AbsIdseed = -1;
2650 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
2651 if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
2652 Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
2653 AbsIdseed = cluster->GetCellAbsId(i);
2661 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
2662 fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
2663 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
2670 if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) {
2671 absID1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
2674 absID2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
2682 if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
2683 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
2684 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
2686 else if (ieta == 0 && imod%2) {
2687 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
2688 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
2691 if (ieta < AliEMCALGeoParams::fgkEMCALCols-1) {
2692 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
2695 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
2699 Double_t ecell1 = cells->GetCellAmplitude(absID1);
2700 Double_t ecell2 = cells->GetCellAmplitude(absID2);
2701 Double_t ecell3 = cells->GetCellAmplitude(absID3);
2702 Double_t ecell4 = cells->GetCellAmplitude(absID4);
2704 Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
2706 Double_t Fcross = 1 - Ecross/Eseed;
Double_t fMatchingJetR
jet R for matching study
void AllocateDijetImbalanceHistograms()
AliEmcalJet * GetLeadingJet(AliJetContainer *jetCont)
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
TObjArray fClusterCollArray
cluster collection array
Double_t GetRhoVal() const
Int_t fNPhiBins
Number of phi bins in DCal region (for background/correction)
const TString & GetRhoName() const
Int_t fNPtHistBins
! number of variable pt bins
void FillCaloHistograms()
void UserCreateOutputObjects()
void AllocateJetHistograms()
Float_t fMaxPt
Histogram pt limit.
AliJetContainer * GetJetContainer(Int_t i=0) const
Double_t * fPtHistBins
! variable pt bins
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
UInt_t fOffTrigger
offline trigger for event selection
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
static AliEmcalDownscaleFactorsOCDB * Instance()
const AliClusterIterableMomentumContainer accepted_momentum() const
Int_t fNEtaBins
Number of eta bins in DCal region (for background/correction)
bidirectional stl iterator over the EMCAL iterable container
void AllocateCaloHistograms()
void AllocateGeometricalMatchingHistograms()
void DoMomentumBalance(TString histname)
Container with name, TClonesArray and cuts for particles.
Bool_t fPlotJetHistograms
Set whether to enable inclusive jet histograms.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Declaration of class AliTLorentzVector.
void SetRun(int runnumber)
TList * fEventCutList
! Output list for event cut histograms
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.
TH2D * fGapJetScalingWeights
Histogram storing eta-phi weights scaling jets near the gap region.
AliVParticle * Track(Int_t idx) const
Double_t fDijetLeadingHadronPt
leading hadron pT threshold for leading jet in dijet
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
void FillDijetCandHistograms(AliJetContainer *jets)
AliAnalysisTaskEmcalDijetImbalance()
Bool_t fkEMCEJE
! flag telling whether the event is "triggered" or not in "simulation"
Double_t GetDownscaleFactorForTriggerClass(const TString &trigger) const
Double_t fMedianEMCal
! median patch energy in EMCal, per event
Double_t fMedianDCal
! median patch energy in DCal, per event
void FillGeometricalMatchingHistograms()
Double_t fMinAssJetPt
subleading jet min pT in a dijet pair, for it to be accepted
UShort_t GetNumberOfConstituents() const
void SetCaloTriggerPatchInfoName(const char *n)
UShort_t GetNumberOfTracks() const
Bool_t fDoMomentumBalance
Set whether to enable momentum balance study.
void FindDijet(AliJetContainer *jetCont, Int_t leadingHadronCutBin)
Bool_t fPlotDijetImbalanceHistograms
Set whether to enable dijet imbalance histograms.
bool AddQAPlotsToList(TList *list)
AliEventCuts fEventCuts
event selection utility
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
Bool_t fPlotClusWithoutNonLinCorr
If true, use pre-nonlincorr energy in cluster thnsparse.
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
Dijet_t fDijet
! dijet candidate (per event)
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.
void FillDijetImbalanceHistograms(AliJetContainer *jets)
TObject * FindObject(const char *name) const
Find an object inside the container.
Double_t GetJetType(AliEmcalJet *jet)
THashList * GetListOfHistograms() const
Get the list of histograms.
Double_t GetDeltaR(AliEmcalJet *jet1, AliEmcalJet *jet2)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
Double_t fClusterConstituentThreshold
constituent threshold for matching study
Di-jet imbalance analysis with full jets.
AliEMCALGeometry * fGeom
!emcal geometry
UInt_t GetJetAcceptanceType() const
void DoTriggerSimulation()
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.
Bool_t fDoTriggerSimulation
Set whether to perform a simple trigger simulation.
BeamType fForceBeamType
forced beam type
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
Int_t leadingHadronCutType
Double_t fDeltaPhiMin
minimum delta phi between di-jets
Double_t fMBUpscaleFactor
! inverse of downscale factor, for MB trigger
Bool_t fComputeBackground
Set whether to enable study of background.
Double_t Phi_0_2pi() const
std::vector< TString > GetTriggerClasses() const
Double_t fCent
!event centrality
void LoadBackgroundScalingHistogram(const char *path="alien:///alice/cern.ch/user/j/jmulliga/scaleFactorEMCalLHC15o.root", const char *name1="hEtaPhiSFCorrection", const char *name2="hEtaPhiJetPtCorrection")
Double_t GetJetPt(AliJetContainer *jetCont, AliEmcalJet *jet)
void AllocateDijetCandHistograms()
void RunChanged(Int_t run)
Double_t GetFcross(AliVCluster *cluster, AliVCaloCells *cells)
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 FillMomentumBalanceHistograms(TString histname, Double_t deltaPhi, Double_t trackPt, Double_t balancePt)
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
THistManager fHistManager
Histogram manager.
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
Bool_t fComputeMBDownscaling
Set whether to compute and plot MB downscaling factors.
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
void RecordEmbeddedEventProperties()
const AliClusterIterableMomentumContainer all_momentum() const
virtual Bool_t IsEventSelected()
Performing event selection.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
void FillTriggerSimHistograms()
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
Bool_t fLoadBackgroundScalingWeights
Flag to load eta-phi weights for full-jet background scale factors.
Bool_t fPlotClusterTHnSparse
Set whether to plot cluster thnsparse in calo studies.
Handler for downscale factors for various triggers obtained from the OCDB.
TFile * file
TList with histograms for a given trigger.
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
Bool_t fDoGeometricalMatching
Set whether to enable constituent study with geometrical matching.
Represent a jet reconstructed using the EMCal jet framework.
Bool_t fPlotClustersInJets
Set whether to plot histogram of clusters within jets.
const AliTrackIterableMomentumContainer accepted_momentum() const
Int_t GetRunNumber(TString)
Dijet_t fMatchingDijet
! low-threshold matching dijet, for matching study
TH2D * fBackgroundScalingWeights
Histogram storing eta-phi weights for full-jet background scale factors.
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
Main initialization function on the worker.
AliEmcalEmbeddingQA fEmbeddingQA
! QA hists for embedding (will only be added if embedding)
const AliJetIterableContainer accepted() const
Bool_t fPlotExotics
Set whether to plot exotic cluster study.
Double_t fTrackConstituentThreshold
constituent threshold for matching study
Double_t * fCentHistBins
! cent bins
DCal acceptance – spans ONLY DCal (no PHOS or gap)
void FindMatchingDijet(AliJetContainer *jetCont)
Int_t fNCentHistBins
! number of cent bins
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.
Double_t fMinTrigJetPt
leading jet min pT in a dijet pair
void ComputeBackground(AliJetContainer *jetCont)
Container structure for EMCAL clusters.
Bool_t fPlotNeutralJets
Set whether to plot neutral jet histo.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
AliPHOSGeometry * fPHOSGeo
! phos geometry
virtual ~AliAnalysisTaskEmcalDijetImbalance()
Container for jet within the EMCAL jet framework.
void DoGeometricalMatching()
Bool_t fPlotDijetCandHistograms
Set whether to enable dijet pair histograms.
void AllocateMomentumBalanceHistograms()
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.
void AllocateTriggerSimHistograms()
Bool_t fDoCaloStudy
Set whether to perform calorimeter detector study.
const AliJetIterableContainer all() const
static const AliAnalysisTaskEmcalEmbeddingHelper * GetInstance()
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal