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"
58 fUseManualEventCuts(kFALSE),
59 fUseAliEventCuts(kTRUE),
63 fDijetLeadingHadronPt(0),
69 fPlotJetHistograms(kFALSE),
70 fPlotDijetCandHistograms(kFALSE),
71 fPlotDijetImbalanceHistograms(kFALSE),
72 fComputeBackground(kFALSE),
73 fDoMomentumBalance(kFALSE),
74 fDoGeometricalMatching(kFALSE),
76 fTrackConstituentThreshold(0),
77 fClusterConstituentThreshold(0),
81 fLoadBackgroundScalingWeights(kTRUE),
82 fBackgroundScalingWeights(0),
83 fGapJetScalingWeights(0),
84 fComputeMBDownscaling(kFALSE),
86 fDoTriggerSimulation(kFALSE),
110 fUseManualEventCuts(kFALSE),
111 fUseAliEventCuts(kTRUE),
115 fDijetLeadingHadronPt(0),
121 fPlotJetHistograms(kFALSE),
122 fPlotDijetCandHistograms(kFALSE),
123 fPlotDijetImbalanceHistograms(kFALSE),
124 fComputeBackground(kFALSE),
125 fDoMomentumBalance(kFALSE),
126 fDoGeometricalMatching(kFALSE),
128 fTrackConstituentThreshold(0),
129 fClusterConstituentThreshold(0),
130 fMBUpscaleFactor(1.),
133 fLoadBackgroundScalingWeights(kTRUE),
134 fBackgroundScalingWeights(0),
135 fGapJetScalingWeights(0),
136 fComputeMBDownscaling(kFALSE),
137 fDoCaloStudy(kFALSE),
138 fDoTriggerSimulation(kFALSE),
201 while ((obj = next())) {
243 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
246 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
247 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
253 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
254 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
259 histname = TString::Format(
"%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
260 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
261 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5);
264 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
265 title = histname +
";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
267 Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
272 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
273 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
274 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5,
"s");
277 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
278 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
282 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
283 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
287 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
288 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
295 histname = TString::Format(
"%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
296 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
303 histname = TString::Format(
"%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
304 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
312 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
313 title = histname +
";#it{E}_{patch,med};type;#it{p}_{T}^{corr} (GeV/#it{c});Centrality (%)";
323 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
324 title = histname +
";Centrality;Scale factor;counts";
327 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
328 title = histname +
";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
331 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jets->GetArrayName().Data());
332 title = histname +
";#eta;#phi;Centrality;Scale factor;";
335 Double_t max[4] = {0.5,6., 100, 20};
338 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jets->GetArrayName().Data());
339 title = histname +
";#eta;#phi;Centrality;#delta#it{p}_{T} (GeV/#it{c})";
341 Double_t minDpT[4] = {-0.5,1., 0, -50};
342 Double_t maxDpT[4] = {0.5,6., 100, 150};
357 title[dim] =
"Centrality %";
365 title[dim] =
"#it{E}_{clus} (GeV)";
372 title[dim] =
"#it{p}_{T,jet}^{corr}";
379 title[dim] =
"#eta_{jet}";
386 title[dim] =
"#phi_{jet}";
393 TString thnname = TString::Format(
"%s/JetHistograms/hClustersInJets", jets->GetArrayName().Data());
395 for (
Int_t i = 0; i < dim; i++) {
396 hn->GetAxis(i)->SetTitle(title[i]);
397 hn->SetBinEdges(i, binEdges[i]);
404 histname =
"Trigger/hMBDownscaleFactor";
405 title = histname +
";Downscale factor;counts";
421 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
430 axisTitle[dim] =
"Centrality (%)";
438 axisTitle[dim] =
"LeadingHadronRequired";
445 axisTitle[dim] =
"#it{p}_{T,trig jet} (GeV/#it{c})";
446 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
452 axisTitle[dim] =
"#it{p}_{T,ass jet} (GeV/#it{c})";
453 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
459 axisTitle[dim] =
"#phi_{trig jet}";
460 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
462 max[dim] = TMath::TwoPi();
466 axisTitle[dim] =
"#phi_{ass jet}";
467 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
469 max[dim] = TMath::TwoPi();
473 axisTitle[dim] =
"#eta_{trig jet}";
474 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
480 axisTitle[dim] =
"#eta_{ass jet}";
481 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
487 TString thnname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
489 for (
Int_t i = 0; i < dim; i++) {
490 hn->GetAxis(i)->SetTitle(axisTitle[i]);
491 hn->SetBinEdges(i, binEdges[i]);
504 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
516 axisTitle[dim] =
"Centrality (%)";
524 axisTitle[dim] =
"#Delta#phi";
531 axisTitle[dim] =
"#Delta#eta";
538 axisTitle[dim] =
"A_{J}";
545 axisTitle[dim] =
"x_{J}";
552 axisTitle[dim] =
"k_{Ty} (GeV)";
559 axisTitle[dim] =
"N_{tracks, trig jet}";
566 axisTitle[dim] =
"N_{tracks, ass jet}";
573 TString thnname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
575 for (
Int_t i = 0; i < dim; i++) {
576 hn->GetAxis(i)->SetTitle(axisTitle[i]);
577 hn->SetBinEdges(i, binEdges[i]);
585 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
586 TString title = histname +
";Centrality (%);#it{p}_{T,1}^{corr} (GeV/#it{c});#it{p}_{T,2}^{corr} (GeV/#it{c})";
587 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt,
nPtBins, 0,
fMaxPt,
"s");
592 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
593 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
600 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
601 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
608 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
609 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
616 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
617 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
632 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
642 axisTitle[dim] =
"A_{J}";
649 axisTitle[dim] =
"#Delta#phi";
656 axisTitle[dim] =
"#it{p}_{T,particle} (GeV/#it{c})";
666 max[dim] = pTParticleBins[nbins[dim]];
667 binEdges[dim] = pTParticleBins;
670 axisTitle[dim] =
"#it{p}_{T}#parallel (GeV/#it{c})";
679 max[dim] = pTParallelBins[nbins[dim]];
680 binEdges[dim] = pTParallelBins;
683 TString thnname = TString::Format(
"%s/MomentumBalance", jets->GetArrayName().Data());
685 for (
Int_t i = 0; i < dim; i++) {
686 hn->GetAxis(i)->SetTitle(axisTitle[i]);
687 hn->SetBinEdges(i, binEdges[i]);
706 axisTitle[dim] =
"Centrality (%)";
714 axisTitle[dim] =
"isSwitched";
721 axisTitle[dim] =
"#DeltaR_{trig}";
728 axisTitle[dim] =
"#DeltaR_{ass}";
735 axisTitle[dim] =
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
742 axisTitle[dim] =
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
749 axisTitle[dim] =
"A_{J} low-threshold";
756 axisTitle[dim] =
"A_{J} hard-core";
763 TString thnname =
"GeometricalMatching";
765 for (
Int_t i = 0; i < dim; i++) {
766 hn->GetAxis(i)->SetTitle(axisTitle[i]);
767 hn->SetBinEdges(i, binEdges[i]);
773 histname =
"GeometricalMatchingEfficiency";
774 title = histname +
";isMatched;counts";
788 const Int_t nRejBins = 32;
792 AliEmcalContainer* cont = 0;
794 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
797 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
798 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
802 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
803 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
808 const Int_t nEmcalSM = 20;
809 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
810 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
811 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
815 for (
Int_t sm = 1; sm < 5; sm++) {
816 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
817 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
830 title[dim] =
"Centrality %";
852 title[dim] =
"#it{E}_{clus} (GeV)";
859 title[dim] =
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
866 title[dim] =
"Matched track";
880 title[dim] =
"Ncells";
887 title[dim] =
"Dispersion cut";
894 TString thnname = TString::Format(
"%s/clusterObservables", cont->GetArrayName().Data());
896 for (
Int_t i = 0; i < dim; i++) {
897 hn->GetAxis(i)->SetTitle(title[i]);
898 hn->SetBinEdges(i, binEdges[i]);
905 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
908 Int_t nbinsJet[30] = {0};
915 axisTitle[dimJet] =
"Centrality (%)";
923 axisTitle[dimJet] =
"#eta_{jet}";
924 nbinsJet[dimJet] = 28;
925 minJet[dimJet] = -0.7;
926 maxJet[dimJet] = 0.7;
930 axisTitle[dimJet] =
"#phi_{jet} (rad)";
931 nbinsJet[dimJet] = 100;
937 axisTitle[dimJet] =
"#it{E}_{T} (GeV)";
944 axisTitle[dimJet] =
"#rho (GeV/#it{c})";
945 nbinsJet[dimJet] = 100;
947 maxJet[dimJet] = 1000.;
951 axisTitle[dimJet] =
"N_{clusters}";
952 nbinsJet[dimJet] = 20;
953 minJet[dimJet] = -0.5;
954 maxJet[dimJet] = 19.5;
958 TString thnname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
960 for (
Int_t i = 0; i < dimJet; i++) {
961 hn->GetAxis(i)->SetTitle(axisTitle[i]);
962 hn->SetBinEdges(i, binEdgesJet[i]);
970 histname = TString::Format(
"Cells/hCellEnergyAll");
971 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
975 histname = TString::Format(
"Cells/hCellEnergyAccepted");
976 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
980 histname = TString::Format(
"Cells/hCellEnergyLeading");
981 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
985 const Int_t nEmcalSM = 20;
986 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
987 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
988 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
992 for (
Int_t sm = 1; sm < 5; sm++) {
993 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
994 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
1014 histname =
"TriggerSimHistograms/hEtaVsPhi";
1015 title = histname +
";#eta_{patch} (rad);#phi_{patch} (rad)";
1019 histname =
"TriggerSimHistograms/hNPatches";
1020 title = histname +
";#it{N}_{patches};type";
1024 histname =
"TriggerSimHistograms/hPatchE";
1025 title = histname +
";Centrality (%);#it{E}_{patch} (GeV)";
1029 histname =
"TriggerSimHistograms/hPatchMedianE";
1030 title = histname +
";Centrality (%);#it{E}_{patch,med} (GeV);type";
1031 fHistManager.
CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
1034 histname =
"TriggerSimHistograms/hMedPatchDijet";
1035 title = histname +
";Centrality (%);#it{E}_{patch,med} (GeV);type";
1036 fHistManager.
CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
1042 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1045 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1046 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
1052 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
1053 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
1058 histname = TString::Format(
"%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
1059 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
1060 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5);
1063 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1064 title = histname +
";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
1066 Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
1071 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1072 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
1076 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
1077 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
1081 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1082 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
1084 Double_t min2[4] = {0, 0, 0, -0.5};
1089 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
1090 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
1092 Double_t min3[4] = {0, 0, 0, -0.5};
1097 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
1098 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
1100 Double_t min4[4] = {0, 0, 0, -0.5};
1115 if (fname.BeginsWith(
"alien://")) {
1116 TGrid::Connect(
"alien://");
1119 TFile*
file = TFile::Open(path);
1121 if (!file || file->IsZombie()) {
1122 ::Error(
"AliAnalysisTaskEmcalDijetImbalance",
"Could not open background scaling histogram");
1126 TH1D* h =
dynamic_cast<TH1D*
>(file->Get(name));
1129 ::Info(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s loaded from file %s.", name, path);
1132 ::Error(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s not found in file %s.", name, path);
1157 TClass cls(objname);
1158 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1159 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1160 GetName(), cls.GetName(),
"EmcalTriggers"));
1165 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1171 fPHOSGeo = AliPHOSGeometry::GetInstance();
1173 AliInfo(
"Found instance of PHOS geometry!");
1176 AliInfo(
"Creating PHOS geometry!");
1177 Int_t runNum = InputEvent()->GetRunNumber();
1179 fPHOSGeo = AliPHOSGeometry::GetInstance(
"IHEP");
1181 fPHOSGeo = AliPHOSGeometry::GetInstance(
"Run2");
1184 AliOADBContainer geomContainer(
"phosGeo");
1185 geomContainer.InitFromFile(
"$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root",
"PHOSMCRotationMatrixes");
1186 TObjArray* matrixes = (
TObjArray*)geomContainer.GetObject(runNum,
"PHOSRotationMatrixes");
1187 for(
Int_t mod=0; mod<6; mod++) {
1188 if(!matrixes->At(mod))
continue;
1189 fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
1190 printf(
".........Adding Matrix(%d), geo=%p\n",mod,
fPHOSGeo);
1191 ((TGeoHMatrix*)matrixes->At(mod))->
Print();
1218 TString triggerNameMB1 =
"CINT7-B-NOPF-CENT";
1219 TString triggerNameMB2 =
"CV0L7-B-NOPF-CENT";
1220 TString triggerNameJE =
"CINT7EJ1-B-NOPF-CENTNOPMD";
1225 for (
auto i : runtriggers) {
1226 if (i.EqualTo(triggerNameMB1) || i.EqualTo(triggerNameMB2)) {
1235 TString histname =
"Trigger/hMBDownscaleFactor";
1272 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
1273 TString jetContName = jetCont->GetName();
1274 if (jetContName.Contains(
"HardCore"))
continue;
1282 for (
Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
1285 FindDijet(jetCont, leadingHadronCutType);
1306 histname = TString::Format(
"%s/MomentumBalance", jetCont->GetArrayName().Data());
1341 if(!trigJet)
return;
1358 for(
auto assJetCand : jetCont->
accepted()) {
1359 if (!assJetCand)
continue;
1361 if ( TMath::Abs(trigJet->
Phi() - assJetCand->Phi()) <
fDeltaPhiMin )
continue;
1364 if ( assJetCandPt < assJetPt )
continue;
1366 assJet = assJetCand;
1368 if (!assJet)
return;
1396 track = trackIterator.second;
1406 Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
1407 Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
1408 Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
1413 deltaPhi = trackPhi - trigJetPhi;
1414 balancePt = trackPt * TMath::Cos(deltaPhi);
1417 deltaPhi = trackPhi - assJetPhi;
1418 balancePt = -trackPt * TMath::Cos(deltaPhi);
1432 TString jetContAllName = Form(
"Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (
int) (
fMatchingJetR*10) );
1438 TString jetContHardCoreName = Form(
"JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (
int) (
fMatchingJetR*10), trackThreshold, clusThreshold);
1459 TClass cls(objname);
1460 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1461 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1462 GetName(), cls.GetName(),
"EmcalTriggers"));
1467 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1472 std::vector<Double_t> vecEMCal;
1473 std::vector<Double_t> vecDCal;
1475 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1478 if(!recpatch->IsJetHighSimple())
continue;
1480 histname =
"TriggerSimHistograms/hEtaVsPhi";
1483 histname =
"TriggerSimHistograms/hPatchE";
1486 if (recpatch->IsEMCal()) {
1487 vecEMCal.push_back(recpatch->GetPatchE());
1489 vecDCal.push_back(recpatch->GetPatchE());
1496 const Int_t nBkgPatchesEMCal = vecEMCal.size();
1497 const Int_t nBkgPatchesDCal = vecDCal.size();
1498 fMedianEMCal = TMath::Median(nBkgPatchesEMCal, &vecEMCal[0]);
1499 fMedianDCal = TMath::Median(nBkgPatchesDCal, &vecDCal[0]);
1501 histname =
"TriggerSimHistograms/hPatchMedianE";
1505 histname =
"TriggerSimHistograms/hNPatches";
1513 for(
auto p : *fTriggerPatchInfo){
1514 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1517 if(!recpatch->IsJetHighSimple())
continue;
1519 if (recpatch->IsEMCal()) {
1520 if ((recpatch->GetPatchE() -
fMedianDCal) > threshold) {
1525 if ((recpatch->GetPatchE() -
fMedianEMCal) > threshold) {
1549 for(
auto matchingTrigJetCand : jetCont->
accepted()) {
1550 if (!matchingTrigJetCand)
continue;
1552 if (matchingTrigJet) {
1553 if (
GetJetPt(jetCont, matchingTrigJetCand) <
GetJetPt(jetCont, matchingTrigJet) )
continue;
1555 matchingTrigJet = matchingTrigJetCand;
1557 if (!matchingTrigJet)
return;
1561 for(
auto matchingAssJetCand : jetCont->
accepted()) {
1562 if (!matchingAssJetCand)
continue;
1564 if (matchingAssJet) {
1565 if (
GetJetPt(jetCont, matchingAssJetCand) <
GetJetPt(jetCont, matchingAssJet) )
continue;
1567 matchingAssJet = matchingAssJetCand;
1571 if (matchingAssJet) {
1574 if (
GetJetPt(jetCont, matchingTrigJet) <
GetJetPt(jetCont, matchingAssJet) ) {
1615 Double_t phiMinEMCal =
fGeom->GetArm1PhiMin() * TMath::DegToRad();
1616 Double_t phiMaxEMCal =
fGeom->GetEMCALPhiMax() * TMath::DegToRad();
1617 Double_t phiMinDCal =
fGeom->GetDCALPhiMin() * TMath::DegToRad();
1618 Double_t phiMaxDCal =
fGeom->GetDCALPhiMax() * TMath::DegToRad();
1619 Double_t phiMinPHOS = 250 * TMath::DegToRad();
1620 Double_t phiMaxPHOS = 320 * TMath::DegToRad();
1622 Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
1623 Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
1624 Double_t accDCalRegion = 2 * etaEMCal * (phiMaxDCal - phiMinDCal);
1627 TRandom3* r =
new TRandom3(0);
1629 Double_t accRC = TMath::Pi() * jetR * jetR;
1630 Double_t etaEMCalfid = etaEMCal - jetR;
1631 Double_t phiMinEMCalfid = phiMinEMCal + jetR;
1632 Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
1633 Double_t phiMinDCalRegionfid = phiMinDCal + jetR;
1634 Double_t phiMaxDCalRegionfid = phiMaxDCal - jetR;
1637 Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
1638 Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
1646 etaMin = -etaEMCalfid + etaBin*etaStep;
1647 etaMax = etaMin + etaStep;
1648 etaDCalRC[etaBin] = r->Uniform(etaMin, etaMax);
1656 phiMin = 1 + phiBin*phiStep;
1657 phiMax = phiMin + phiStep;
1658 phiDCalRC[phiBin] = r->Uniform(phiMin, phiMax);
1669 std::vector<std::vector<Double_t>> trackPtSumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1670 std::vector<std::vector<Double_t>> clusESumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1684 track = trackIterator.first;
1685 trackEta = track.Eta();
1687 trackPt = track.Pt();
1690 if (TMath::Abs(trackEta) < etaTPC) {
1691 trackPtSumTPC += trackPt;
1695 if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
1696 trackPtSumEMCal += trackPt;
1700 deltaR =
GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
1701 if (deltaR < jetR) {
1702 trackPtSumEMCalRC += trackPt;
1708 deltaR =
GetDeltaR(&track, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1709 if (deltaR < jetR) {
1710 trackPtSumDCalRC[etaBin][phiBin] += trackPt;
1727 clus = clusIterator.first;
1728 clusEta = clus.Eta();
1733 if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
1734 clusESumEMCal += clusE;
1738 deltaR =
GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
1739 if (deltaR < jetR) {
1740 clusESumEMCalRC += clusE;
1746 deltaR =
GetDeltaR(&clus, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1747 if (deltaR < jetR) {
1748 clusESumDCalRC[etaBin][phiBin] += clusE;
1756 Double_t numerator = (trackPtSumEMCal + clusESumEMCal) / accEMCal;
1757 Double_t denominator = trackPtSumTPC / accTPC;
1758 Double_t scaleFactor = numerator / denominator;
1759 TString histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1765 numerator = (trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin]) / accRC;
1766 scaleFactor = numerator / denominator;
1767 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jetCont->GetArrayName().Data());
1768 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, scaleFactor};
1775 Double_t deltaPt = trackPtSumEMCalRC + clusESumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1776 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1787 deltaPt = trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin] - rho * accRC;
1788 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jetCont->GetArrayName().Data());
1789 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, deltaPt};
1816 TString jetContName = jetCont->GetName();
1817 if (jetContName.Contains(
"HardCore")) pT = jet->
Pt();
1830 for(
auto jetCand : jetCont->
accepted()) {
1831 if (!jetCand)
continue;
1835 if ( jetCandPt < leadingJetPt )
continue;
1837 leadingJet = jetCand;
1854 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1864 Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
1865 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1913 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1914 TString jetContName = jets->GetName();
1915 if (jetContName.Contains(
"HardCore"))
continue;
1919 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
1923 for (
auto jet : jets->
all()) {
1929 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
1934 UInt_t rejectionReason = 0;
1935 if (!jets->
AcceptJet(jet, rejectionReason)) {
1936 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1937 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1945 histname = TString::Format(
"%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
1949 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1950 Double_t x[6] = {
fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
1954 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
1958 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1962 TLorentzVector leadPart;
1965 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
1966 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1971 histname = TString::Format(
"%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
1973 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
1974 track =
static_cast<AliVTrack*
>(jet->Track(i));
1975 z = track->Pt() / TMath::Abs(corrPt);
1981 histname = TString::Format(
"%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
1982 Double_t a[4] = {
fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
1987 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
1996 histname = TString::Format(
"%s/JetHistograms/hClustersInJets", jets->GetArrayName().Data());
1997 Int_t nClusters = jet->GetNumberOfClusters();
1999 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
2000 clus = jet->Cluster(iClus);
2001 Double_t x[5] = {
fCent, clus->E(), corrPt, jet->Eta(), jet->Phi_0_2pi()};
2022 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2023 TString jetContName = jets->GetName();
2024 if (jetContName.Contains(
"HardCore"))
continue;
2028 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
2032 for (
auto jet : jets->
all()) {
2038 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
2043 UInt_t rejectionReason = 0;
2044 if (!jets->
AcceptJet(jet, rejectionReason)) {
2045 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
2046 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
2054 histname = TString::Format(
"%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
2058 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
2059 Double_t x[6] = {
fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
2063 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
2067 TLorentzVector leadPart;
2070 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2071 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2076 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
2078 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
2079 track =
static_cast<AliVTrack*
>(jet->Track(i));
2080 z = track->Pt() / TMath::Abs(corrPt);
2086 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
2087 Double_t a[4] = {
fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
2101 TString histname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
2103 if (!histJetObservables)
return;
2104 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2105 TString title(histJetObservables->GetAxis(n)->GetTitle());
2106 if (
title==
"Centrality (%)")
2107 contents[n] =
fCent;
2108 else if (
title==
"LeadingHadronRequired")
2110 else if (
title==
"#it{p}_{T,trig jet} (GeV/#it{c})")
2112 else if (
title==
"#it{p}_{T,ass jet} (GeV/#it{c})")
2114 else if (
title==
"#phi_{trig jet}")
2116 else if (
title==
"#phi_{ass jet}")
2118 else if (
title==
"#eta_{trig jet}")
2120 else if (
title==
"#eta_{ass jet}")
2123 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2125 histJetObservables->Fill(contents);
2136 TString histname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
2138 if (!histJetObservables)
return;
2139 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2140 TString title(histJetObservables->GetAxis(n)->GetTitle());
2141 if (
title==
"Centrality (%)")
2142 contents[n] =
fCent;
2143 else if (
title==
"#Delta#phi")
2145 else if (
title==
"#Delta#eta")
2147 else if (
title==
"A_{J}")
2149 else if (
title==
"x_{J}")
2151 else if (
title==
"k_{Ty} (GeV)")
2153 else if (
title==
"N_{tracks, trig jet}")
2155 else if (
title==
"N_{tracks, ass jet}")
2158 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2160 histJetObservables->Fill(contents);
2164 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
2172 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
2177 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2178 TLorentzVector leadPart;
2181 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2186 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
2189 track =
static_cast<AliVTrack*
>(trigJet->
Track(i));
2196 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
2202 histname =
"TriggerSimHistograms/hMedPatchDijet";
2216 if (!histJetObservables)
return;
2217 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2218 TString title(histJetObservables->GetAxis(n)->GetTitle());
2221 else if (
title==
"#Delta#phi")
2222 contents[n] = deltaPhi;
2223 else if (
title==
"#it{p}_{T,particle} (GeV/#it{c})")
2224 contents[n] = trackPt;
2225 else if (
title==
"#it{p}_{T}#parallel (GeV/#it{c})")
2226 contents[n] = balancePt;
2228 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2230 histJetObservables->Fill(contents);
2239 TString histname =
"GeometricalMatchingEfficiency";
2249 TString thnname =
"GeometricalMatching";
2252 if (!histJetObservables)
return;
2253 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2254 TString title(histJetObservables->GetAxis(n)->GetTitle());
2255 if (
title==
"Centrality (%)")
2256 contents[n] =
fCent;
2257 else if (
title==
"isSwitched")
2258 contents[n] = isSwitched;
2259 else if (
title==
"#DeltaR_{trig}")
2260 contents[n] = trigDeltaR;
2261 else if (
title==
"#DeltaR_{ass}")
2262 contents[n] = assDeltaR;
2263 else if (
title==
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2265 else if (
title==
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2267 else if (
title==
"A_{J} low-threshold")
2269 else if (
title==
"A_{J} hard-core")
2272 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2274 histJetObservables->Fill(contents);
2296 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
2301 while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
2307 if (it->second->IsEMCAL()) {
2308 Double_t phi = it->first.Phi_0_2pi();
2312 }
else if (isDcal == 1) {
2315 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2320 if (it->second->IsEMCAL()) {
2321 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
2322 UInt_t rejectionReason = 0;
2323 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
2324 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2327 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2328 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
2329 UInt_t rejectionReason = 0;
2330 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
2331 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2341 if (it->second->IsEMCAL()) {
2343 Ehadcorr = it->second->GetHadCorrEnergy();
2344 Enonlin = it->second->GetNonLinCorrEnergy();
2346 Int_t sm =
fGeom->GetSuperModuleNumber(it->second->GetCellAbsId(0));
2347 if (sm >=0 && sm < 20) {
2348 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2352 AliError(Form(
"Supermodule %d does not exist!", sm));
2356 histname = TString::Format(
"Cells/hCellEnergyAccepted");
2358 for (
Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2359 absId = it->second->GetCellAbsId(iCell);
2362 if (ecell > leadEcell) {
2367 histname = TString::Format(
"Cells/hCellEnergyLeading");
2370 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2372 Ehadcorr = it->second->GetCoreEnergy();
2373 Enonlin = it->second->E();
2377 fPHOSGeo->AbsToRelNumbering(it->second->GetCellAbsId(0), relid);
2378 Int_t sm = relid[0];
2379 if (sm >=1 && sm < 5) {
2380 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2384 AliError(Form(
"Supermodule %d does not exist!", sm));
2389 histname = TString::Format(
"Cells/hCellEnergyAccepted");
2391 for (
Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2392 absId = it->second->GetCellAbsId(iCell);
2393 ecell = phosCaloCells->GetCellAmplitude(absId);
2395 if (ecell > leadEcell) {
2400 histname = TString::Format(
"Cells/hCellEnergyLeading");
2405 Int_t hasMatchedTrack = -1;
2406 Int_t nMatchedTracks = it->second->GetNTracksMatched();
2407 if (nMatchedTracks == 0) {
2408 hasMatchedTrack = 0;
2409 }
else if (nMatchedTracks > 0) {
2410 hasMatchedTrack = 1;
2414 Int_t passedDispersionCut = 0;
2415 if (it->second->Chi2() < 2.5*2.5) {
2416 passedDispersionCut = 1;
2420 histname = TString::Format(
"%s/clusterObservables", clusters->GetArrayName().Data());
2422 if (!histClusterObservables)
return;
2423 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
2424 TString title(histClusterObservables->GetAxis(i)->GetTitle());
2425 if (
title==
"Centrality %")
2426 contents[i] =
fCent;
2427 else if (
title==
"#eta")
2428 contents[i] = it->first.Eta();
2429 else if (
title==
"#phi")
2430 contents[i] = it->first.Phi_0_2pi();
2431 else if (
title==
"#it{E}_{clus} (GeV)")
2432 contents[i] = Enonlin;
2433 else if (
title==
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
2434 contents[i] = Ehadcorr;
2435 else if (
title==
"Matched track")
2436 contents[i] = hasMatchedTrack;
2437 else if (
title==
"M02")
2438 contents[i] = it->second->GetM02();
2439 else if (
title==
"Ncells")
2440 contents[i] = it->second->GetNCells();
2441 else if (
title==
"Dispersion cut")
2442 contents[i] = passedDispersionCut;
2444 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2446 histClusterObservables->Fill(contents);
2455 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2457 for (
auto jet : jets->
accepted()) {
2460 histname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
2462 if (!histJetObservables)
return;
2463 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
2464 TString title(histJetObservables->GetAxis(i)->GetTitle());
2465 if (
title==
"Centrality (%)")
2466 contents[i] =
fCent;
2467 else if (
title==
"#eta_{jet}")
2468 contents[i] = jet->Eta();
2469 else if (
title==
"#phi_{jet} (rad)")
2470 contents[i] = jet->Phi_0_2pi();
2471 else if (
title==
"#it{E}_{T} (GeV)")
2472 contents[i] = jet->Pt();
2473 else if (
title==
"#rho (GeV/#it{c})")
2474 contents[i] = jet->Pt() / jet->Area();
2475 else if (
title==
"N_{clusters}")
2476 contents[i] = jet->GetNumberOfClusters();
2478 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2480 histJetObservables->Fill(contents);
2497 histname = TString::Format(
"Cells/hCellEnergyAll");
2501 sm =
fGeom->GetSuperModuleNumber(absId);
2502 if (sm >=0 && sm < 20) {
2503 patchSumEMCal[sm] += ecell;
2508 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
2510 absId = phosCaloCells->GetCellNumber(i);
2511 ecell = phosCaloCells->GetCellAmplitude(absId);
2514 histname = TString::Format(
"Cells/hCellEnergyAll");
2518 fPHOSGeo->AbsToRelNumbering(absId, relid);
2520 if (sm >=1 && sm < 5) {
2521 patchSumPHOS[sm-1] += ecell;
2526 for (
Int_t sm = 0; sm < 20; sm++) {
2527 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
2531 for (
Int_t sm = 1; sm < 5; sm++) {
2532 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
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.
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.
AliEventCuts fEventCuts
event selection utility
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
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="")
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
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
Double_t GetJetPt(AliJetContainer *jetCont, AliEmcalJet *jet)
void AllocateDijetCandHistograms()
void RunChanged(Int_t run)
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.
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.
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
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.
const AliTrackIterableMomentumContainer accepted_momentum() const
Int_t GetRunNumber(TString)
Dijet_t fMatchingDijet
! low-threshold matching dijet, for matching study
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
Double_t fTrackConstituentThreshold
constituent threshold for matching study
Double_t * fCentHistBins
! cent bins
DCal acceptance – spans ONLY DCal (no PHOS or gap)
TH1D * fBackgroundScalingWeights
Histogram storing eta-phi weights for full-jet background scale factors.
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 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 LoadBackgroundScalingHistogram(const char *path="alien:///alice/cern.ch/user/j/jmulliga/BackgroundScalingWeights.root", const char *name="hBackgroundScalingWeights")
void AllocateTriggerSimHistograms()
Bool_t fDoCaloStudy
Set whether to perform calorimeter detector study.
const AliJetIterableContainer all() const
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal