Skip to content

Commit f9102f8

Browse files
committed
fixes: runnumber and downscaling
1 parent 2f1a4db commit f9102f8

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

PWGLF/Tasks/Strangeness/nonPromptCascade.cxx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ struct NonPromptCascadeTask {
216216
Configurable<float> cfgMaxMult{"cfgMaxMult", 8000.f, "Upper range of multiplicty histo"};
217217
Configurable<float> cfgMaxMultFV0{"cfgMaxMultFV0", 10000.f, "Upper range of multiplicty FV0 histo"};
218218
Configurable<std::string> cfgPtEdgesdNdeta{"ptEdges", "0,0.2,0.4,0.6,0.8,1,1.2,1.6,2.0,2.4,2.8,3.2,3.6,4,4.5,5,5.5,6,7,8,10", "Pt bin edges (comma-separated)"};
219+
Configurable<int> cfgDownscaleMB{"cfgDownscaleMB", 1, "Downscaling for pile up study sample"};
219220

220221
Zorro mZorro;
221222
OutputObj<ZorroSummary> mZorroSummary{"ZorroSummary"};
@@ -978,14 +979,21 @@ struct NonPromptCascadeTask {
978979

979980
void processPileUp(CollisionCandidatesRun3 const& collisions, aod::BCsWithTimestamps const&)
980981
{
981-
std::cout << "Processing pile up" << std::endl;
982+
// std::cout << "Processing pile up" << std::endl;
983+
int ds = 1;
982984
for (const auto& coll : collisions) {
983-
float centFT0M = coll.centFT0M();
984-
float multFT0M = coll.multFT0M();
985-
auto bc = coll.template bc_as<aod::BCsWithTimestamps>();
986-
uint64_t globalBC = bc.globalBC();
987-
NPPUTable(mRunNumber, globalBC, coll.numContrib(), coll.multNTracksGlobal(), centFT0M, multFT0M);
988-
// NPPileUpTable(mRunNumber, globalBC, multNTracks, centFT0M, multFT0M);
985+
if (ds == cfgDownscaleMB) {
986+
auto bc = coll.template bc_as<aod::BCsWithTimestamps>();
987+
if (mRunNumber != bc.runNumber()) {
988+
mRunNumber = bc.runNumber();
989+
}
990+
float centFT0M = coll.centFT0M();
991+
float multFT0M = coll.multFT0M();
992+
uint64_t globalBC = bc.globalBC();
993+
NPPUTable(mRunNumber, globalBC, coll.numContrib(), coll.multNTracksGlobal(), centFT0M, multFT0M);
994+
ds = 0;
995+
}
996+
ds++;
989997
}
990998
};
991999
PROCESS_SWITCH(NonPromptCascadeTask, processPileUp, "pile up studies", true);

0 commit comments

Comments
 (0)