Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ struct JflucWeightsLoader {
LOGF(fatal, "NUA correction weights file not found: %s", cfgPathPhiWeights.value.substr(8).c_str());
}
useNUAFromCCDB = false;
} else if (cfgPathPhiWeights.value == "") {
LOGF(info, "No NUA corrections provided.");
useNUAFromCCDB = false;
} else {
LOGF(info, "Assuming NUA corrections from CCDB.");
useNUAFromCCDB = true;
Expand All @@ -136,6 +139,9 @@ struct JflucWeightsLoader {
LOGF(info, "Loaded efficiency correction histogram locally.");
}
useEffFromCCDB = false;
} else if (cfgPathEffWeights.value == "") {
LOGF(info, "No efficiency corrections provided.");
useEffFromCCDB = false;
} else {
LOGF(info, "Assuming efficiency corrections from CCDB.");
useEffFromCCDB = true;
Expand Down Expand Up @@ -169,10 +175,9 @@ struct JflucWeightsLoader {
initCCDB(collision.runNumber(), timestamp, kNUA);
LOGF(info, "Loaded NUA correction histogram from CCDB for run %d.", collision.runNumber());
}
runNumber = collision.runNumber();
}
}
if (pfeff) {
if (pfeff || useEffFromCCDB) {
if (collision.runNumber() != runNumber) {
if (pheff)
delete pheff;
Expand All @@ -188,6 +193,10 @@ struct JflucWeightsLoader {
}
}
}

// Set run number after reading corrections
runNumber = collision.runNumber();

for (const auto& track : tracks) {
float phiWeight, effWeight;
if (ph) {
Expand Down
Loading