Skip to content

Commit 106e1a8

Browse files
committed
FIx pt axis index bug
1 parent 28f5ca6 commit 106e1a8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

PWGDQ/Tasks/taskJPsiMu.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ struct DqJPsiMuonCorrelations {
197197

198198
// Muon kinematic cuts
199199
if ((track.eta() < fConfigMuonEtaMin || track.eta() > fConfigMuonEtaMax) ||
200-
(track.pt() < axisPt.value.front() || track.pt() > axisPt.value.back())) {
200+
(track.pt() < axisPt.value[1] || track.pt() > axisPt.value.back())) {
201201
continue;
202202
}
203203

@@ -252,7 +252,8 @@ double getWeight(const double pT, const std::vector<double>& pT_bins, const std:
252252

253253
int eff_bin = -1;
254254
for (size_t b = 0; b < pT_bins.size() - 1; ++b) {
255-
if (pT >= pT_bins[b] && pT < pT_bins[b + 1]) {
255+
// Shift pT index by one to account for the VARIABLE_WIDTH entry in the axis configuration
256+
if (pT >= pT_bins[b + 1] && pT < pT_bins[b + 2]) {
256257
eff_bin = b;
257258
break;
258259
}

0 commit comments

Comments
 (0)