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),
61 fHistRejectionReason1(0),
62 fHistRejectionReason2(0),
68 fHistJets1CorrPtArea(0),
70 fHistJets1CEFvsCEFPt(0),
74 fHistJets2CorrPtArea(0),
76 fHistJets2CEFvsCEFPt(0),
78 fHistCommonEnergy1vsJet1Pt(0),
79 fHistCommonEnergy2vsJet2Pt(0),
80 fHistDistancevsJet1Pt(0),
81 fHistDistancevsJet2Pt(0),
82 fHistDistancevsCommonEnergy1(0),
83 fHistDistancevsCommonEnergy2(0),
84 fHistCommonEnergy1vsCommonEnergy2(0),
85 fHistDeltaEtaDeltaPhi(0),
86 fHistJet2PtOverJet1PtvsJet2Pt(0),
87 fHistJet1PtOverJet2PtvsJet1Pt(0),
88 fHistDeltaPtvsJet1Pt(0),
89 fHistDeltaPtvsJet2Pt(0),
90 fHistDeltaPtOverJet1PtvsJet1Pt(0),
91 fHistDeltaPtOverJet2PtvsJet2Pt(0),
92 fHistDeltaPtvsDistance(0),
93 fHistDeltaPtvsCommonEnergy1(0),
94 fHistDeltaPtvsCommonEnergy2(0),
95 fHistDeltaPtvsArea1(0),
96 fHistDeltaPtvsArea2(0),
97 fHistDeltaPtvsDeltaArea(0),
98 fHistJet1PtvsJet2Pt(0),
99 fHistDeltaCorrPtOverJet1CorrPtvsJet1CorrPt(0),
100 fHistDeltaCorrPtOverJet2CorrPtvsJet2CorrPt(0),
101 fHistDeltaCorrPtvsJet1CorrPt(0),
102 fHistDeltaCorrPtvsJet2CorrPt(0),
103 fHistDeltaCorrPtvsDistance(0),
104 fHistDeltaCorrPtvsCommonEnergy1(0),
105 fHistDeltaCorrPtvsCommonEnergy2(0),
106 fHistDeltaCorrPtvsArea1(0),
107 fHistDeltaCorrPtvsArea2(0),
108 fHistDeltaCorrPtvsDeltaArea(0),
109 fHistJet1CorrPtvsJet2CorrPt(0),
110 fHistDeltaMCPtOverJet1MCPtvsJet1MCPt(0),
111 fHistDeltaMCPtOverJet2PtvsJet2Pt(0),
112 fHistDeltaMCPtvsJet1MCPt(0),
113 fHistDeltaMCPtvsJet2Pt(0),
114 fHistDeltaMCPtvsDistance(0),
115 fHistDeltaMCPtvsCommonEnergy1(0),
116 fHistDeltaMCPtvsCommonEnergy2(0),
117 fHistDeltaMCPtvsArea1(0),
118 fHistDeltaMCPtvsArea2(0),
119 fHistDeltaMCPtvsDeltaArea(0),
120 fHistJet1MCPtvsJet2Pt(0)
124 SetMakeGeneralHistograms(kTRUE);
130 fMatching(kNoMatching),
133 fUseCellsToMatch(kFALSE),
137 fDeltaEtaDeltaPhiAxis(0),
148 fHistRejectionReason1(0),
149 fHistRejectionReason2(0),
155 fHistJets1CorrPtArea(0),
156 fHistJets1NEFvsPt(0),
157 fHistJets1CEFvsCEFPt(0),
161 fHistJets2CorrPtArea(0),
162 fHistJets2NEFvsPt(0),
163 fHistJets2CEFvsCEFPt(0),
165 fHistCommonEnergy1vsJet1Pt(0),
166 fHistCommonEnergy2vsJet2Pt(0),
167 fHistDistancevsJet1Pt(0),
168 fHistDistancevsJet2Pt(0),
169 fHistDistancevsCommonEnergy1(0),
170 fHistDistancevsCommonEnergy2(0),
171 fHistCommonEnergy1vsCommonEnergy2(0),
172 fHistDeltaEtaDeltaPhi(0),
173 fHistJet2PtOverJet1PtvsJet2Pt(0),
174 fHistJet1PtOverJet2PtvsJet1Pt(0),
175 fHistDeltaPtvsJet1Pt(0),
176 fHistDeltaPtvsJet2Pt(0),
177 fHistDeltaPtOverJet1PtvsJet1Pt(0),
178 fHistDeltaPtOverJet2PtvsJet2Pt(0),
179 fHistDeltaPtvsDistance(0),
180 fHistDeltaPtvsCommonEnergy1(0),
181 fHistDeltaPtvsCommonEnergy2(0),
182 fHistDeltaPtvsArea1(0),
183 fHistDeltaPtvsArea2(0),
184 fHistDeltaPtvsDeltaArea(0),
185 fHistJet1PtvsJet2Pt(0),
186 fHistDeltaCorrPtOverJet1CorrPtvsJet1CorrPt(0),
187 fHistDeltaCorrPtOverJet2CorrPtvsJet2CorrPt(0),
188 fHistDeltaCorrPtvsJet1CorrPt(0),
189 fHistDeltaCorrPtvsJet2CorrPt(0),
190 fHistDeltaCorrPtvsDistance(0),
191 fHistDeltaCorrPtvsCommonEnergy1(0),
192 fHistDeltaCorrPtvsCommonEnergy2(0),
193 fHistDeltaCorrPtvsArea1(0),
194 fHistDeltaCorrPtvsArea2(0),
195 fHistDeltaCorrPtvsDeltaArea(0),
196 fHistJet1CorrPtvsJet2CorrPt(0),
197 fHistDeltaMCPtOverJet1MCPtvsJet1MCPt(0),
198 fHistDeltaMCPtOverJet2PtvsJet2Pt(0),
199 fHistDeltaMCPtvsJet1MCPt(0),
200 fHistDeltaMCPtvsJet2Pt(0),
201 fHistDeltaMCPtvsDistance(0),
202 fHistDeltaMCPtvsCommonEnergy1(0),
203 fHistDeltaMCPtvsCommonEnergy2(0),
204 fHistDeltaMCPtvsArea1(0),
205 fHistDeltaMCPtvsArea2(0),
206 fHistDeltaMCPtvsDeltaArea(0),
207 fHistJet1MCPtvsJet2Pt(0)
226 fHistJets1PhiEta =
new TH2F(
"fHistJets1PhiEta",
"fHistJets1PhiEta", 40, -1, 1, 40, 0, TMath::Pi()*2);
266 fHistJets2PhiEta =
new TH2F(
"fHistJets2PhiEta",
"fHistJets2PhiEta", 40, -1, 1, 40, 0, TMath::Pi()*2);
633 max[dim] = 2*TMath::Pi()*(1 + 1./(nbins[dim]-1));
642 title[dim] =
"p_{T}";
648 title[dim] =
"A_{jet}";
671 title[dim] =
"z_{flavour}";
679 title[dim] =
"p_{T}^{D}";
686 title[dim] =
"p_{T,particle}^{leading} (GeV/c)";
692 Int_t dim1 = dim, dim2 = dim;
695 title[dim1] =
"p_{T}^{corr}";
703 title[dim1] =
"p_{T}^{MC}";
710 fHistJets1 =
new THnSparseD(
"fHistJets1",
"fHistJets1",dim1,nbins,min,max);
711 for (
Int_t i = 0; i < dim1; i++)
716 title[dim2] =
"p_{T}^{corr}";
723 fHistJets2 =
new THnSparseD(
"fHistJets2",
"fHistJets2",dim2,nbins,min,max);
724 for (
Int_t i = 0; i < dim2; i++)
732 title[dim] =
"p_{T,1}";
738 title[dim] =
"p_{T,2}";
744 title[dim] =
"A_{jet,1}";
750 title[dim] =
"A_{jet,2}";
756 title[dim] =
"distance";
774 title[dim] =
"p_{T,particle,1}^{leading} (GeV/c)";
780 title[dim] =
"p_{T,particle,2}^{leading} (GeV/c)";
787 title[dim] =
"#deltaA_{jet}";
793 title[dim] =
"#deltap_{T}";
800 title[dim] =
"p_{T,1}^{corr}";
807 title[dim] =
"p_{T,2}^{corr}";
814 title[dim] =
"#deltap_{T}^{corr}";
821 title[dim] =
"#delta#eta";
827 title[dim] =
"#delta#phi";
829 min[dim] = -TMath::Pi()/2;
830 max[dim] = TMath::Pi()*3/2;
834 title[dim] =
"p_{T,1}^{MC}";
841 title[dim] =
"#deltap_{T}^{MC}";
850 title[dim] =
"NEF_{1}";
856 title[dim] =
"NEF_{2}";
864 title[dim] =
"Z_{1}";
870 title[dim] =
"Z_{2}";
878 title[dim] =
"z_{flavour,1}";
884 title[dim] =
"z_{flavour,2}";
892 title[dim] =
"p_{T,1}^{D}";
898 title[dim] =
"p_{T,2}^{D}";
906 title[dim] =
"Z_{g,1}";
911 title[dim] =
"Z_{g,2}";
919 title[dim] =
"dR_{1}";
924 title[dim] =
"dR_{2}";
932 title[dim] =
"p_{T,g,1}";
937 title[dim] =
"p_{T,g,2}";
945 title[dim] =
"DBC_{1}";
950 title[dim] =
"DBC_{2}";
957 fHistMatching =
new THnSparseD(
"fHistMatching",
"fHistMatching",dim,nbins,min,max);
959 for (
Int_t i = 0; i < dim; i++)
975 if (!jets1 || !jets2)
return;
1012 if (zleading == 1 || (zleading > 1 && zleading - 1 < 1e-3)) zleading = 0.999;
1020 ptflavour = hftrack->Pt();
1022 if (zflavour == 1 || (zflavour > 1 && zflavour - 1 < 1e-3)) zflavour = 0.999;
1026 THnSparse *histo = 0;
1038 for (
Int_t i = 0; i < histo->GetNdimensions(); i++) {
1041 contents[i] = jet->
Phi();
1042 else if (
title==
"#eta")
1043 contents[i] = jet->
Eta();
1044 else if (
title==
"p_{T}")
1045 contents[i] = jet->
Pt();
1046 else if (
title==
"A_{jet}")
1047 contents[i] = jet->
Area();
1048 else if (
title==
"NEF")
1049 contents[i] = jet->
NEF();
1050 else if (
title==
"Z")
1051 contents[i] = zleading;
1052 else if (
title==
"p_{T}^{corr}")
1053 contents[i] = corrpt;
1054 else if (
title==
"p_{T}^{MC}")
1055 contents[i] = jet->
MCPt();
1056 else if (
title==
"p_{T,particle}^{leading} (GeV/c)")
1057 contents[i] = leadPart.Pt();
1058 else if (
title==
"z_{flavour}")
1059 contents[i] = zflavour;
1060 else if (
title==
"p_{T}^{D}")
1061 contents[i] = ptflavour;
1063 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1066 histo->Fill(contents);
1078 else if (Set == 2) {
1112 if (zleading1 == 1 || (zleading1 > 1 && zleading1 - 1 < 1e-3)) zleading1 = 0.999;
1120 ptflavour1 = hftrack1->Pt();
1122 if (zflavour1 == 1 || (zflavour1 > 1 && zflavour1 - 1 < 1e-3)) zflavour1 = 0.999;
1129 if (zleading2 == 1 || (zleading2 > 1 && zleading2 - 1 < 1e-3)) zleading2 = 0.999;
1137 ptflavour2 = hftrack2->Pt();
1139 if (zflavour2 == 1 || (zflavour2 > 1 && zflavour2 - 1 < 1e-3)) zflavour2 = 0.999;
1147 if (
title==
"p_{T,1}")
1148 contents[i] = jet1->
Pt();
1149 else if (
title==
"p_{T,2}")
1150 contents[i] = jet2->
Pt();
1151 else if (
title==
"A_{jet,1}")
1152 contents[i] = jet1->
Area();
1153 else if (
title==
"A_{jet,2}")
1154 contents[i] = jet2->
Area();
1155 else if (
title==
"distance")
1157 else if (
title==
"CE1")
1159 else if (
title==
"CE2")
1161 else if (
title==
"#deltaA_{jet}")
1162 contents[i] = jet1->
Area()-jet2->
Area();
1163 else if (
title==
"#deltap_{T}")
1164 contents[i] = jet1->
Pt()-jet2->
Pt();
1165 else if (
title==
"#delta#eta")
1166 contents[i] = jet1->
Eta()-jet2->
Eta();
1167 else if (
title==
"#delta#phi")
1168 contents[i] = jet1->
Phi()-jet2->
Phi();
1169 else if (
title==
"p_{T,1}^{corr}")
1170 contents[i] = corrpt1;
1171 else if (
title==
"p_{T,2}^{corr}")
1172 contents[i] = corrpt2;
1173 else if (
title==
"#deltap_{T}^{corr}")
1174 contents[i] = corrpt1-corrpt2;
1175 else if (
title==
"p_{T,1}^{MC}")
1176 contents[i] = jet1->
MCPt();
1177 else if (
title==
"#deltap_{T}^{MC}")
1178 contents[i] = jet1->
MCPt()-jet2->
Pt();
1179 else if (
title==
"NEF_{1}")
1180 contents[i] = jet1->
NEF();
1181 else if (
title==
"NEF_{2}")
1182 contents[i] = jet2->
NEF();
1183 else if (
title==
"Z_{1}")
1184 contents[i] = zleading1;
1185 else if (
title==
"Z_{2}")
1186 contents[i] = zleading2;
1187 else if (
title==
"p_{T,particle,1}^{leading} (GeV/c)")
1188 contents[i] = leadPart1.Pt();
1189 else if (
title==
"p_{T,particle,2}^{leading} (GeV/c)")
1190 contents[i] = leadPart2.Pt();
1191 else if (
title==
"z_{flavour,1}")
1192 contents[i] = zflavour1;
1193 else if (
title==
"z_{flavour,2}")
1194 contents[i] = zflavour2;
1195 else if (
title==
"p_{T,1}^{D}")
1196 contents[i] = ptflavour1;
1197 else if (
title==
"p_{T,2}^{D}")
1198 contents[i] = ptflavour2;
1199 else if (
title==
"Z_{g,1}")
1201 else if (
title==
"Z_{g,2}")
1203 else if (
title==
"dR_{1}")
1205 else if (
title==
"dR_{2}")
1207 else if (
title==
"p_{T,g,1}")
1209 else if (
title==
"p_{T,g,2}")
1211 else if (
title==
"DBC_{1}")
1213 else if (
title==
"DBC_{2}")
1216 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1256 Double_t dcorrpt = corrpt1 - corrpt2;
1297 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1299 if (
fMatching ==
kMCLabel && (!jets2->GetIsParticleLevel() || jets1->GetIsParticleLevel())) {
1300 if (jets1->GetIsParticleLevel() == jets2->GetIsParticleLevel()) {
1301 AliWarning(
"Changing matching type from MC label to same collection...");
1305 AliWarning(
"Changing matching type from MC label to geometrical...");
1310 if (jets2->GetIsParticleLevel() && !jets1->GetIsParticleLevel()) {
1311 AliWarning(
"Changing matching type from same collection to MC label...");
1315 AliWarning(
"Changing matching type from same collection to geometrical...");
1338 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return kFALSE;
1344 jets1->ResetCurrentID();
1349 if (!jet2)
continue;
1356 AliDebug(2,Form(
"Found matching: jet1 pt = %f, eta = %f, phi = %f, jet2 pt = %f, eta = %f, phi = %f",
1357 jet1->
Pt(), jet1->
Eta(), jet1->
Phi(),
1358 jet2->
Pt(), jet2->
Eta(), jet2->
Phi()));
1372 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1377 jets2->ResetCurrentID();
1380 jets1->ResetCurrentID();
1386 jets2->ResetCurrentID();
1405 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1417 if (tracks1 && tracks1->GetArray()) {
1419 AliVParticle *track = jet1->
TrackAt(iTrack,tracks1->GetArray());
1421 AliWarning(Form(
"Could not find track %d!", iTrack));
1425 Int_t MClabel = TMath::Abs(track->GetLabel());
1427 if (MClabel != 0)
continue;
1430 AliDebug(3,Form(
"Track %d (pT = %f) is not a MC particle (MClabel = %d)!",iTrack,track->Pt(),MClabel));
1431 totalPt1 -= track->Pt();
1439 AliVCluster *clus = jet1->
ClusterAt(iClus,clusters1->GetArray());
1441 AliWarning(Form(
"Could not find cluster %d!", iClus));
1445 clus->GetMomentum(part,
fVertex);
1447 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++) {
1448 Int_t cellId = clus->GetCellAbsId(iCell);
1449 Double_t cellFrac = clus->GetCellAmplitudeFraction(iCell);
1453 if (MClabel != 0)
continue;
1456 AliDebug(3,Form(
"Cell %d (frac = %f) is not a MC particle (MClabel = %d)!",iCell,cellFrac,MClabel));
1457 totalPt1 -= part.Pt() * cellFrac;
1458 d1 -= part.Pt() * cellFrac;
1464 AliVCluster *clus = jet1->
ClusterAt(iClus,clusters1->GetArray());
1466 AliWarning(Form(
"Could not find cluster %d!", iClus));
1469 TLorentzVector part;
1470 clus->GetMomentum(part,
fVertex);
1472 Int_t MClabel = TMath::Abs(clus->GetLabel());
1474 if (MClabel != 0)
continue;
1477 AliDebug(3,Form(
"Cluster %d (pT = %f) is not a MC particle (MClabel = %d)!",iClus,part.Pt(),MClabel));
1478 totalPt1 -= part.Pt();
1484 Bool_t track2Found = kFALSE;
1489 AliVParticle *track = jet1->
TrackAt(iTrack,tracks1->GetArray());
1491 AliWarning(Form(
"Could not find track %d!", iTrack));
1494 Int_t MClabel = TMath::Abs(track->GetLabel());
1496 if (MClabel <= 0)
continue;
1499 index = tracks2->GetIndexFromLabel(MClabel);
1501 AliDebug(2,Form(
"Track %d (pT = %f) does not have an associated MC particle (MClabel = %d)!",iTrack,track->Pt(),MClabel));
1505 if (index2 != index)
continue;
1511 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1512 AliDebug(3,Form(
"Track %d (pT = %f, eta = %f, phi = %f) is associated with the MC particle %d (pT = %f, eta = %f, phi = %f)!",
1513 iTrack,track->Pt(),track->Eta(),track->Phi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1517 track2Found = kTRUE;
1525 AliWarning(Form(
"Could not find cluster %d!", iClus));
1529 clus->GetMomentum(part,
fVertex);
1531 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++) {
1532 Int_t cellId = clus->GetCellAbsId(iCell);
1533 Double_t cellFrac = clus->GetCellAmplitudeFraction(iCell);
1537 if (MClabel <= 0)
continue;
1540 index1 = tracks2->GetIndexFromLabel(MClabel);
1542 AliDebug(3,Form(
"Cell %d (frac = %f) does not have an associated MC particle (MClabel = %d)!",iCell,cellFrac,MClabel));
1546 if (index2 != index1)
continue;
1549 d1 -= part.Pt() * cellFrac;
1552 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1553 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)!",
1554 iCell,iClus,part.Pt(),part.Eta(),part.
Phi_0_2pi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1555 d2 -= MCpart->Pt() * cellFrac;
1558 track2Found = kTRUE;
1566 AliWarning(Form(
"Could not find cluster %d!", iClus));
1570 clus->GetMomentum(part,
fVertex);
1572 Int_t MClabel = TMath::Abs(clus->GetLabel());
1574 if (MClabel <= 0)
continue;
1577 index = tracks2->GetIndexFromLabel(MClabel);
1580 AliDebug(3,Form(
"Cluster %d (pT = %f) does not have an associated MC particle (MClabel = %d)!",iClus,part.Pt(),MClabel));
1584 if (index2 != index)
continue;
1590 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1591 AliDebug(3,Form(
"Cluster %d (pT = %f, eta = %f, phi = %f) is associated with the MC particle %d (pT = %f, eta = %f, phi = %f)!",
1592 iClus,part.Pt(),part.Eta(),part.
Phi_0_2pi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1597 track2Found = kTRUE;
1625 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1636 if (tracks1 && tracks2) {
1642 if (index2 == index1) {
1643 AliVParticle *part1 = tracks1->
GetParticle(index1);
1645 AliWarning(Form(
"Could not find track %d!", index1));
1648 AliVParticle *part2 = tracks2->
GetParticle(index2);
1650 AliWarning(Form(
"Could not find track %d!", index2));
1663 if (clusters1 && clusters2) {
1672 AliWarning(
"ATTENTION ATTENTION ATTENTION: this section of the AliJetResponseMaker code needs to be revised and tested before using it for physics!!!");
1675 Int_t ncells1[nClus1];
1679 Int_t *sortedIndexes1[nClus1];
1681 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1683 AliVCluster *clus1 = clusters1->
GetCluster(index1);
1685 AliWarning(Form(
"Could not find cluster %d!", index1));
1686 ncells1[iClus1] = 0;
1687 cellsId1[iClus1] = 0;
1688 cellsFrac1[iClus1] = 0;
1689 cellsClusFrac1[iClus1] = 0;
1690 sortedIndexes1[iClus1] = 0;
1691 ptClus1[iClus1] = 0;
1694 TLorentzVector part1;
1695 clus1->GetMomentum(part1,
fVertex);
1697 ncells1[iClus1] = clus1->GetNCells();
1698 cellsId1[iClus1] = clus1->GetCellsAbsId();
1699 cellsFrac1[iClus1] = clus1->GetCellsAmplitudeFraction();
1700 cellsClusFrac1[iClus1] =
new Double_t[ncells1[iClus1]];
1701 sortedIndexes1[iClus1] =
new Int_t[ncells1[iClus1]];
1702 ptClus1[iClus1] = part1.Pt();
1704 for (
Int_t iCell = 0; iCell < ncells1[iClus1]; iCell++) {
1705 cellsClusFrac1[iClus1][iCell] =
fCaloCells->GetCellAmplitude(cellsId1[iClus1][iCell]) / clus1->E();
1708 TMath::Sort(ncells1[iClus1], cellsId1[iClus1], sortedIndexes1[iClus1], kFALSE);
1713 const Int_t maxNcells2 = 11520;
1714 Int_t sortedIndexes2[maxNcells2];
1715 for (
Int_t iClus2 = 0; iClus2 < nClus2; iClus2++) {
1717 AliVCluster *clus2 = clusters2->
GetCluster(index2);
1719 AliWarning(Form(
"Could not find cluster %d!", index2));
1722 Int_t ncells2 = clus2->GetNCells();
1723 if (ncells2 >= maxNcells2) {
1724 AliError(Form(
"Number of cells in the cluster %d >= %d",ncells2,maxNcells2));
1727 UShort_t *cellsId2 = clus2->GetCellsAbsId();
1728 Double_t *cellsFrac2 = clus2->GetCellsAmplitudeFraction();
1731 for (
Int_t iCell = 0; iCell < ncells2; iCell++) {
1732 cellsClusFrac2[iCell] =
fCaloCells->GetCellAmplitude(cellsId2[iCell]) / clus2->E();
1735 TLorentzVector part2;
1736 clus2->GetMomentum(part2,
fVertex);
1739 TMath::Sort(ncells2, cellsId2, sortedIndexes2, kFALSE);
1741 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1742 if (sortedIndexes1[iClus1] == 0)
1744 Int_t iCell1 = 0, iCell2 = 0;
1745 while (iCell1 < ncells1[iClus1] && iCell2 < ncells2) {
1746 if (cellsId1[iClus1][sortedIndexes1[iClus1][iCell1]] == cellsId2[sortedIndexes2[iCell2]]) {
1747 d1 -= cellsFrac1[iClus1][sortedIndexes1[iClus1][iCell1]] * cellsClusFrac1[iClus1][sortedIndexes1[iClus1][iCell1]] * ptClus1[iClus1];
1748 d2 -= cellsFrac2[sortedIndexes2[iCell2]] * cellsClusFrac2[sortedIndexes2[iCell2]] * ptClus2;
1752 else if (cellsId1[iClus1][sortedIndexes1[iClus1][iCell1]] > cellsId2[sortedIndexes2[iCell2]]) {
1760 delete[] cellsClusFrac2;
1762 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1763 delete[] cellsClusFrac1[iClus1];
1764 delete[] sortedIndexes1[iClus1];
1772 if (index2 == index1) {
1773 AliVCluster *clus1 = clusters1->
GetCluster(index1);
1775 AliWarning(Form(
"Could not find cluster %d!", index1));
1778 AliVCluster *clus2 = clusters2->
GetCluster(index2);
1780 AliWarning(Form(
"Could not find cluster %d!", index2));
1783 TLorentzVector part1, part2;
1784 clus1->GetMomentum(part1,
fVertex);
1785 clus2->GetMomentum(part2,
fVertex);
1836 if (d1 < jet1->ClosestJetDistance()) {
1840 else if (d1 < jet1->SecondClosestJetDistance()) {
1847 if (d2 < jet2->ClosestJetDistance()) {
1851 else if (d2 < jet2->SecondClosestJetDistance()) {
1865 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return kFALSE;
1870 jets2->ResetCurrentID();
1873 AliDebug(2,Form(
"Processing jet (2) %d", jets2->GetCurrentID()));
1877 UInt_t rejectionReason = 0;
1878 if (jets2->
AcceptJet(jet2, rejectionReason))
1885 if (!jet1)
continue;
1886 rejectionReason = 0;
1887 if (!jets1->
AcceptJet(jet1, rejectionReason))
continue;
1892 if (jets2->GetIsParticleLevel() && !jets1->GetIsParticleLevel())
1894 else if (jets1->GetIsParticleLevel() == jets2->GetIsParticleLevel())
1909 jets1->ResetCurrentID();
1911 UInt_t rejectionReason = 0;
1912 if (!jets1->
AcceptJet(jet1, rejectionReason)) {
1917 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)
Double_t GetSoftDropZg() const
Double_t GetSoftDropdR() const
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
Double_t GetSoftDropPtfrac() const
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
Int_t GetSoftDropDropCount() 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 (%)
AliEmcalJetShapeProperties * GetShapeProperties() const
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