Skip to content

Commit dadb651

Browse files
jikim1290alibuild
andauthored
[PWGCF] fixing bug for efficiency correction (#15064)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 3e8a4c5 commit dadb651

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ struct jEPFlowAnalysis {
169169
effVars[1] = eff->GetAxis(1)->FindBin(pt);
170170
effVars[2] = eff->GetAxis(2)->FindBin(multiplicity);
171171
effVars[3] = eff->GetAxis(3)->FindBin(posZ);
172+
172173
return eff->GetBinContent(effVars);
173174
}
174175

@@ -251,7 +252,11 @@ struct jEPFlowAnalysis {
251252

252253
if (cfgEffCor) {
253254
auto bc = coll.bc_as<aod::BCsWithTimestamps>();
254-
effMap = ccdb->getForTimeStamp<THnT<float>>(cfgEffCorDir, bc.timestamp());
255+
currentRunNumber = bc.runNumber();
256+
if (currentRunNumber != lastRunNumber) {
257+
effMap = ccdb->getForTimeStamp<THnT<float>>(cfgEffCorDir, bc.timestamp());
258+
lastRunNumber = currentRunNumber;
259+
}
255260
}
256261

257262
float cent = coll.cent();
@@ -350,7 +355,7 @@ struct jEPFlowAnalysis {
350355
continue;
351356

352357
if (cfgEffCor) {
353-
weight /= getEfficiencyCorrection(effMap, track.eta(), track.pt(), cent, coll.posZ());
358+
weight = getEfficiencyCorrection(effMap, track.eta(), track.pt(), cent, coll.posZ());
354359
}
355360

356361
float vn = std::cos((i + 2) * (track.phi() - eps[0]));

0 commit comments

Comments
 (0)