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),
60 fHistRejectionReason1(0),
61 fHistRejectionReason2(0),
67 fHistJets1CorrPtArea(0),
69 fHistJets1CEFvsCEFPt(0),
73 fHistJets2CorrPtArea(0),
75 fHistJets2CEFvsCEFPt(0),
77 fHistCommonEnergy1vsJet1Pt(0),
78 fHistCommonEnergy2vsJet2Pt(0),
79 fHistDistancevsJet1Pt(0),
80 fHistDistancevsJet2Pt(0),
81 fHistDistancevsCommonEnergy1(0),
82 fHistDistancevsCommonEnergy2(0),
83 fHistCommonEnergy1vsCommonEnergy2(0),
84 fHistDeltaEtaDeltaPhi(0),
85 fHistJet2PtOverJet1PtvsJet2Pt(0),
86 fHistJet1PtOverJet2PtvsJet1Pt(0),
87 fHistDeltaPtvsJet1Pt(0),
88 fHistDeltaPtvsJet2Pt(0),
89 fHistDeltaPtOverJet1PtvsJet1Pt(0),
90 fHistDeltaPtOverJet2PtvsJet2Pt(0),
91 fHistDeltaPtvsDistance(0),
92 fHistDeltaPtvsCommonEnergy1(0),
93 fHistDeltaPtvsCommonEnergy2(0),
94 fHistDeltaPtvsArea1(0),
95 fHistDeltaPtvsArea2(0),
96 fHistDeltaPtvsDeltaArea(0),
97 fHistJet1PtvsJet2Pt(0),
98 fHistDeltaCorrPtOverJet1CorrPtvsJet1CorrPt(0),
99 fHistDeltaCorrPtOverJet2CorrPtvsJet2CorrPt(0),
100 fHistDeltaCorrPtvsJet1CorrPt(0),
101 fHistDeltaCorrPtvsJet2CorrPt(0),
102 fHistDeltaCorrPtvsDistance(0),
103 fHistDeltaCorrPtvsCommonEnergy1(0),
104 fHistDeltaCorrPtvsCommonEnergy2(0),
105 fHistDeltaCorrPtvsArea1(0),
106 fHistDeltaCorrPtvsArea2(0),
107 fHistDeltaCorrPtvsDeltaArea(0),
108 fHistJet1CorrPtvsJet2CorrPt(0),
109 fHistDeltaMCPtOverJet1MCPtvsJet1MCPt(0),
110 fHistDeltaMCPtOverJet2PtvsJet2Pt(0),
111 fHistDeltaMCPtvsJet1MCPt(0),
112 fHistDeltaMCPtvsJet2Pt(0),
113 fHistDeltaMCPtvsDistance(0),
114 fHistDeltaMCPtvsCommonEnergy1(0),
115 fHistDeltaMCPtvsCommonEnergy2(0),
116 fHistDeltaMCPtvsArea1(0),
117 fHistDeltaMCPtvsArea2(0),
118 fHistDeltaMCPtvsDeltaArea(0),
119 fHistJet1MCPtvsJet2Pt(0)
123 SetMakeGeneralHistograms(kTRUE);
129 fMatching(kNoMatching),
132 fUseCellsToMatch(kFALSE),
136 fDeltaEtaDeltaPhiAxis(0),
146 fHistRejectionReason1(0),
147 fHistRejectionReason2(0),
153 fHistJets1CorrPtArea(0),
154 fHistJets1NEFvsPt(0),
155 fHistJets1CEFvsCEFPt(0),
159 fHistJets2CorrPtArea(0),
160 fHistJets2NEFvsPt(0),
161 fHistJets2CEFvsCEFPt(0),
163 fHistCommonEnergy1vsJet1Pt(0),
164 fHistCommonEnergy2vsJet2Pt(0),
165 fHistDistancevsJet1Pt(0),
166 fHistDistancevsJet2Pt(0),
167 fHistDistancevsCommonEnergy1(0),
168 fHistDistancevsCommonEnergy2(0),
169 fHistCommonEnergy1vsCommonEnergy2(0),
170 fHistDeltaEtaDeltaPhi(0),
171 fHistJet2PtOverJet1PtvsJet2Pt(0),
172 fHistJet1PtOverJet2PtvsJet1Pt(0),
173 fHistDeltaPtvsJet1Pt(0),
174 fHistDeltaPtvsJet2Pt(0),
175 fHistDeltaPtOverJet1PtvsJet1Pt(0),
176 fHistDeltaPtOverJet2PtvsJet2Pt(0),
177 fHistDeltaPtvsDistance(0),
178 fHistDeltaPtvsCommonEnergy1(0),
179 fHistDeltaPtvsCommonEnergy2(0),
180 fHistDeltaPtvsArea1(0),
181 fHistDeltaPtvsArea2(0),
182 fHistDeltaPtvsDeltaArea(0),
183 fHistJet1PtvsJet2Pt(0),
184 fHistDeltaCorrPtOverJet1CorrPtvsJet1CorrPt(0),
185 fHistDeltaCorrPtOverJet2CorrPtvsJet2CorrPt(0),
186 fHistDeltaCorrPtvsJet1CorrPt(0),
187 fHistDeltaCorrPtvsJet2CorrPt(0),
188 fHistDeltaCorrPtvsDistance(0),
189 fHistDeltaCorrPtvsCommonEnergy1(0),
190 fHistDeltaCorrPtvsCommonEnergy2(0),
191 fHistDeltaCorrPtvsArea1(0),
192 fHistDeltaCorrPtvsArea2(0),
193 fHistDeltaCorrPtvsDeltaArea(0),
194 fHistJet1CorrPtvsJet2CorrPt(0),
195 fHistDeltaMCPtOverJet1MCPtvsJet1MCPt(0),
196 fHistDeltaMCPtOverJet2PtvsJet2Pt(0),
197 fHistDeltaMCPtvsJet1MCPt(0),
198 fHistDeltaMCPtvsJet2Pt(0),
199 fHistDeltaMCPtvsDistance(0),
200 fHistDeltaMCPtvsCommonEnergy1(0),
201 fHistDeltaMCPtvsCommonEnergy2(0),
202 fHistDeltaMCPtvsArea1(0),
203 fHistDeltaMCPtvsArea2(0),
204 fHistDeltaMCPtvsDeltaArea(0),
205 fHistJet1MCPtvsJet2Pt(0)
224 fHistJets1PhiEta =
new TH2F(
"fHistJets1PhiEta",
"fHistJets1PhiEta", 40, -1, 1, 40, 0, TMath::Pi()*2);
264 fHistJets2PhiEta =
new TH2F(
"fHistJets2PhiEta",
"fHistJets2PhiEta", 40, -1, 1, 40, 0, TMath::Pi()*2);
631 max[dim] = 2*TMath::Pi()*(1 + 1./(nbins[dim]-1));
640 title[dim] =
"p_{T}";
646 title[dim] =
"A_{jet}";
669 title[dim] =
"z_{flavour}";
677 title[dim] =
"p_{T}^{D}";
684 title[dim] =
"p_{T,particle}^{leading} (GeV/c)";
690 Int_t dim1 = dim, dim2 = dim;
693 title[dim1] =
"p_{T}^{corr}";
701 title[dim1] =
"p_{T}^{MC}";
708 fHistJets1 =
new THnSparseD(
"fHistJets1",
"fHistJets1",dim1,nbins,min,max);
709 for (
Int_t i = 0; i < dim1; i++)
714 title[dim2] =
"p_{T}^{corr}";
721 fHistJets2 =
new THnSparseD(
"fHistJets2",
"fHistJets2",dim2,nbins,min,max);
722 for (
Int_t i = 0; i < dim2; i++)
730 title[dim] =
"p_{T,1}";
736 title[dim] =
"p_{T,2}";
742 title[dim] =
"A_{jet,1}";
748 title[dim] =
"A_{jet,2}";
754 title[dim] =
"distance";
772 title[dim] =
"p_{T,particle,1}^{leading} (GeV/c)";
778 title[dim] =
"p_{T,particle,2}^{leading} (GeV/c)";
785 title[dim] =
"#deltaA_{jet}";
791 title[dim] =
"#deltap_{T}";
798 title[dim] =
"p_{T,1}^{corr}";
805 title[dim] =
"p_{T,2}^{corr}";
812 title[dim] =
"#deltap_{T}^{corr}";
819 title[dim] =
"#delta#eta";
825 title[dim] =
"#delta#phi";
827 min[dim] = -TMath::Pi()/2;
828 max[dim] = TMath::Pi()*3/2;
832 title[dim] =
"p_{T,1}^{MC}";
839 title[dim] =
"#deltap_{T}^{MC}";
848 title[dim] =
"NEF_{1}";
854 title[dim] =
"NEF_{2}";
862 title[dim] =
"Z_{1}";
868 title[dim] =
"Z_{2}";
876 title[dim] =
"z_{flavour,1}";
882 title[dim] =
"z_{flavour,2}";
890 title[dim] =
"p_{T,1}^{D}";
896 title[dim] =
"p_{T,2}^{D}";
904 title[dim] =
"Z_{g,1}";
909 title[dim] =
"Z_{g,2}";
917 title[dim] =
"dR_{1}";
922 title[dim] =
"dR_{2}";
930 title[dim] =
"p_{T,g,1}";
935 title[dim] =
"p_{T,g,2}";
942 fHistMatching =
new THnSparseD(
"fHistMatching",
"fHistMatching",dim,nbins,min,max);
944 for (
Int_t i = 0; i < dim; i++)
960 if (!jets1 || !jets2)
return;
997 if (zleading == 1 || (zleading > 1 && zleading - 1 < 1e-3)) zleading = 0.999;
1005 ptflavour = hftrack->Pt();
1007 if (zflavour == 1 || (zflavour > 1 && zflavour - 1 < 1e-3)) zflavour = 0.999;
1011 THnSparse *histo = 0;
1023 for (
Int_t i = 0; i < histo->GetNdimensions(); i++) {
1026 contents[i] = jet->
Phi();
1027 else if (
title==
"#eta")
1028 contents[i] = jet->
Eta();
1029 else if (
title==
"p_{T}")
1030 contents[i] = jet->
Pt();
1031 else if (
title==
"A_{jet}")
1032 contents[i] = jet->
Area();
1033 else if (
title==
"NEF")
1034 contents[i] = jet->
NEF();
1035 else if (
title==
"Z")
1036 contents[i] = zleading;
1037 else if (
title==
"p_{T}^{corr}")
1038 contents[i] = corrpt;
1039 else if (
title==
"p_{T}^{MC}")
1040 contents[i] = jet->
MCPt();
1041 else if (
title==
"p_{T,particle}^{leading} (GeV/c)")
1042 contents[i] = leadPart.Pt();
1043 else if (
title==
"z_{flavour}")
1044 contents[i] = zflavour;
1045 else if (
title==
"p_{T}^{D}")
1046 contents[i] = ptflavour;
1048 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1051 histo->Fill(contents);
1063 else if (Set == 2) {
1097 if (zleading1 == 1 || (zleading1 > 1 && zleading1 - 1 < 1e-3)) zleading1 = 0.999;
1105 ptflavour1 = hftrack1->Pt();
1107 if (zflavour1 == 1 || (zflavour1 > 1 && zflavour1 - 1 < 1e-3)) zflavour1 = 0.999;
1114 if (zleading2 == 1 || (zleading2 > 1 && zleading2 - 1 < 1e-3)) zleading2 = 0.999;
1122 ptflavour2 = hftrack2->Pt();
1124 if (zflavour2 == 1 || (zflavour2 > 1 && zflavour2 - 1 < 1e-3)) zflavour2 = 0.999;
1132 if (
title==
"p_{T,1}")
1133 contents[i] = jet1->
Pt();
1134 else if (
title==
"p_{T,2}")
1135 contents[i] = jet2->
Pt();
1136 else if (
title==
"A_{jet,1}")
1137 contents[i] = jet1->
Area();
1138 else if (
title==
"A_{jet,2}")
1139 contents[i] = jet2->
Area();
1140 else if (
title==
"distance")
1142 else if (
title==
"CE1")
1144 else if (
title==
"CE2")
1146 else if (
title==
"#deltaA_{jet}")
1147 contents[i] = jet1->
Area()-jet2->
Area();
1148 else if (
title==
"#deltap_{T}")
1149 contents[i] = jet1->
Pt()-jet2->
Pt();
1150 else if (
title==
"#delta#eta")
1151 contents[i] = jet1->
Eta()-jet2->
Eta();
1152 else if (
title==
"#delta#phi")
1153 contents[i] = jet1->
Phi()-jet2->
Phi();
1154 else if (
title==
"p_{T,1}^{corr}")
1155 contents[i] = corrpt1;
1156 else if (
title==
"p_{T,2}^{corr}")
1157 contents[i] = corrpt2;
1158 else if (
title==
"#deltap_{T}^{corr}")
1159 contents[i] = corrpt1-corrpt2;
1160 else if (
title==
"p_{T,1}^{MC}")
1161 contents[i] = jet1->
MCPt();
1162 else if (
title==
"#deltap_{T}^{MC}")
1163 contents[i] = jet1->
MCPt()-jet2->
Pt();
1164 else if (
title==
"NEF_{1}")
1165 contents[i] = jet1->
NEF();
1166 else if (
title==
"NEF_{2}")
1167 contents[i] = jet2->
NEF();
1168 else if (
title==
"Z_{1}")
1169 contents[i] = zleading1;
1170 else if (
title==
"Z_{2}")
1171 contents[i] = zleading2;
1172 else if (
title==
"p_{T,particle,1}^{leading} (GeV/c)")
1173 contents[i] = leadPart1.Pt();
1174 else if (
title==
"p_{T,particle,2}^{leading} (GeV/c)")
1175 contents[i] = leadPart2.Pt();
1176 else if (
title==
"z_{flavour,1}")
1177 contents[i] = zflavour1;
1178 else if (
title==
"z_{flavour,2}")
1179 contents[i] = zflavour2;
1180 else if (
title==
"p_{T,1}^{D}")
1181 contents[i] = ptflavour1;
1182 else if (
title==
"p_{T,2}^{D}")
1183 contents[i] = ptflavour2;
1184 else if (
title==
"Z_{g,1}")
1186 else if (
title==
"Z_{g,2}")
1188 else if (
title==
"dR_{1}")
1190 else if (
title==
"dR_{2}")
1192 else if (
title==
"p_{T,g,1}")
1194 else if (
title==
"p_{T,g,2}")
1197 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1237 Double_t dcorrpt = corrpt1 - corrpt2;
1278 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1280 if (
fMatching ==
kMCLabel && (!jets2->GetIsParticleLevel() || jets1->GetIsParticleLevel())) {
1281 if (jets1->GetIsParticleLevel() == jets2->GetIsParticleLevel()) {
1282 AliWarning(
"Changing matching type from MC label to same collection...");
1286 AliWarning(
"Changing matching type from MC label to geometrical...");
1291 if (jets2->GetIsParticleLevel() && !jets1->GetIsParticleLevel()) {
1292 AliWarning(
"Changing matching type from same collection to MC label...");
1296 AliWarning(
"Changing matching type from same collection to geometrical...");
1319 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return kFALSE;
1325 jets1->ResetCurrentID();
1330 if (!jet2)
continue;
1337 AliDebug(2,Form(
"Found matching: jet1 pt = %f, eta = %f, phi = %f, jet2 pt = %f, eta = %f, phi = %f",
1338 jet1->
Pt(), jet1->
Eta(), jet1->
Phi(),
1339 jet2->
Pt(), jet2->
Eta(), jet2->
Phi()));
1353 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1358 jets2->ResetCurrentID();
1361 jets1->ResetCurrentID();
1367 jets2->ResetCurrentID();
1386 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1398 if (tracks1 && tracks1->GetArray()) {
1400 AliVParticle *track = jet1->
TrackAt(iTrack,tracks1->GetArray());
1402 AliWarning(Form(
"Could not find track %d!", iTrack));
1406 Int_t MClabel = TMath::Abs(track->GetLabel());
1408 if (MClabel != 0)
continue;
1411 AliDebug(3,Form(
"Track %d (pT = %f) is not a MC particle (MClabel = %d)!",iTrack,track->Pt(),MClabel));
1412 totalPt1 -= track->Pt();
1420 AliVCluster *clus = jet1->
ClusterAt(iClus,clusters1->GetArray());
1422 AliWarning(Form(
"Could not find cluster %d!", iClus));
1426 clus->GetMomentum(part,
fVertex);
1428 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++) {
1429 Int_t cellId = clus->GetCellAbsId(iCell);
1430 Double_t cellFrac = clus->GetCellAmplitudeFraction(iCell);
1434 if (MClabel != 0)
continue;
1437 AliDebug(3,Form(
"Cell %d (frac = %f) is not a MC particle (MClabel = %d)!",iCell,cellFrac,MClabel));
1438 totalPt1 -= part.Pt() * cellFrac;
1439 d1 -= part.Pt() * cellFrac;
1445 AliVCluster *clus = jet1->
ClusterAt(iClus,clusters1->GetArray());
1447 AliWarning(Form(
"Could not find cluster %d!", iClus));
1450 TLorentzVector part;
1451 clus->GetMomentum(part,
fVertex);
1453 Int_t MClabel = TMath::Abs(clus->GetLabel());
1455 if (MClabel != 0)
continue;
1458 AliDebug(3,Form(
"Cluster %d (pT = %f) is not a MC particle (MClabel = %d)!",iClus,part.Pt(),MClabel));
1459 totalPt1 -= part.Pt();
1465 Bool_t track2Found = kFALSE;
1470 AliVParticle *track = jet1->
TrackAt(iTrack,tracks1->GetArray());
1472 AliWarning(Form(
"Could not find track %d!", iTrack));
1475 Int_t MClabel = TMath::Abs(track->GetLabel());
1477 if (MClabel <= 0)
continue;
1480 index = tracks2->GetIndexFromLabel(MClabel);
1482 AliDebug(2,Form(
"Track %d (pT = %f) does not have an associated MC particle (MClabel = %d)!",iTrack,track->Pt(),MClabel));
1486 if (index2 != index)
continue;
1492 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1493 AliDebug(3,Form(
"Track %d (pT = %f, eta = %f, phi = %f) is associated with the MC particle %d (pT = %f, eta = %f, phi = %f)!",
1494 iTrack,track->Pt(),track->Eta(),track->Phi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1498 track2Found = kTRUE;
1506 AliWarning(Form(
"Could not find cluster %d!", iClus));
1510 clus->GetMomentum(part,
fVertex);
1512 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++) {
1513 Int_t cellId = clus->GetCellAbsId(iCell);
1514 Double_t cellFrac = clus->GetCellAmplitudeFraction(iCell);
1518 if (MClabel <= 0)
continue;
1521 index1 = tracks2->GetIndexFromLabel(MClabel);
1523 AliDebug(3,Form(
"Cell %d (frac = %f) does not have an associated MC particle (MClabel = %d)!",iCell,cellFrac,MClabel));
1527 if (index2 != index1)
continue;
1530 d1 -= part.Pt() * cellFrac;
1533 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1534 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)!",
1535 iCell,iClus,part.Pt(),part.Eta(),part.
Phi_0_2pi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1536 d2 -= MCpart->Pt() * cellFrac;
1539 track2Found = kTRUE;
1547 AliWarning(Form(
"Could not find cluster %d!", iClus));
1551 clus->GetMomentum(part,
fVertex);
1553 Int_t MClabel = TMath::Abs(clus->GetLabel());
1555 if (MClabel <= 0)
continue;
1558 index = tracks2->GetIndexFromLabel(MClabel);
1561 AliDebug(3,Form(
"Cluster %d (pT = %f) does not have an associated MC particle (MClabel = %d)!",iClus,part.Pt(),MClabel));
1565 if (index2 != index)
continue;
1571 AliVParticle *MCpart = tracks2->
GetParticle(index2);
1572 AliDebug(3,Form(
"Cluster %d (pT = %f, eta = %f, phi = %f) is associated with the MC particle %d (pT = %f, eta = %f, phi = %f)!",
1573 iClus,part.Pt(),part.Eta(),part.
Phi_0_2pi(),MClabel,MCpart->Pt(),MCpart->Eta(),MCpart->Phi()));
1578 track2Found = kTRUE;
1606 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return;
1617 if (tracks1 && tracks2) {
1623 if (index2 == index1) {
1624 AliVParticle *part1 = tracks1->
GetParticle(index1);
1626 AliWarning(Form(
"Could not find track %d!", index1));
1629 AliVParticle *part2 = tracks2->
GetParticle(index2);
1631 AliWarning(Form(
"Could not find track %d!", index2));
1644 if (clusters1 && clusters2) {
1653 AliWarning(
"ATTENTION ATTENTION ATTENTION: this section of the AliJetResponseMaker code needs to be revised and tested before using it for physics!!!");
1656 Int_t ncells1[nClus1];
1660 Int_t *sortedIndexes1[nClus1];
1662 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1664 AliVCluster *clus1 = clusters1->
GetCluster(index1);
1666 AliWarning(Form(
"Could not find cluster %d!", index1));
1667 ncells1[iClus1] = 0;
1668 cellsId1[iClus1] = 0;
1669 cellsFrac1[iClus1] = 0;
1670 cellsClusFrac1[iClus1] = 0;
1671 sortedIndexes1[iClus1] = 0;
1672 ptClus1[iClus1] = 0;
1675 TLorentzVector part1;
1676 clus1->GetMomentum(part1,
fVertex);
1678 ncells1[iClus1] = clus1->GetNCells();
1679 cellsId1[iClus1] = clus1->GetCellsAbsId();
1680 cellsFrac1[iClus1] = clus1->GetCellsAmplitudeFraction();
1681 cellsClusFrac1[iClus1] =
new Double_t[ncells1[iClus1]];
1682 sortedIndexes1[iClus1] =
new Int_t[ncells1[iClus1]];
1683 ptClus1[iClus1] = part1.Pt();
1685 for (
Int_t iCell = 0; iCell < ncells1[iClus1]; iCell++) {
1686 cellsClusFrac1[iClus1][iCell] =
fCaloCells->GetCellAmplitude(cellsId1[iClus1][iCell]) / clus1->E();
1689 TMath::Sort(ncells1[iClus1], cellsId1[iClus1], sortedIndexes1[iClus1], kFALSE);
1694 const Int_t maxNcells2 = 11520;
1695 Int_t sortedIndexes2[maxNcells2];
1696 for (
Int_t iClus2 = 0; iClus2 < nClus2; iClus2++) {
1698 AliVCluster *clus2 = clusters2->
GetCluster(index2);
1700 AliWarning(Form(
"Could not find cluster %d!", index2));
1703 Int_t ncells2 = clus2->GetNCells();
1704 if (ncells2 >= maxNcells2) {
1705 AliError(Form(
"Number of cells in the cluster %d >= %d",ncells2,maxNcells2));
1708 UShort_t *cellsId2 = clus2->GetCellsAbsId();
1709 Double_t *cellsFrac2 = clus2->GetCellsAmplitudeFraction();
1712 for (
Int_t iCell = 0; iCell < ncells2; iCell++) {
1713 cellsClusFrac2[iCell] =
fCaloCells->GetCellAmplitude(cellsId2[iCell]) / clus2->E();
1716 TLorentzVector part2;
1717 clus2->GetMomentum(part2,
fVertex);
1720 TMath::Sort(ncells2, cellsId2, sortedIndexes2, kFALSE);
1722 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1723 if (sortedIndexes1[iClus1] == 0)
1725 Int_t iCell1 = 0, iCell2 = 0;
1726 while (iCell1 < ncells1[iClus1] && iCell2 < ncells2) {
1727 if (cellsId1[iClus1][sortedIndexes1[iClus1][iCell1]] == cellsId2[sortedIndexes2[iCell2]]) {
1728 d1 -= cellsFrac1[iClus1][sortedIndexes1[iClus1][iCell1]] * cellsClusFrac1[iClus1][sortedIndexes1[iClus1][iCell1]] * ptClus1[iClus1];
1729 d2 -= cellsFrac2[sortedIndexes2[iCell2]] * cellsClusFrac2[sortedIndexes2[iCell2]] * ptClus2;
1733 else if (cellsId1[iClus1][sortedIndexes1[iClus1][iCell1]] > cellsId2[sortedIndexes2[iCell2]]) {
1741 delete[] cellsClusFrac2;
1743 for (
Int_t iClus1 = 0; iClus1 < nClus1; iClus1++) {
1744 delete[] cellsClusFrac1[iClus1];
1745 delete[] sortedIndexes1[iClus1];
1753 if (index2 == index1) {
1754 AliVCluster *clus1 = clusters1->
GetCluster(index1);
1756 AliWarning(Form(
"Could not find cluster %d!", index1));
1759 AliVCluster *clus2 = clusters2->
GetCluster(index2);
1761 AliWarning(Form(
"Could not find cluster %d!", index2));
1764 TLorentzVector part1, part2;
1765 clus1->GetMomentum(part1,
fVertex);
1766 clus2->GetMomentum(part2,
fVertex);
1817 if (d1 < jet1->ClosestJetDistance()) {
1821 else if (d1 < jet1->SecondClosestJetDistance()) {
1828 if (d2 < jet2->ClosestJetDistance()) {
1832 else if (d2 < jet2->SecondClosestJetDistance()) {
1846 if (!jets1 || !jets1->GetArray() || !jets2 || !jets2->GetArray())
return kFALSE;
1851 jets2->ResetCurrentID();
1854 AliDebug(2,Form(
"Processing jet (2) %d", jets2->GetCurrentID()));
1858 UInt_t rejectionReason = 0;
1859 if (jets2->
AcceptJet(jet2, rejectionReason))
1866 if (!jet1)
continue;
1867 rejectionReason = 0;
1868 if (!jets1->
AcceptJet(jet1, rejectionReason))
continue;
1873 if (jets2->GetIsParticleLevel() && !jets1->GetIsParticleLevel())
1875 else if (jets1->GetIsParticleLevel() == jets2->GetIsParticleLevel())
1890 jets1->ResetCurrentID();
1892 UInt_t rejectionReason = 0;
1893 if (!jets1->
AcceptJet(jet1, rejectionReason)) {
1898 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
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