From 59c5bc13f866d474b7ff1dc80bfcfd93a29a2872 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Tue, 11 Nov 2025 16:24:22 +0100 Subject: [PATCH 1/4] add two subevent method for pt-pt correlations --- PWGCF/Flow/Tasks/flowTask.cxx | 19 +- .../GenericFramework/Core/FlowPtContainer.cxx | 430 ++++++++++++++++++ PWGCF/GenericFramework/Core/FlowPtContainer.h | 29 ++ 3 files changed, 477 insertions(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index cf9bd184833..dcd467eeaec 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -72,7 +72,9 @@ struct FlowTask { O2_DEFINE_CONFIGURABLE(cfgCutPtMin, float, 0.2f, "Minimal pT for all tracks") O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 10.0f, "Maximal pT for all tracks") O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks") - O2_DEFINE_CONFIGURABLE(cfgEtaPtPt, float, 0.4, "eta cut for pt-pt correlations"); + O2_DEFINE_CONFIGURABLE(cfgEtaPtPt, float, 0.4, "eta range for pt-pt correlations") + O2_DEFINE_CONFIGURABLE(cfgEtaGapPtPt, float, 0.2, "eta gap for pt-pt correlations, cfgEtaGapPtPt<|eta|setUseCentralMoments(cfgUseCentralMoments); fFCpt->setUseGapMethod(true); fFCpt->initialise(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap); + if (cfgEtaGapPtPtEnabled) + fFCpt->initialiseSubevent(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap); for (auto i = 0; i < gfwConfigs.GetSize(); ++i) { corrconfigsPtVn.push_back(fGFW->GetCorrelatorConfig(gfwConfigs.GetCorrs()[i], gfwConfigs.GetHeads()[i], gfwConfigs.GetpTDifs()[i])); } @@ -642,6 +646,14 @@ struct FlowTask { { if (std::abs(track.eta()) < cfgEtaPtPt) { (dt == kGen) ? fFCptgen->fill(1., track.pt()) : fFCpt->fill(weff, track.pt()); + if (cfgEtaGapPtPtEnabled) { + if (track.eta() < -1. * cfgEtaGapPtPt) { + (dt == kGen) ? fFCptgen->fillSub1(1., track.pt()) : fFCpt->fillSub1(weff, track.pt()); + } + if (track.eta() > cfgEtaGapPtPt) { + (dt == kGen) ? fFCptgen->fillSub2(1., track.pt()) : fFCpt->fillSub2(weff, track.pt()); + } + } } } @@ -651,6 +663,11 @@ struct FlowTask { (dt == kGen) ? fFCptgen->calculateCorrelations() : fFCpt->calculateCorrelations(); (dt == kGen) ? fFCptgen->fillPtProfiles(centmult, rndm) : fFCpt->fillPtProfiles(centmult, rndm); (dt == kGen) ? fFCptgen->fillCMProfiles(centmult, rndm) : fFCpt->fillCMProfiles(centmult, rndm); + if (cfgEtaGapPtPtEnabled) { + (dt == kGen) ? fFCptgen->calculateSubeventCorrelations() : fFCpt->calculateSubeventCorrelations(); + (dt == kGen) ? fFCptgen->fillSubeventPtProfiles(centmult, rndm) : fFCpt->fillSubeventPtProfiles(centmult, rndm); + (dt == kGen) ? fFCptgen->fillCMSubeventProfiles(centmult, rndm) : fFCpt->fillCMSubeventProfiles(centmult, rndm); + } for (uint l_ind = 0; l_ind < corrconfigsPtVn.size(); ++l_ind) { if (!corrconfigsPtVn.at(l_ind).pTDif) { auto dnx = fGFW->Calculate(corrconfigsPtVn.at(l_ind), 0, kTRUE).real(); diff --git a/PWGCF/GenericFramework/Core/FlowPtContainer.cxx b/PWGCF/GenericFramework/Core/FlowPtContainer.cxx index fd1ebbdebb7..99d2034dc0c 100644 --- a/PWGCF/GenericFramework/Core/FlowPtContainer.cxx +++ b/PWGCF/GenericFramework/Core/FlowPtContainer.cxx @@ -21,6 +21,8 @@ FlowPtContainer::FlowPtContainer() : fCMTermList(0), fCorrList(0), fCovList(0), + fSubList(0), + fSubCMList(0), fCumulantList(0), fCentralMomentList(0), mpar(0), @@ -29,10 +31,20 @@ FlowPtContainer::FlowPtContainer() : fCMTermList(0), fUseCentralMoments(true), fUseGap(false), sumP(), + insub1(), + insub2(), corrNum(), + corrNum1(), + corrNum2(), corrDen(), + corrDen1(), + corrDen2(), cmVal(), + cmVal1(), + cmVal2(), cmDen(), + cmDen1(), + cmDen2(), arr(), warr() {} FlowPtContainer::~FlowPtContainer() @@ -40,11 +52,17 @@ FlowPtContainer::~FlowPtContainer() delete fCMTermList; delete fCorrList; delete fCovList; + delete fSubList; + delete fSubCMList; + delete fCumulantList; + delete fCentralMomentList; }; FlowPtContainer::FlowPtContainer(const char* name) : TNamed(name, name), fCMTermList(0), fCorrList(0), fCovList(0), + fSubList(0), + fSubCMList(0), fCumulantList(0), fCentralMomentList(0), mpar(0), @@ -53,16 +71,28 @@ FlowPtContainer::FlowPtContainer(const char* name) : TNamed(name, name), fUseCentralMoments(true), fUseGap(false), sumP(), + insub1(), + insub2(), corrNum(), + corrNum1(), + corrNum2(), corrDen(), + corrDen1(), + corrDen2(), cmVal(), + cmVal1(), + cmVal2(), cmDen(), + cmDen1(), + cmDen2(), arr(), warr() {} FlowPtContainer::FlowPtContainer(const char* name, const char* title) : TNamed(name, title), fCMTermList(0), fCorrList(0), fCovList(0), + fSubList(0), + fSubCMList(0), fCumulantList(0), fCentralMomentList(0), mpar(0), @@ -71,10 +101,20 @@ FlowPtContainer::FlowPtContainer(const char* name, const char* title) : TNamed(n fUseCentralMoments(true), fUseGap(false), sumP(), + insub1(), + insub2(), corrNum(), + corrNum1(), + corrNum2(), corrDen(), + corrDen1(), + corrDen2(), cmVal(), + cmVal1(), + cmVal2(), cmDen(), + cmDen1(), + cmDen2(), arr(), warr() {} void FlowPtContainer::initialise(const o2::framework::AxisSpec axis, const int& m, const GFWCorrConfigs& configs, const int& nsub) @@ -351,6 +391,174 @@ void FlowPtContainer::initialise(int nbinsx, double xlow, double xhigh, const in } LOGF(info, "Container %s initialized with m = %i\n", this->GetName(), mpar); }; +void FlowPtContainer::initialiseSubevent(const o2::framework::AxisSpec axis, const int& m, const GFWCorrConfigs& configs, const int& nsub) +{ + if (!mpar) + mpar = m; + std::vector multiBins = axis.binEdges; + int nMultiBins = axis.nBins.value_or(0); + if (nMultiBins <= 0) + nMultiBins = multiBins.size() - 1; + if (nMultiBins <= 0) { + LOGF(warning, "Multiplicity axis does not exist"); + return; + } + + if (fSubList) + delete fSubList; + fSubList = new TList(); + fSubList->SetOwner(kTRUE); + for (int subEv = 0; subEv < 2; ++subEv) { + for (int m = 0; m < mpar; ++m) { + fSubList->Add(new BootstrapProfile(Form("mpt_sub%i_%ipar", subEv + 1, m + 1), this->GetTitle(), nMultiBins, &multiBins[0])); + } + } + for (int m = 2; m <= mpar; ++m) { + for (int k = 0; k < m - 1; ++k) { + fSubList->Add(new BootstrapProfile(Form("mpt_%isub1_%isub2_%ipar", m - k - 1, k + 1, m), this->GetTitle(), nMultiBins, &multiBins[0])); + } + } + + if (fSubCMList) + delete fSubCMList; + fSubCMList = new TList(); + fSubCMList->SetOwner(kTRUE); + for (int subEv = 0; subEv < 2; ++subEv) { + for (int m = 0; m < 4; ++m) { + for (int i = 0; i <= m; ++i) { + fSubCMList->Add(new BootstrapProfile(Form("cm%i_sub%i_Mpt%i", m + 1, subEv + 1, i), this->GetTitle(), nMultiBins, &multiBins[0])); + } + } + } + for (int m = 2; m <= 4; ++m) { + for (int first = 1; first < m; ++first) { + for (int second = first; second < m; ++second) { + if (first > second) + continue; + int fourth = m - second; + for (int third = 1; third < m; ++third) { + if (third > fourth) + continue; + fSubCMList->Add(new BootstrapProfile(Form("cm%i_%i%isub1_%i%isub2", m, first, second, third, fourth), this->GetTitle(), nMultiBins, &multiBins[0])); + } + } + } + } + + if (nsub) { + for (int i = 0; i < fSubList->GetEntries(); ++i) + dynamic_cast(fSubList->At(i))->InitializeSubsamples(nsub); + for (int i = 0; i < fSubCMList->GetEntries(); ++i) + dynamic_cast(fSubCMList->At(i))->InitializeSubsamples(nsub); + } + LOGF(info, "Container %s initialized Subevents and %i subsamples", this->GetName(), nsub); +} +void FlowPtContainer::initialiseSubevent(int nbinsx, double* xbins, const int& m, const GFWCorrConfigs& configs, const int& nsub) +{ + if (!mpar) + mpar = m; + + if (fSubList) + delete fSubList; + fSubList = new TList(); + fSubList->SetOwner(kTRUE); + for (int subEv = 0; subEv < 2; ++subEv) { + for (int m = 0; m < mpar; ++m) { + fSubList->Add(new BootstrapProfile(Form("mpt_sub%i_%ipar", subEv + 1, m + 1), this->GetTitle(), nbinsx, xbins)); + } + } + for (int m = 2; m <= mpar; ++m) { + for (int k = 0; k < m - 1; ++k) { + fSubList->Add(new BootstrapProfile(Form("mpt_%isub1_%isub2_%ipar", m - k - 1, k + 1, m), this->GetTitle(), nbinsx, xbins)); + } + } + + if (fSubCMList) + delete fSubCMList; + fSubCMList = new TList(); + fSubCMList->SetOwner(kTRUE); + for (int subEv = 0; subEv < 2; ++subEv) { + for (int m = 0; m < 4; ++m) { + for (int i = 0; i <= m; ++i) { + fSubCMList->Add(new BootstrapProfile(Form("cm%i_sub%i_Mpt%i", m + 1, subEv + 1, i), this->GetTitle(), nbinsx, xbins)); + } + } + } + for (int m = 2; m <= 4; ++m) { + for (int first = 1; first < m; ++first) { + for (int second = first; second < m; ++second) { + if (first > second) + continue; + int fourth = m - second; + for (int third = 1; third < m; ++third) { + if (third > fourth) + continue; + fSubCMList->Add(new BootstrapProfile(Form("cm%i_%i%isub1_%i%isub2", m, first, second, third, fourth), this->GetTitle(), nbinsx, xbins)); + } + } + } + } + + if (nsub) { + for (int i = 0; i < fSubList->GetEntries(); ++i) + dynamic_cast(fSubList->At(i))->InitializeSubsamples(nsub); + for (int i = 0; i < fSubCMList->GetEntries(); ++i) + dynamic_cast(fSubCMList->At(i))->InitializeSubsamples(nsub); + } + LOGF(info, "Container %s initialized Subevents and %i subsamples", this->GetName(), nsub); +} +void FlowPtContainer::initialiseSubevent(int nbinsx, double xlow, double xhigh, const int& m, const GFWCorrConfigs& configs, const int& nsub) +{ + if (!mpar) + mpar = m; + if (fSubList) + delete fSubList; + fSubList = new TList(); + fSubList->SetOwner(kTRUE); + for (int subEv = 0; subEv < 2; ++subEv) { + for (int m = 0; m < mpar; ++m) { + fSubList->Add(new BootstrapProfile(Form("mpt_sub%i_%ipar", subEv + 1, m + 1), this->GetTitle(), nbinsx, xlow, xhigh)); + } + } + for (int m = 2; m <= mpar; ++m) { + for (int k = 0; k < m - 1; ++k) { + fSubList->Add(new BootstrapProfile(Form("mpt_%isub1_%isub2_%ipar", m - k - 1, k + 1, m), this->GetTitle(), nbinsx, xlow, xhigh)); + } + } + + if (fSubCMList) + delete fSubCMList; + fSubCMList = new TList(); + fSubCMList->SetOwner(kTRUE); + for (int subEv = 0; subEv < 2; ++subEv) { + for (int m = 0; m < 4; ++m) { + for (int i = 0; i <= m; ++i) { + fSubCMList->Add(new BootstrapProfile(Form("cm%i_sub%i_Mpt%i", m + 1, subEv + 1, i), this->GetTitle(), nbinsx, xlow, xhigh)); + } + } + } + for (int m = 2; m <= 4; ++m) { + for (int first = 1; first < m; ++first) { + for (int second = first; second < m; ++second) { + if (first > second) + continue; + int fourth = m - second; + for (int third = 1; third < m; ++third) { + if (third > fourth) + continue; + fSubCMList->Add(new BootstrapProfile(Form("cm%i_%i%isub1_%i%isub2", m, first, second, third, fourth), this->GetTitle(), nbinsx, xlow, xhigh)); + } + } + } + } + if (nsub) { + for (int i = 0; i < fSubList->GetEntries(); ++i) + dynamic_cast(fSubList->At(i))->InitializeSubsamples(nsub); + for (int i = 0; i < fSubCMList->GetEntries(); ++i) + dynamic_cast(fSubCMList->At(i))->InitializeSubsamples(nsub); + } + LOGF(info, "Container %s initialized Subevents and %i subsamples", this->GetName(), nsub); +} void FlowPtContainer::fill(const double& w, const double& pt) { for (size_t i = 0; i < sumP.size(); ++i) { @@ -358,6 +566,20 @@ void FlowPtContainer::fill(const double& w, const double& pt) } return; } +void FlowPtContainer::fillSub1(const double& w, const double& pt) +{ + for (size_t i = 0; i < insub1.size(); ++i) { + insub1[i] += std::pow(w, i % (mpar + 1)) * std::pow(pt, i / (mpar + 1)); + } + return; +} +void FlowPtContainer::fillSub2(const double& w, const double& pt) +{ + for (size_t i = 0; i < insub2.size(); ++i) { + insub2[i] += std::pow(w, i % (mpar + 1)) * std::pow(pt, i / (mpar + 1)); + } + return; +} void FlowPtContainer::calculateCorrelations() { corrNum.clear(); @@ -385,6 +607,54 @@ void FlowPtContainer::calculateCorrelations() } return; } +void FlowPtContainer::calculateSubeventCorrelations() +{ + corrNum1.clear(); + corrNum1.resize(mpar + 1, 0); + corrNum1[0] = 1.0; + corrDen1.clear(); + corrDen1.resize(mpar + 1, 0); + corrDen1[0] = 1.0; + corrNum2.clear(); + corrNum2.resize(mpar + 1, 0); + corrNum2[0] = 1.0; + corrDen2.clear(); + corrDen2.resize(mpar + 1, 0); + corrDen2[0] = 1.0; + + double sumNum1 = 0; + double sumDenum1 = 0; + std::vector valNum1; + std::vector valDenum1; + double sumNum2 = 0; + double sumDenum2 = 0; + std::vector valNum2; + std::vector valDenum2; + + for (int m(1); m <= mpar; ++m) { + for (int k(1); k <= m; ++k) { + // correlations in subevent 1 + valNum1.push_back(SignArray[k - 1] * corrNum1[m - k] * (FactorialArray[m - 1] / FactorialArray[m - k]) * insub1[getVectorIndex(k, k)]); + valDenum1.push_back(SignArray[k - 1] * corrDen1[m - k] * (FactorialArray[m - 1] / FactorialArray[m - k]) * insub1[getVectorIndex(k, 0)]); + // correlations in subevent 2 + valNum2.push_back(SignArray[k - 1] * corrNum2[m - k] * (FactorialArray[m - 1] / FactorialArray[m - k]) * insub2[getVectorIndex(k, k)]); + valDenum2.push_back(SignArray[k - 1] * corrDen2[m - k] * (FactorialArray[m - 1] / FactorialArray[m - k]) * insub2[getVectorIndex(k, 0)]); + } + sumNum1 = orderedAddition(valNum1); + sumDenum1 = orderedAddition(valDenum1); + sumNum2 = orderedAddition(valNum2); + sumDenum2 = orderedAddition(valDenum2); + valNum1.clear(); + valDenum1.clear(); + valNum2.clear(); + valDenum2.clear(); + corrNum1[m] = sumNum1; + corrDen1[m] = sumDenum1; + corrNum2[m] = sumNum2; + corrDen2[m] = sumDenum2; + } + return; +} void FlowPtContainer::fillPtProfiles(const double& centmult, const double& rn) { for (int m = 1; m <= mpar; ++m) { @@ -394,6 +664,26 @@ void FlowPtContainer::fillPtProfiles(const double& centmult, const double& rn) } return; } +void FlowPtContainer::fillSubeventPtProfiles(const double& centmult, const double& rn) +{ + // Fill the correlations within subevents, requires that the CalculateSubeventCorrelations have been called with the correct input vectors right before + for (int m = 1; m <= mpar; ++m) { + if (corrDen1[m] != 0) + dynamic_cast(fSubList->At(m - 1))->FillProfile(centmult, corrNum1[m] / corrDen1[m], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : corrDen1[m], rn); + // subevent 2 profiles offset by mpar positions + if (corrDen2[m] != 0) + dynamic_cast(fSubList->At(mpar + m - 1))->FillProfile(centmult, corrNum2[m] / corrDen2[m], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : corrDen2[m], rn); + } + + // Fill the cross-subevent correlations + for (int m = 2; m <= mpar; ++m) { + for (int k = 0; k < m - 1; ++k) { + if (corrDen1[m - k - 1] != 0 && corrDen2[k + 1] != 0) + dynamic_cast(fSubList->FindObject(Form("mpt_%isub1_%isub2_%ipar", m - k - 1, k + 1, m)))->FillProfile(centmult, corrNum1[m - k - 1] / corrDen1[m - k - 1] * corrNum2[k + 1] / corrDen2[k + 1], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : corrDen1[m - k - 1] * corrDen2[k + 1], rn); + } + } + return; +} void FlowPtContainer::fillVnPtCorrProfiles(const double& centmult, const double& flowval, const double& flowtuples, const double& rn, uint8_t mask) { if (!mask) { @@ -584,6 +874,116 @@ void FlowPtContainer::fillCMProfiles(const double& centmult, const double& rn) dynamic_cast(fCMTermList->At(9))->FillProfile(centmult, cmVal[10], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen[4], rn); return; } +void FlowPtContainer::fillCMSubeventProfiles(const double& centmult, const double& rn) +{ + // do I need to add an extra return statement here to match fillCMProfiles? + if (mpar < 1) + return; + + int indOffset = 0; + for (int im = 1; im <= mpar; im++) { + indOffset += im; + } + // 0th order correlation + cmDen1.push_back(1.); + cmVal1.push_back(1.); + cmDen2.push_back(1.); + cmVal2.push_back(1.); + + cmDen1.push_back(insub1[getVectorIndex(1, 0)]); + cmDen1.push_back(insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] - insub1[getVectorIndex(2, 0)]); + cmDen1.push_back(insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] - 3 * insub1[getVectorIndex(2, 0)] * insub1[getVectorIndex(1, 0)] + 2 * insub1[getVectorIndex(3, 0)]); + cmDen1.push_back(insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] - 6 * insub1[getVectorIndex(2, 0)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] + 8 * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(3, 0)] + 3 * insub1[getVectorIndex(2, 0)] * insub1[getVectorIndex(2, 0)] - 6 * insub1[getVectorIndex(4, 0)]); + + cmDen2.push_back(insub2[getVectorIndex(1, 0)]); + cmDen2.push_back(insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] - insub2[getVectorIndex(2, 0)]); + cmDen2.push_back(insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] - 3 * insub2[getVectorIndex(2, 0)] * insub2[getVectorIndex(1, 0)] + 2 * insub2[getVectorIndex(3, 0)]); + cmDen2.push_back(insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] - 6 * insub2[getVectorIndex(2, 0)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] + 8 * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(3, 0)] + 3 * insub2[getVectorIndex(2, 0)] * insub2[getVectorIndex(2, 0)] - 6 * insub2[getVectorIndex(4, 0)]); + + if (cmDen1[1] != 0) { + cmVal1.push_back(insub1[getVectorIndex(1, 1)] / cmDen1[1]); + dynamic_cast(fSubCMList->At(0))->FillProfile(centmult, cmVal1[1], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[1], rn); + } + if (cmDen2[1] != 0) { + cmVal2.push_back(insub2[getVectorIndex(1, 1)] / cmDen2[1]); + dynamic_cast(fSubCMList->At(indOffset + 0))->FillProfile(centmult, cmVal2[1], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[1], rn); + } + + if (mpar < 2) + return; + if (insub1[getVectorIndex(2, 0)] != 0 && cmDen1[2] != 0) { + cmVal1.push_back(1 / cmDen1[2] * (insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] - insub1[getVectorIndex(2, 2)])); + dynamic_cast(fSubCMList->At(1))->FillProfile(centmult, cmVal1[2], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[2], rn); + cmVal1.push_back(1 / cmDen1[2] * (insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 1)] - insub1[getVectorIndex(2, 1)])); + dynamic_cast(fSubCMList->At(2))->FillProfile(centmult, cmVal1[3], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[2], rn); + } + if (insub2[getVectorIndex(2, 0)] != 0 && cmDen2[2] != 0) { + cmVal2.push_back(1 / cmDen2[2] * (insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] - insub2[getVectorIndex(2, 2)])); + dynamic_cast(fSubCMList->At(indOffset + 1))->FillProfile(centmult, cmVal2[2], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[2], rn); + cmVal2.push_back(1 / cmDen2[2] * (insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 1)] - insub2[getVectorIndex(2, 1)])); + dynamic_cast(fSubCMList->At(indOffset + 2))->FillProfile(centmult, cmVal2[3], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[2], rn); + } + + if (mpar < 3) + return; + if (insub1[getVectorIndex(3, 0)] != 0 && cmDen1[3] != 0) { + cmVal1.push_back(1 / cmDen1[3] * (insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] - 3 * insub1[getVectorIndex(2, 2)] * insub1[getVectorIndex(1, 1)] + 2 * insub1[getVectorIndex(3, 3)])); + dynamic_cast(fSubCMList->At(3))->FillProfile(centmult, cmVal1[4], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[3], rn); + cmVal1.push_back(1 / cmDen1[3] * (insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 0)] - 2 * insub1[getVectorIndex(2, 1)] * insub1[getVectorIndex(1, 1)] + 2 * insub1[getVectorIndex(3, 2)] - insub1[getVectorIndex(2, 2)] * insub1[getVectorIndex(1, 0)])); + dynamic_cast(fSubCMList->At(4))->FillProfile(centmult, cmVal1[5], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[3], rn); + cmVal1.push_back(1 / cmDen1[3] * (insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] - 2 * insub1[getVectorIndex(2, 1)] * insub1[getVectorIndex(1, 0)] + 2 * insub1[getVectorIndex(3, 1)] - insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(2, 0)])); + dynamic_cast(fSubCMList->At(5))->FillProfile(centmult, cmVal1[6], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[3], rn); + } + if (insub2[getVectorIndex(3, 0)] != 0 && cmDen2[3] != 0) { + cmVal2.push_back(1 / cmDen2[3] * (insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] - 3 * insub2[getVectorIndex(2, 2)] * insub2[getVectorIndex(1, 1)] + 2 * insub2[getVectorIndex(3, 3)])); + dynamic_cast(fSubCMList->At(indOffset + 3))->FillProfile(centmult, cmVal2[4], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[3], rn); + cmVal2.push_back(1 / cmDen2[3] * (insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 0)] - 2 * insub2[getVectorIndex(2, 1)] * insub2[getVectorIndex(1, 1)] + 2 * insub2[getVectorIndex(3, 2)] - insub2[getVectorIndex(2, 2)] * insub2[getVectorIndex(1, 0)])); + dynamic_cast(fSubCMList->At(indOffset + 4))->FillProfile(centmult, cmVal2[5], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[3], rn); + cmVal2.push_back(1 / cmDen2[3] * (insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] - 2 * insub2[getVectorIndex(2, 1)] * insub2[getVectorIndex(1, 0)] + 2 * insub2[getVectorIndex(3, 1)] - insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(2, 0)])); + dynamic_cast(fSubCMList->At(indOffset + 5))->FillProfile(centmult, cmVal2[6], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[3], rn); + } + + if (mpar < 4) + return; + if (insub1[getVectorIndex(4, 0)] != 0 && cmDen1[4] != 0) { + cmVal1.push_back(1 / cmDen1[4] * (insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] - 6 * insub1[getVectorIndex(2, 2)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] + 3 * insub1[getVectorIndex(2, 2)] * insub1[getVectorIndex(2, 2)] + 8 * insub1[getVectorIndex(3, 3)] * insub1[getVectorIndex(1, 1)] - 6 * insub1[getVectorIndex(4, 4)])); + dynamic_cast(fSubCMList->At(6))->FillProfile(centmult, cmVal1[7], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[4], rn); + cmVal1.push_back(1 / cmDen1[4] * (insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 0)] - 3 * insub1[getVectorIndex(2, 2)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 0)] - 3 * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(2, 1)] + 3 * insub1[getVectorIndex(2, 2)] * insub1[getVectorIndex(2, 1)] + 6 * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(3, 2)] - 6 * insub1[getVectorIndex(4, 3)])); + dynamic_cast(fSubCMList->At(7))->FillProfile(centmult, cmVal1[8], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[4], rn); + cmVal1.push_back(1 / cmDen1[4] * (insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] - insub1[getVectorIndex(2, 2)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] - insub1[getVectorIndex(2, 0)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 1)] + insub1[getVectorIndex(2, 0)] * insub1[getVectorIndex(2, 2)] - 4 * insub1[getVectorIndex(2, 1)] * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 0)] + 4 * insub1[getVectorIndex(3, 2)] * insub1[getVectorIndex(1, 0)] + 4 * insub1[getVectorIndex(3, 1)] * insub1[getVectorIndex(1, 1)] + 2 * insub1[getVectorIndex(2, 1)] * insub1[getVectorIndex(2, 1)] - 6 * insub1[getVectorIndex(4, 2)])); + dynamic_cast(fSubCMList->At(8))->FillProfile(centmult, cmVal1[9], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[4], rn); + cmVal1.push_back(1 / cmDen1[4] * (insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] - 3 * insub1[getVectorIndex(2, 1)] * insub1[getVectorIndex(1, 0)] * insub1[getVectorIndex(1, 0)] - 3 * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(2, 0)] * insub1[getVectorIndex(1, 0)] + 3 * insub1[getVectorIndex(2, 1)] * insub1[getVectorIndex(2, 0)] + 2 * insub1[getVectorIndex(1, 1)] * insub1[getVectorIndex(3, 0)] + 6 * insub1[getVectorIndex(3, 1)] * insub1[getVectorIndex(1, 0)] - 6 * insub1[getVectorIndex(4, 1)])); + dynamic_cast(fSubCMList->At(9))->FillProfile(centmult, cmVal1[10], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[4], rn); + } + if (insub2[getVectorIndex(4, 0)] != 0 && cmDen2[4] != 0) { + cmVal2.push_back(1 / cmDen2[4] * (insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] - 6 * insub2[getVectorIndex(2, 2)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] + 3 * insub2[getVectorIndex(2, 2)] * insub2[getVectorIndex(2, 2)] + 8 * insub2[getVectorIndex(3, 3)] * insub2[getVectorIndex(1, 1)] - 6 * insub2[getVectorIndex(4, 4)])); + dynamic_cast(fSubCMList->At(indOffset + 6))->FillProfile(centmult, cmVal2[7], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[4], rn); + cmVal2.push_back(1 / cmDen2[4] * (insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 0)] - 3 * insub2[getVectorIndex(2, 2)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 0)] - 3 * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(2, 1)] + 3 * insub2[getVectorIndex(2, 2)] * insub2[getVectorIndex(2, 1)] + 6 * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(3, 2)] - 6 * insub2[getVectorIndex(4, 3)])); + dynamic_cast(fSubCMList->At(indOffset + 7))->FillProfile(centmult, cmVal2[8], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[4], rn); + cmVal2.push_back(1 / cmDen2[4] * (insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] - insub2[getVectorIndex(2, 2)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] - insub2[getVectorIndex(2, 0)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 1)] + insub2[getVectorIndex(2, 0)] * insub2[getVectorIndex(2, 2)] - 4 * insub2[getVectorIndex(2, 1)] * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 0)] + 4 * insub2[getVectorIndex(3, 2)] * insub2[getVectorIndex(1, 0)] + 4 * insub2[getVectorIndex(3, 1)] * insub2[getVectorIndex(1, 1)] + 2 * insub2[getVectorIndex(2, 1)] * insub2[getVectorIndex(2, 1)] - 6 * insub2[getVectorIndex(4, 2)])); + dynamic_cast(fSubCMList->At(indOffset + 8))->FillProfile(centmult, cmVal2[9], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[4], rn); + cmVal2.push_back(1 / cmDen2[4] * (insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] - 3 * insub2[getVectorIndex(2, 1)] * insub2[getVectorIndex(1, 0)] * insub2[getVectorIndex(1, 0)] - 3 * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(2, 0)] * insub2[getVectorIndex(1, 0)] + 3 * insub2[getVectorIndex(2, 1)] * insub2[getVectorIndex(2, 0)] + 2 * insub2[getVectorIndex(1, 1)] * insub2[getVectorIndex(3, 0)] + 6 * insub2[getVectorIndex(3, 1)] * insub2[getVectorIndex(1, 0)] - 6 * insub2[getVectorIndex(4, 1)])); + dynamic_cast(fSubCMList->At(indOffset + 9))->FillProfile(centmult, cmVal2[10], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen2[4], rn); + } + + // Fill cross terms + for (int m = 2; m <= 4; ++m) { + for (int first = 1; first < m; ++first) { + for (int second = first; second < m; ++second) { + if (first > second) + continue; + int fourth = m - second; + for (int third = 1; third < m; ++third) { + if (third > fourth) + continue; + if (insub1[getVectorIndex(m, 0)] != 0 && insub2[getVectorIndex(m, 0)] != 0 && cmDen1[m] * cmDen2[m] != 0) + ((BootstrapProfile*)fSubCMList->FindObject(Form("cm%i_%i%isub1_%i%isub2", m, first, second, third, fourth)))->FillProfile(centmult, cmVal1[second * (second - 1) / 2 + second - first + 1] * cmVal2[fourth * (fourth - 1) / 2 + fourth - third + 1], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[m] * cmDen2[m], rn); + } + } + } + } + return; +} void FlowPtContainer::fillArray(FillType a, FillType b, double c, double d) { for (int idx = 0; idx < 225; ++idx) { @@ -1237,6 +1637,14 @@ void FlowPtContainer::rebinMulti(int nbins) for (int i = 0; i < fCovList->GetEntries(); i++) dynamic_cast(fCovList->At(i))->RebinMulti(nbins); } + if (fSubList) { + for (int i = 0; i < fSubList->GetEntries(); i++) + dynamic_cast(fSubList->At(i))->RebinMulti(nbins); + } + if (fSubCMList) { + for (int i = 0; i < fSubCMList->GetEntries(); i++) + dynamic_cast(fSubCMList->At(i))->RebinMulti(nbins); + } return; } void FlowPtContainer::rebinMulti(int nbins, double* binedges) @@ -1253,6 +1661,14 @@ void FlowPtContainer::rebinMulti(int nbins, double* binedges) for (int i = 0; i < fCovList->GetEntries(); i++) dynamic_cast(fCovList->At(i))->RebinMulti(nbins, binedges); } + if (fSubList) { + for (int i = 0; i < fSubList->GetEntries(); i++) + dynamic_cast(fSubList->At(i))->RebinMulti(nbins, binedges); + } + if (fSubCMList) { + for (int i = 0; i < fSubCMList->GetEntries(); i++) + dynamic_cast(fSubCMList->At(i))->RebinMulti(nbins, binedges); + } return; } TH1* FlowPtContainer::getCorrHist(int ind, int m) @@ -1359,6 +1775,8 @@ Long64_t FlowPtContainer::Merge(TCollection* collist) TList* tCMTerm = lPTC->fCMTermList; TList* tCorr = lPTC->fCorrList; TList* tCov = lPTC->fCovList; + TList* tSub = lPTC->fSubList; + TList* tSubCM = lPTC->fSubCMList; TList* tCum = lPTC->fCumulantList; TList* tCM = lPTC->fCentralMomentList; if (tCMTerm) { @@ -1392,6 +1810,18 @@ Long64_t FlowPtContainer::Merge(TCollection* collist) else mergeBSLists(fCentralMomentList, tCM); } + if (tSub) { + if (!fSubList) + fSubList = dynamic_cast(tSub->Clone()); + else + mergeBSLists(fSubList, tSub); + } + if (tSubCM) { + if (!fSubCMList) + fSubCMList = dynamic_cast(tSubCM->Clone()); + else + mergeBSLists(fSubCMList, tSubCM); + } } return nmerged; } diff --git a/PWGCF/GenericFramework/Core/FlowPtContainer.h b/PWGCF/GenericFramework/Core/FlowPtContainer.h index 977fd719063..a0b5404c0d6 100644 --- a/PWGCF/GenericFramework/Core/FlowPtContainer.h +++ b/PWGCF/GenericFramework/Core/FlowPtContainer.h @@ -50,13 +50,21 @@ class FlowPtContainer : public TNamed void initialise(const o2::framework::AxisSpec axis, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); void initialise(int nbinsx, double* xbins, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); void initialise(int nbinsx, double xlow, double xhigh, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); + // initial pt-pt correlations with two subevents + void initialiseSubevent(const o2::framework::AxisSpec axis, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); + void initialiseSubevent(int nbinsx, double* xbins, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); + void initialiseSubevent(int nbinsx, double xlow, double xhigh, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); void fill(const double& w, const double& pt); + void fillSub1(const double& w, const double& pt); + void fillSub2(const double& w, const double& pt); void fillArray(FillType a, FillType b, double c, double d); int getVectorIndex(const int i, const int j) { return j * (mpar + 1) + i; } // index for 2d array for storing pt correlations int getVectorIndex(const int i, const int j, const int k, const int l) { return i + j * 3 + k * 3 * 3 + l * 3 * 3 * 5; } // index for 4d array for std vnpt correlation - size 3x3x3x3 void calculateCorrelations(); + void calculateSubeventCorrelations(); void calculateCMTerms(); void fillPtProfiles(const double& lMult, const double& rn); + void fillSubeventPtProfiles(const double& lMult, const double& rn); void fillVnPtCorrProfiles(const double& lMult, const double& flowval, const double& flowtuples, const double& rn, uint8_t mask); void fillVnDeltaPtProfiles(const double& centmult, const double& flowval, const double& flowtuples, const double& rn, uint8_t mask); void fillVnPtCorrProfiles(const int configIndex, const double& lMult, const double& flowval, const double& flowtuples, const double& rn, uint8_t mask); @@ -101,6 +109,7 @@ class FlowPtContainer : public TNamed fillVnPtCorrStdProfiles(centmult, rn); } void fillCMProfiles(const double& lMult, const double& rn); + void fillCMSubeventProfiles(const double& lMult, const double& rn); TList* getCorrList() { return fCorrList; } TList* getCMTermList() { return fCMTermList; } TList* getCovList() { return fCovList; } @@ -125,8 +134,16 @@ class FlowPtContainer : public TNamed { sumP.clear(); sumP.resize((mpar + 1) * (mpar + 1)); + insub1.clear(); + insub1.resize((mpar + 1) * (mpar + 1)); + insub2.clear(); + insub2.resize((mpar + 1) * (mpar + 1)); cmVal.clear(); + cmVal1.clear(); + cmVal2.clear(); cmDen.clear(); + cmDen1.clear(); + cmDen2.clear(); fillCounter = 0; arr.clear(); arr.resize(3 * 3 * 5 * 5, {0.0, 0.0}); @@ -137,6 +154,8 @@ class FlowPtContainer : public TNamed TList* fCMTermList; TList* fCorrList; TList* fCovList; + TList* fSubList; + TList* fSubCMList; TList* fCumulantList; TList* fCentralMomentList; @@ -148,10 +167,20 @@ class FlowPtContainer : public TNamed void mergeBSLists(TList* source, TList* target); TH1* raiseHistToPower(TH1* inh, double p); std::vector sumP; //! + std::vector insub1; //! + std::vector insub2; //! std::vector corrNum; //! + std::vector corrNum1; //! + std::vector corrNum2; //! std::vector corrDen; //! + std::vector corrDen1; //! + std::vector corrDen2; //! std::vector cmVal; //! + std::vector cmVal1; //! + std::vector cmVal2; //! std::vector cmDen; //! + std::vector cmDen1; //! + std::vector cmDen2; //! std::vector> arr; //! std::vector warr; //! std::vector fCovFirstIndex; //! From fd3f4b5e425263d0d1b6fb0cf327468a4d312bc6 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Tue, 11 Nov 2025 16:32:28 +0100 Subject: [PATCH 2/4] megalinter format --- PWGCF/GenericFramework/Core/FlowPtContainer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/GenericFramework/Core/FlowPtContainer.cxx b/PWGCF/GenericFramework/Core/FlowPtContainer.cxx index 99d2034dc0c..cfb522205be 100644 --- a/PWGCF/GenericFramework/Core/FlowPtContainer.cxx +++ b/PWGCF/GenericFramework/Core/FlowPtContainer.cxx @@ -977,7 +977,7 @@ void FlowPtContainer::fillCMSubeventProfiles(const double& centmult, const doubl if (third > fourth) continue; if (insub1[getVectorIndex(m, 0)] != 0 && insub2[getVectorIndex(m, 0)] != 0 && cmDen1[m] * cmDen2[m] != 0) - ((BootstrapProfile*)fSubCMList->FindObject(Form("cm%i_%i%isub1_%i%isub2", m, first, second, third, fourth)))->FillProfile(centmult, cmVal1[second * (second - 1) / 2 + second - first + 1] * cmVal2[fourth * (fourth - 1) / 2 + fourth - third + 1], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[m] * cmDen2[m], rn); + dynamic_cast(fSubCMList->FindObject(Form("cm%i_%i%isub1_%i%isub2", m, first, second, third, fourth)))->FillProfile(centmult, cmVal1[second * (second - 1) / 2 + second - first + 1] * cmVal2[fourth * (fourth - 1) / 2 + fourth - third + 1], (fEventWeight == EventWeight::UnityWeight) ? 1.0 : cmDen1[m] * cmDen2[m], rn); } } } From bf64982432f124ca8b7d05fb5999ee092bf4cc78 Mon Sep 17 00:00:00 2001 From: Luzhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Wed, 12 Nov 2025 07:03:27 +0800 Subject: [PATCH 3/4] remove unused parameters --- PWGCF/GenericFramework/Core/FlowPtContainer.cxx | 6 +++--- PWGCF/GenericFramework/Core/FlowPtContainer.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGCF/GenericFramework/Core/FlowPtContainer.cxx b/PWGCF/GenericFramework/Core/FlowPtContainer.cxx index cfb522205be..ad5f5880d53 100644 --- a/PWGCF/GenericFramework/Core/FlowPtContainer.cxx +++ b/PWGCF/GenericFramework/Core/FlowPtContainer.cxx @@ -391,7 +391,7 @@ void FlowPtContainer::initialise(int nbinsx, double xlow, double xhigh, const in } LOGF(info, "Container %s initialized with m = %i\n", this->GetName(), mpar); }; -void FlowPtContainer::initialiseSubevent(const o2::framework::AxisSpec axis, const int& m, const GFWCorrConfigs& configs, const int& nsub) +void FlowPtContainer::initialiseSubevent(const o2::framework::AxisSpec axis, const int& m, const int& nsub) { if (!mpar) mpar = m; @@ -453,7 +453,7 @@ void FlowPtContainer::initialiseSubevent(const o2::framework::AxisSpec axis, con } LOGF(info, "Container %s initialized Subevents and %i subsamples", this->GetName(), nsub); } -void FlowPtContainer::initialiseSubevent(int nbinsx, double* xbins, const int& m, const GFWCorrConfigs& configs, const int& nsub) +void FlowPtContainer::initialiseSubevent(int nbinsx, double* xbins, const int& m, const int& nsub) { if (!mpar) mpar = m; @@ -507,7 +507,7 @@ void FlowPtContainer::initialiseSubevent(int nbinsx, double* xbins, const int& m } LOGF(info, "Container %s initialized Subevents and %i subsamples", this->GetName(), nsub); } -void FlowPtContainer::initialiseSubevent(int nbinsx, double xlow, double xhigh, const int& m, const GFWCorrConfigs& configs, const int& nsub) +void FlowPtContainer::initialiseSubevent(int nbinsx, double xlow, double xhigh, const int& m, const int& nsub) { if (!mpar) mpar = m; diff --git a/PWGCF/GenericFramework/Core/FlowPtContainer.h b/PWGCF/GenericFramework/Core/FlowPtContainer.h index a0b5404c0d6..86bd676d7d8 100644 --- a/PWGCF/GenericFramework/Core/FlowPtContainer.h +++ b/PWGCF/GenericFramework/Core/FlowPtContainer.h @@ -51,9 +51,9 @@ class FlowPtContainer : public TNamed void initialise(int nbinsx, double* xbins, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); void initialise(int nbinsx, double xlow, double xhigh, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); // initial pt-pt correlations with two subevents - void initialiseSubevent(const o2::framework::AxisSpec axis, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); - void initialiseSubevent(int nbinsx, double* xbins, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); - void initialiseSubevent(int nbinsx, double xlow, double xhigh, const int& m, const GFWCorrConfigs& configs, const int& nsub = 10); + void initialiseSubevent(const o2::framework::AxisSpec axis, const int& m, const int& nsub = 10); + void initialiseSubevent(int nbinsx, double* xbins, const int& m, const int& nsub = 10); + void initialiseSubevent(int nbinsx, double xlow, double xhigh, const int& m, const int& nsub = 10); void fill(const double& w, const double& pt); void fillSub1(const double& w, const double& pt); void fillSub2(const double& w, const double& pt); From f0869f73b794b8b8a6b69f7bb62edf9082a1a1b5 Mon Sep 17 00:00:00 2001 From: Luzhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Wed, 12 Nov 2025 07:07:28 +0800 Subject: [PATCH 4/4] modify task because of function para changed --- PWGCF/Flow/Tasks/flowTask.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index dcd467eeaec..f4346ed5206 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -511,7 +511,7 @@ struct FlowTask { fFCpt->setUseGapMethod(true); fFCpt->initialise(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap); if (cfgEtaGapPtPtEnabled) - fFCpt->initialiseSubevent(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap); + fFCpt->initialiseSubevent(axisIndependent, cfgMpar, cfgNbootstrap); for (auto i = 0; i < gfwConfigs.GetSize(); ++i) { corrconfigsPtVn.push_back(fGFW->GetCorrelatorConfig(gfwConfigs.GetCorrs()[i], gfwConfigs.GetHeads()[i], gfwConfigs.GetpTDifs()[i])); }