Skip to content

Commit f8251d0

Browse files
committed
fixing wrong indeices
1 parent 8215385 commit f8251d0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,13 @@ struct jEPFlowAnalysis {
189189
}
190190
}
191191

192+
if (coll.qvecAmp()[detId] < 1e-5 || coll.qvecAmp()[refAId] < 1e-5 || coll.qvecAmp()[refBId] < 1e-5) return;
193+
192194
for (int i = 0; i < cfgnMode; i++) { // loop over different harmonic orders
193195
harmInd = cfgnTotalSystem * 4 * (i) + 3; // harmonic index to access corresponding Q-vector as all Q-vectors are in same vector
194-
eps[0] = helperEP.GetEventPlane(coll.qvecRe()[detId + harmInd], coll.qvecIm()[detId + harmInd], i + 2);
195-
eps[1] = helperEP.GetEventPlane(coll.qvecRe()[refAId + harmInd], coll.qvecIm()[refAId + harmInd], i + 2);
196-
eps[2] = helperEP.GetEventPlane(coll.qvecRe()[refBId + harmInd], coll.qvecIm()[refBId + harmInd], i + 2);
196+
eps[0] = helperEP.GetEventPlane(coll.qvecRe()[4 * detId + harmInd], coll.qvecIm()[4 * detId + harmInd], i + 2);
197+
eps[1] = helperEP.GetEventPlane(coll.qvecRe()[4 * refAId + harmInd], coll.qvecIm()[4 * refAId + harmInd], i + 2);
198+
eps[2] = helperEP.GetEventPlane(coll.qvecRe()[4 * refBId + harmInd], coll.qvecIm()[4 * refBId + harmInd], i + 2);
197199

198200
auto deltapsiDet = 0.0;
199201
auto deltapsiRefA = 0.0;
@@ -222,7 +224,9 @@ struct jEPFlowAnalysis {
222224
}
223225

224226
if (cfgSPmethod)
225-
weight *= std::sqrt(std::pow(coll.qvecRe()[detId + harmInd], 2) + std::pow(coll.qvecIm()[detId + harmInd], 2));
227+
weight *= std::sqrt(std::pow(coll.qvecRe()[4 * detId + harmInd], 2) + std::pow(coll.qvecIm()[4 * detId + harmInd], 2));
228+
229+
226230

227231
float resNumA = helperEP.GetResolution(eps[0], eps[1], i + 2);
228232
float resNumB = helperEP.GetResolution(eps[0], eps[2], i + 2);

0 commit comments

Comments
 (0)