Skip to content

Commit ea08eaa

Browse files
author
Emil Gorm Nielsen
committed
move to TH3D in registry for weights
1 parent 7565e16 commit ea08eaa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,11 @@ struct FlowGenericFramework {
383383
void loadCorrections(aod::BCsWithTimestamps::iterator const& bc)
384384
{
385385
uint64_t timestamp = bc.timestamp();
386-
if (cfg.correctionsLoaded)
386+
if (!cfgRunByRun && cfg.correctionsLoaded)
387387
return;
388388
if(!cfgAcceptance.value.empty()) {
389389
std::string runstr = (cfgRunByRun)?"RBR/":"";
390+
cfg.mAcceptance.clear();
390391
if(cfgUsePID){
391392
cfg.mAcceptance.push_back(ccdb->getForTimeStamp<GFWWeights>(cfgAcceptance.value+runstr+"ref/", timestamp));
392393
cfg.mAcceptance.push_back(ccdb->getForTimeStamp<GFWWeights>(cfgAcceptance.value+runstr+"ch/", timestamp));
@@ -911,7 +912,6 @@ struct FlowGenericFramework {
911912
lastRun = run;
912913
LOGF(info,"run = %d",run);
913914
if(cfgRunByRun){
914-
LOGF(info,"cfgRunByRun = true");
915915
if(std::find(runNumbers.begin(), runNumbers.end(), run) == runNumbers.end()){
916916
LOGF(info,"Creating histograms for run %d",run);
917917
createRunByRunHistograms(run);
@@ -920,9 +920,12 @@ struct FlowGenericFramework {
920920
else {
921921
LOGF(info,"run %d already in runNumbers",run);
922922
}
923+
if (!cfgFillWeights)
924+
loadCorrections(bc);
923925
}
924-
else LOGF(info,"cfgRunByRun = false");
925926
}
927+
if (!cfgFillWeights && !cfgRunByRun)
928+
loadCorrections(bc);
926929
registry.fill(HIST("eventQA/eventSel"), 0.5);
927930
if(cfgRunByRun) th1sList[run][hEventSel]->Fill(0.5);
928931
if (!collision.sel8())
@@ -943,8 +946,6 @@ struct FlowGenericFramework {
943946
return;
944947
if (cfgFillQA)
945948
fillEventQA<kAfter>(collision, tracks);
946-
if (!cfgFillWeights)
947-
loadCorrections(bc);
948949
auto field = (cfgMagField == 99999) ? getMagneticField(bc.timestamp()) : cfgMagField;
949950
processCollision<kReco>(collision, tracks, centrality, field, run);
950951
}

0 commit comments

Comments
 (0)