From 3c53db54758a961b620ee489d719c599e656f6f4 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Mon, 16 Feb 2026 20:08:20 +0100 Subject: [PATCH 1/3] [Common] Glauber+NBD de-convolution of eccentricities added --- .../Multiplicity/multGlauberNBDFitter.cxx | 20 ++++++++++++++++++- .../Tools/Multiplicity/multGlauberNBDFitter.h | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index 85c86e808fd..d6a4b8a63e9 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -383,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) +void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot) { cout << "Calculating , in centrality bins..." << endl; cout << "Range to calculate: " << lLoRange << " to " << lHiRange << endl; @@ -419,6 +420,17 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol 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); Double_t lNAncestors2 = (fNpart[ibin] * ff + fNcoll[ibin] * (1.0 - ff)); + + 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])); + lNpNcEcc->GetYaxis()->SetRange(lNpNcEcc->GetYaxis()->FindBin(fNcoll[ibin]), lNpNcEcc->GetYaxis()->FindBin(fNcoll[ibin])); + hEccentricity = (TH1D*) lNpNcEcc->Project3D("z"); + hEccentricity->SetName(Form("hEccentricity_%i", ibin)); + } + for (Long_t lMultValue = 1; lMultValue < lHiRange; lMultValue++) { Double_t lNancestors = lNAncestors0; if (fAncestorMode == 1) @@ -444,6 +456,12 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lNPart2DPlot->Fill(lMultValueToFill, fNpart[ibin], lProbability); if (lNColl2DPlot) lNColl2DPlot->Fill(lMultValueToFill, fNcoll[ibin], lProbability); + 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)); + } + } } } } diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.h b/Common/Tools/Multiplicity/multGlauberNBDFitter.h index 218caf43fc3..889398fad1a 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.h +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -77,7 +78,7 @@ 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); + 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); // void Print(Option_t *option="") const; From 42dae644ce77df93d581c89750054540831fcd02 Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Mon, 16 Feb 2026 20:09:41 +0100 Subject: [PATCH 2/3] Please consider the following formatting changes (#501) --- Common/Tools/Multiplicity/multGlauberNBDFitter.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index d6a4b8a63e9..4dbd8b8f545 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -421,13 +421,13 @@ 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; + TH1D* hEccentricity = 0x0; - if(lNpNcEcc){ + 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])); lNpNcEcc->GetYaxis()->SetRange(lNpNcEcc->GetYaxis()->FindBin(fNcoll[ibin]), lNpNcEcc->GetYaxis()->FindBin(fNcoll[ibin])); - hEccentricity = (TH1D*) lNpNcEcc->Project3D("z"); + hEccentricity = (TH1D*)lNpNcEcc->Project3D("z"); hEccentricity->SetName(Form("hEccentricity_%i", ibin)); } @@ -456,10 +456,10 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol lNPart2DPlot->Fill(lMultValueToFill, fNpart[ibin], lProbability); if (lNColl2DPlot) lNColl2DPlot->Fill(lMultValueToFill, fNcoll[ibin], lProbability); - 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)); + 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)); } } } From e0671d9087a9d5da41b14ef6e44487b472c2a710 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Tue, 17 Feb 2026 20:06:55 +0100 Subject: [PATCH 3/3] Megalinter fix --- Common/Tools/Multiplicity/multGlauberNBDFitter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index 4dbd8b8f545..c7a669f816b 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -427,7 +427,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol // 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])); lNpNcEcc->GetYaxis()->SetRange(lNpNcEcc->GetYaxis()->FindBin(fNcoll[ibin]), lNpNcEcc->GetYaxis()->FindBin(fNcoll[ibin])); - hEccentricity = (TH1D*)lNpNcEcc->Project3D("z"); + hEccentricity = reinterpret_cast(lNpNcEcc->Project3D("z")); hEccentricity->SetName(Form("hEccentricity_%i", ibin)); }