21 #include <AliAnalysisManager.h> 22 #include <AliVEventHandler.h> 25 #include "AliVCluster.h" 26 #include "AliVParticle.h" 63 AliInfo(Form(
"CreateOutputObjects of task %s", GetName()));
67 Int_t maxTracks = 6000;
68 Int_t constituentsNbins = 250;
74 constituentsNbins = 50;
75 constituentsMax = 49.5;
81 constituentsNbins = 100;
82 constituentsMax = 99.5;
92 Int_t nCorrPtBins = TMath::CeilNint((
fMaxPt - minCorrPt) / fPtBinWidth);
105 for (
auto rho2 : fAlternativeRho) {
106 if (rho1.first == rho2.first)
continue;
107 histname = TString::Format(
"%s/fHistDelta%sOverRhoVsCent", rho1.first.Data(), rho2.first.Data());
108 title = TString::Format(
"%s;Centrality (%%);2#frac{%s - %s}{%s + %s};counts", histname.Data(), rho1.first.Data(), rho2.first.Data(), rho1.first.Data(), rho2.first.Data());
111 histname = TString::Format(
"%s/fHistDelta%sVsRho", rho1.first.Data(), rho2.first.Data());
112 title = TString::Format(
"%s;#frac{%s + %s}{2} (GeV/#it{c} #times rad^{-1});%s - %s (GeV/#it{c} #times rad^{-1});counts", histname.Data(), rho1.first.Data(), rho2.first.Data(), rho1.first.Data(), rho2.first.Data());
115 histname = TString::Format(
"%s/fHist%sVs%s", rho1.first.Data(), rho2.first.Data(), rho1.first.Data());
116 title = TString::Format(
"%s;%s (GeV/#it{c} #times rad^{-1}); %s (GeV/#it{c} #times rad^{-1});counts", histname.Data(), rho1.first.Data(), rho2.first.Data());
121 for (
auto cont_it : fJetCollArray) {
124 histname = TString::Format(
"%s/fHistLeadingJetPtVsCent", jets->GetArrayName().Data());
125 title = histname +
";Centrality (%);#it{p}_{T,jet}^{lead} (GeV/#it{c});counts";
128 histname = TString::Format(
"%s/fHistLeadingJetPhiVsEta", jets->GetArrayName().Data());
129 title = histname +
";#eta_{jet};#phi_{jet} (rad);counts";
132 histname = TString::Format(
"%s/fHistB2BLeadingJetPtVsCent", jets->GetArrayName().Data());
133 title = histname +
";Centrality (%);#it{p}_{T,jet}^{lead} (GeV/#it{c});counts";
136 for (
auto rho : fAlternativeRho) {
137 for (
auto rho2 : fAlternativeRho) {
138 if (rho.first == rho2.first)
continue;
139 histname = TString::Format(
"%s/%s/fHistB2BDelta%sOverRhoVsCent", jets->GetArrayName().Data(), rho.first.Data(), rho2.first.Data());
140 title = TString::Format(
"%s;Centrality (%%);2#frac{%s - %s}{%s + %s};counts", histname.Data(), rho.first.Data(), rho2.first.Data(), rho.first.Data(), rho2.first.Data());
143 histname = TString::Format(
"%s/%s/fHistB2BDelta%sVsRho", jets->GetArrayName().Data(), rho.first.Data(), rho2.first.Data());
144 title = TString::Format(
"%s;#frac{%s + %s}{2} (GeV/#it{c} #times rad^{-1});%s - %s (GeV/#it{c} #times rad^{-1});counts", histname.Data(), rho.first.Data(), rho2.first.Data(), rho.first.Data(), rho2.first.Data());
147 histname = TString::Format(
"%s/fHistB2B%sVs%s", rho.first.Data(), rho2.first.Data(), rho.first.Data());
148 title = TString::Format(
"%s;%s (GeV/#it{c} #times rad^{-1}); %s (GeV/#it{c} #times rad^{-1});counts", histname.Data(), rho.first.Data(), rho2.first.Data());
152 histname = TString::Format(
"%s/%s/fHistLeadingJetCorrPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
153 title = histname +
";Centrality (%);#it{p}_{T,jet}^{lead} - #it{A}_{jet}#rho (GeV/#it{c});counts";
156 histname = TString::Format(
"%s/%s/fHistB2BLeadingJetCorrPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
157 title = histname +
";Centrality (%);#it{p}_{T,jet}^{lead} - #it{A}_{jet}#rho (GeV/#it{c});counts";
160 histname = TString::Format(
"%s/%s/fHistRCPhiVsEta", jets->GetArrayName().Data(), rho.first.Data());
161 title = histname +
";#eta_{RC};#phi_{RC} (rad);counts";
164 histname = TString::Format(
"%s/%s/fHistRCPerpPhiVsEta", jets->GetArrayName().Data(), rho.first.Data());
165 title = histname +
";#eta_{RC};#phi_{RC} (rad);counts";
168 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetPhiVsEta", jets->GetArrayName().Data(), rho.first.Data());
169 title = histname +
";#eta_{RC};#phi_{RC} (rad);counts";
172 histname = TString::Format(
"%s/%s/fHistRCDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
173 title = histname +
";Centrality (%);#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
176 histname = TString::Format(
"%s/%s/fHistRCPerpDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
177 title = histname +
";Centrality (%);#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
180 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
181 title = histname +
";Centrality (%);#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
184 histname = TString::Format(
"%s/%s/fHistB2BRCDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
185 title = histname +
";Centrality (%);#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
188 histname = TString::Format(
"%s/%s/fHistB2BRCPerpDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
189 title = histname +
";Centrality (%);#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
192 histname = TString::Format(
"%s/%s/fHistB2BRCExclLeadJetDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
193 title = histname +
";Centrality (%);#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
196 histname = TString::Format(
"%s/%s/fHistRCDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
197 title = histname +
";#rho (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
200 histname = TString::Format(
"%s/%s/fHistRCPerpDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
201 title = histname +
";#rho (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
204 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
205 title = histname +
";#rho (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
208 histname = TString::Format(
"%s/%s/fHistB2BRCDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
209 title = histname +
";#rho (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
212 histname = TString::Format(
"%s/%s/fHistB2BRCPerpDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
213 title = histname +
";#rho (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
216 histname = TString::Format(
"%s/%s/fHistB2BRCExclLeadJetDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
217 title = histname +
";#rho (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
220 histname = TString::Format(
"%s/%s/fHistRCDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
221 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
224 histname = TString::Format(
"%s/%s/fHistRCPerpDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
225 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
228 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
229 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
232 histname = TString::Format(
"%s/%s/fHistB2BRCDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
233 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
236 histname = TString::Format(
"%s/%s/fHistB2BRCPerpDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
237 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
240 histname = TString::Format(
"%s/%s/fHistB2BRCExclLeadJetDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
241 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});#Delta#it{p}_{T}^{RC} = #it{p}_{T}^{RC} - #it{A}_{jet}#rho (GeV/#it{c});counts";
247 histname = TString::Format(
"%s/fHistJetPt_Cent%d_%d", jets->GetArrayName().Data(), TMath::CeilNint(
fCentBins[i]), TMath::CeilNint(
fCentBins[i+1]));
248 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});counts";
251 histname = TString::Format(
"%s/fHistB2BJetPt_Cent%d_%d", jets->GetArrayName().Data(), TMath::CeilNint(
fCentBins[i]), TMath::CeilNint(
fCentBins[i+1]));
252 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});counts";
255 for (
auto rho : fAlternativeRho) {
256 histname = TString::Format(
"%s/%s/fHistJetCorrPt_Cent%d_%d", jets->GetArrayName().Data(), rho.first.Data(), TMath::CeilNint(
fCentBins[i]), TMath::CeilNint(
fCentBins[i+1]));
257 title = histname +
";#it{p}_{T,jet}^{lead} - #it{A}_{jet}#rho (GeV/#it{c});counts";
260 histname = TString::Format(
"%s/%s/fHistB2BJetCorrPt_Cent%d_%d", jets->GetArrayName().Data(), rho.first.Data(), TMath::CeilNint(
fCentBins[i]), TMath::CeilNint(
fCentBins[i+1]));
261 title = histname +
";#it{p}_{T,jet}^{lead} - #it{A}_{jet}#rho (GeV/#it{c});counts";
267 histname = TString::Format(
"%s/fHistJetPt", jets->GetArrayName().Data());
268 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});counts";
271 histname = TString::Format(
"%s/fHistB2BJetPt", jets->GetArrayName().Data());
272 title = histname +
";#it{p}_{T,jet}^{lead} (GeV/#it{c});counts";
275 for (
auto rho : fAlternativeRho) {
276 histname = TString::Format(
"%s/%s/fHistJetCorrPt", jets->GetArrayName().Data(), rho.first.Data());
277 title = histname +
";#it{p}_{T,jet}^{lead} - #it{A}_{jet}#rho (GeV/#it{c});counts";
280 histname = TString::Format(
"%s/%s/fHistB2BJetCorrPt", jets->GetArrayName().Data(), rho.first.Data());
281 title = histname +
";#it{p}_{T,jet}^{lead} - #it{A}_{jet}#rho (GeV/#it{c});counts";
289 while ((obj = nextElement()))
fOutput->Add(obj);
301 if (rhoIt->second)
continue;
302 rhoIt->second =
dynamic_cast<AliRhoParameter*
>(fInputEvent->FindListObject(rhoIt->first));
307 AliError(Form(
"%s: Could not retrieve rho %s! This rho name will be ignored", GetName(), rhoIt->first.Data()));
334 AliError(Form(
"fCentBin is %d! fCent = %.3f. Fix the centrality bins to include all possible values of centrality.",
fCentBin,
fCent));
339 for (
auto rho2 : fAlternativeRho) {
340 if (rho1 == rho2)
continue;
341 histname = TString::Format(
"%s/fHistDelta%sOverRhoVsCent", rho1.first.Data(), rho2.first.Data());
342 fHistManager.
FillTH2(histname,
fCent, 2.0 * (rho1.second->GetVal() - rho2.second->GetVal()) / (rho1.second->GetVal() + rho2.second->GetVal()));
344 histname = TString::Format(
"%s/fHistDelta%sVsRho", rho1.first.Data(), rho2.first.Data());
345 fHistManager.
FillTH2(histname, (rho1.second->GetVal() + rho2.second->GetVal()) / 2, rho1.second->GetVal() - rho2.second->GetVal());
347 histname = TString::Format(
"%s/fHist%sVs%s", rho1.first.Data(), rho2.first.Data(), rho1.first.Data());
357 std::shared_ptr<AliEmcalJet> random_cone(
GetRandomCone(jets));
358 std::shared_ptr<AliEmcalJet> random_cone_perp(
nullptr);
359 std::shared_ptr<AliEmcalJet> random_cone_excl_lead(
nullptr);
367 random_cone_perp = random_cone;
368 random_cone_excl_lead = random_cone;
372 histname = TString::Format(
"%s/fHistLeadingJetPtVsCent", jets->GetArrayName().Data());
375 histname = TString::Format(
"%s/fHistLeadingJetPhiVsEta", jets->GetArrayName().Data());
379 histname = TString::Format(
"%s/fHistB2BLeadingJetPtVsCent", jets->GetArrayName().Data());
384 for (
auto rho : fAlternativeRho) {
386 histname = TString::Format(
"%s/%s/fHistLeadingJetCorrPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
390 histname = TString::Format(
"%s/%s/fHistRCPhiVsEta", jets->GetArrayName().Data(), rho.first.Data());
393 histname = TString::Format(
"%s/%s/fHistRCDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
396 histname = TString::Format(
"%s/%s/fHistRCDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
397 fHistManager.
FillTH2(histname, rho.second->GetVal(), random_cone->Pt() - rho.second->GetVal() * random_cone->Area());
399 histname = TString::Format(
"%s/%s/fHistRCPerpPhiVsEta", jets->GetArrayName().Data(), rho.first.Data());
402 histname = TString::Format(
"%s/%s/fHistRCPerpDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
405 histname = TString::Format(
"%s/%s/fHistRCPerpDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
406 fHistManager.
FillTH2(histname, rho.second->GetVal(), random_cone_perp->Pt() - rho.second->GetVal() * random_cone_perp->Area());
408 if (random_cone_excl_lead) {
409 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetPhiVsEta", jets->GetArrayName().Data(), rho.first.Data());
410 fHistManager.
FillTH2(histname, random_cone_excl_lead->Eta(), random_cone_excl_lead->Phi());
412 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
413 fHistManager.
FillTH2(histname,
fCent, random_cone_excl_lead->Pt() - rho.second->GetVal() * random_cone_excl_lead->Area());
415 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
416 fHistManager.
FillTH2(histname, rho.second->GetVal(), random_cone_excl_lead->Pt() - rho.second->GetVal() * random_cone_excl_lead->Area());
420 histname = TString::Format(
"%s/%s/fHistRCDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
421 fHistManager.
FillTH2(histname, leadingJet->
Pt(), random_cone->Pt() - rho.second->GetVal() * random_cone->Area());
423 histname = TString::Format(
"%s/%s/fHistRCPerpDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
424 fHistManager.
FillTH2(histname, leadingJet->
Pt(), random_cone_perp->Pt() - rho.second->GetVal() * random_cone_perp->Area());
426 if (random_cone_excl_lead) {
427 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
428 fHistManager.
FillTH2(histname, leadingJet->
Pt(), random_cone_excl_lead->Pt() - rho.second->GetVal() * random_cone_excl_lead->Area());
432 histname = TString::Format(
"%s/%s/fHistRCDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
433 fHistManager.
FillTH2(histname, -1, random_cone->Pt() - rho.second->GetVal() * random_cone->Area());
435 histname = TString::Format(
"%s/%s/fHistRCPerpDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
436 fHistManager.
FillTH2(histname, -1, random_cone_perp->Pt() - rho.second->GetVal() * random_cone_perp->Area());
438 histname = TString::Format(
"%s/%s/fHistRCExclLeadJetDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
439 fHistManager.
FillTH2(histname, -1, random_cone_excl_lead->Pt() - rho.second->GetVal() * random_cone_excl_lead->Area());
444 histname = TString::Format(
"%s/%s/fHistB2BLeadingJetCorrPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
448 histname = TString::Format(
"%s/%s/fHistB2BRCDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
451 histname = TString::Format(
"%s/%s/fHistB2BRCDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
452 fHistManager.
FillTH2(histname, rho.second->GetVal(), random_cone->Pt() - rho.second->GetVal() * random_cone->Area());
454 histname = TString::Format(
"%s/%s/fHistB2BRCPerpDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
457 histname = TString::Format(
"%s/%s/fHistB2BRCPerpDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
458 fHistManager.
FillTH2(histname, rho.second->GetVal(), random_cone_perp->Pt() - rho.second->GetVal() * random_cone_perp->Area());
460 if (random_cone_excl_lead) {
461 histname = TString::Format(
"%s/%s/fHistB2BRCExclLeadJetDeltaPtVsCent", jets->GetArrayName().Data(), rho.first.Data());
462 fHistManager.
FillTH2(histname,
fCent, random_cone_excl_lead->Pt() - rho.second->GetVal() * random_cone_excl_lead->Area());
464 histname = TString::Format(
"%s/%s/fHistB2BRCExclLeadJetDeltaPtVsRho", jets->GetArrayName().Data(), rho.first.Data());
465 fHistManager.
FillTH2(histname, rho.second->GetVal(), random_cone_excl_lead->Pt() - rho.second->GetVal() * random_cone_excl_lead->Area());
469 histname = TString::Format(
"%s/%s/fHistB2BRCDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
470 fHistManager.
FillTH2(histname, leadingJet->
Pt(), random_cone->Pt() - rho.second->GetVal() * random_cone->Area());
472 histname = TString::Format(
"%s/%s/fHistB2BRCPerpDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
473 fHistManager.
FillTH2(histname, leadingJet->
Pt(), random_cone_perp->Pt() - rho.second->GetVal() * random_cone_perp->Area());
475 if (random_cone_excl_lead) {
476 histname = TString::Format(
"%s/%s/fHistB2BRCExclLeadJetDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
477 fHistManager.
FillTH2(histname, leadingJet->
Pt(), random_cone_excl_lead->Pt() - rho.second->GetVal() * random_cone_excl_lead->Area());
481 histname = TString::Format(
"%s/%s/fHistB2BRCDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
482 fHistManager.
FillTH2(histname, -1, random_cone->Pt() - rho.second->GetVal() * random_cone->Area());
484 histname = TString::Format(
"%s/%s/fHistB2BRCPerpDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
485 fHistManager.
FillTH2(histname, -1, random_cone_perp->Pt() - rho.second->GetVal() * random_cone_perp->Area());
487 histname = TString::Format(
"%s/%s/fHistB2BRCExclLeadJetDeltaPtVsLeadJetPt", jets->GetArrayName().Data(), rho.first.Data());
488 fHistManager.
FillTH2(histname, -1, random_cone_excl_lead->Pt() - rho.second->GetVal() * random_cone_excl_lead->Area());
491 for (
auto rho2 : fAlternativeRho) {
492 if (rho == rho2)
continue;
493 histname = TString::Format(
"%s/%s/fHistB2BDelta%sOverRhoVsCent", jets->GetArrayName().Data(), rho.first.Data(), rho2.first.Data());
494 fHistManager.
FillTH2(histname,
fCent, 2.0 * (rho.second->GetVal() - rho2.second->GetVal()) / (rho.second->GetVal() + rho2.second->GetVal()));
496 histname = TString::Format(
"%s/%s/fHistB2BDelta%sVsRho", jets->GetArrayName().Data(), rho.first.Data(), rho2.first.Data());
497 fHistManager.
FillTH2(histname, (rho.second->GetVal() + rho2.second->GetVal()) / 2, rho.second->GetVal() - rho2.second->GetVal());
499 histname = TString::Format(
"%s/fHistB2B%sVs%s", rho.first.Data(), rho2.first.Data(), rho.first.Data());
507 histname = TString::Format(
"%s/fHistJetPt_Cent%d_%d", jets->GetArrayName().Data(), TMath::CeilNint(
fCentBins[
fCentBin]), TMath::CeilNint(
fCentBins[fCentBin+1]));
511 histname = TString::Format(
"%s/fHistB2BJetPt_Cent%d_%d", jets->GetArrayName().Data(), TMath::CeilNint(
fCentBins[fCentBin]), TMath::CeilNint(
fCentBins[fCentBin+1]));
515 for (
auto rho : fAlternativeRho) {
516 histname = TString::Format(
"%s/%s/fHistJetCorrPt_Cent%d_%d", jets->GetArrayName().Data(), rho.first.Data(), TMath::CeilNint(
fCentBins[fCentBin]), TMath::CeilNint(
fCentBins[fCentBin+1]));
520 histname = TString::Format(
"%s/%s/fHistB2BJetCorrPt_Cent%d_%d", jets->GetArrayName().Data(), rho.first.Data(), TMath::CeilNint(
fCentBins[fCentBin]), TMath::CeilNint(
fCentBins[fCentBin+1]));
526 histname = TString::Format(
"%s/fHistJetPt", jets->GetArrayName().Data());
530 histname = TString::Format(
"%s/fHistB2BJetPt", jets->GetArrayName().Data());
534 for (
auto rho : fAlternativeRho) {
535 histname = TString::Format(
"%s/%s/fHistJetCorrPt", jets->GetArrayName().Data(), rho.first.Data());
539 histname = TString::Format(
"%s/%s/fHistB2BJetCorrPt", jets->GetArrayName().Data(), rho.first.Data());
562 template <
class T, Int_t MAX_CONSTITUENTS>
565 auto IndexMap = T::GetEmcalContainerIndexMap();
567 for (
auto coll : CollArray) {
568 auto itcont = coll.second->accepted_momentum();
569 for (
auto itmom = itcont.begin(); itmom != itcont.end(); itmom++) {
570 Double_t etaDiff = eta - itmom->first.Eta();
571 Double_t phiDiff = AliEmcalContainer::RelativePhi(phi, itmom->first.Phi());
572 Double_t d2 = etaDiff*etaDiff + phiDiff*phiDiff;
573 if (d2 > maxD2)
continue;
574 ConstList[N] = IndexMap.GlobalIndexFromLocalIndex(coll.second->GetArray(), itmom.current_index());
575 pt += itmom->first.Pt();
577 if (N >= MAX_CONSTITUENTS) {
578 AliError(Form(
"Reached the maximum number of constituents = %d", MAX_CONSTITUENTS));
597 const Int_t MAX_CONSTITUENTS = 100;
599 static std::array<Int_t, MAX_CONSTITUENTS> tracks;
600 static std::array<Int_t, MAX_CONSTITUENTS> clusters;
602 Int_t nParticles = SumParticles<AliParticleContainer, MAX_CONSTITUENTS>(pt, eta, phi, maxD2,
fParticleCollArray, tracks);
603 Int_t nClusters = SumParticles<AliClusterContainer, MAX_CONSTITUENTS>(pt, eta, phi, maxD2,
fClusterCollArray, clusters);
606 jet->SetArea(maxD2*TMath::Pi());
608 jet->SetNumberOfTracks(nParticles);
609 jet->SetNumberOfClusters(nClusters);
611 for (
Int_t i = 0; i < nParticles; i++) jet->AddTrackAt(tracks[i], i);
612 for (
Int_t i = 0; i < nClusters; i++) jet->AddClusterAt(clusters[i], i);
625 if (jetCont->GetMinPhi() == -10 && jetCont->GetMaxPhi() == 10) {
626 phi =
fRandom->Uniform(0, TMath::TwoPi());
648 Double_t maxPhi = leadJet->
Phi() + TMath::Pi() - double_radius;
652 minPhi += TMath::Pi();
653 maxPhi += TMath::Pi();
671 if (jetCont->GetMinPhi() == -10 && jetCont->GetMaxPhi() == 10) {
672 phi =
fRandom->Uniform(0, TMath::TwoPi());
678 const Int_t MAX_ITER = 20;
680 for (
Int_t i = 0; i < MAX_ITER; i++) {
691 if (!jet) AliError(Form(
"Could not find a random cone that does not overlap with the leading jet after %d iterations!", MAX_ITER));
710 ::Error(
"AliAnalysisTaskJetUEStudies",
"No analysis manager to connect to.");
715 AliVEventHandler* handler = mgr->GetInputEventHandler();
717 ::Error(
"AliAnalysisTaskJetUEStudies",
"This task requires an input event handler");
723 if (handler->InheritsFrom(
"AliESDInputHandler")) {
726 else if (handler->InheritsFrom(
"AliAODInputHandler")) {
732 if (trackName ==
"usedefault") {
733 if (dataType ==
kESD) {
734 trackName =
"Tracks";
736 else if (dataType ==
kAOD) {
737 trackName =
"tracks";
744 if (clusName ==
"usedefault") {
745 if (dataType ==
kESD) {
746 clusName =
"CaloClusters";
748 else if (dataType ==
kAOD) {
749 clusName =
"caloClusters";
756 TString name(
"AliAnalysisTaskJetUEStudies");
757 if (strcmp(suffix,
"")) {
777 mgr->AddTask(jetTask);
780 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer() ;
782 contname +=
"_histos";
783 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contname.Data(),
784 TList::Class(),AliAnalysisManager::kOutputContainer,
785 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
786 mgr->ConnectInput (jetTask, 0, cinput1 );
787 mgr->ConnectOutput (jetTask, 1, coutput1 );
AliAnalysisTaskJetUEStudies()
Default constructor for ROOT I/O purposes.
AliClusterContainer * AddClusterContainer(std::string branchName, std::string contName="")
void UserCreateOutputObjects()
Bool_t AreJetsOverlapping(AliEmcalJet *jet1, AliEmcalJet *jet2)
void SetParticlePtCut(Double_t cut)
TList * fOutput
!output list
const TString & GetRhoName() const
EDataType_t
Switch for the data type.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Bool_t IsB2BEvent(std::string jetCollName="Signal")
std::vector< double > fCentBins
how many centrality bins
Container for particles within the EMCAL framework.
std::set< TString > fDefaultRhoNames
! Default rho names
AliEmcalJet * GetJetCone(Double_t radius, Double_t eta, Double_t phi)
EBeamType_t fForceBeamType
forced beam type
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
THashList * GetListOfHistograms() const
Get the list of histograms.
Float_t fMaxPt
Histogram pt limit.
Int_t SumParticles(Double_t &pt, Double_t eta, Double_t phi, Double_t maxD2, std::map< std::string, T * > &CollArray, std::array< Int_t, MAX_CONSTITUENTS > &ConstList)
AliEmcalJet * GetRandomConeExclLead(AliJetContainer *jetCont, AliEmcalJet *leadJet)
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
void SetNeedEmcalGeom(Bool_t n)
Int_t fCentBin
!event centrality bin
Declaration of class AliAnalysisTaskJetUE.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
AliEmcalJet * GetRandomCone(AliJetContainer *jetCont)
Base class for a task that studies the UE.
Float_t fPtBinWidth
Histogram pt bin width.
AliParticleContainer * AddParticleContainer(std::string branchName, std::string contName="")
Float_t GetJetRadius() const
std::map< std::string, AliParticleContainer * > fParticleCollArray
particle/track collection array
void SetVzRange(Double_t min, Double_t max)
virtual void CalculateEventProperties()
Represent a jet reconstructed using the EMCal jet framework.
std::map< TString, AliRhoParameter * > fAlternativeRho
Alternative average background estimations.
void SetClusPtCut(Double_t cut)
std::map< std::string, AliEmcalJet * > fLeadingJet
!leading jet
std::map< std::string, AliJetContainer * > fJetCollArray
jet collection array
THistManager fHistManager
Histogram manager.
const AliJetIterableContainer accepted() const
void SetClusECut(Double_t cut)
void SetDefaultClusterEnergy(Int_t d)
std::map< std::string, AliClusterContainer * > fClusterCollArray
cluster collection array
static AliAnalysisTaskJetUEStudies * AddTaskJetUEStudies(TString ntracks="usedefault", TString nclusters="usedefault", Double_t trackPtCut=0.15, Double_t clusECut=0.30, TString suffix="")
Container structure for EMCAL clusters.
TRandom * fRandom
! Random number generator
void SetMakeGeneralHistograms(Bool_t g)
AliEmcalJet * GetRandomConePerp(AliJetContainer *jetCont, AliEmcalJet *leadJet)
Double_t fCent
!event centrality
Container for jet within the EMCAL jet framework.
void UserCreateOutputObjects()
Overloads base class method. Creates output objects.
void SetClusHadCorrEnergyCut(Double_t cut)