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
18 changes: 18 additions & 0 deletions PWGCF/Flow/Tasks/flowTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ struct FlowTask {
};
enum BootstrapHist {
kMeanPtWithinGap08 = 0,
kMeanPtWithinGap08_MC,
kCount_BootstrapHist
};
int mRunNumber{-1};
Expand Down Expand Up @@ -359,6 +360,10 @@ struct FlowTask {
registry.add("MCGen/MChPhi", "#phi distribution", {HistType::kTH1D, {axisPhi}});
registry.add("MCGen/MChEta", "#eta distribution", {HistType::kTH1D, {axisEta}});
registry.add("MCGen/MChPtRef", "p_{T} distribution after cut", {HistType::kTH1D, {axisPtHist}});
registry.add("hMeanPtWithinGap08_MC", "mean p_{T}", {HistType::kTProfile, {axisIndependent}});
for (auto i = 0; i < cfgNbootstrap; i++) {
bootstrapArray[i][kMeanPtWithinGap08_MC] = registry.add<TProfile>(Form("BootstrapContainer_%d/hMeanPtWithinGap08_MC", i), "", {HistType::kTProfile, {axisIndependent}});
}
}

o2::framework::AxisSpec axis = axisPt;
Expand Down Expand Up @@ -1248,16 +1253,23 @@ struct FlowTask {
fGFW->Clear();
fFCptgen->clearVector();

double ptSum_Gap08 = 0.;
double count_Gap08 = 0.;
Comment on lines +1256 to +1257
Copy link
Collaborator

@victor-gonzalez victor-gonzalez Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest keep adhering to linter recommendations

for (const auto& mcParticle : mcParticles) {
if (!mcParticle.isPhysicalPrimary())
continue;
bool withinPtPOI = (cfgCutPtPOIMin < mcParticle.pt()) && (mcParticle.pt() < cfgCutPtPOIMax); // within POI pT range
bool withinPtRef = (cfgCutPtRefMin < mcParticle.pt()) && (mcParticle.pt() < cfgCutPtRefMax); // within RF pT range
bool withinEtaGap08 = (std::abs(mcParticle.eta()) < cfgEtaPtPt);

if (withinPtRef) {
registry.fill(HIST("MCGen/MChPhi"), mcParticle.phi());
registry.fill(HIST("MCGen/MChEta"), mcParticle.eta());
registry.fill(HIST("MCGen/MChPtRef"), mcParticle.pt());
if (withinEtaGap08) {
ptSum_Gap08 += mcParticle.pt();
count_Gap08 += 1.;
}
}
if (withinPtRef)
fGFW->Fill(mcParticle.eta(), fPtAxis->FindBin(mcParticle.pt()) - 1, mcParticle.phi(), 1., 1);
Expand All @@ -1271,6 +1283,12 @@ struct FlowTask {
fillPtSums<kGen>(mcParticle, 1.);
}

if (count_Gap08 > 0)
registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, 1.0);
int sampleIndex = static_cast<int>(cfgNbootstrap * lRandom);
if (count_Gap08 > 0)
bootstrapArray[sampleIndex][kMeanPtWithinGap08_MC]->Fill(independent, ptSum_Gap08 / count_Gap08, 1.0);

// Filling Flow Container
for (uint l_ind = 0; l_ind < corrconfigs.size(); l_ind++) {
fillFC<kGen>(corrconfigs.at(l_ind), independent, lRandom);
Expand Down
Loading