From bf7c910f9eb19b38234ab7abe55677068c8d9ba8 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Mon, 23 Feb 2026 21:49:18 +0100 Subject: [PATCH 1/7] [Common] add deconvolution of b, nancestor --- .../Multiplicity/multGlauberNBDFitter.cxx | 36 +++++++++++++++---- .../Tools/Multiplicity/multGlauberNBDFitter.h | 3 +- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index c7a669f816b..fbc014c8bb8 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -384,7 +384,7 @@ Double_t multGlauberNBDFitter::ContinuousNBD(Double_t n, Double_t mu, Double_t k return F; } -void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot) +void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot, TH3D* lNpNcB, TH2F* lB2DPlot, TH2F *lNancestor2DPlot) { cout << "Calculating , in centrality bins..." << endl; cout << "Range to calculate: " << lLoRange << " to " << lHiRange << endl; @@ -421,8 +421,15 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol Double_t lNAncestors1 = TMath::Floor(fNpart[ibin] * ff + fNcoll[ibin] * (1.0 - ff) + 0.5); Double_t lNAncestors2 = (fNpart[ibin] * ff + fNcoll[ibin] * (1.0 - ff)); - TH1D* hEccentricity = 0x0; + // define ancestors officially + Double_t lNancestors = lNAncestors0; + if (fAncestorMode == 1) + lNancestors = lNAncestors1; + if (fAncestorMode == 2) + lNancestors = lNAncestors2; + // eccentricity handling + TH1D* hEccentricity = 0x0; if (lNpNcEcc) { // locate the histogram that corresponds to the eccentricity distribution in this NpNc pair lNpNcEcc->GetXaxis()->SetRange(lNpNcEcc->GetXaxis()->FindBin(fNpart[ibin]), lNpNcEcc->GetXaxis()->FindBin(fNpart[ibin])); @@ -431,12 +438,17 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol hEccentricity->SetName(Form("hEccentricity_%i", ibin)); } + // impact parameter handling + TH1D* hImpactParameter = 0x0; + if (lNpNcB) { + // locate the histogram that corresponds to the eccentricity distribution in this NpNc pair + lNpNcB->GetXaxis()->SetRange(lNpNcB->GetXaxis()->FindBin(fNpart[ibin]), lNpNcB->GetXaxis()->FindBin(fNpart[ibin])); + lNpNcB->GetYaxis()->SetRange(lNpNcB->GetYaxis()->FindBin(fNcoll[ibin]), lNpNcB->GetYaxis()->FindBin(fNcoll[ibin])); + hImpactParameter = reinterpret_cast(lNpNcB->Project3D("z")); + hImpactParameter->SetName(Form("hImpactParameter_%i", ibin)); + } + for (Long_t lMultValue = 1; lMultValue < lHiRange; lMultValue++) { - Double_t lNancestors = lNAncestors0; - if (fAncestorMode == 1) - lNancestors = lNAncestors1; - if (fAncestorMode == 2) - lNancestors = lNAncestors2; Double_t lNancestorCount = fContent[ibin]; Double_t lThisMu = (((Double_t)lNancestors)) * fMu; Double_t lThisk = (((Double_t)lNancestors)) * fk; @@ -452,6 +464,10 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lMultValueToFill = hPercentileMap->GetBinContent(hPercentileMap->FindBin(lMultValue)); lNPartProf->Fill(lMultValueToFill, fNpart[ibin], lProbability); lNCollProf->Fill(lMultValueToFill, fNcoll[ibin], lProbability); + if(lNancestor2DPlot){ + // fill cross-check histogram with lNancestorCount at lNancestors value + lNancestor2DPlot->Fill(lMultValueToFill, lNancestors, lProbability * lNancestorCount); + } if (lNPart2DPlot) lNPart2DPlot->Fill(lMultValueToFill, fNpart[ibin], lProbability); if (lNColl2DPlot) @@ -462,6 +478,12 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lEcc2DPlot->Fill(lMultValueToFill, hEccentricity->GetBinCenter(ib), lProbability * hEccentricity->GetBinContent(ib)); } } + if (lNpNcB) { + // collapse the entire eccentricity distribution for this combo + for (int ib = 1; ib < hImpactParameter->GetNbinsX() + 1; ib++) { + lB2DPlot->Fill(lMultValueToFill, hImpactParameter->GetBinCenter(ib), lProbability * hImpactParameter->GetBinContent(ib)); + } + } } } } diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.h b/Common/Tools/Multiplicity/multGlauberNBDFitter.h index 889398fad1a..3e023184345 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.h +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.h @@ -78,7 +78,8 @@ class multGlauberNBDFitter : public TNamed Double_t ContinuousNBD(Double_t n, Double_t mu, Double_t k); // For estimating Npart, Ncoll in multiplicity bins - void CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange = -1, Double_t lHiRange = -1, TH3D* lNpNcEcc = 0x0, TH2F* lEcc2DPlot = 0x0); + // also viable: eccentricity, impact parameter, ancestor cross-check plot + void CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange = -1, Double_t lHiRange = -1, TH3D* lNpNcEcc = 0x0, TH2F* lEcc2DPlot = 0x0, TH3D* lNpNcB = 0x0, TH2F* lB2DPlot = 0x0, TH2F *lNancestor2DPlot = 0x0); // void Print(Option_t *option="") const; From 8cd8f719a232984a973da8dbe001d8f172635f9c Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Mon, 23 Feb 2026 21:54:39 +0100 Subject: [PATCH 2/7] Please consider the following formatting changes (#502) --- Common/Tools/Multiplicity/multGlauberNBDFitter.cxx | 6 +++--- Common/Tools/Multiplicity/multGlauberNBDFitter.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index fbc014c8bb8..82dbcffa798 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -384,7 +384,7 @@ Double_t multGlauberNBDFitter::ContinuousNBD(Double_t n, Double_t mu, Double_t k return F; } -void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot, TH3D* lNpNcB, TH2F* lB2DPlot, TH2F *lNancestor2DPlot) +void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot, TH3D* lNpNcB, TH2F* lB2DPlot, TH2F* lNancestor2DPlot) { cout << "Calculating , in centrality bins..." << endl; cout << "Range to calculate: " << lLoRange << " to " << lHiRange << endl; @@ -438,7 +438,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol hEccentricity->SetName(Form("hEccentricity_%i", ibin)); } - // impact parameter handling + // impact parameter handling TH1D* hImpactParameter = 0x0; if (lNpNcB) { // locate the histogram that corresponds to the eccentricity distribution in this NpNc pair @@ -464,7 +464,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lMultValueToFill = hPercentileMap->GetBinContent(hPercentileMap->FindBin(lMultValue)); lNPartProf->Fill(lMultValueToFill, fNpart[ibin], lProbability); lNCollProf->Fill(lMultValueToFill, fNcoll[ibin], lProbability); - if(lNancestor2DPlot){ + if (lNancestor2DPlot) { // fill cross-check histogram with lNancestorCount at lNancestors value lNancestor2DPlot->Fill(lMultValueToFill, lNancestors, lProbability * lNancestorCount); } diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.h b/Common/Tools/Multiplicity/multGlauberNBDFitter.h index 3e023184345..89707550171 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.h +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.h @@ -79,7 +79,7 @@ class multGlauberNBDFitter : public TNamed // For estimating Npart, Ncoll in multiplicity bins // also viable: eccentricity, impact parameter, ancestor cross-check plot - void CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange = -1, Double_t lHiRange = -1, TH3D* lNpNcEcc = 0x0, TH2F* lEcc2DPlot = 0x0, TH3D* lNpNcB = 0x0, TH2F* lB2DPlot = 0x0, TH2F *lNancestor2DPlot = 0x0); + void CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange = -1, Double_t lHiRange = -1, TH3D* lNpNcEcc = 0x0, TH2F* lEcc2DPlot = 0x0, TH3D* lNpNcB = 0x0, TH2F* lB2DPlot = 0x0, TH2F* lNancestor2DPlot = 0x0); // void Print(Option_t *option="") const; From ef258fa1dc55e96389c91e5b453f5042c4c065d6 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Wed, 25 Feb 2026 10:49:42 +0100 Subject: [PATCH 3/7] Add lowest probability cutoff for faster processing --- Common/Tools/Multiplicity/multGlauberNBDFitter.cxx | 11 ++++++++--- Common/Tools/Multiplicity/multGlauberNBDFitter.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index 82dbcffa798..6850fac2cb5 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -384,7 +384,7 @@ Double_t multGlauberNBDFitter::ContinuousNBD(Double_t n, Double_t mu, Double_t k return F; } -void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot, TH3D* lNpNcB, TH2F* lB2DPlot, TH2F* lNancestor2DPlot) +void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot, TH3D* lNpNcB, TH2F* lB2DPlot, TH2F *lNancestor2DPlot, Double_t fProbabilityCutoff) { cout << "Calculating , in centrality bins..." << endl; cout << "Range to calculate: " << lLoRange << " to " << lHiRange << endl; @@ -415,7 +415,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol } // bypass to zero for (int ibin = 0; ibin < fNNpNcPairs; ibin++) { - if (ibin % 2000 == 0) + if (ibin % 200 == 0) cout << "At NpNc pair #" << ibin << " of " << fNNpNcPairs << "..." << endl; Double_t lNAncestors0 = (Int_t)(fNpart[ibin] * ff + fNcoll[ibin] * (1.0 - ff)); Double_t lNAncestors1 = TMath::Floor(fNpart[ibin] * ff + fNcoll[ibin] * (1.0 - ff) + 0.5); @@ -459,6 +459,11 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol if (lMultValue > 1e-6) lMult = fAncestorMode != 2 ? fNBD->Eval(lMultValue) : ContinuousNBD(lMultValue, lThisMu, lThisk); Double_t lProbability = lNancestorCount * lMult; + + if(lProbability < fProbabilityCutoff){ + continue; // skip if probability of contributing too small + } + Double_t lMultValueToFill = lMultValue; if (hPercentileMap) lMultValueToFill = hPercentileMap->GetBinContent(hPercentileMap->FindBin(lMultValue)); @@ -479,7 +484,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol } } if (lNpNcB) { - // collapse the entire eccentricity distribution for this combo + // collapse the entire impact parameter distribution for this combo for (int ib = 1; ib < hImpactParameter->GetNbinsX() + 1; ib++) { lB2DPlot->Fill(lMultValueToFill, hImpactParameter->GetBinCenter(ib), lProbability * hImpactParameter->GetBinContent(ib)); } diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.h b/Common/Tools/Multiplicity/multGlauberNBDFitter.h index 89707550171..f7995c57de3 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.h +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.h @@ -79,7 +79,7 @@ class multGlauberNBDFitter : public TNamed // For estimating Npart, Ncoll in multiplicity bins // also viable: eccentricity, impact parameter, ancestor cross-check plot - void CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange = -1, Double_t lHiRange = -1, TH3D* lNpNcEcc = 0x0, TH2F* lEcc2DPlot = 0x0, TH3D* lNpNcB = 0x0, TH2F* lB2DPlot = 0x0, TH2F* lNancestor2DPlot = 0x0); + void CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange = -1, Double_t lHiRange = -1, TH3D* lNpNcEcc = 0x0, TH2F* lEcc2DPlot = 0x0, TH3D* lNpNcB = 0x0, TH2F* lB2DPlot = 0x0, TH2F *lNancestor2DPlot = 0x0, Double_t fProbabilityCutoff = -1); // void Print(Option_t *option="") const; From 9af03501fa5c382ac0b183f5c6e1a5dc73fd20c4 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Wed, 25 Feb 2026 13:11:04 +0100 Subject: [PATCH 4/7] Fix bug in weights in 1d functions --- Common/Tools/Multiplicity/multGlauberNBDFitter.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index 6850fac2cb5..38ebff161c0 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -480,13 +480,13 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol if (lNpNcEcc) { // collapse the entire eccentricity distribution for this combo for (int ib = 1; ib < hEccentricity->GetNbinsX() + 1; ib++) { - lEcc2DPlot->Fill(lMultValueToFill, hEccentricity->GetBinCenter(ib), lProbability * hEccentricity->GetBinContent(ib)); + lEcc2DPlot->Fill(lMultValueToFill, hEccentricity->GetBinCenter(ib), lProbability * lNancestorCount * hEccentricity->GetBinContent(ib)); } } if (lNpNcB) { // collapse the entire impact parameter distribution for this combo for (int ib = 1; ib < hImpactParameter->GetNbinsX() + 1; ib++) { - lB2DPlot->Fill(lMultValueToFill, hImpactParameter->GetBinCenter(ib), lProbability * hImpactParameter->GetBinContent(ib)); + lB2DPlot->Fill(lMultValueToFill, hImpactParameter->GetBinCenter(ib), lProbability * lNancestorCount * hImpactParameter->GetBinContent(ib)); } } } From faa6febe2a4f2e1ca6e04c991577be258ee1c525 Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Wed, 25 Feb 2026 13:12:46 +0100 Subject: [PATCH 5/7] Please consider the following formatting changes (#503) --- Common/Tools/Multiplicity/multGlauberNBDFitter.cxx | 4 ++-- Common/Tools/Multiplicity/multGlauberNBDFitter.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index 38ebff161c0..dbd97a35537 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -384,7 +384,7 @@ Double_t multGlauberNBDFitter::ContinuousNBD(Double_t n, Double_t mu, Double_t k return F; } -void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot, TH3D* lNpNcB, TH2F* lB2DPlot, TH2F *lNancestor2DPlot, Double_t fProbabilityCutoff) +void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot, TH3D* lNpNcB, TH2F* lB2DPlot, TH2F* lNancestor2DPlot, Double_t fProbabilityCutoff) { cout << "Calculating , in centrality bins..." << endl; cout << "Range to calculate: " << lLoRange << " to " << lHiRange << endl; @@ -460,7 +460,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lMult = fAncestorMode != 2 ? fNBD->Eval(lMultValue) : ContinuousNBD(lMultValue, lThisMu, lThisk); Double_t lProbability = lNancestorCount * lMult; - if(lProbability < fProbabilityCutoff){ + if (lProbability < fProbabilityCutoff) { continue; // skip if probability of contributing too small } diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.h b/Common/Tools/Multiplicity/multGlauberNBDFitter.h index f7995c57de3..598ef312ce9 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.h +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.h @@ -79,7 +79,7 @@ class multGlauberNBDFitter : public TNamed // For estimating Npart, Ncoll in multiplicity bins // also viable: eccentricity, impact parameter, ancestor cross-check plot - void CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange = -1, Double_t lHiRange = -1, TH3D* lNpNcEcc = 0x0, TH2F* lEcc2DPlot = 0x0, TH3D* lNpNcB = 0x0, TH2F* lB2DPlot = 0x0, TH2F *lNancestor2DPlot = 0x0, Double_t fProbabilityCutoff = -1); + void CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange = -1, Double_t lHiRange = -1, TH3D* lNpNcEcc = 0x0, TH2F* lEcc2DPlot = 0x0, TH3D* lNpNcB = 0x0, TH2F* lB2DPlot = 0x0, TH2F* lNancestor2DPlot = 0x0, Double_t fProbabilityCutoff = -1); // void Print(Option_t *option="") const; From bcdac1a49d321e94b3ef7a7379d0d74989b9bea9 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Wed, 25 Feb 2026 16:09:57 +0100 Subject: [PATCH 6/7] Last fix --- .../Multiplicity/multGlauberNBDFitter.cxx | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index dbd97a35537..a706a915ecc 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -436,6 +436,14 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lNpNcEcc->GetYaxis()->SetRange(lNpNcEcc->GetYaxis()->FindBin(fNcoll[ibin]), lNpNcEcc->GetYaxis()->FindBin(fNcoll[ibin])); hEccentricity = reinterpret_cast(lNpNcEcc->Project3D("z")); hEccentricity->SetName(Form("hEccentricity_%i", ibin)); + + // normalize into unitary fractions + Double_t eccIntegral = hEccentricity->Integral(1, hEccentricity->GetNbinsX()+1); + if(eccIntegral>1e-6){ // no counts + hEccentricity->Scale(1./eccIntegral); + }else{ + hEccentricity->Scale(0.0); + } } // impact parameter handling @@ -446,6 +454,14 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lNpNcB->GetYaxis()->SetRange(lNpNcB->GetYaxis()->FindBin(fNcoll[ibin]), lNpNcB->GetYaxis()->FindBin(fNcoll[ibin])); hImpactParameter = reinterpret_cast(lNpNcB->Project3D("z")); hImpactParameter->SetName(Form("hImpactParameter_%i", ibin)); + + // normalize into unitary fractions + Double_t bIntegral = hImpactParameter->Integral(1, hImpactParameter->GetNbinsX()+1); + if(bIntegral>1e-6){ // no counts + hImpactParameter->Scale(1./bIntegral); + }else{ + hImpactParameter->Scale(0.0); + } } for (Long_t lMultValue = 1; lMultValue < lHiRange; lMultValue++) { @@ -471,7 +487,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lNCollProf->Fill(lMultValueToFill, fNcoll[ibin], lProbability); if (lNancestor2DPlot) { // fill cross-check histogram with lNancestorCount at lNancestors value - lNancestor2DPlot->Fill(lMultValueToFill, lNancestors, lProbability * lNancestorCount); + lNancestor2DPlot->Fill(lMultValueToFill, lNancestors, lProbability); } if (lNPart2DPlot) lNPart2DPlot->Fill(lMultValueToFill, fNpart[ibin], lProbability); @@ -480,13 +496,13 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol if (lNpNcEcc) { // collapse the entire eccentricity distribution for this combo for (int ib = 1; ib < hEccentricity->GetNbinsX() + 1; ib++) { - lEcc2DPlot->Fill(lMultValueToFill, hEccentricity->GetBinCenter(ib), lProbability * lNancestorCount * hEccentricity->GetBinContent(ib)); + lEcc2DPlot->Fill(lMultValueToFill, hEccentricity->GetBinCenter(ib), lProbability * hEccentricity->GetBinContent(ib)); } } if (lNpNcB) { // collapse the entire impact parameter distribution for this combo for (int ib = 1; ib < hImpactParameter->GetNbinsX() + 1; ib++) { - lB2DPlot->Fill(lMultValueToFill, hImpactParameter->GetBinCenter(ib), lProbability * lNancestorCount * hImpactParameter->GetBinContent(ib)); + lB2DPlot->Fill(lMultValueToFill, hImpactParameter->GetBinCenter(ib), lProbability * hImpactParameter->GetBinContent(ib)); } } } From fb3b1ac29966684f6ef2ee70d48b541861663799 Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Wed, 25 Feb 2026 16:12:19 +0100 Subject: [PATCH 7/7] Please consider the following formatting changes (#504) --- .../Tools/Multiplicity/multGlauberNBDFitter.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index a706a915ecc..44d7cbe79de 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -438,10 +438,10 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol hEccentricity->SetName(Form("hEccentricity_%i", ibin)); // normalize into unitary fractions - Double_t eccIntegral = hEccentricity->Integral(1, hEccentricity->GetNbinsX()+1); - if(eccIntegral>1e-6){ // no counts - hEccentricity->Scale(1./eccIntegral); - }else{ + Double_t eccIntegral = hEccentricity->Integral(1, hEccentricity->GetNbinsX() + 1); + if (eccIntegral > 1e-6) { // no counts + hEccentricity->Scale(1. / eccIntegral); + } else { hEccentricity->Scale(0.0); } } @@ -456,10 +456,10 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol hImpactParameter->SetName(Form("hImpactParameter_%i", ibin)); // normalize into unitary fractions - Double_t bIntegral = hImpactParameter->Integral(1, hImpactParameter->GetNbinsX()+1); - if(bIntegral>1e-6){ // no counts - hImpactParameter->Scale(1./bIntegral); - }else{ + Double_t bIntegral = hImpactParameter->Integral(1, hImpactParameter->GetNbinsX() + 1); + if (bIntegral > 1e-6) { // no counts + hImpactParameter->Scale(1. / bIntegral); + } else { hImpactParameter->Scale(0.0); } }