Skip to content

Commit af9f4f2

Browse files
jikim1290junleekim
andauthored
[event plane] fix bug (#6788)
* fix bug * fix bug --------- Co-authored-by: junleekim <junleekim@maccbookjunlee2024.dyndns.cern.ch>
1 parent 317a260 commit af9f4f2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Common/TableProducer/qVectorsTable.cxx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,14 @@ struct qVectorsTable {
402402
continue;
403403
}
404404
histosQA.fill(HIST("ChTracks"), trk.pt(), trk.eta(), trk.phi(), cent);
405-
if (std::abs(trk.eta()) < 0.1 || std::abs(trk.eta()) > 0.8) {
405+
if (std::abs(trk.eta()) > 0.8) {
406+
continue;
407+
}
408+
qVectBTot[0] += trk.pt() * std::cos(trk.phi() * nmode);
409+
qVectBTot[1] += trk.pt() * std::sin(trk.phi() * nmode);
410+
TrkBTotLabel.push_back(trk.globalIndex());
411+
nTrkBTot++;
412+
if (std::abs(trk.eta()) < 0.1) {
406413
continue;
407414
}
408415
if (trk.eta() > 0 && useDetector["QvectorBPoss"]) {
@@ -416,10 +423,6 @@ struct qVectorsTable {
416423
TrkBNegLabel.push_back(trk.globalIndex());
417424
nTrkBNeg++;
418425
}
419-
qVectBTot[0] += trk.pt() * std::cos(trk.phi() * nmode);
420-
qVectBTot[1] += trk.pt() * std::sin(trk.phi() * nmode);
421-
TrkBTotLabel.push_back(trk.globalIndex());
422-
nTrkBTot++;
423426
}
424427
if (nTrkBPos > 0) {
425428
qVectBPos[0] /= nTrkBPos;

0 commit comments

Comments
 (0)