22 #include <TClonesArray.h>
24 #include <THnSparse.h>
27 #include "AliAnalysisManager.h"
28 #include "AliVCluster.h"
29 #include "AliVTrack.h"
43 fMatching(kNoMatching),
46 fUseCellsToMatch(kFALSE),
50 fDeltaEtaDeltaPhiAxis(0),
57 fHistRejectionReason1(0),
58 fHistRejectionReason2(0),
64 fHistJets1CorrPtArea(0),
66 fHistJets1CEFvsCEFPt(0),
70 fHistJets2CorrPtArea(0),
72 fHistJets2CEFvsCEFPt(0),
74 fHistCommonEnergy1vsJet1Pt(0),
75 fHistCommonEnergy2vsJet2Pt(0),
76 fHistDistancevsJet1Pt(0),
77 fHistDistancevsJet2Pt(0),
78 fHistDistancevsCommonEnergy1(0),
79 fHistDistancevsCommonEnergy2(0),
80 fHistCommonEnergy1vsCommonEnergy2(0),
81 fHistDeltaEtaDeltaPhi(0),
82 fHistJet2PtOverJet1PtvsJet2Pt(0),
83 fHistJet1PtOverJet2PtvsJet1Pt(0),
84 fHistDeltaPtvsJet1Pt(0),
85 fHistDeltaPtvsJet2Pt(0),
86 fHistDeltaPtOverJet1PtvsJet1Pt(0),
87 fHistDeltaPtOverJet2PtvsJet2Pt(0),
88 fHistDeltaPtvsDistance(0),
89 fHistDeltaPtvsCommonEnergy1(0),
90 fHistDeltaPtvsCommonEnergy2(0),
91 fHistDeltaPtvsArea1(0),
92 fHistDeltaPtvsArea2(0),
93 fHistDeltaPtvsDeltaArea(0),
94 fHistJet1PtvsJet2Pt(0),
95 fHistDeltaCorrPtOverJet1CorrPtvsJet1CorrPt(0),
96 fHistDeltaCorrPtOverJet2CorrPtvsJet2CorrPt(0),
97 fHistDeltaCorrPtvsJet1CorrPt(0),
98 fHistDeltaCorrPtvsJet2CorrPt(0),
99 fHistDeltaCorrPtvsDistance(0),
100 fHistDeltaCorrPtvsCommonEnergy1(0),
101 fHistDeltaCorrPtvsCommonEnergy2(0),
102 fHistDeltaCorrPtvsArea1(0),
103 fHistDeltaCorrPtvsArea2(0),
104 fHistDeltaCorrPtvsDeltaArea(0),
105 fHistJet1CorrPtvsJet2CorrPt(0),
106 fHistDeltaMCPtOverJet1MCPtvsJet1MCPt(0),
107 fHistDeltaMCPtOverJet2PtvsJet2Pt(0),
108 fHistDeltaMCPtvsJet1MCPt(0),
109 fHistDeltaMCPtvsJet2Pt(0),
110 fHistDeltaMCPtvsDistance(0),
111 fHistDeltaMCPtvsCommonEnergy1(0),
112 fHistDeltaMCPtvsCommonEnergy2(0),
113 fHistDeltaMCPtvsArea1(0),
114 fHistDeltaMCPtvsArea2(0),
115 fHistDeltaMCPtvsDeltaArea(0),
116 fHistJet1MCPtvsJet2Pt(0)
120 SetMakeGeneralHistograms(kTRUE);
126 fMatching(kNoMatching),
129 fUseCellsToMatch(kFALSE),
133 fDeltaEtaDeltaPhiAxis(0),
140 fHistRejectionReason1(0),
141 fHistRejectionReason2(0),
147 fHistJets1CorrPtArea(0),
148 fHistJets1NEFvsPt(0),
149 fHistJets1CEFvsCEFPt(0),
153 fHistJets2CorrPtArea(0),
154 fHistJets2NEFvsPt(0),
155 fHistJets2CEFvsCEFPt(0),
157 fHistCommonEnergy1vsJet1Pt(0),
158 fHistCommonEnergy2vsJet2Pt(0),
159 fHistDistancevsJet1Pt(0),
160 fHistDistancevsJet2Pt(0),
161 fHistDistancevsCommonEnergy1(0),
162 fHistDistancevsCommonEnergy2(0),
163 fHistCommonEnergy1vsCommonEnergy2(0),
164 fHistDeltaEtaDeltaPhi(0),
165 fHistJet2PtOverJet1PtvsJet2Pt(0),
166 fHistJet1PtOverJet2PtvsJet1Pt(0),
167 fHistDeltaPtvsJet1Pt(0),
168 fHistDeltaPtvsJet2Pt(0),
169 fHistDeltaPtOverJet1PtvsJet1Pt(0),
170 fHistDeltaPtOverJet2PtvsJet2Pt(0),
171 fHistDeltaPtvsDistance(0),
172 fHistDeltaPtvsCommonEnergy1(0),
173 fHistDeltaPtvsCommonEnergy2(0),
174 fHistDeltaPtvsArea1(0),
175 fHistDeltaPtvsArea2(0),
176 fHistDeltaPtvsDeltaArea(0),
177 fHistJet1PtvsJet2Pt(0),
178 fHistDeltaCorrPtOverJet1CorrPtvsJet1CorrPt(0),
179 fHistDeltaCorrPtOverJet2CorrPtvsJet2CorrPt(0),
180 fHistDeltaCorrPtvsJet1CorrPt(0),
181 fHistDeltaCorrPtvsJet2CorrPt(0),
182 fHistDeltaCorrPtvsDistance(0),
183 fHistDeltaCorrPtvsCommonEnergy1(0),
184 fHistDeltaCorrPtvsCommonEnergy2(0),
185 fHistDeltaCorrPtvsArea1(0),
186 fHistDeltaCorrPtvsArea2(0),
187 fHistDeltaCorrPtvsDeltaArea(0),
188 fHistJet1CorrPtvsJet2CorrPt(0),
189 fHistDeltaMCPtOverJet1MCPtvsJet1MCPt(0),
190 fHistDeltaMCPtOverJet2PtvsJet2Pt(0),
191 fHistDeltaMCPtvsJet1MCPt(0),
192 fHistDeltaMCPtvsJet2Pt(0),
193 fHistDeltaMCPtvsDistance(0),
194 fHistDeltaMCPtvsCommonEnergy1(0),
195 fHistDeltaMCPtvsCommonEnergy2(0),
196 fHistDeltaMCPtvsArea1(0),
197 fHistDeltaMCPtvsArea2(0),
198 fHistDeltaMCPtvsDeltaArea(0),
199 fHistJet1MCPtvsJet2Pt(0)
218 fHistJets1PhiEta =
new TH2F(
"fHistJets1PhiEta",
"fHistJets1PhiEta", 40, -1, 1, 40, 0, TMath::Pi()*2);
258 fHistJets2PhiEta =
new TH2F(
"fHistJets2PhiEta",
"fHistJets2PhiEta", 40, -1, 1, 40, 0, TMath::Pi()*2);
625 max[dim] = 2*TMath::Pi()*(1 + 1./(nbins[dim]-1));
634 title[dim] =
"p_{T}";
640 title[dim] =
"A_{jet}";
663 title[dim] =
"z_{flavour}";
671 title[dim] =
"p_{T}^{D}";
678 title[dim] =
"p_{T,particle}^{leading} (GeV/c)";
684 Int_t dim1 = dim, dim2 = dim;
687 title[dim1] =
"p_{T}^{corr}";
695 title[dim1] =
"p_{T}^{MC}";
702 fHistJets1 =
new THnSparseD(
"fHistJets1",
"fHistJets1",dim1,nbins,min,max);
703 for (
Int_t i = 0; i < dim1; i++)
708 title[dim2] =
"p_{T}^{corr}";
715 fHistJets2 =
new THnSparseD(
"fHistJets2",
"fHistJets2",dim2,nbins,min,max);
716 for (
Int_t i = 0; i < dim2; i++)
724 title[dim] =
"p_{T,1}";
730 title[dim] =
"p_{T,2}";
736 title[dim] =
"A_{jet,1}";
742 title[dim] =
"A_{jet,2}";
748 title[dim] =
"distance";
766 title[dim] =
"p_{T,particle,1}^{leading} (GeV/c)";
772 title[dim] =
"p_{T,particle,2}^{leading} (GeV/c)";
779 title[dim] =
"#deltaA_{jet}";
785 title[dim] =
"#deltap_{T}";
792 title[dim] =
"p_{T,1}^{corr}";
799 title[dim] =
"p_{T,2}^{corr}";
806 title[dim] =
"#deltap_{T}^{corr}";
813 title[dim] =
"#delta#eta";
819 title[dim] =
"#delta#phi";
821 min[dim] = -TMath::Pi()/2;
822 max[dim] = TMath::Pi()*3/2;
826 title[dim] =
"p_{T,1}^{MC}";
833 title[dim] =
"#deltap_{T}^{MC}";
842 title[dim] =
"NEF_{1}";
848 title[dim] =
"NEF_{2}";
856 title[dim] =
"Z_{1}";
862 title[dim] =
"Z_{2}";
870 title[dim] =
"z_{flavour,1}";
876 title[dim] =
"z_{flavour,2}";
884 title[dim] =
"p_{T,1}^{D}";
890 title[dim] =
"p_{T,2}^{D}";
897 fHistMatching =
new THnSparseD(
"fHistMatching",
"fHistMatching",dim,nbins,min,max);
899 for (
Int_t i = 0; i < dim; i++)
915 if (!jets1 || !jets2)
return;
952 if (zleading == 1 || (zleading > 1 && zleading - 1 < 1e-3)) zleading = 0.999;
960 ptflavour = hftrack->Pt();
962 if (zflavour == 1 || (zflavour > 1 && zflavour - 1 < 1e-3)) zflavour = 0.999;
966 THnSparse *histo = 0;
978 for (
Int_t i = 0; i < histo->GetNdimensions(); i++) {
981 contents[i] = jet->
Phi();
982 else if (
title==
"#eta")
983 contents[i] = jet->
Eta();
984 else if (
title==
"p_{T}")
985 contents[i] = jet->
Pt();
986 else if (
title==
"A_{jet}")
987 contents[i] = jet->
Area();
988 else if (
title==
"NEF")
989 contents[i] = jet->
NEF();
991 contents[i] = zleading;
992 else if (
title==
"p_{T}^{corr}")
993 contents[i] = corrpt;
994 else if (
title==
"p_{T}^{MC}")
995 contents[i] = jet->
MCPt();
996 else if (
title==
"p_{T,particle}^{leading} (GeV/c)")
997 contents[i] = leadPart.Pt();
998 else if (
title==
"z_{flavour}")
999 contents[i] = zflavour;
1000 else if (
title==
"p_{T}^{D}")
1001 contents[i] = ptflavour;
1003 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1006 histo->Fill(contents);
1018 else if (Set == 2) {
1052 if (zleading1 == 1 || (zleading1 > 1 && zleading1 - 1 < 1e-3)) zleading1 = 0.999;
1060 ptflavour1 = hftrack1->Pt();
1062 if (zflavour1 == 1 || (zflavour1 > 1 && zflavour1 - 1 < 1e-3)) zflavour1 = 0.999;
1069 if (zleading2 == 1 || (zleading2 > 1 && zleading2 - 1 < 1e-3)) zleading2 = 0.999;
1077 ptflavour2 = hftrack2->Pt();
1079 if (zflavour2 == 1 || (zflavour2 > 1 && zflavour2 - 1 < 1e-3)) zflavour2 = 0.999;
1087 if (
title==
"p_{T,1}")
1088 contents[i] = jet1->
Pt();
1089 else if (
title==
"p_{T,2}")
1090 contents[i] = jet2->
Pt();
1091 else if (
title==
"A_{jet,1}")
1092 contents[i] = jet1->
Area();
1093 else if (
title==
"A_{jet,2}")
1094 contents[i] = jet2->
Area();
1095 else if (
title==
"distance")
1097 else if (
title==
"CE1")
1099 else if (
title==
"CE2")
1101 else if (
title==
"#deltaA_{jet}")
1102 contents[i] = jet1->
Area()-jet2->
Area();
1103 else if (
title==
"#deltap_{T}")
1104 contents[i] = jet1->
Pt()-jet2->
Pt();
1105 else if (
title==
"#delta#eta")
1106 contents[i] = jet1->
Eta()-jet2->
Eta();
1107 else if (
title==
"#delta#phi")
1108 contents[i] = jet1->
Phi()-jet2->
Phi();
1109 else if (
title==
"p_{T,1}^{corr}")
1110 contents[i] = corrpt1;
1111 else if (
title==
"p_{T,2}^{corr}")
1112 contents[i] = corrpt2;
1113 else if (
title==
"#deltap_{T}^{corr}")
1114 contents[i] = corrpt1-corrpt2;
1115 else if (
title==
"p_{T,1}^{MC}")
1116 contents[i] = jet1->
MCPt();
1117 else if (
title==
"#deltap_{T}^{MC}")
1118 contents[i] = jet1->
MCPt()-jet2->
Pt();
1119 else if (
title==
"NEF_{1}")
1120 contents[i] = jet1->
NEF();
1121 else if (
title==
"NEF_{2}")
1122 contents[i] = jet2->
NEF();
1123 else if (
title==
"Z_{1}")
1124 contents[i] = zleading1;
1125 else if (
title==
"Z_{2}")
1126 contents[i] = zleading2;
1127 else if (
title==
"p_{T,particle,1}^{leading} (GeV/c)")
1128 contents[i] = leadPart1.Pt();
1129 else if (
title==
"p_{T,particle,2}^{leading} (GeV/c)")
1130 contents[i] = leadPart2.Pt();
1131 else if (
title==
"z_{flavour,1}")
1132 contents[i] = zflavour1;
1133 else if (
title==
"z_{flavour,2}")
1134 contents[i] = zflavour2;
1135 else if (
title==
"p_{T,1}^{D}")
1136 contents[i] = ptflavour1;
1137 else if (
title==
"p_{T,2}^{D}")
1138 contents[i] = ptflavour2;
1140 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1180 Double_t dcorrpt = corrpt1 - corrpt2;
1221 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1223 if (
fMatching ==
kMCLabel && (!jets2->GetIsParticleLevel() || jets1->GetIsParticleLevel())) {
1224 if (jets1->GetIsParticleLevel() == jets2->GetIsParticleLevel()) {
1225 AliWarning(
"Changing matching type from MC label to same collection...");
1229 AliWarning(
"Changing matching type from MC label to geometrical...");
1234 if (jets2->GetIsParticleLevel() && !jets1->GetIsParticleLevel()) {
1235 AliWarning(
"Changing matching type from same collection to MC label...");
1239 AliWarning(
"Changing matching type from same collection to geometrical...");
1262 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return kFALSE;
1268 jets1->ResetCurrentID();
1273 if (!jet2)
continue;
1280 AliDebug(2,Form(
"Found matching: jet1 pt = %f, eta = %f, phi = %f, jet2 pt = %f, eta = %f, phi = %f",
1281 jet1->
Pt(), jet1->
Eta(), jet1->
Phi(),
1282 jet2->
Pt(), jet2->
Eta(), jet2->
Phi()));
1296 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1301 jets2->ResetCurrentID();
1304 jets1->ResetCurrentID();
1310 jets2->ResetCurrentID();
1329 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1341 if (tracks1 && tracks1->GetArray()) {
1343 AliVParticle *track = jet1->
TrackAt(iTrack,tracks1->GetArray());
1345 AliWarning(Form(
"Could not find track %d!", iTrack));
1349 Int_t MClabel = TMath::Abs(track->GetLabel());
1351 if (MClabel != 0)
continue;
1354 AliDebug(3,Form(
"Track %d (pT = %f) is not a MC particle (MClabel = %d)!",iTrack,track->Pt(),MClabel));
1355 totalPt1 -= track->Pt();
1363 AliVCluster *clus = jet1->
ClusterAt(iClus,clusters1->GetArray());
1365 AliWarning(Form(
"Could not find cluster %d!", iClus));
1369 clus->GetMomentum(part,
fVertex);
1371 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++) {
1372 Int_t cellId = clus->GetCellAbsId(iCell);
1373 Double_t cellFrac = clus->GetCellAmplitudeFraction(iCell);
1377 if (MClabel != 0)
continue;
1380 AliDebug(3,Form(
"Cell %d (frac = %f) is not a MC particle (MClabel = %d)!",iCell,cellFrac,MClabel));
1381 totalPt1 -= part.Pt() * cellFrac;
1382 d1 -= part.Pt() * cellFrac;
1388 AliVCluster *clus = jet1->
ClusterAt(iClus,clusters1->GetArray());
1390 AliWarning(Form(
"Could not find cluster %d!", iClus));
1393 TLorentzVector part;
1394 clus->GetMomentum(part,
fVertex);
1396 Int_t MClabel = TMath::Abs(clus->GetLabel());
1398 if (MClabel != 0)
continue;
1401 AliDebug(3,Form(
"Cluster %d (pT = %f) is not a MC particle (MClabel = %d)!",iClus,part.Pt(),MClabel));
1402 totalPt1 -= part.Pt();
1408 Bool_t track2Found = kFALSE;
1413 AliVParticle *track = jet1->
TrackAt(iTrack,tracks1->GetArray());
1415 AliWarning(Form(
"Could not find track %d!", iTrack));
1418 Int_t MClabel = TMath::Abs(track->GetLabel());
1420 if (MClabel <= 0)
continue;
1423 index = tracks2->GetIndexFromLabel(MClabel);
1425 AliDebug(2,Form(
"Track %d (pT = %f) does not have an associated MC particle (MClabel = %d)!",iTrack,track->Pt(),MClabel));
1429 if (index2 != index)
continue;
1435 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1436 AliDebug(3,Form(
"Track %d (pT = %f, eta = %f, phi = %f) is associated with the MC particle %d (pT = %f, eta = %f, phi = %f)!",
1437 iTrack,track->Pt(),track->Eta(),track->Phi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1441 track2Found = kTRUE;
1449 AliWarning(Form(
"Could not find cluster %d!", iClus));
1453 clus->GetMomentum(part,
fVertex);
1455 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++) {
1456 Int_t cellId = clus->GetCellAbsId(iCell);
1457 Double_t cellFrac = clus->GetCellAmplitudeFraction(iCell);
1461 if (MClabel <= 0)
continue;
1464 index1 = tracks2->GetIndexFromLabel(MClabel);
1466 AliDebug(3,Form(
"Cell %d (frac = %f) does not have an associated MC particle (MClabel = %d)!",iCell,cellFrac,MClabel));
1470 if (index2 != index1)
continue;
1473 d1 -= part.Pt() * cellFrac;
1476 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1477 AliDebug(3,Form(
"Cell %d belonging to cluster %d (pT = %f, eta = %f, phi = %f) is associated with the MC particle %d (pT = %f, eta = %f, phi = %f)!",
1478 iCell,iClus,part.Pt(),part.Eta(),part.
Phi_0_2pi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1479 d2 -= MCpart->Pt() * cellFrac;
1482 track2Found = kTRUE;
1490 AliWarning(Form(
"Could not find cluster %d!", iClus));
1494 clus->GetMomentum(part,
fVertex);
1496 Int_t MClabel = TMath::Abs(clus->GetLabel());
1498 if (MClabel <= 0)
continue;
1501 index = tracks2->GetIndexFromLabel(MClabel);
1504 AliDebug(3,Form(
"Cluster %d (pT = %f) does not have an associated MC particle (MClabel = %d)!",iClus,part.Pt(),MClabel));
1508 if (index2 != index)
continue;
1514 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1515 AliDebug(3,Form(
"Cluster %d (pT = %f, eta = %f, phi = %f) is associated with the MC particle %d (pT = %f, eta = %f, phi = %f)!",
1516 iClus,part.Pt(),part.Eta(),part.
Phi_0_2pi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1521 track2Found = kTRUE;
1549 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1560 if (tracks1 && tracks2) {
1566 if (index2 == index1) {
1567 AliVParticle *part1 = tracks1->
GetParticle(index1);
1569 AliWarning(Form(
"Could not find track %d!", index1));
1572 AliVParticle *part2 = tracks2->
GetParticle(index2);
1574 AliWarning(Form(
"Could not find track %d!", index2));
1587 if (clusters1 && clusters2) {
1596 AliWarning(
"ATTENTION ATTENTION ATTENTION: this section of the AliJetResponseMaker code needs to be revised and tested before using it for physics!!!");
1599 Int_t ncells1[nClus1];
1603 Int_t *sortedIndexes1[nClus1];
1605 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1607 AliVCluster *clus1 = clusters1->
GetCluster(index1);
1609 AliWarning(Form(
"Could not find cluster %d!", index1));
1610 ncells1[iClus1] = 0;
1611 cellsId1[iClus1] = 0;
1612 cellsFrac1[iClus1] = 0;
1613 cellsClusFrac1[iClus1] = 0;
1614 sortedIndexes1[iClus1] = 0;
1615 ptClus1[iClus1] = 0;
1618 TLorentzVector part1;
1619 clus1->GetMomentum(part1,
fVertex);
1621 ncells1[iClus1] = clus1->GetNCells();
1622 cellsId1[iClus1] = clus1->GetCellsAbsId();
1623 cellsFrac1[iClus1] = clus1->GetCellsAmplitudeFraction();
1624 cellsClusFrac1[iClus1] =
new Double_t[ncells1[iClus1]];
1625 sortedIndexes1[iClus1] =
new Int_t[ncells1[iClus1]];
1626 ptClus1[iClus1] = part1.Pt();
1628 for (
Int_t iCell = 0; iCell < ncells1[iClus1]; iCell++) {
1629 cellsClusFrac1[iClus1][iCell] =
fCaloCells->GetCellAmplitude(cellsId1[iClus1][iCell]) / clus1->E();
1632 TMath::Sort(ncells1[iClus1], cellsId1[iClus1], sortedIndexes1[iClus1], kFALSE);
1637 const Int_t maxNcells2 = 11520;
1638 Int_t sortedIndexes2[maxNcells2];
1639 for (
Int_t iClus2 = 0; iClus2 < nClus2; iClus2++) {
1641 AliVCluster *clus2 = clusters2->
GetCluster(index2);
1643 AliWarning(Form(
"Could not find cluster %d!", index2));
1646 Int_t ncells2 = clus2->GetNCells();
1647 if (ncells2 >= maxNcells2) {
1648 AliError(Form(
"Number of cells in the cluster %d >= %d",ncells2,maxNcells2));
1651 UShort_t *cellsId2 = clus2->GetCellsAbsId();
1652 Double_t *cellsFrac2 = clus2->GetCellsAmplitudeFraction();
1655 for (
Int_t iCell = 0; iCell < ncells2; iCell++) {
1656 cellsClusFrac2[iCell] =
fCaloCells->GetCellAmplitude(cellsId2[iCell]) / clus2->E();
1659 TLorentzVector part2;
1660 clus2->GetMomentum(part2,
fVertex);
1663 TMath::Sort(ncells2, cellsId2, sortedIndexes2, kFALSE);
1665 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1666 if (sortedIndexes1[iClus1] == 0)
1668 Int_t iCell1 = 0, iCell2 = 0;
1669 while (iCell1 < ncells1[iClus1] && iCell2 < ncells2) {
1670 if (cellsId1[iClus1][sortedIndexes1[iClus1][iCell1]] == cellsId2[sortedIndexes2[iCell2]]) {
1671 d1 -= cellsFrac1[iClus1][sortedIndexes1[iClus1][iCell1]] * cellsClusFrac1[iClus1][sortedIndexes1[iClus1][iCell1]] * ptClus1[iClus1];
1672 d2 -= cellsFrac2[sortedIndexes2[iCell2]] * cellsClusFrac2[sortedIndexes2[iCell2]] * ptClus2;
1676 else if (cellsId1[iClus1][sortedIndexes1[iClus1][iCell1]] > cellsId2[sortedIndexes2[iCell2]]) {
1684 delete[] cellsClusFrac2;
1686 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1687 delete[] cellsClusFrac1[iClus1];
1688 delete[] sortedIndexes1[iClus1];
1696 if (index2 == index1) {
1697 AliVCluster *clus1 = clusters1->
GetCluster(index1);
1699 AliWarning(Form(
"Could not find cluster %d!", index1));
1702 AliVCluster *clus2 = clusters2->
GetCluster(index2);
1704 AliWarning(Form(
"Could not find cluster %d!", index2));
1707 TLorentzVector part1, part2;
1708 clus1->GetMomentum(part1,
fVertex);
1709 clus2->GetMomentum(part2,
fVertex);
1760 if (d1 < jet1->ClosestJetDistance()) {
1764 else if (d1 < jet1->SecondClosestJetDistance()) {
1771 if (d2 < jet2->ClosestJetDistance()) {
1775 else if (d2 < jet2->SecondClosestJetDistance()) {
1789 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return kFALSE;
1794 jets2->ResetCurrentID();
1797 AliDebug(2,Form(
"Processing jet (2) %d", jets2->GetCurrentID()));
1801 UInt_t rejectionReason = 0;
1802 if (jets2->
AcceptJet(jet2, rejectionReason))
1809 if (!jet1)
continue;
1810 rejectionReason = 0;
1811 if (!jets1->
AcceptJet(jet1, rejectionReason))
continue;
1816 if (jets2->GetIsParticleLevel() && !jets1->GetIsParticleLevel())
1818 else if (jets1->GetIsParticleLevel() == jets2->GetIsParticleLevel())
1833 jets1->ResetCurrentID();
1835 UInt_t rejectionReason = 0;
1836 if (!jets1->
AcceptJet(jet1, rejectionReason)) {
1841 AliDebug(2,Form(
"Processing jet (1) %d", jets1->GetCurrentID()));
void SetSecondClosestJet(AliEmcalJet *j, Double_t d)
TH2 * fHistJets2PtArea
phi-eta distribution of jets 2
TH2 * fHistRejectionReason1
whether the jet2 collection has to be average subtracted
TH2 * fHistJets2CorrPtArea
inclusive jet pt vs. area histogram 2
Double_t GetRhoVal() const
const TString & GetRhoName() const
TH2 * fHistDeltaPtvsCommonEnergy1
delta pt between matched jets vs distance
TH2 * fHistJet2PtOverJet1PtvsJet2Pt
delta eta vs delta phi of matched jets
TH2 * fHistDeltaPtvsDeltaArea
delta pt between matched jets vs jet 2 area
AliEmcalJet * ClosestJet() const
AliJetContainer * GetJetContainer(Int_t i=0) const
Double_t ClosestJetDistance() const
TH2 * fHistJets2PhiEta
Constituent Pt over Jet Pt ratio vs. jet pt 1.
TH2 * fHistDeltaCorrPtvsArea2
delta pt corr between matched jets vs jet 1 area
void FillJetHisto(AliEmcalJet *jet, Int_t Set)
AliEmcalJet * MatchedJet() const
Declaration of class AliTLorentzVector.
void GetSameCollectionsMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d1, Double_t &d2) const
Int_t fDeltaEtaDeltaPhiAxis
Double_t fMinBinPt
min pt in histograms
TH2 * fHistDeltaMCPtvsCommonEnergy2
jet 1 MC pt - jet2 pt vs common energy 1 (%)
AliClusterContainer * GetClusterContainer() const
TH2 * fHistJets1ZvsPt
Jet charged energy fraction vs. charged jet pt 1.
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
THnSparse * fHistMatching
jet2 THnSparse
TH2 * fHistDeltaEtaDeltaPhi
common energy 1 (%) vs common energy 2 (%)
ClassImp(AliJetResponseMaker) AliJetResponseMaker
TH2 * fHistDeltaMCPtvsCommonEnergy1
jet 1 MC pt - jet2 pt vs distance
TH2 * fHistDeltaCorrPtOverJet2CorrPtvsJet2CorrPt
delta pt corr / jet 1 corr pt between matched jets vs jet 1 corr pt
TH2 * fHistCommonEnergy1vsCommonEnergy2
distance vs common energy 2 (%)
TH2 * fHistDeltaPtvsCommonEnergy2
delta pt between matched jets vs common energy 1 (%)
TH2 * fHistDeltaMCPtvsDistance
jet 1 MC pt - jet2 pt vs jet 2 pt
AliVParticle * GetFlavourTrack(Int_t i=0) const
Container for particles within the EMCAL framework.
TH2 * fHistJets1NEFvsPt
inclusive jet pt vs. area histogram 1
TH2 * fHistJets2ZvsPt
Jet charged energy fraction vs. charged jet pt 2.
Bool_t fIsEmbedded
trigger, embedded signal
UShort_t GetNumberOfTracks() const
Bool_t fIsJet2Rho
whether the jet1 collection has to be average subtracted
TH2 * fHistDeltaPtvsJet1Pt
jet 1 pt over jet 2 pt vs jet 1 pt
TH2 * fHistDeltaCorrPtvsCommonEnergy2
delta pt corr between matched jets vs common energy 1 (%)
AliParticleContainer * GetParticleContainer() const
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
TClonesArray * fCaloClusters
!clusters
TH2 * fHistDeltaPtvsJet2Pt
delta pt between matched jets vs jet 1 pt
Short_t ClusterAt(Int_t idx) const
TH2 * fHistJets1PhiEta
matching THnSparse
UShort_t GetNumberOfClusters() const
THnSparse * fHistJets1
Rejection reason vs. jet pt.
UShort_t GetMatchingType() const
TH2 * fHistJet1PtOverJet2PtvsJet1Pt
jet 2 pt over jet 1 pt vs jet 2 pt
Double_t Phi_0_2pi() const
TH2 * fHistDeltaCorrPtvsDistance
delta pt corr between matched jets vs jet 2 corr pt
virtual AliVParticle * GetParticle(Int_t i=-1) const
void FillMatchingHistos(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t d, Double_t CE1, Double_t CE2)
TH2 * fHistJet1PtvsJet2Pt
delta pt between matched jets vs delta area
TH2 * fHistDeltaCorrPtvsJet1CorrPt
delta pt corr / jet 2 corr pt between matched jets vs jet 2 corr pt
TH2 * fHistDeltaMCPtOverJet2PtvsJet2Pt
jet 1 MC pt - jet2 pt / jet 1 MC pt vs jet 1 pt
TH2 * fHistDistancevsCommonEnergy2
distance vs common energy 1 (%)
Double_t GetJetPtCut() const
TH2 * fHistRejectionReason2
Rejection reason vs. jet pt.
Int_t fMCLabelShift
if MC label > fMCLabelShift, MC label -= fMCLabelShift
TH2 * fHistDistancevsJet1Pt
common energy 2 (%) vs jet 2 pt
TH2 * fHistDeltaMCPtOverJet1MCPtvsJet1MCPt
correlation jet 1 corr pt vs jet 2 corr pt
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
AliVCluster * GetCluster(Int_t i) const
TH2 * fHistDeltaPtOverJet1PtvsJet1Pt
delta pt between matched jets vs jet 2 pt
TObjArray fJetCollArray
jet collection array
Double_t DeltaR(const AliVParticle *part) const
TH2 * fHistDeltaCorrPtvsArea1
delta pt corr between matched jets vs common energy 2 (%)
void UserCreateOutputObjects()
AliVCaloCells * fCaloCells
!cells
TH2 * fHistCommonEnergy1vsJet1Pt
Constituent Pt over Jet Pt ratio vs. jet pt 2.
void SetMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, MatchingType matching)
TH2 * fHistJets1CorrPtArea
inclusive jet pt vs. area histogram 1
AliEmcalJet * GetNextJet()
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
TH2 * fHistDeltaMCPtvsJet1MCPt
jet 1 MC pt - jet2 pt / jet 2 pt vs jet 2 pt
void SetClosestJet(AliEmcalJet *j, Double_t d)
TH2 * fHistDeltaMCPtvsArea2
jet 1 MC pt - jet2 pt vs jet 1 area
Short_t TrackAt(Int_t idx) const
TH2 * fHistDeltaMCPtvsJet2Pt
jet 1 MC pt - jet2 pt vs jet 1 MC pt
TH2 * fHistDistancevsJet2Pt
distance vs jet 1 pt
TH2 * fHistDeltaPtvsArea1
delta pt between matched jets vs common energy 2 (%)
Double_t fVertex[3]
!event vertex
TH2 * fHistDeltaCorrPtvsJet2CorrPt
delta pt corr between matched jets vs jet 1 corr pt
void GetGeometricalMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d) const
THnSparse * fHistJets2
jet1 THnSparse
TH2 * fHistDeltaPtOverJet2PtvsJet2Pt
delta pt / jet 1 pt between matched jets vs jet 1 pt
TH2 * fHistDeltaPtvsArea2
delta pt between matched jets vs jet 1 area
void SetMakeGeneralHistograms(Bool_t g)
TH2 * fHistJets2NEFvsPt
inclusive jet pt vs. area histogram 2
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
TH2 * fHistCommonEnergy2vsJet2Pt
common energy 1 (%) vs jet 1 pt
TH2 * fHistDeltaPtvsDistance
delta pt / jet 2 pt between matched jets vs jet 2 pt
TH2 * fHistJet1MCPtvsJet2Pt
jet 1 MC pt - jet2 pt vs delta area
virtual ~AliJetResponseMaker()
TH2 * fHistJets2CEFvsCEFPt
Jet neutral energy fraction vs. jet pt 2.
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
TH2 * fHistDistancevsCommonEnergy1
distance vs jet 2 pt
TH2 * fHistJets1CEFvsCEFPt
Jet neutral energy fraction vs. jet pt 1.
TH2 * fHistDeltaMCPtvsArea1
jet 1 MC pt - jet2 pt vs common energy 2 (%)
TH2 * fHistDeltaCorrPtOverJet1CorrPtvsJet1CorrPt
correlation jet 1 pt vs jet 2 pt
TH2 * fHistJets1PtArea
phi-eta distribution of jets 1
TH2 * fHistDeltaMCPtvsDeltaArea
jet 1 MC pt - jet2 pt vs jet 2 area
Container structure for EMCAL clusters.
TH2 * fHistDeltaCorrPtvsCommonEnergy1
delta pt corr between matched jets vs distance
void GetMCLabelMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d1, Double_t &d2) const
Container for jet within the EMCAL jet framework.
void SetMatchedToClosest(UShort_t m)
Int_t fNbins
no. of pt bins
TH2 * fHistJet1CorrPtvsJet2CorrPt
delta pt corr between matched jets vs delta area
TH2 * fHistDeltaCorrPtvsDeltaArea
delta pt corr between matched jets vs jet 2 area