From 12de57f2a339f6214d3a297bd165060209d14d4c Mon Sep 17 00:00:00 2001 From: Hadi Hassan Date: Wed, 19 Jun 2024 15:57:23 +0300 Subject: [PATCH] PWGJE: fixing the jet index in the b-jet tables --- PWGJE/Tasks/bjetTreeCreator.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGJE/Tasks/bjetTreeCreator.cxx b/PWGJE/Tasks/bjetTreeCreator.cxx index bbd15962ab4..509bdc87450 100644 --- a/PWGJE/Tasks/bjetTreeCreator.cxx +++ b/PWGJE/Tasks/bjetTreeCreator.cxx @@ -266,7 +266,7 @@ struct BJetTreeCreator { double energySV = candSV.e(); if (produceTree) { - bjetSVParamsTable(bjetParamsTable.lastIndex(), candSV.pt(), deltaRJetSV, massSV, energySV / myJet.energy(), candSV.impactParameterXY(), candSV.cpa(), candSV.chi2PCA(), candSV.decayLengthXY(), candSV.errorDecayLengthXY(), candSV.decayLength(), candSV.errorDecayLength()); + bjetSVParamsTable(bjetParamsTable.lastIndex() + 1, candSV.pt(), deltaRJetSV, massSV, energySV / myJet.energy(), candSV.impactParameterXY(), candSV.cpa(), candSV.chi2PCA(), candSV.decayLengthXY(), candSV.errorDecayLengthXY(), candSV.decayLength(), candSV.errorDecayLength()); } svIndices.push_back(bjetSVParamsTable.lastIndex()); @@ -336,7 +336,7 @@ struct BJetTreeCreator { } if (produceTree) { - bjetTracksParamsTable(bjetParamsTable.lastIndex(), constituent.pt(), constituent.eta(), dotProduct, dotProduct / analysisJet.p(), deltaRJetTrack, TMath::Abs(constituent.dcaXY()) * sign, TMath::Sqrt(constituent.sigmaDcaXY2()), dcaXYZ * sign, TMath::Sqrt(sigmaDcaXYZ2), constituent.p() / analysisJet.p(), RClosestSV); + bjetTracksParamsTable(bjetParamsTable.lastIndex() + 1, constituent.pt(), constituent.eta(), dotProduct, dotProduct / analysisJet.p(), deltaRJetTrack, TMath::Abs(constituent.dcaXY()) * sign, TMath::Sqrt(constituent.sigmaDcaXY2()), dcaXYZ * sign, TMath::Sqrt(sigmaDcaXYZ2), constituent.p() / analysisJet.p(), RClosestSV); } trackIndices.push_back(bjetTracksParamsTable.lastIndex()); } @@ -381,7 +381,7 @@ struct BJetTreeCreator { registry.fill(HIST("h2_nSV_jetpT"), analysisJet.pt(), SVsIndices.size() < 250 ? SVsIndices.size() : 249); if (produceTree) { - bjetConstituentsTable(bjetParamsTable.lastIndex(), tracksIndices, SVsIndices); + bjetConstituentsTable(bjetParamsTable.lastIndex() + 1, tracksIndices, SVsIndices); bjetParamsTable(analysisJet.pt(), analysisJet.eta(), analysisJet.phi(), tracksIndices.size(), SVsIndices.size(), analysisJet.mass(), 0, analysisJet.r()); } } @@ -464,7 +464,7 @@ struct BJetTreeCreator { } if (produceTree) { - bjetConstituentsTable(bjetParamsTable.lastIndex(), tracksIndices, SVsIndices); + bjetConstituentsTable(bjetParamsTable.lastIndex() + 1, tracksIndices, SVsIndices); bjetParamsTable(analysisJet.pt(), analysisJet.eta(), analysisJet.phi(), tracksIndices.size(), SVsIndices.size(), analysisJet.mass(), jetFlavor, analysisJet.r()); } }