Skip to content
Open
Show file tree
Hide file tree
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
20 changes: 19 additions & 1 deletion Common/Tools/Multiplicity/multGlauberNBDFitter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <TFitResultPtr.h>
#include <TH1.h>
#include <TH2.h>
#include <TH3.h>
#include <TMath.h>
#include <TMathBase.h>
#include <TNamed.h>
Expand Down Expand Up @@ -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 <Npart>, <Ncoll> in centrality bins..." << endl;
cout << "Range to calculate: " << lLoRange << " to " << lHiRange << endl;
Expand Down Expand Up @@ -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 = reinterpret_cast<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)
Expand All @@ -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));
}
}
}
}
}
3 changes: 2 additions & 1 deletion Common/Tools/Multiplicity/multGlauberNBDFitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <TF1.h>
#include <TH1.h>
#include <TH2.h>
#include <TH3.h>
#include <TNamed.h>
#include <TProfile.h>
#include <TString.h>
Expand Down Expand Up @@ -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;

Expand Down
Loading