diff --git a/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx b/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx index 3e495a3bc42..79c5c4e2df6 100644 --- a/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx +++ b/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx @@ -249,6 +249,11 @@ struct jEPFlowAnalysis { return; } + if (cfgEffCor) { + auto bc = coll.bc_as(); + effMap = ccdb->getForTimeStamp>(cfgEffCorDir, bc.timestamp()); + } + float cent = coll.cent(); epFlowHistograms.fill(HIST("hCentrality"), cent); epFlowHistograms.fill(HIST("hVertex"), coll.posZ()); @@ -287,6 +292,13 @@ struct jEPFlowAnalysis { float weight = 1.0; + qx_shifted[0] = coll.qvecRe()[4 * detId + harmInd]; + qy_shifted[0] = coll.qvecIm()[4 * detId + harmInd]; + qx_shifted[1] = coll.qvecRe()[4 * refAId + harmInd]; + qy_shifted[1] = coll.qvecIm()[4 * refAId + harmInd]; + qx_shifted[2] = coll.qvecRe()[4 * refBId + harmInd]; + qy_shifted[2] = coll.qvecIm()[4 * refBId + harmInd]; + if (cfgManShiftCorr) { constexpr int kShiftBins = 10; for (int ishift = 1; ishift <= kShiftBins; ishift++) { @@ -334,14 +346,21 @@ struct jEPFlowAnalysis { epFlowHistograms.fill(HIST("EpResQvecRefARefBxy"), i + 2, cent, qx_shifted[2] * qy_shifted[1] - qx_shifted[1] * qy_shifted[2]); for (const auto& track : tracks) { + if (trackSel(track)) + continue; + + if (cfgEffCor) { + weight /= getEfficiencyCorrection(effMap, track.eta(), track.pt(), cent, coll.posZ()); + } + float vn = std::cos((i + 2) * (track.phi() - eps[0])); float vnSin = std::sin((i + 2) * (track.phi() - eps[0])); - epFlowHistograms.fill(HIST("vncos"), i + 2, cent, track.pt(), vn * weight); - epFlowHistograms.fill(HIST("vnsin"), i + 2, cent, track.pt(), vnSin * weight); + epFlowHistograms.fill(HIST("vncos"), i + 2, cent, track.pt(), vn, weight); + epFlowHistograms.fill(HIST("vnsin"), i + 2, cent, track.pt(), vnSin, weight); - epFlowHistograms.fill(HIST("SPvnxx"), i + 2, cent, track.pt(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]) * weight); - epFlowHistograms.fill(HIST("SPvnxy"), i + 2, cent, track.pt(), (std::sin(track.phi() * static_cast(i + 2)) * qx_shifted[0] - std::cos(track.phi() * static_cast(i + 2)) * qy_shifted[0]) * weight); + epFlowHistograms.fill(HIST("SPvnxx"), i + 2, cent, track.pt(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); + epFlowHistograms.fill(HIST("SPvnxy"), i + 2, cent, track.pt(), (std::sin(track.phi() * static_cast(i + 2)) * qx_shifted[0] - std::cos(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); } } }