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),
225 while ((obj = next())) {
253 if (embeddingHelper) {
276 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
279 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
280 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
286 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
287 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
292 histname = TString::Format(
"%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
293 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
294 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5);
297 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
298 title = histname +
";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
300 Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
305 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
306 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
307 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5,
"s");
310 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
311 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
315 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
316 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
320 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
321 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
328 histname = TString::Format(
"%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
329 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
336 histname = TString::Format(
"%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
337 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
345 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
346 title = histname +
";#it{E}_{patch,med};type;#it{p}_{T}^{corr} (GeV/#it{c});Centrality (%)";
357 histname =
"Trigger/hMBDownscaleFactor";
358 title = histname +
";Downscale factor;counts";
377 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
379 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
380 title = histname +
";Centrality;Scale factor;counts";
383 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
384 title = histname +
";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
387 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jets->GetArrayName().Data());
388 title = histname +
";#eta;#phi;Centrality;Scale factor;";
391 Double_t max[4] = {0.5,6., 100, 20};
394 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jets->GetArrayName().Data());
395 title = histname +
";#eta;#phi;Centrality;#delta#it{p}_{T} (GeV/#it{c})";
397 Double_t minDpT[4] = {-0.5,1., 0, -50};
398 Double_t maxDpT[4] = {0.5,6., 100, 150};
414 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
423 axisTitle[dim] =
"Centrality (%)";
431 axisTitle[dim] =
"LeadingHadronRequired";
438 axisTitle[dim] =
"#it{p}_{T,trig jet} (GeV/#it{c})";
439 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
445 axisTitle[dim] =
"#it{p}_{T,ass jet} (GeV/#it{c})";
446 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
452 axisTitle[dim] =
"#phi_{trig jet}";
453 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
455 max[dim] = TMath::TwoPi();
459 axisTitle[dim] =
"#phi_{ass jet}";
460 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
462 max[dim] = TMath::TwoPi();
466 axisTitle[dim] =
"#eta_{trig jet}";
467 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
473 axisTitle[dim] =
"#eta_{ass jet}";
474 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
480 TString thnname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
482 for (
Int_t i = 0; i < dim; i++) {
483 hn->GetAxis(i)->SetTitle(axisTitle[i]);
484 hn->SetBinEdges(i, binEdges[i]);
497 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
509 axisTitle[dim] =
"Centrality (%)";
517 axisTitle[dim] =
"#Delta#phi";
524 axisTitle[dim] =
"#Delta#eta";
531 axisTitle[dim] =
"A_{J}";
538 axisTitle[dim] =
"x_{J}";
545 axisTitle[dim] =
"k_{Ty} (GeV)";
552 axisTitle[dim] =
"N_{tracks, trig jet}";
559 axisTitle[dim] =
"N_{tracks, ass jet}";
566 TString thnname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
568 for (
Int_t i = 0; i < dim; i++) {
569 hn->GetAxis(i)->SetTitle(axisTitle[i]);
570 hn->SetBinEdges(i, binEdges[i]);
578 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
579 TString title = histname +
";Centrality (%);#it{p}_{T,1}^{corr} (GeV/#it{c});#it{p}_{T,2}^{corr} (GeV/#it{c})";
580 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt,
nPtBins, 0,
fMaxPt,
"s");
585 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
586 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
593 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
594 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
601 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
602 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
609 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
610 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
625 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
635 axisTitle[dim] =
"A_{J}";
642 axisTitle[dim] =
"#Delta#phi";
649 axisTitle[dim] =
"#it{p}_{T,particle} (GeV/#it{c})";
659 max[dim] = pTParticleBins[nbins[dim]];
660 binEdges[dim] = pTParticleBins;
663 axisTitle[dim] =
"#it{p}_{T}#parallel (GeV/#it{c})";
672 max[dim] = pTParallelBins[nbins[dim]];
673 binEdges[dim] = pTParallelBins;
676 TString thnname = TString::Format(
"%s/MomentumBalance", jets->GetArrayName().Data());
678 for (
Int_t i = 0; i < dim; i++) {
679 hn->GetAxis(i)->SetTitle(axisTitle[i]);
680 hn->SetBinEdges(i, binEdges[i]);
699 axisTitle[dim] =
"Centrality (%)";
707 axisTitle[dim] =
"isSwitched";
714 axisTitle[dim] =
"#DeltaR_{trig}";
721 axisTitle[dim] =
"#DeltaR_{ass}";
728 axisTitle[dim] =
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
735 axisTitle[dim] =
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
742 axisTitle[dim] =
"A_{J} low-threshold";
749 axisTitle[dim] =
"A_{J} hard-core";
756 TString thnname =
"GeometricalMatching";
758 for (
Int_t i = 0; i < dim; i++) {
759 hn->GetAxis(i)->SetTitle(axisTitle[i]);
760 hn->SetBinEdges(i, binEdges[i]);
766 histname =
"GeometricalMatchingEfficiency";
767 title = histname +
";isMatched;counts";
782 const Int_t nRejBins = 32;
785 const Int_t nExBins = 200;
789 AliEmcalContainer* cont = 0;
791 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
794 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
795 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
799 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
800 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
805 const Int_t nEmcalSM = 20;
806 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
807 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
808 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
812 for (
Int_t sm = 1; sm < 5; sm++) {
813 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
814 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
828 title[dim] =
"Centrality %";
850 title[dim] =
"#it{E}_{clus} (GeV)";
857 title[dim] =
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
864 title[dim] =
"Matched track";
878 title[dim] =
"Ncells";
885 title[dim] =
"Dispersion cut";
892 TString thnname = TString::Format(
"%s/clusterObservables", cont->GetArrayName().Data());
894 for (
Int_t i = 0; i < dim; i++) {
895 hn->GetAxis(i)->SetTitle(title[i]);
896 hn->SetBinEdges(i, binEdges[i]);
901 histname = TString::Format(
"%s/hFcrossEMCal", cont->GetArrayName().Data());
902 htitle = histname +
";Centrality (%);Fcross;#it{E}_{clus} (GeV/)";
909 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
914 Int_t nbinsJet[30] = {0};
921 axisTitle[dimJet] =
"Centrality (%)";
929 axisTitle[dimJet] =
"#eta_{jet}";
930 nbinsJet[dimJet] = 28;
931 minJet[dimJet] = -0.7;
932 maxJet[dimJet] = 0.7;
936 axisTitle[dimJet] =
"#phi_{jet} (rad)";
937 nbinsJet[dimJet] = 100;
943 axisTitle[dimJet] =
"#it{E}_{T} (GeV)";
950 axisTitle[dimJet] =
"#rho (GeV/#it{c})";
951 nbinsJet[dimJet] = 100;
953 maxJet[dimJet] = 1000.;
957 axisTitle[dimJet] =
"N_{clusters}";
958 nbinsJet[dimJet] = 20;
959 minJet[dimJet] = -0.5;
960 maxJet[dimJet] = 19.5;
964 TString thnname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
966 for (
Int_t i = 0; i < dimJet; i++) {
967 hn->GetAxis(i)->SetTitle(axisTitle[i]);
968 hn->SetBinEdges(i, binEdgesJet[i]);
983 title[dim] =
"Centrality %";
991 title[dim] =
"#it{E}_{clus} (GeV)";
998 title[dim] =
"#it{p}_{T,jet}^{corr}";
1005 title[dim] =
"#eta_{jet}";
1012 title[dim] =
"#phi_{jet}";
1019 TString thnname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
1021 for (
Int_t i = 0; i < dim; i++) {
1022 hn->GetAxis(i)->SetTitle(title[i]);
1023 hn->SetBinEdges(i, binEdges[i]);
1027 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
1028 htitle = histname +
";type;#it{p}_{T}^{corr} (GeV/#it{c});#Delta_{JES}";
1029 fHistManager.
CreateTH3(histname.Data(), htitle.Data(), 3, -0.5, 2.5,
nPtBins, 0,
fMaxPt, 100, 0, 20);
1037 histname = TString::Format(
"Cells/hCellEnergyAll");
1038 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
1042 histname = TString::Format(
"Cells/hCellEnergyAccepted");
1043 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
1047 histname = TString::Format(
"Cells/hCellEnergyLeading");
1048 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
1052 const Int_t nEmcalSM = 20;
1053 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
1054 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
1055 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
1059 for (
Int_t sm = 1; sm < 5; sm++) {
1060 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
1061 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
1081 histname =
"TriggerSimHistograms/hEtaVsPhi";
1082 title = histname +
";#eta_{patch} (rad);#phi_{patch} (rad)";
1086 histname =
"TriggerSimHistograms/hNPatches";
1087 title = histname +
";#it{N}_{patches};type";
1091 histname =
"TriggerSimHistograms/hPatchE";
1092 title = histname +
";Centrality (%);#it{E}_{patch} (GeV)";
1096 histname =
"TriggerSimHistograms/hPatchMedianE";
1097 title = histname +
";Centrality (%);#it{E}_{patch,med} (GeV);type";
1098 fHistManager.
CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
1101 histname =
"TriggerSimHistograms/hMedPatchDijet";
1102 title = histname +
";Centrality (%);#it{p}_{T,trig}^{corr} (GeV/#it{c});#it{E}_{patch,med} (GeV);type";
1103 Int_t nbinsD[4] = {50, 40, 100, 2};
1104 Double_t minD[4] = {0, 0, 0, -0.5};
1105 Double_t maxD[4] = {100, 200, 50, 1.5};
1112 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1115 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1116 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
1122 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
1123 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
1128 histname = TString::Format(
"%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
1129 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
1130 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5);
1133 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1134 title = histname +
";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
1136 Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
1141 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1142 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
1146 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
1147 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
1151 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1152 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
1154 Double_t min2[4] = {0, 0, 0, -0.5};
1159 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
1160 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
1162 Double_t min3[4] = {0, 0, 0, -0.5};
1167 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
1168 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
1170 Double_t min4[4] = {0, 0, 0, -0.5};
1185 if (fname.BeginsWith(
"alien://")) {
1186 TGrid::Connect(
"alien://");
1189 TFile*
file = TFile::Open(path);
1191 if (!file || file->IsZombie()) {
1192 ::Error(
"AliAnalysisTaskEmcalDijetImbalance",
"Could not open background scaling histogram");
1197 TH2D* h1 =
dynamic_cast<TH2D*
>(file->Get(name1));
1200 ::Info(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s loaded from file %s.", name1, path);
1203 ::Error(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s not found in file %s.", name1, path);
1210 TH2D* h2 =
dynamic_cast<TH2D*
>(file->Get(name2));
1213 ::Info(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Jet pT scaling histogram %s loaded from file %s.", name2, path);
1216 ::Error(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Jet pT scaling histogram %s not found in file %s.", name2, path);
1246 fPHOSGeo = AliPHOSGeometry::GetInstance();
1248 AliInfo(
"Found instance of PHOS geometry!");
1251 AliInfo(
"Creating PHOS geometry!");
1252 Int_t runNum = InputEvent()->GetRunNumber();
1254 fPHOSGeo = AliPHOSGeometry::GetInstance(
"IHEP");
1256 fPHOSGeo = AliPHOSGeometry::GetInstance(
"Run2");
1259 AliOADBContainer geomContainer(
"phosGeo");
1260 geomContainer.InitFromFile(
"$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root",
"PHOSMCRotationMatrixes");
1261 TObjArray* matrixes = (
TObjArray*)geomContainer.GetObject(runNum,
"PHOSRotationMatrixes");
1262 for(
Int_t mod=0; mod<6; mod++) {
1263 if(!matrixes->At(mod))
continue;
1264 fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
1265 printf(
".........Adding Matrix(%d), geo=%p\n",mod,
fPHOSGeo);
1266 ((TGeoHMatrix*)matrixes->At(mod))->
Print();
1276 TClass cls(objname);
1277 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1278 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1279 GetName(), cls.GetName(),
"EmcalTriggers"));
1284 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1310 TString triggerNameMB1 =
"CINT7-B-NOPF-CENT";
1311 TString triggerNameMB2 =
"CV0L7-B-NOPF-CENT";
1312 TString triggerNameJE =
"CINT7EJ1-B-NOPF-CENTNOPMD";
1317 for (
auto i : runtriggers) {
1318 if (i.EqualTo(triggerNameMB1) || i.EqualTo(triggerNameMB2)) {
1327 TString histname =
"Trigger/hMBDownscaleFactor";
1364 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
1365 TString jetContName = jetCont->GetName();
1366 if (jetContName.Contains(
"HardCore"))
continue;
1374 for (
Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
1377 FindDijet(jetCont, leadingHadronCutType);
1398 histname = TString::Format(
"%s/MomentumBalance", jetCont->GetArrayName().Data());
1441 if(!trigJet)
return;
1458 for(
auto assJetCand : jetCont->
accepted()) {
1459 if (!assJetCand)
continue;
1461 if ( TMath::Abs(trigJet->
Phi() - assJetCand->Phi()) <
fDeltaPhiMin )
continue;
1464 if ( assJetCandPt < assJetPt )
continue;
1466 assJet = assJetCand;
1468 if (!assJet)
return;
1496 track = trackIterator.second;
1506 Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
1507 Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
1508 Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
1513 deltaPhi = trackPhi - trigJetPhi;
1514 balancePt = trackPt * TMath::Cos(deltaPhi);
1517 deltaPhi = trackPhi - assJetPhi;
1518 balancePt = -trackPt * TMath::Cos(deltaPhi);
1532 TString jetContAllName = Form(
"Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (
int) (
fMatchingJetR*10) );
1538 TString jetContHardCoreName = Form(
"JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (
int) (
fMatchingJetR*10), trackThreshold, clusThreshold);
1559 TClass cls(objname);
1560 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1561 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1562 GetName(), cls.GetName(),
"EmcalTriggers"));
1567 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1572 std::vector<Double_t> vecEMCal;
1573 std::vector<Double_t> vecDCal;
1575 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1578 if(!recpatch->IsJetHighSimple())
continue;
1580 histname =
"TriggerSimHistograms/hEtaVsPhi";
1583 histname =
"TriggerSimHistograms/hPatchE";
1586 if (recpatch->IsEMCal()) {
1587 vecEMCal.push_back(recpatch->GetPatchE());
1589 vecDCal.push_back(recpatch->GetPatchE());
1596 const Int_t nBkgPatchesEMCal = vecEMCal.size();
1597 const Int_t nBkgPatchesDCal = vecDCal.size();
1598 fMedianEMCal = TMath::Median(nBkgPatchesEMCal, &vecEMCal[0]);
1599 fMedianDCal = TMath::Median(nBkgPatchesDCal, &vecDCal[0]);
1601 histname =
"TriggerSimHistograms/hPatchMedianE";
1605 histname =
"TriggerSimHistograms/hNPatches";
1611 histname =
"TriggerSimHistograms/hMedPatchDijet";
1622 for(
auto p : *fTriggerPatchInfo){
1623 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1626 if(!recpatch->IsJetHighSimple())
continue;
1628 if (recpatch->IsEMCal()) {
1629 if ((recpatch->GetPatchE() -
fMedianDCal) > threshold) {
1634 if ((recpatch->GetPatchE() -
fMedianEMCal) > threshold) {
1658 for(
auto matchingTrigJetCand : jetCont->
accepted()) {
1659 if (!matchingTrigJetCand)
continue;
1661 if (matchingTrigJet) {
1662 if (
GetJetPt(jetCont, matchingTrigJetCand) <
GetJetPt(jetCont, matchingTrigJet) )
continue;
1664 matchingTrigJet = matchingTrigJetCand;
1666 if (!matchingTrigJet)
return;
1670 for(
auto matchingAssJetCand : jetCont->
accepted()) {
1671 if (!matchingAssJetCand)
continue;
1673 if (matchingAssJet) {
1674 if (
GetJetPt(jetCont, matchingAssJetCand) <
GetJetPt(jetCont, matchingAssJet) )
continue;
1676 matchingAssJet = matchingAssJetCand;
1680 if (matchingAssJet) {
1683 if (
GetJetPt(jetCont, matchingTrigJet) <
GetJetPt(jetCont, matchingAssJet) ) {
1724 Double_t phiMinEMCal =
fGeom->GetArm1PhiMin() * TMath::DegToRad();
1725 Double_t phiMaxEMCal =
fGeom->GetEMCALPhiMax() * TMath::DegToRad();
1726 Double_t phiMinDCal =
fGeom->GetDCALPhiMin() * TMath::DegToRad();
1727 Double_t phiMaxDCal =
fGeom->GetDCALPhiMax() * TMath::DegToRad();
1728 Double_t phiMinPHOS = 250 * TMath::DegToRad();
1729 Double_t phiMaxPHOS = 320 * TMath::DegToRad();
1731 Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
1732 Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
1733 Double_t accDCalRegion = 2 * etaEMCal * (phiMaxDCal - phiMinDCal);
1738 while ((jetCont = static_cast<AliJetContainer*>(nextJetColl()))) {
1741 TRandom3* r =
new TRandom3(0);
1742 Double_t jetR = jetCont->GetJetRadius();
1743 Double_t accRC = TMath::Pi() * jetR * jetR;
1744 Double_t etaEMCalfid = etaEMCal - jetR;
1745 Double_t phiMinEMCalfid = phiMinEMCal + jetR;
1746 Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
1747 Double_t phiMinDCalRegionfid = phiMinDCal + jetR;
1748 Double_t phiMaxDCalRegionfid = phiMaxDCal - jetR;
1751 Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
1752 Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
1760 etaMin = -etaEMCalfid + etaBin*etaStep;
1761 etaMax = etaMin + etaStep;
1762 etaDCalRC[etaBin] = r->Uniform(etaMin, etaMax);
1770 phiMin = 1 + phiBin*phiStep;
1771 phiMax = phiMin + phiStep;
1772 phiDCalRC[phiBin] = r->Uniform(phiMin, phiMax);
1783 std::vector<std::vector<Double_t>> trackPtSumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1784 std::vector<std::vector<Double_t>> clusESumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1798 track = trackIterator.first;
1799 trackEta = track.Eta();
1801 trackPt = track.Pt();
1804 if (TMath::Abs(trackEta) < etaTPC) {
1805 trackPtSumTPC += trackPt;
1809 if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
1810 trackPtSumEMCal += trackPt;
1814 deltaR =
GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
1815 if (deltaR < jetR) {
1816 trackPtSumEMCalRC += trackPt;
1822 deltaR =
GetDeltaR(&track, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1823 if (deltaR < jetR) {
1824 trackPtSumDCalRC[etaBin][phiBin] += trackPt;
1841 clus = clusIterator.first;
1842 clusEta = clus.Eta();
1847 if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
1848 clusESumEMCal += clusE;
1852 deltaR =
GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
1853 if (deltaR < jetR) {
1854 clusESumEMCalRC += clusE;
1860 deltaR =
GetDeltaR(&clus, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1861 if (deltaR < jetR) {
1862 clusESumDCalRC[etaBin][phiBin] += clusE;
1870 Double_t numerator = (trackPtSumEMCal + clusESumEMCal) / accEMCal;
1871 Double_t denominator = trackPtSumTPC / accTPC;
1872 Double_t scaleFactor = numerator / denominator;
1873 TString histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1879 numerator = (trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin]) / accRC;
1880 scaleFactor = numerator / denominator;
1881 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jetCont->GetArrayName().Data());
1882 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, scaleFactor};
1888 Double_t rho = jetCont->GetRhoVal();
1889 Double_t deltaPt = trackPtSumEMCalRC + clusESumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1890 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1899 rho = sf * jetCont->GetRhoVal();
1901 deltaPt = trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin] - rho * accRC;
1902 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jetCont->GetArrayName().Data());
1903 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, deltaPt};
1924 jetPt = jetPt * (1 + sf * jet->
NEF());
1932 TString jetContName = jetCont->GetName();
1933 if (jetContName.Contains(
"HardCore")) pT = jet->
Pt();
1946 for(
auto jetCand : jetCont->
accepted()) {
1947 if (!jetCand)
continue;
1951 if ( jetCandPt < leadingJetPt )
continue;
1953 leadingJet = jetCand;
1970 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1980 Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
1981 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
2036 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2037 TString jetContName = jets->GetName();
2038 if (jetContName.Contains(
"HardCore"))
continue;
2042 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
2046 for (
auto jet : jets->
all()) {
2052 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
2057 UInt_t rejectionReason = 0;
2058 if (!jets->
AcceptJet(jet, rejectionReason)) {
2059 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
2060 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
2068 histname = TString::Format(
"%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
2072 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
2073 Double_t x[6] = {
fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
2077 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
2081 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
2085 TLorentzVector leadPart;
2088 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2089 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2094 histname = TString::Format(
"%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
2096 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
2097 track =
static_cast<AliVTrack*
>(jet->Track(i));
2098 z = track->Pt() / TMath::Abs(corrPt);
2104 histname = TString::Format(
"%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
2105 Double_t a[4] = {
fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
2110 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
2131 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2132 TString jetContName = jets->GetName();
2133 if (jetContName.Contains(
"HardCore"))
continue;
2137 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
2141 for (
auto jet : jets->
all()) {
2147 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
2152 UInt_t rejectionReason = 0;
2153 if (!jets->
AcceptJet(jet, rejectionReason)) {
2154 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
2155 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
2163 histname = TString::Format(
"%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
2167 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
2168 Double_t x[6] = {
fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
2172 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
2176 TLorentzVector leadPart;
2179 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2180 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2185 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
2187 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
2188 track =
static_cast<AliVTrack*
>(jet->Track(i));
2189 z = track->Pt() / TMath::Abs(corrPt);
2195 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
2196 Double_t a[4] = {
fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
2210 TString histname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
2212 if (!histJetObservables)
return;
2213 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2214 TString title(histJetObservables->GetAxis(n)->GetTitle());
2215 if (
title==
"Centrality (%)")
2216 contents[n] =
fCent;
2217 else if (
title==
"LeadingHadronRequired")
2219 else if (
title==
"#it{p}_{T,trig jet} (GeV/#it{c})")
2221 else if (
title==
"#it{p}_{T,ass jet} (GeV/#it{c})")
2223 else if (
title==
"#phi_{trig jet}")
2225 else if (
title==
"#phi_{ass jet}")
2227 else if (
title==
"#eta_{trig jet}")
2229 else if (
title==
"#eta_{ass jet}")
2232 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2234 histJetObservables->Fill(contents);
2245 TString histname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
2247 if (!histJetObservables)
return;
2248 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2249 TString title(histJetObservables->GetAxis(n)->GetTitle());
2250 if (
title==
"Centrality (%)")
2251 contents[n] =
fCent;
2252 else if (
title==
"#Delta#phi")
2254 else if (
title==
"#Delta#eta")
2256 else if (
title==
"A_{J}")
2258 else if (
title==
"x_{J}")
2260 else if (
title==
"k_{Ty} (GeV)")
2262 else if (
title==
"N_{tracks, trig jet}")
2264 else if (
title==
"N_{tracks, ass jet}")
2267 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2269 histJetObservables->Fill(contents);
2273 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
2281 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
2286 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2287 TLorentzVector leadPart;
2290 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2295 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
2298 track =
static_cast<AliVTrack*
>(trigJet->
Track(i));
2305 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
2318 if (!histJetObservables)
return;
2319 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2320 TString title(histJetObservables->GetAxis(n)->GetTitle());
2323 else if (
title==
"#Delta#phi")
2324 contents[n] = deltaPhi;
2325 else if (
title==
"#it{p}_{T,particle} (GeV/#it{c})")
2326 contents[n] = trackPt;
2327 else if (
title==
"#it{p}_{T}#parallel (GeV/#it{c})")
2328 contents[n] = balancePt;
2330 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2332 histJetObservables->Fill(contents);
2341 TString histname =
"GeometricalMatchingEfficiency";
2351 TString thnname =
"GeometricalMatching";
2354 if (!histJetObservables)
return;
2355 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2356 TString title(histJetObservables->GetAxis(n)->GetTitle());
2357 if (
title==
"Centrality (%)")
2358 contents[n] =
fCent;
2359 else if (
title==
"isSwitched")
2360 contents[n] = isSwitched;
2361 else if (
title==
"#DeltaR_{trig}")
2362 contents[n] = trigDeltaR;
2363 else if (
title==
"#DeltaR_{ass}")
2364 contents[n] = assDeltaR;
2365 else if (
title==
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2367 else if (
title==
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2369 else if (
title==
"A_{J} low-threshold")
2371 else if (
title==
"A_{J} hard-core")
2374 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2376 histJetObservables->Fill(contents);
2398 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
2403 while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
2409 if (it->second->IsEMCAL()) {
2410 Double_t phi = it->first.Phi_0_2pi();
2414 }
else if (isDcal == 1) {
2417 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2422 if (it->second->IsEMCAL()) {
2423 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
2424 UInt_t rejectionReason = 0;
2425 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
2426 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2429 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2430 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
2431 UInt_t rejectionReason = 0;
2432 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
2433 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2443 if (it->second->IsEMCAL()) {
2445 Ehadcorr = it->second->GetHadCorrEnergy();
2446 Enonlin = it->second->GetNonLinCorrEnergy();
2448 Enonlin = it->second->E();
2452 histname = TString::Format(
"%s/hFcrossEMCal", clusters->GetArrayName().Data());
2457 Int_t sm =
fGeom->GetSuperModuleNumber(it->second->GetCellAbsId(0));
2458 if (sm >=0 && sm < 20) {
2459 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2463 AliError(Form(
"Supermodule %d does not exist!", sm));
2467 histname = TString::Format(
"Cells/hCellEnergyAccepted");
2469 for (
Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2470 absId = it->second->GetCellAbsId(iCell);
2473 if (ecell > leadEcell) {
2478 histname = TString::Format(
"Cells/hCellEnergyLeading");
2481 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2483 Ehadcorr = it->second->GetCoreEnergy();
2484 Enonlin = it->second->E();
2488 fPHOSGeo->AbsToRelNumbering(it->second->GetCellAbsId(0), relid);
2489 Int_t sm = relid[0];
2490 if (sm >=1 && sm < 5) {
2491 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2495 AliError(Form(
"Supermodule %d does not exist!", sm));
2500 histname = TString::Format(
"Cells/hCellEnergyAccepted");
2502 for (
Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2503 absId = it->second->GetCellAbsId(iCell);
2504 ecell = phosCaloCells->GetCellAmplitude(absId);
2506 if (ecell > leadEcell) {
2511 histname = TString::Format(
"Cells/hCellEnergyLeading");
2516 Int_t hasMatchedTrack = -1;
2517 Int_t nMatchedTracks = it->second->GetNTracksMatched();
2518 if (nMatchedTracks == 0) {
2519 hasMatchedTrack = 0;
2520 }
else if (nMatchedTracks > 0) {
2521 hasMatchedTrack = 1;
2525 Int_t passedDispersionCut = 0;
2526 if (it->second->Chi2() < 2.5*2.5) {
2527 passedDispersionCut = 1;
2532 histname = TString::Format(
"%s/clusterObservables", clusters->GetArrayName().Data());
2534 if (!histClusterObservables)
return;
2535 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
2536 TString title(histClusterObservables->GetAxis(i)->GetTitle());
2537 if (
title==
"Centrality %")
2538 contents[i] =
fCent;
2539 else if (
title==
"#eta")
2540 contents[i] = it->first.Eta();
2541 else if (
title==
"#phi")
2542 contents[i] = it->first.Phi_0_2pi();
2543 else if (
title==
"#it{E}_{clus} (GeV)")
2544 contents[i] = Enonlin;
2545 else if (
title==
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
2546 contents[i] = Ehadcorr;
2547 else if (
title==
"Matched track")
2548 contents[i] = hasMatchedTrack;
2549 else if (
title==
"M02")
2550 contents[i] = it->second->GetM02();
2551 else if (
title==
"Ncells")
2552 contents[i] = it->second->GetNCells();
2553 else if (
title==
"Dispersion cut")
2554 contents[i] = passedDispersionCut;
2556 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2558 histClusterObservables->Fill(contents);
2567 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2569 for (
auto jet : jets->
accepted()) {
2574 histname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
2576 if (!histJetObservables)
return;
2577 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
2578 TString title(histJetObservables->GetAxis(i)->GetTitle());
2579 if (
title==
"Centrality (%)")
2580 contents[i] =
fCent;
2581 else if (
title==
"#eta_{jet}")
2582 contents[i] = jet->Eta();
2583 else if (
title==
"#phi_{jet} (rad)")
2584 contents[i] = jet->Phi_0_2pi();
2585 else if (
title==
"#it{E}_{T} (GeV)")
2586 contents[i] = jet->Pt();
2587 else if (
title==
"#rho (GeV/#it{c})")
2588 contents[i] = jet->Pt() / jet->Area();
2589 else if (
title==
"N_{clusters}")
2590 contents[i] = jet->GetNumberOfClusters();
2592 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2594 histJetObservables->Fill(contents);
2600 histname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
2601 Int_t nClusters = jet->GetNumberOfClusters();
2603 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
2604 clus = jet->Cluster(iClus);
2616 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
2617 clus = jet->Cluster(iClus);
2620 shift = 0.79 * TMath::Exp(-0.5 * ((eclus - 3.81) / 1.50)*((eclus - 3.81) / 1.50) );
2624 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
2645 histname = TString::Format(
"Cells/hCellEnergyAll");
2649 sm =
fGeom->GetSuperModuleNumber(absId);
2650 if (sm >=0 && sm < 20) {
2651 patchSumEMCal[sm] += ecell;
2656 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
2658 absId = phosCaloCells->GetCellNumber(i);
2659 ecell = phosCaloCells->GetCellAmplitude(absId);
2662 histname = TString::Format(
"Cells/hCellEnergyAll");
2666 fPHOSGeo->AbsToRelNumbering(absId, relid);
2668 if (sm >=1 && sm < 5) {
2669 patchSumPHOS[sm-1] += ecell;
2674 for (
Int_t sm = 0; sm < 20; sm++) {
2675 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
2679 for (
Int_t sm = 1; sm < 5; sm++) {
2680 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
2689 Int_t AbsIdseed = -1;
2691 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
2692 if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
2693 Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
2694 AbsIdseed = cluster->GetCellAbsId(i);
2702 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
2703 fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
2704 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
2711 if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) {
2712 absID1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
2715 absID2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
2723 if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
2724 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
2725 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
2727 else if (ieta == 0 && imod%2) {
2728 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
2729 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
2732 if (ieta < AliEMCALGeoParams::fgkEMCALCols-1) {
2733 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
2736 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
2740 Double_t ecell1 = cells->GetCellAmplitude(absID1);
2741 Double_t ecell2 = cells->GetCellAmplitude(absID2);
2742 Double_t ecell3 = cells->GetCellAmplitude(absID3);
2743 Double_t ecell4 = cells->GetCellAmplitude(absID4);
2745 Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
2747 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)
void AllocateBackgroundHistograms()
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()
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
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