18 #include <TClonesArray.h> 23 #include <THnSparse.h> 28 #include <AliVCluster.h> 29 #include <AliVParticle.h> 32 #include "AliAnalysisManager.h" 33 #include <AliVEventHandler.h> 40 #include "AliEMCALGeometry.h" 42 #include "AliEMCALTriggerPatchInfo.h" 59 fDijetLeadingHadronPt(0),
61 fTrackConstituentThreshold(0),
62 fClusterConstituentThreshold(0),
65 fBackgroundScalingWeights(0),
66 fGapJetScalingWeights(0),
67 fPlotDijetCandHistograms(kFALSE),
68 fPlotDijetImbalanceHistograms(kFALSE),
69 fComputeBackground(kFALSE),
70 fDoMomentumBalance(kFALSE),
71 fDoGeometricalMatching(kFALSE),
72 fLoadBackgroundScalingWeights(kTRUE),
73 fComputeMBDownscaling(kFALSE),
74 fDoTriggerSimulation(kFALSE),
80 fUseAliEventCuts(kTRUE),
83 fUseManualEventCuts(kFALSE),
203 while ((obj = next())) {
231 if (embeddingHelper) {
252 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
254 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
255 title = histname +
";Centrality;Scale factor;counts";
258 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
259 title = histname +
";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
262 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jets->GetArrayName().Data());
263 title = histname +
";#eta;#phi;Centrality;Scale factor;";
266 Double_t max[4] = {0.5,6., 100, 20};
269 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jets->GetArrayName().Data());
270 title = histname +
";#eta;#phi;Centrality;#delta#it{p}_{T} (GeV/#it{c})";
272 Double_t minDpT[4] = {-0.5,1., 0, -50};
273 Double_t maxDpT[4] = {0.5,6., 100, 150};
289 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
298 axisTitle[dim] =
"Centrality (%)";
306 axisTitle[dim] =
"LeadingHadronRequired";
313 axisTitle[dim] =
"#it{p}_{T,trig jet} (GeV/#it{c})";
314 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
320 axisTitle[dim] =
"#it{p}_{T,ass jet} (GeV/#it{c})";
321 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
327 axisTitle[dim] =
"#phi_{trig jet}";
328 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
330 max[dim] = TMath::TwoPi();
334 axisTitle[dim] =
"#phi_{ass jet}";
335 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
337 max[dim] = TMath::TwoPi();
341 axisTitle[dim] =
"#eta_{trig jet}";
342 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
348 axisTitle[dim] =
"#eta_{ass jet}";
349 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
355 TString thnname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
357 for (
Int_t i = 0; i < dim; i++) {
358 hn->GetAxis(i)->SetTitle(axisTitle[i]);
359 hn->SetBinEdges(i, binEdges[i]);
372 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
384 axisTitle[dim] =
"Centrality (%)";
392 axisTitle[dim] =
"#Delta#phi";
399 axisTitle[dim] =
"#Delta#eta";
406 axisTitle[dim] =
"A_{J}";
413 axisTitle[dim] =
"x_{J}";
420 axisTitle[dim] =
"k_{Ty} (GeV)";
427 axisTitle[dim] =
"N_{tracks, trig jet}";
434 axisTitle[dim] =
"N_{tracks, ass jet}";
441 TString thnname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
443 for (
Int_t i = 0; i < dim; i++) {
444 hn->GetAxis(i)->SetTitle(axisTitle[i]);
445 hn->SetBinEdges(i, binEdges[i]);
453 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
454 TString title = histname +
";Centrality (%);#it{p}_{T,1}^{corr} (GeV/#it{c});#it{p}_{T,2}^{corr} (GeV/#it{c})";
455 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100,
nPtBins, 0,
fMaxPt,
nPtBins, 0,
fMaxPt,
"s");
460 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
461 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
468 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
469 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
476 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
477 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
484 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
485 title = histname +
";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
500 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
510 axisTitle[dim] =
"A_{J}";
517 axisTitle[dim] =
"#Delta#phi";
524 axisTitle[dim] =
"#it{p}_{T,particle} (GeV/#it{c})";
534 max[dim] = pTParticleBins[nbins[dim]];
535 binEdges[dim] = pTParticleBins;
538 axisTitle[dim] =
"#it{p}_{T}#parallel (GeV/#it{c})";
547 max[dim] = pTParallelBins[nbins[dim]];
548 binEdges[dim] = pTParallelBins;
551 TString thnname = TString::Format(
"%s/MomentumBalance", jets->GetArrayName().Data());
553 for (
Int_t i = 0; i < dim; i++) {
554 hn->GetAxis(i)->SetTitle(axisTitle[i]);
555 hn->SetBinEdges(i, binEdges[i]);
574 axisTitle[dim] =
"Centrality (%)";
582 axisTitle[dim] =
"isSwitched";
589 axisTitle[dim] =
"#DeltaR_{trig}";
596 axisTitle[dim] =
"#DeltaR_{ass}";
603 axisTitle[dim] =
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
610 axisTitle[dim] =
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
617 axisTitle[dim] =
"A_{J} low-threshold";
624 axisTitle[dim] =
"A_{J} hard-core";
631 TString thnname =
"GeometricalMatching";
633 for (
Int_t i = 0; i < dim; i++) {
634 hn->GetAxis(i)->SetTitle(axisTitle[i]);
635 hn->SetBinEdges(i, binEdges[i]);
641 histname =
"GeometricalMatchingEfficiency";
642 title = histname +
";isMatched;counts";
659 histname =
"TriggerSimHistograms/hMedPatchDijet";
660 title = histname +
";Centrality (%);#it{p}_{T,trig}^{corr} (GeV/#it{c});#it{E}_{patch,med} (GeV);type";
661 Int_t nbinsD[4] = {50, 40, 100, 2};
663 Double_t maxD[4] = {100, 200, 50, 1.5};
675 if (fname.BeginsWith(
"alien://")) {
676 TGrid::Connect(
"alien://");
679 TFile*
file = TFile::Open(path);
681 if (!file || file->IsZombie()) {
682 ::Error(
"AliAnalysisTaskEmcalDijetImbalance",
"Could not open background scaling histogram");
687 TH2D* h1 =
dynamic_cast<TH2D*
>(file->Get(name1));
690 ::Info(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s loaded from file %s.", name1, path);
693 ::Error(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Background histogram %s not found in file %s.", name1, path);
700 TH2D* h2 =
dynamic_cast<TH2D*
>(file->Get(name2));
703 ::Info(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Jet pT scaling histogram %s loaded from file %s.", name2, path);
706 ::Error(
"AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram",
"Jet pT scaling histogram %s not found in file %s.", name2, path);
739 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
740 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
741 GetName(), cls.GetName(),
"EmcalTriggers"));
746 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
772 TString triggerNameMB1 =
"CINT7-B-NOPF-CENT";
773 TString triggerNameMB2 =
"CV0L7-B-NOPF-CENT";
774 TString triggerNameJE =
"CINT7EJ1-B-NOPF-CENTNOPMD";
779 for (
auto i : runtriggers) {
780 if (i.EqualTo(triggerNameMB1) || i.EqualTo(triggerNameMB2)) {
823 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
824 TString jetContName = jetCont->GetName();
825 if (jetContName.Contains(
"HardCore"))
continue;
833 for (
Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
836 FindDijet(jetCont, leadingHadronCutType);
857 histname = TString::Format(
"%s/MomentumBalance", jetCont->GetArrayName().Data());
917 for(
auto assJetCand : jetCont->
accepted()) {
918 if (!assJetCand)
continue;
920 if ( TMath::Abs(trigJet->
Phi() - assJetCand->Phi()) <
fDeltaPhiMin )
continue;
923 if ( assJetCandPt < assJetPt )
continue;
955 track = trackIterator.second;
965 Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
966 Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
967 Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
972 deltaPhi = trackPhi - trigJetPhi;
973 balancePt = trackPt * TMath::Cos(deltaPhi);
976 deltaPhi = trackPhi - assJetPhi;
977 balancePt = -trackPt * TMath::Cos(deltaPhi);
991 TString jetContAllName = Form(
"Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (
int) (
fMatchingJetR*10) );
997 TString jetContHardCoreName = Form(
"JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (
int) (
fMatchingJetR*10), trackThreshold, clusThreshold);
1019 TClass cls(objname);
1020 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1021 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1022 GetName(), cls.GetName(),
"EmcalTriggers"));
1027 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1032 std::vector<Double_t> vecEMCal;
1033 std::vector<Double_t> vecDCal;
1035 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1038 if(!recpatch->IsJetHighSimple())
continue;
1040 if (recpatch->IsEMCal()) {
1041 vecEMCal.push_back(recpatch->GetPatchE());
1043 vecDCal.push_back(recpatch->GetPatchE());
1050 const Int_t nBkgPatchesEMCal = vecEMCal.size();
1051 const Int_t nBkgPatchesDCal = vecDCal.size();
1052 fMedianEMCal = TMath::Median(nBkgPatchesEMCal, &vecEMCal[0]);
1053 fMedianDCal = TMath::Median(nBkgPatchesDCal, &vecDCal[0]);
1057 histname =
"TriggerSimHistograms/hMedPatchDijet";
1076 for(
auto matchingTrigJetCand : jetCont->
accepted()) {
1077 if (!matchingTrigJetCand)
continue;
1079 if (matchingTrigJet) {
1080 if (
GetJetPt(jetCont, matchingTrigJetCand) <
GetJetPt(jetCont, matchingTrigJet) )
continue;
1082 matchingTrigJet = matchingTrigJetCand;
1084 if (!matchingTrigJet)
return;
1088 for(
auto matchingAssJetCand : jetCont->
accepted()) {
1089 if (!matchingAssJetCand)
continue;
1091 if (matchingAssJet) {
1092 if (
GetJetPt(jetCont, matchingAssJetCand) <
GetJetPt(jetCont, matchingAssJet) )
continue;
1094 matchingAssJet = matchingAssJetCand;
1098 if (matchingAssJet) {
1101 if (
GetJetPt(jetCont, matchingTrigJet) <
GetJetPt(jetCont, matchingAssJet) ) {
1102 trigJet = matchingAssJet;
1103 assJet = matchingTrigJet;
1142 Double_t phiMinEMCal =
fGeom->GetArm1PhiMin() * TMath::DegToRad();
1143 Double_t phiMaxEMCal =
fGeom->GetEMCALPhiMax() * TMath::DegToRad();
1149 Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
1150 Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
1156 while ((jetCont = static_cast<AliJetContainer*>(nextJetColl()))) {
1159 TRandom3* r =
new TRandom3(0);
1160 Double_t jetR = jetCont->GetJetRadius();
1161 Double_t accRC = TMath::Pi() * jetR * jetR;
1162 Double_t etaEMCalfid = etaEMCal - jetR;
1163 Double_t phiMinEMCalfid = phiMinEMCal + jetR;
1164 Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
1167 Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
1168 Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
1176 etaMin = -etaEMCalfid + etaBin*etaStep;
1177 etaMax = etaMin + etaStep;
1178 etaDCalRC[etaBin] = r->Uniform(etaMin, etaMax);
1186 phiMin = 1 + phiBin*phiStep;
1187 phiMax = phiMin + phiStep;
1188 phiDCalRC[phiBin] = r->Uniform(phiMin, phiMax);
1199 std::vector<std::vector<Double_t>> trackPtSumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1200 std::vector<std::vector<Double_t>> clusESumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1214 track = trackIterator.first;
1215 trackEta = track.Eta();
1217 trackPt = track.Pt();
1220 if (TMath::Abs(trackEta) < etaTPC) {
1221 trackPtSumTPC += trackPt;
1225 if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
1226 trackPtSumEMCal += trackPt;
1230 deltaR =
GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
1231 if (deltaR < jetR) {
1232 trackPtSumEMCalRC += trackPt;
1238 deltaR =
GetDeltaR(&track, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1239 if (deltaR < jetR) {
1240 trackPtSumDCalRC[etaBin][phiBin] += trackPt;
1257 clus = clusIterator.first;
1258 clusEta = clus.Eta();
1263 if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
1264 clusESumEMCal += clusE;
1268 deltaR =
GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
1269 if (deltaR < jetR) {
1270 clusESumEMCalRC += clusE;
1276 deltaR =
GetDeltaR(&clus, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1277 if (deltaR < jetR) {
1278 clusESumDCalRC[etaBin][phiBin] += clusE;
1286 Double_t numerator = (trackPtSumEMCal + clusESumEMCal) / accEMCal;
1287 Double_t denominator = trackPtSumTPC / accTPC;
1288 Double_t scaleFactor = numerator / denominator;
1289 TString histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1295 numerator = (trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin]) / accRC;
1296 scaleFactor = numerator / denominator;
1297 histname = TString::Format(
"%s/BackgroundHistograms/hScaleFactorEtaPhi", jetCont->GetArrayName().Data());
1298 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, scaleFactor};
1304 Double_t rho = jetCont->GetRhoVal();
1305 Double_t deltaPt = trackPtSumEMCalRC + clusESumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1306 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1315 rho = sf * jetCont->GetRhoVal();
1317 deltaPt = trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin] - rho * accRC;
1318 histname = TString::Format(
"%s/BackgroundHistograms/hDeltaPtEtaPhi", jetCont->GetArrayName().Data());
1319 Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin],
fCent, deltaPt};
1340 jetPt = jetPt * (1 + sf * jet->
NEF());
1348 TString jetContName = jetCont->GetName();
1349 if (jetContName.Contains(
"HardCore")) pT = jet->
Pt();
1362 for(
auto jetCand : jetCont->
accepted()) {
1363 if (!jetCand)
continue;
1367 if ( jetCandPt < leadingJetPt )
continue;
1369 leadingJet = jetCand;
1386 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1396 Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
1397 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1444 TString histname = TString::Format(
"%s/DijetCandObservables", jets->GetArrayName().Data());
1446 if (!histJetObservables)
return;
1447 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1448 TString title(histJetObservables->GetAxis(n)->GetTitle());
1449 if (
title==
"Centrality (%)")
1450 contents[n] =
fCent;
1451 else if (
title==
"LeadingHadronRequired")
1453 else if (
title==
"#it{p}_{T,trig jet} (GeV/#it{c})")
1455 else if (
title==
"#it{p}_{T,ass jet} (GeV/#it{c})")
1457 else if (
title==
"#phi_{trig jet}")
1459 else if (
title==
"#phi_{ass jet}")
1461 else if (
title==
"#eta_{trig jet}")
1463 else if (
title==
"#eta_{ass jet}")
1466 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1468 histJetObservables->Fill(contents);
1479 TString histname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
1481 if (!histJetObservables)
return;
1482 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1483 TString title(histJetObservables->GetAxis(n)->GetTitle());
1484 if (
title==
"Centrality (%)")
1485 contents[n] =
fCent;
1486 else if (
title==
"#Delta#phi")
1488 else if (
title==
"#Delta#eta")
1490 else if (
title==
"A_{J}")
1492 else if (
title==
"x_{J}")
1494 else if (
title==
"k_{Ty} (GeV)")
1496 else if (
title==
"N_{tracks, trig jet}")
1498 else if (
title==
"N_{tracks, ass jet}")
1501 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1503 histJetObservables->Fill(contents);
1507 TString histname = TString::Format(
"%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
1515 histname = TString::Format(
"%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
1520 histname = TString::Format(
"%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1521 TLorentzVector leadPart;
1524 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
1529 histname = TString::Format(
"%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
1532 track =
static_cast<AliVTrack*
>(trigJet->
Track(i));
1539 histname = TString::Format(
"%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
1552 if (!histJetObservables)
return;
1553 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1554 TString title(histJetObservables->GetAxis(n)->GetTitle());
1557 else if (
title==
"#Delta#phi")
1558 contents[n] = deltaPhi;
1559 else if (
title==
"#it{p}_{T,particle} (GeV/#it{c})")
1560 contents[n] = trackPt;
1561 else if (
title==
"#it{p}_{T}#parallel (GeV/#it{c})")
1562 contents[n] = balancePt;
1564 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1566 histJetObservables->Fill(contents);
1575 TString histname =
"GeometricalMatchingEfficiency";
1585 TString thnname =
"GeometricalMatching";
1588 if (!histJetObservables)
return;
1589 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1590 TString title(histJetObservables->GetAxis(n)->GetTitle());
1591 if (
title==
"Centrality (%)")
1592 contents[n] =
fCent;
1593 else if (
title==
"isSwitched")
1594 contents[n] = isSwitched;
1595 else if (
title==
"#DeltaR_{trig}")
1596 contents[n] = trigDeltaR;
1597 else if (
title==
"#DeltaR_{ass}")
1598 contents[n] = assDeltaR;
1599 else if (
title==
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
1601 else if (
title==
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
1603 else if (
title==
"A_{J} low-threshold")
1605 else if (
title==
"A_{J} hard-core")
1608 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1610 histJetObservables->Fill(contents);
1621 const char *nclusters,
1623 const Bool_t doGeomMatching,
1627 const Bool_t includePHOS,
1638 ::Error(
"AddTaskEmcalDijetImbalance",
"No analysis manager to connect to.");
1644 AliVEventHandler* handler = mgr->GetInputEventHandler();
1647 ::Error(
"AddTaskEmcalDijetImbalance",
"This task requires an input event handler");
1659 if (handler->InheritsFrom(
"AliESDInputHandler")) {
1662 else if (handler->InheritsFrom(
"AliAODInputHandler")) {
1673 if (trackName ==
"usedefault") {
1674 if (dataType ==
kESD) {
1675 trackName =
"Tracks";
1677 else if (dataType == kAOD) {
1678 trackName =
"tracks";
1685 if (clusName ==
"usedefault") {
1686 if (dataType ==
kESD) {
1687 clusName =
"CaloClusters";
1689 else if (dataType == kAOD) {
1690 clusName =
"caloClusters";
1697 TString name(
"AliAnalysisTaskEmcalDijetImbalance");
1698 if (!trackName.IsNull()) {
1702 if (!clusName.IsNull()) {
1706 if (strcmp(suffix,
"") != 0) {
1721 if (trackName ==
"mcparticles") {
1723 partCont = mcpartCont;
1725 else if (trackName ==
"tracks" || trackName ==
"Tracks") {
1727 partCont = trackCont;
1733 if (!clusName.IsNull()) {
1751 if (doGeomMatching) {
1753 if (trackName ==
"mcparticles") {
1755 partContThresh = mcpartCont;
1757 else if (trackName ==
"tracks" || trackName ==
"Tracks") {
1759 partContThresh = trackCont;
1761 if (partContThresh) {
1763 partContThresh->SetName(
"tracksThresh");
1768 if (!clusName.IsNull()) {
1770 clusContThresh->SetName(
"caloClustersThresh");
1789 mgr->AddTask(dijetTask);
1792 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer() ;
1794 contname +=
"_histos";
1795 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contname.Data(),
1796 TList::Class(),AliAnalysisManager::kOutputContainer,
1797 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
1798 mgr->ConnectInput (dijetTask, 0, cinput1 );
1799 mgr->ConnectOutput (dijetTask, 1, coutput1 );
Double_t fMatchingJetR
jet R for matching study
void AllocateDijetImbalanceHistograms()
AliEmcalJet * GetLeadingJet(AliJetContainer *jetCont)
void SetDeltaPhiCut(Double_t d)
void SetParticlePtCut(Double_t cut)
Double_t GetRhoVal() const
Int_t fNPhiBins
Number of phi bins in DCal region (for background/correction)
Int_t fNPtHistBins
! number of variable pt bins
void UserCreateOutputObjects()
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
void AdoptParticleContainer(AliParticleContainer *cont)
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
const AliClusterIterableMomentumContainer accepted_momentum() const
Int_t fNEtaBins
Number of eta bins in DCal region (for background/correction)
void AllocateGeometricalMatchingHistograms()
void DoMomentumBalance(TString histname)
Container with name, TClonesArray and cuts for particles.
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.
static AliEmcalDownscaleFactorsOCDB * Instance()
TList * fEventCutList
! Output list for event cut histograms
void FillTH3(const char *hname, double x, double y, double z, double weight=1., Option_t *opt="")
Fill a 3D histogram within the container.
Declaration of class AliAnalysisTaskEmcalEmbeddingHelper.
TH2D * fGapJetScalingWeights
Histogram storing eta-phi weights scaling jets near the gap region.
AliVParticle * Track(Int_t idx) const
Double_t fDijetLeadingHadronPt
leading hadron pT threshold for leading jet in dijet
void FillDijetCandHistograms(AliJetContainer *jets)
Double_t GetDownscaleFactorForTriggerClass(const TString &trigger) const
void AllocateBackgroundHistograms()
void SetPhosMinM02(Double_t m)
AliAnalysisTaskEmcalDijetImbalance()
void SetDoGeometricalMatching(Bool_t b, Double_t r, Double_t trackThresh, Double_t clusThresh)
Bool_t fkEMCEJE
! flag telling whether the event is "triggered" or not in "simulation"
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
TString part
use mixed event to constrain combinatorial background
UShort_t GetNumberOfConstituents() const
Container for particles within the EMCAL framework.
void SetCaloTriggerPatchInfoName(const char *n)
UShort_t GetNumberOfTracks() const
Bool_t fDoMomentumBalance
Set whether to enable momentum balance study.
void AdoptClusterContainer(AliClusterContainer *cont)
void FindDijet(AliJetContainer *jetCont, Int_t leadingHadronCutBin)
Bool_t fPlotDijetImbalanceHistograms
Set whether to enable dijet imbalance histograms.
bool AddQAPlotsToList(TList *list)
AliEventCuts fEventCuts
event selection utility
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
void SetRun(int runnumber)
Dijet_t fDijet
! dijet candidate (per event)
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
bool IsInitialized() const
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
void FillDijetImbalanceHistograms(AliJetContainer *jets)
TObject * FindObject(const char *name) const
Find an object inside the container.
Double_t GetJetType(AliEmcalJet *jet)
THashList * GetListOfHistograms() const
Get the list of histograms.
Double_t GetDeltaR(AliEmcalJet *jet1, AliEmcalJet *jet2)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
Double_t fClusterConstituentThreshold
constituent threshold for matching study
void SetClusNonLinCorrEnergyCut(Double_t cut)
Di-jet imbalance analysis with full jets.
AliEMCALGeometry * fGeom
!emcal geometry
UInt_t GetJetAcceptanceType() const
void DoTriggerSimulation()
Double_t Phi_0_2pi() const
Implementation of task to embed external events.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
Bool_t fDoTriggerSimulation
Set whether to perform a simple trigger simulation.
BeamType fForceBeamType
forced beam type
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
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
Double_t fCent
!event centrality
void LoadBackgroundScalingHistogram(const char *path="alien:///alice/cern.ch/user/j/jmulliga/scaleFactorEMCalLHC15o.root", const char *name1="hEtaPhiSFCorrection", const char *name2="hEtaPhiJetPtCorrection")
void SetIncludePHOS(Bool_t b)
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.
AliRhoParameter * GetRhoParameter()
Bool_t fComputeMBDownscaling
Set whether to compute and plot MB downscaling factors.
void RecordEmbeddedEventProperties()
virtual Bool_t IsEventSelected()
Performing event selection.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
std::vector< TString > GetTriggerClasses() const
AliEmcalList * fOutput
!output list
Handler for downscale factors for various triggers obtained from the OCDB.
Bool_t fLoadBackgroundScalingWeights
Flag to load eta-phi weights for full-jet background scale factors.
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)
void SetClusPtCut(Double_t cut)
Dijet_t fMatchingDijet
! low-threshold matching dijet, for matching study
TH2D * fBackgroundScalingWeights
Histogram storing eta-phi weights for full-jet background scale factors.
void UserCreateOutputObjects()
Main initialization function on the worker.
AliEmcalEmbeddingQA fEmbeddingQA
! QA hists for embedding (will only be added if embedding)
const AliJetIterableContainer accepted() const
Double_t fTrackConstituentThreshold
constituent threshold for matching study
Double_t * fCentHistBins
! cent bins
EDataType_t
Switch for the data type.
static AliAnalysisTaskEmcalDijetImbalance * AddTaskEmcalDijetImbalance(const char *ntracks="usedefault", const char *nclusters="usedefault", const Double_t deltaPhiMin=2 *TMath::Pi()/3, const Bool_t doGeomMatching=kFALSE, const Double_t minTrPtHardCore=3.0, const Double_t minClPtHardCore=3.0, const Double_t jetR=0.2, const Bool_t includePHOS=kTRUE, const Double_t minTrPt=0.15, const Double_t minClPt=0.30, const char *suffix="")
DCal acceptance – spans ONLY DCal (no PHOS or gap)
void SetClusECut(Double_t cut)
void SetDefaultClusterEnergy(Int_t d)
void FindMatchingDijet(AliJetContainer *jetCont)
Int_t fNCentHistBins
! number of cent bins
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Create a new THnSparse within the container.
Double_t fMinTrigJetPt
leading jet min pT in a dijet pair
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
virtual ~AliAnalysisTaskEmcalDijetImbalance()
void SetPhosMinNcells(Int_t n)
Container for jet within the EMCAL jet framework.
void DoGeometricalMatching()
Bool_t fPlotDijetCandHistograms
Set whether to enable dijet pair histograms.
void AllocateMomentumBalanceHistograms()
TH3 * CreateTH3(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int nbinsz, double zmin, double zmax, Option_t *opt="")
Create a new TH2 within the container.
void AllocateTriggerSimHistograms()
void SetClusHadCorrEnergyCut(Double_t cut)
static const AliAnalysisTaskEmcalEmbeddingHelper * GetInstance()