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),
90 fPlotNeutralJets(kFALSE),
91 fPlotClustersInJets(kFALSE),
112 fUseManualEventCuts(kFALSE),
113 fUseAliEventCuts(kTRUE),
117 fDijetLeadingHadronPt(0),
123 fPlotJetHistograms(kFALSE),
124 fPlotDijetCandHistograms(kFALSE),
125 fPlotDijetImbalanceHistograms(kFALSE),
126 fComputeBackground(kFALSE),
127 fDoMomentumBalance(kFALSE),
128 fDoGeometricalMatching(kFALSE),
130 fTrackConstituentThreshold(0),
131 fClusterConstituentThreshold(0),
132 fMBUpscaleFactor(1.),
135 fLoadBackgroundScalingWeights(kTRUE),
136 fBackgroundScalingWeights(0),
137 fGapJetScalingWeights(0),
138 fComputeMBDownscaling(kFALSE),
139 fDoCaloStudy(kFALSE),
140 fDoTriggerSimulation(kFALSE),
144 fPlotNeutralJets(kFALSE),
145 fPlotClustersInJets(kFALSE),
205 while ((obj = next())) {
247 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
250 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
251 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
257 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
258 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
263 histname = TString::Format(
"%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
264 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
265 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5);
268 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
269 title = histname +
";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
271 Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
276 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
277 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
278 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5,
"s");
281 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
282 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
286 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
287 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
291 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
292 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
299 histname = TString::Format(
"%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
300 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
307 histname = TString::Format(
"%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
308 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
316 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
317 title = histname +
";#it{E}_{patch,med};type;#it{p}_{T}^{corr} (GeV/#it{c});Centrality (%)";
327 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
328 title = histname +
";Centrality;Scale factor;counts";
331 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
332 title = histname +
";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
335 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jets->GetArrayName().Data());
336 title = histname +
";#eta;#phi;Centrality;Scale factor;";
339 Double_t max[4] = {0.5,6., 100, 20};
342 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jets->GetArrayName().Data());
343 title = histname +
";#eta;#phi;Centrality;#delta#it{p}_{T} (GeV/#it{c})";
345 Double_t minDpT[4] = {-0.5,1., 0, -50};
346 Double_t maxDpT[4] = {0.5,6., 100, 150};
355 histname =
"Trigger/hMBDownscaleFactor";
356 title = histname +
";Downscale factor;counts";
372 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
381 axisTitle[dim] =
"Centrality (%)";
389 axisTitle[dim] =
"LeadingHadronRequired";
396 axisTitle[dim] =
"#it{p}_{T,trig jet} (GeV/#it{c})";
397 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
403 axisTitle[dim] =
"#it{p}_{T,ass jet} (GeV/#it{c})";
404 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
410 axisTitle[dim] =
"#phi_{trig jet}";
411 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
413 max[dim] = TMath::TwoPi();
417 axisTitle[dim] =
"#phi_{ass jet}";
418 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
420 max[dim] = TMath::TwoPi();
424 axisTitle[dim] =
"#eta_{trig jet}";
425 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
431 axisTitle[dim] =
"#eta_{ass jet}";
432 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
438 TString thnname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
440 for (
Int_t i = 0; i < dim; i++) {
441 hn->GetAxis(i)->SetTitle(axisTitle[i]);
442 hn->SetBinEdges(i, binEdges[i]);
455 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
467 axisTitle[dim] =
"Centrality (%)";
475 axisTitle[dim] =
"#Delta#phi";
482 axisTitle[dim] =
"#Delta#eta";
489 axisTitle[dim] =
"A_{J}";
496 axisTitle[dim] =
"x_{J}";
503 axisTitle[dim] =
"k_{Ty} (GeV)";
510 axisTitle[dim] =
"N_{tracks, trig jet}";
517 axisTitle[dim] =
"N_{tracks, ass jet}";
524 TString thnname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
526 for (
Int_t i = 0; i < dim; i++) {
527 hn->GetAxis(i)->SetTitle(axisTitle[i]);
528 hn->SetBinEdges(i, binEdges[i]);
536 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
537 TString title = histname +
";Centrality (%);#it{p}_{T,1}^{corr} (GeV/#it{c});#it{p}_{T,2}^{corr} (GeV/#it{c})";
538 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt,
nPtBins, 0,
fMaxPt,
"s");
543 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
544 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
551 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
552 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
559 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
560 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
567 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
568 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
583 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
593 axisTitle[dim] =
"A_{J}";
600 axisTitle[dim] =
"#Delta#phi";
607 axisTitle[dim] =
"#it{p}_{T,particle} (GeV/#it{c})";
617 max[dim] = pTParticleBins[nbins[dim]];
618 binEdges[dim] = pTParticleBins;
621 axisTitle[dim] =
"#it{p}_{T}#parallel (GeV/#it{c})";
630 max[dim] = pTParallelBins[nbins[dim]];
631 binEdges[dim] = pTParallelBins;
634 TString thnname = TString::Format(
"%s/MomentumBalance", jets->GetArrayName().Data());
636 for (
Int_t i = 0; i < dim; i++) {
637 hn->GetAxis(i)->SetTitle(axisTitle[i]);
638 hn->SetBinEdges(i, binEdges[i]);
657 axisTitle[dim] =
"Centrality (%)";
665 axisTitle[dim] =
"isSwitched";
672 axisTitle[dim] =
"#DeltaR_{trig}";
679 axisTitle[dim] =
"#DeltaR_{ass}";
686 axisTitle[dim] =
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
693 axisTitle[dim] =
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
700 axisTitle[dim] =
"A_{J} low-threshold";
707 axisTitle[dim] =
"A_{J} hard-core";
714 TString thnname =
"GeometricalMatching";
716 for (
Int_t i = 0; i < dim; i++) {
717 hn->GetAxis(i)->SetTitle(axisTitle[i]);
718 hn->SetBinEdges(i, binEdges[i]);
724 histname =
"GeometricalMatchingEfficiency";
725 title = histname +
";isMatched;counts";
740 const Int_t nRejBins = 32;
744 AliEmcalContainer* cont = 0;
746 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
749 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
750 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
754 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
755 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
760 const Int_t nEmcalSM = 20;
761 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
762 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
763 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
767 for (
Int_t sm = 1; sm < 5; sm++) {
768 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
769 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
782 title[dim] =
"Centrality %";
804 title[dim] =
"#it{E}_{clus} (GeV)";
811 title[dim] =
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
818 title[dim] =
"Matched track";
832 title[dim] =
"Ncells";
839 title[dim] =
"Dispersion cut";
846 TString thnname = TString::Format(
"%s/clusterObservables", cont->GetArrayName().Data());
848 for (
Int_t i = 0; i < dim; i++) {
849 hn->GetAxis(i)->SetTitle(title[i]);
850 hn->SetBinEdges(i, binEdges[i]);
856 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
861 Int_t nbinsJet[30] = {0};
868 axisTitle[dimJet] =
"Centrality (%)";
876 axisTitle[dimJet] =
"#eta_{jet}";
877 nbinsJet[dimJet] = 28;
878 minJet[dimJet] = -0.7;
879 maxJet[dimJet] = 0.7;
883 axisTitle[dimJet] =
"#phi_{jet} (rad)";
884 nbinsJet[dimJet] = 100;
890 axisTitle[dimJet] =
"#it{E}_{T} (GeV)";
897 axisTitle[dimJet] =
"#rho (GeV/#it{c})";
898 nbinsJet[dimJet] = 100;
900 maxJet[dimJet] = 1000.;
904 axisTitle[dimJet] =
"N_{clusters}";
905 nbinsJet[dimJet] = 20;
906 minJet[dimJet] = -0.5;
907 maxJet[dimJet] = 19.5;
911 TString thnname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
913 for (
Int_t i = 0; i < dimJet; i++) {
914 hn->GetAxis(i)->SetTitle(axisTitle[i]);
915 hn->SetBinEdges(i, binEdgesJet[i]);
930 title[dim] =
"Centrality %";
938 title[dim] =
"#it{E}_{clus} (GeV)";
945 title[dim] =
"#it{p}_{T,jet}^{corr}";
952 title[dim] =
"#eta_{jet}";
959 title[dim] =
"#phi_{jet}";
966 TString thnname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
968 for (
Int_t i = 0; i < dim; i++) {
969 hn->GetAxis(i)->SetTitle(title[i]);
970 hn->SetBinEdges(i, binEdges[i]);
979 histname = TString::Format(
"Cells/hCellEnergyAll");
980 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
984 histname = TString::Format(
"Cells/hCellEnergyAccepted");
985 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
989 histname = TString::Format(
"Cells/hCellEnergyLeading");
990 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
994 const Int_t nEmcalSM = 20;
995 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
996 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
997 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
1001 for (
Int_t sm = 1; sm < 5; sm++) {
1002 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
1003 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
1023 histname =
"TriggerSimHistograms/hEtaVsPhi";
1024 title = histname +
";#eta_{patch} (rad);#phi_{patch} (rad)";
1028 histname =
"TriggerSimHistograms/hNPatches";
1029 title = histname +
";#it{N}_{patches};type";
1033 histname =
"TriggerSimHistograms/hPatchE";
1034 title = histname +
";Centrality (%);#it{E}_{patch} (GeV)";
1038 histname =
"TriggerSimHistograms/hPatchMedianE";
1039 title = histname +
";Centrality (%);#it{E}_{patch,med} (GeV);type";
1040 fHistManager.
CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
1043 histname =
"TriggerSimHistograms/hMedPatchDijet";
1044 title = histname +
";Centrality (%);#it{E}_{patch,med} (GeV);type";
1045 fHistManager.
CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
1051 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1054 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1055 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
1061 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
1062 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
1067 histname = TString::Format(
"%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
1068 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
1069 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt, 3, -0.5, 2.5);
1072 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1073 title = histname +
";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
1075 Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
1080 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1081 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
1085 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
1086 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
1090 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1091 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
1093 Double_t min2[4] = {0, 0, 0, -0.5};
1098 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
1099 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
1101 Double_t min3[4] = {0, 0, 0, -0.5};
1106 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
1107 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
1109 Double_t min4[4] = {0, 0, 0, -0.5};
1124 if (fname.BeginsWith(
"alien://")) {
1125 TGrid::Connect(
"alien://");
1128 TFile*
file = TFile::Open(path);
1130 if (!file || file->IsZombie()) {
1131 ::Error(
"AliAnalysisTaskEmcalDijetImbalance",
"Could not open background scaling histogram");
1135 TH1D* h =
dynamic_cast<TH1D*
>(file->Get(name));
1138 ::Info(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s loaded from file %s.", name, path);
1141 ::Error(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s not found in file %s.", name, path);
1166 TClass cls(objname);
1167 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1168 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1169 GetName(), cls.GetName(),
"EmcalTriggers"));
1174 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1180 fPHOSGeo = AliPHOSGeometry::GetInstance();
1182 AliInfo(
"Found instance of PHOS geometry!");
1185 AliInfo(
"Creating PHOS geometry!");
1186 Int_t runNum = InputEvent()->GetRunNumber();
1188 fPHOSGeo = AliPHOSGeometry::GetInstance(
"IHEP");
1190 fPHOSGeo = AliPHOSGeometry::GetInstance(
"Run2");
1193 AliOADBContainer geomContainer(
"phosGeo");
1194 geomContainer.InitFromFile(
"$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root",
"PHOSMCRotationMatrixes");
1195 TObjArray* matrixes = (
TObjArray*)geomContainer.GetObject(runNum,
"PHOSRotationMatrixes");
1196 for(
Int_t mod=0; mod<6; mod++) {
1197 if(!matrixes->At(mod))
continue;
1198 fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
1199 printf(
".........Adding Matrix(%d), geo=%p\n",mod,
fPHOSGeo);
1200 ((TGeoHMatrix*)matrixes->At(mod))->
Print();
1227 TString triggerNameMB1 =
"CINT7-B-NOPF-CENT";
1228 TString triggerNameMB2 =
"CV0L7-B-NOPF-CENT";
1229 TString triggerNameJE =
"CINT7EJ1-B-NOPF-CENTNOPMD";
1234 for (
auto i : runtriggers) {
1235 if (i.EqualTo(triggerNameMB1) || i.EqualTo(triggerNameMB2)) {
1244 TString histname =
"Trigger/hMBDownscaleFactor";
1281 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
1282 TString jetContName = jetCont->GetName();
1283 if (jetContName.Contains(
"HardCore"))
continue;
1291 for (
Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
1294 FindDijet(jetCont, leadingHadronCutType);
1315 histname = TString::Format(
"%s/MomentumBalance", jetCont->GetArrayName().Data());
1350 if(!trigJet)
return;
1367 for(
auto assJetCand : jetCont->
accepted()) {
1368 if (!assJetCand)
continue;
1370 if ( TMath::Abs(trigJet->
Phi() - assJetCand->Phi()) <
fDeltaPhiMin )
continue;
1373 if ( assJetCandPt < assJetPt )
continue;
1375 assJet = assJetCand;
1377 if (!assJet)
return;
1405 track = trackIterator.second;
1415 Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
1416 Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
1417 Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
1422 deltaPhi = trackPhi - trigJetPhi;
1423 balancePt = trackPt * TMath::Cos(deltaPhi);
1426 deltaPhi = trackPhi - assJetPhi;
1427 balancePt = -trackPt * TMath::Cos(deltaPhi);
1441 TString jetContAllName = Form(
"Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (
int) (
fMatchingJetR*10) );
1447 TString jetContHardCoreName = Form(
"JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (
int) (
fMatchingJetR*10), trackThreshold, clusThreshold);
1468 TClass cls(objname);
1469 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1470 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1471 GetName(), cls.GetName(),
"EmcalTriggers"));
1476 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1481 std::vector<Double_t> vecEMCal;
1482 std::vector<Double_t> vecDCal;
1484 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1487 if(!recpatch->IsJetHighSimple())
continue;
1489 histname =
"TriggerSimHistograms/hEtaVsPhi";
1492 histname =
"TriggerSimHistograms/hPatchE";
1495 if (recpatch->IsEMCal()) {
1496 vecEMCal.push_back(recpatch->GetPatchE());
1498 vecDCal.push_back(recpatch->GetPatchE());
1505 const Int_t nBkgPatchesEMCal = vecEMCal.size();
1506 const Int_t nBkgPatchesDCal = vecDCal.size();
1507 fMedianEMCal = TMath::Median(nBkgPatchesEMCal, &vecEMCal[0]);
1508 fMedianDCal = TMath::Median(nBkgPatchesDCal, &vecDCal[0]);
1510 histname =
"TriggerSimHistograms/hPatchMedianE";
1514 histname =
"TriggerSimHistograms/hNPatches";
1522 for(
auto p : *fTriggerPatchInfo){
1523 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1526 if(!recpatch->IsJetHighSimple())
continue;
1528 if (recpatch->IsEMCal()) {
1529 if ((recpatch->GetPatchE() -
fMedianDCal) > threshold) {
1534 if ((recpatch->GetPatchE() -
fMedianEMCal) > threshold) {
1558 for(
auto matchingTrigJetCand : jetCont->
accepted()) {
1559 if (!matchingTrigJetCand)
continue;
1561 if (matchingTrigJet) {
1562 if (
GetJetPt(jetCont, matchingTrigJetCand) <
GetJetPt(jetCont, matchingTrigJet) )
continue;
1564 matchingTrigJet = matchingTrigJetCand;
1566 if (!matchingTrigJet)
return;
1570 for(
auto matchingAssJetCand : jetCont->
accepted()) {
1571 if (!matchingAssJetCand)
continue;
1573 if (matchingAssJet) {
1574 if (
GetJetPt(jetCont, matchingAssJetCand) <
GetJetPt(jetCont, matchingAssJet) )
continue;
1576 matchingAssJet = matchingAssJetCand;
1580 if (matchingAssJet) {
1583 if (
GetJetPt(jetCont, matchingTrigJet) <
GetJetPt(jetCont, matchingAssJet) ) {
1624 Double_t phiMinEMCal =
fGeom->GetArm1PhiMin() * TMath::DegToRad();
1625 Double_t phiMaxEMCal =
fGeom->GetEMCALPhiMax() * TMath::DegToRad();
1626 Double_t phiMinDCal =
fGeom->GetDCALPhiMin() * TMath::DegToRad();
1627 Double_t phiMaxDCal =
fGeom->GetDCALPhiMax() * TMath::DegToRad();
1628 Double_t phiMinPHOS = 250 * TMath::DegToRad();
1629 Double_t phiMaxPHOS = 320 * TMath::DegToRad();
1631 Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
1632 Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
1633 Double_t accDCalRegion = 2 * etaEMCal * (phiMaxDCal - phiMinDCal);
1636 TRandom3* r =
new TRandom3(0);
1638 Double_t accRC = TMath::Pi() * jetR * jetR;
1639 Double_t etaEMCalfid = etaEMCal - jetR;
1640 Double_t phiMinEMCalfid = phiMinEMCal + jetR;
1641 Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
1642 Double_t phiMinDCalRegionfid = phiMinDCal + jetR;
1643 Double_t phiMaxDCalRegionfid = phiMaxDCal - jetR;
1646 Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
1647 Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
1655 etaMin = -etaEMCalfid + etaBin*etaStep;
1656 etaMax = etaMin + etaStep;
1657 etaDCalRC[etaBin] = r->Uniform(etaMin, etaMax);
1665 phiMin = 1 + phiBin*phiStep;
1666 phiMax = phiMin + phiStep;
1667 phiDCalRC[phiBin] = r->Uniform(phiMin, phiMax);
1678 std::vector<std::vector<Double_t>> trackPtSumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1679 std::vector<std::vector<Double_t>> clusESumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1693 track = trackIterator.first;
1694 trackEta = track.Eta();
1696 trackPt = track.Pt();
1699 if (TMath::Abs(trackEta) < etaTPC) {
1700 trackPtSumTPC += trackPt;
1704 if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
1705 trackPtSumEMCal += trackPt;
1709 deltaR =
GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
1710 if (deltaR < jetR) {
1711 trackPtSumEMCalRC += trackPt;
1717 deltaR =
GetDeltaR(&track, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1718 if (deltaR < jetR) {
1719 trackPtSumDCalRC[etaBin][phiBin] += trackPt;
1736 clus = clusIterator.first;
1737 clusEta = clus.Eta();
1742 if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
1743 clusESumEMCal += clusE;
1747 deltaR =
GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
1748 if (deltaR < jetR) {
1749 clusESumEMCalRC += clusE;
1755 deltaR =
GetDeltaR(&clus, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1756 if (deltaR < jetR) {
1757 clusESumDCalRC[etaBin][phiBin] += clusE;
1765 Double_t numerator = (trackPtSumEMCal + clusESumEMCal) / accEMCal;
1766 Double_t denominator = trackPtSumTPC / accTPC;
1767 Double_t scaleFactor = numerator / denominator;
1768 TString histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1774 numerator = (trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin]) / accRC;
1775 scaleFactor = numerator / denominator;
1776 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jetCont->GetArrayName().Data());
1777 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, scaleFactor};
1784 Double_t deltaPt = trackPtSumEMCalRC + clusESumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1785 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1796 deltaPt = trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin] - rho * accRC;
1797 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jetCont->GetArrayName().Data());
1798 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, deltaPt};
1825 TString jetContName = jetCont->GetName();
1826 if (jetContName.Contains(
"HardCore")) pT = jet->
Pt();
1839 for(
auto jetCand : jetCont->
accepted()) {
1840 if (!jetCand)
continue;
1844 if ( jetCandPt < leadingJetPt )
continue;
1846 leadingJet = jetCand;
1863 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1873 Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
1874 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1922 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1923 TString jetContName = jets->GetName();
1924 if (jetContName.Contains(
"HardCore"))
continue;
1928 histname = TString::Format(
"%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
1932 for (
auto jet : jets->
all()) {
1938 histname = TString::Format(
"%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
1943 UInt_t rejectionReason = 0;
1944 if (!jets->
AcceptJet(jet, rejectionReason)) {
1945 histname = TString::Format(
"%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1946 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1954 histname = TString::Format(
"%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
1958 histname = TString::Format(
"%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1959 Double_t x[6] = {
fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
1963 histname = TString::Format(
"%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
1967 histname = TString::Format(
"%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1971 TLorentzVector leadPart;
1974 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
1975 histname = TString::Format(
"%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1980 histname = TString::Format(
"%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
1982 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
1983 track =
static_cast<AliVTrack*
>(jet->Track(i));
1984 z = track->Pt() / TMath::Abs(corrPt);
1990 histname = TString::Format(
"%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
1991 Double_t a[4] = {
fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
1996 histname = TString::Format(
"%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
2020 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2021 TString jetContName = jets->GetName();
2022 if (jetContName.Contains(
"HardCore"))
continue;
2026 histname = TString::Format(
"%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
2030 for (
auto jet : jets->
all()) {
2036 histname = TString::Format(
"%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
2041 UInt_t rejectionReason = 0;
2042 if (!jets->
AcceptJet(jet, rejectionReason)) {
2043 histname = TString::Format(
"%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
2044 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
2052 histname = TString::Format(
"%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
2056 histname = TString::Format(
"%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
2057 Double_t x[6] = {
fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
2061 histname = TString::Format(
"%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
2065 TLorentzVector leadPart;
2068 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2069 histname = TString::Format(
"%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2074 histname = TString::Format(
"%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
2076 for (
Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
2077 track =
static_cast<AliVTrack*
>(jet->Track(i));
2078 z = track->Pt() / TMath::Abs(corrPt);
2084 histname = TString::Format(
"%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
2085 Double_t a[4] = {
fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
2099 TString histname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
2101 if (!histJetObservables)
return;
2102 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2103 TString title(histJetObservables->GetAxis(n)->GetTitle());
2104 if (
title==
"Centrality (%)")
2105 contents[n] =
fCent;
2106 else if (
title==
"LeadingHadronRequired")
2108 else if (
title==
"#it{p}_{T,trig jet} (GeV/#it{c})")
2110 else if (
title==
"#it{p}_{T,ass jet} (GeV/#it{c})")
2112 else if (
title==
"#phi_{trig jet}")
2114 else if (
title==
"#phi_{ass jet}")
2116 else if (
title==
"#eta_{trig jet}")
2118 else if (
title==
"#eta_{ass jet}")
2121 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2123 histJetObservables->Fill(contents);
2134 TString histname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
2136 if (!histJetObservables)
return;
2137 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2138 TString title(histJetObservables->GetAxis(n)->GetTitle());
2139 if (
title==
"Centrality (%)")
2140 contents[n] =
fCent;
2141 else if (
title==
"#Delta#phi")
2143 else if (
title==
"#Delta#eta")
2145 else if (
title==
"A_{J}")
2147 else if (
title==
"x_{J}")
2149 else if (
title==
"k_{Ty} (GeV)")
2151 else if (
title==
"N_{tracks, trig jet}")
2153 else if (
title==
"N_{tracks, ass jet}")
2156 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2158 histJetObservables->Fill(contents);
2162 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
2170 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
2175 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2176 TLorentzVector leadPart;
2179 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
2184 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
2187 track =
static_cast<AliVTrack*
>(trigJet->
Track(i));
2194 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
2200 histname =
"TriggerSimHistograms/hMedPatchDijet";
2214 if (!histJetObservables)
return;
2215 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2216 TString title(histJetObservables->GetAxis(n)->GetTitle());
2219 else if (
title==
"#Delta#phi")
2220 contents[n] = deltaPhi;
2221 else if (
title==
"#it{p}_{T,particle} (GeV/#it{c})")
2222 contents[n] = trackPt;
2223 else if (
title==
"#it{p}_{T}#parallel (GeV/#it{c})")
2224 contents[n] = balancePt;
2226 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2228 histJetObservables->Fill(contents);
2237 TString histname =
"GeometricalMatchingEfficiency";
2247 TString thnname =
"GeometricalMatching";
2250 if (!histJetObservables)
return;
2251 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2252 TString title(histJetObservables->GetAxis(n)->GetTitle());
2253 if (
title==
"Centrality (%)")
2254 contents[n] =
fCent;
2255 else if (
title==
"isSwitched")
2256 contents[n] = isSwitched;
2257 else if (
title==
"#DeltaR_{trig}")
2258 contents[n] = trigDeltaR;
2259 else if (
title==
"#DeltaR_{ass}")
2260 contents[n] = assDeltaR;
2261 else if (
title==
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2263 else if (
title==
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2265 else if (
title==
"A_{J} low-threshold")
2267 else if (
title==
"A_{J} hard-core")
2270 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2272 histJetObservables->Fill(contents);
2294 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
2299 while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
2305 if (it->second->IsEMCAL()) {
2306 Double_t phi = it->first.Phi_0_2pi();
2310 }
else if (isDcal == 1) {
2313 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2318 if (it->second->IsEMCAL()) {
2319 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
2320 UInt_t rejectionReason = 0;
2321 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
2322 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2325 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2326 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
2327 UInt_t rejectionReason = 0;
2328 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
2329 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2339 if (it->second->IsEMCAL()) {
2341 Ehadcorr = it->second->GetHadCorrEnergy();
2342 Enonlin = it->second->GetNonLinCorrEnergy();
2344 Int_t sm =
fGeom->GetSuperModuleNumber(it->second->GetCellAbsId(0));
2345 if (sm >=0 && sm < 20) {
2346 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2350 AliError(Form(
"Supermodule %d does not exist!", sm));
2354 histname = TString::Format(
"Cells/hCellEnergyAccepted");
2356 for (
Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2357 absId = it->second->GetCellAbsId(iCell);
2360 if (ecell > leadEcell) {
2365 histname = TString::Format(
"Cells/hCellEnergyLeading");
2368 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2370 Ehadcorr = it->second->GetCoreEnergy();
2371 Enonlin = it->second->E();
2375 fPHOSGeo->AbsToRelNumbering(it->second->GetCellAbsId(0), relid);
2376 Int_t sm = relid[0];
2377 if (sm >=1 && sm < 5) {
2378 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2382 AliError(Form(
"Supermodule %d does not exist!", sm));
2387 histname = TString::Format(
"Cells/hCellEnergyAccepted");
2389 for (
Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2390 absId = it->second->GetCellAbsId(iCell);
2391 ecell = phosCaloCells->GetCellAmplitude(absId);
2393 if (ecell > leadEcell) {
2398 histname = TString::Format(
"Cells/hCellEnergyLeading");
2403 Int_t hasMatchedTrack = -1;
2404 Int_t nMatchedTracks = it->second->GetNTracksMatched();
2405 if (nMatchedTracks == 0) {
2406 hasMatchedTrack = 0;
2407 }
else if (nMatchedTracks > 0) {
2408 hasMatchedTrack = 1;
2412 Int_t passedDispersionCut = 0;
2413 if (it->second->Chi2() < 2.5*2.5) {
2414 passedDispersionCut = 1;
2418 histname = TString::Format(
"%s/clusterObservables", clusters->GetArrayName().Data());
2420 if (!histClusterObservables)
return;
2421 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
2422 TString title(histClusterObservables->GetAxis(i)->GetTitle());
2423 if (
title==
"Centrality %")
2424 contents[i] =
fCent;
2425 else if (
title==
"#eta")
2426 contents[i] = it->first.Eta();
2427 else if (
title==
"#phi")
2428 contents[i] = it->first.Phi_0_2pi();
2429 else if (
title==
"#it{E}_{clus} (GeV)")
2430 contents[i] = Enonlin;
2431 else if (
title==
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
2432 contents[i] = Ehadcorr;
2433 else if (
title==
"Matched track")
2434 contents[i] = hasMatchedTrack;
2435 else if (
title==
"M02")
2436 contents[i] = it->second->GetM02();
2437 else if (
title==
"Ncells")
2438 contents[i] = it->second->GetNCells();
2439 else if (
title==
"Dispersion cut")
2440 contents[i] = passedDispersionCut;
2442 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2444 histClusterObservables->Fill(contents);
2452 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2454 for (
auto jet : jets->
accepted()) {
2459 histname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
2461 if (!histJetObservables)
return;
2462 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
2463 TString title(histJetObservables->GetAxis(i)->GetTitle());
2464 if (
title==
"Centrality (%)")
2465 contents[i] =
fCent;
2466 else if (
title==
"#eta_{jet}")
2467 contents[i] = jet->Eta();
2468 else if (
title==
"#phi_{jet} (rad)")
2469 contents[i] = jet->Phi_0_2pi();
2470 else if (
title==
"#it{E}_{T} (GeV)")
2471 contents[i] = jet->Pt();
2472 else if (
title==
"#rho (GeV/#it{c})")
2473 contents[i] = jet->Pt() / jet->Area();
2474 else if (
title==
"N_{clusters}")
2475 contents[i] = jet->GetNumberOfClusters();
2477 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
2479 histJetObservables->Fill(contents);
2485 histname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
2486 Int_t nClusters = jet->GetNumberOfClusters();
2488 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
2489 clus = jet->Cluster(iClus);
2510 histname = TString::Format(
"Cells/hCellEnergyAll");
2514 sm =
fGeom->GetSuperModuleNumber(absId);
2515 if (sm >=0 && sm < 20) {
2516 patchSumEMCal[sm] += ecell;
2521 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
2523 absId = phosCaloCells->GetCellNumber(i);
2524 ecell = phosCaloCells->GetCellAmplitude(absId);
2527 histname = TString::Format(
"Cells/hCellEnergyAll");
2531 fPHOSGeo->AbsToRelNumbering(absId, relid);
2533 if (sm >=1 && sm < 5) {
2534 patchSumPHOS[sm-1] += ecell;
2539 for (
Int_t sm = 0; sm < 20; sm++) {
2540 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
2544 for (
Int_t sm = 1; sm < 5; sm++) {
2545 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.
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
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 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 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