Skip to content

Commit bf7c910

Browse files
committed
[Common] add deconvolution of b, nancestor
1 parent 42b2e5c commit bf7c910

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

Common/Tools/Multiplicity/multGlauberNBDFitter.cxx

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ Double_t multGlauberNBDFitter::ContinuousNBD(Double_t n, Double_t mu, Double_t k
384384
return F;
385385
}
386386

387-
void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCollProf, TH2F* lNPart2DPlot, TH2F* lNColl2DPlot, TH1F* hPercentileMap, Double_t lLoRange, Double_t lHiRange, TH3D* lNpNcEcc, TH2F* lEcc2DPlot)
387+
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)
388388
{
389389
cout << "Calculating <Npart>, <Ncoll> in centrality bins..." << endl;
390390
cout << "Range to calculate: " << lLoRange << " to " << lHiRange << endl;
@@ -421,8 +421,15 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol
421421
Double_t lNAncestors1 = TMath::Floor(fNpart[ibin] * ff + fNcoll[ibin] * (1.0 - ff) + 0.5);
422422
Double_t lNAncestors2 = (fNpart[ibin] * ff + fNcoll[ibin] * (1.0 - ff));
423423

424-
TH1D* hEccentricity = 0x0;
424+
// define ancestors officially
425+
Double_t lNancestors = lNAncestors0;
426+
if (fAncestorMode == 1)
427+
lNancestors = lNAncestors1;
428+
if (fAncestorMode == 2)
429+
lNancestors = lNAncestors2;
425430

431+
// eccentricity handling
432+
TH1D* hEccentricity = 0x0;
426433
if (lNpNcEcc) {
427434
// locate the histogram that corresponds to the eccentricity distribution in this NpNc pair
428435
lNpNcEcc->GetXaxis()->SetRange(lNpNcEcc->GetXaxis()->FindBin(fNpart[ibin]), lNpNcEcc->GetXaxis()->FindBin(fNpart[ibin]));
@@ -431,12 +438,17 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol
431438
hEccentricity->SetName(Form("hEccentricity_%i", ibin));
432439
}
433440

441+
// impact parameter handling
442+
TH1D* hImpactParameter = 0x0;
443+
if (lNpNcB) {
444+
// locate the histogram that corresponds to the eccentricity distribution in this NpNc pair
445+
lNpNcB->GetXaxis()->SetRange(lNpNcB->GetXaxis()->FindBin(fNpart[ibin]), lNpNcB->GetXaxis()->FindBin(fNpart[ibin]));
446+
lNpNcB->GetYaxis()->SetRange(lNpNcB->GetYaxis()->FindBin(fNcoll[ibin]), lNpNcB->GetYaxis()->FindBin(fNcoll[ibin]));
447+
hImpactParameter = reinterpret_cast<TH1D*>(lNpNcB->Project3D("z"));
448+
hImpactParameter->SetName(Form("hImpactParameter_%i", ibin));
449+
}
450+
434451
for (Long_t lMultValue = 1; lMultValue < lHiRange; lMultValue++) {
435-
Double_t lNancestors = lNAncestors0;
436-
if (fAncestorMode == 1)
437-
lNancestors = lNAncestors1;
438-
if (fAncestorMode == 2)
439-
lNancestors = lNAncestors2;
440452
Double_t lNancestorCount = fContent[ibin];
441453
Double_t lThisMu = (((Double_t)lNancestors)) * fMu;
442454
Double_t lThisk = (((Double_t)lNancestors)) * fk;
@@ -452,6 +464,10 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol
452464
lMultValueToFill = hPercentileMap->GetBinContent(hPercentileMap->FindBin(lMultValue));
453465
lNPartProf->Fill(lMultValueToFill, fNpart[ibin], lProbability);
454466
lNCollProf->Fill(lMultValueToFill, fNcoll[ibin], lProbability);
467+
if(lNancestor2DPlot){
468+
// fill cross-check histogram with lNancestorCount at lNancestors value
469+
lNancestor2DPlot->Fill(lMultValueToFill, lNancestors, lProbability * lNancestorCount);
470+
}
455471
if (lNPart2DPlot)
456472
lNPart2DPlot->Fill(lMultValueToFill, fNpart[ibin], lProbability);
457473
if (lNColl2DPlot)
@@ -462,6 +478,12 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol
462478
lEcc2DPlot->Fill(lMultValueToFill, hEccentricity->GetBinCenter(ib), lProbability * hEccentricity->GetBinContent(ib));
463479
}
464480
}
481+
if (lNpNcB) {
482+
// collapse the entire eccentricity distribution for this combo
483+
for (int ib = 1; ib < hImpactParameter->GetNbinsX() + 1; ib++) {
484+
lB2DPlot->Fill(lMultValueToFill, hImpactParameter->GetBinCenter(ib), lProbability * hImpactParameter->GetBinContent(ib));
485+
}
486+
}
465487
}
466488
}
467489
}

Common/Tools/Multiplicity/multGlauberNBDFitter.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class multGlauberNBDFitter : public TNamed
7878
Double_t ContinuousNBD(Double_t n, Double_t mu, Double_t k);
7979

8080
// For estimating Npart, Ncoll in multiplicity bins
81-
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);
81+
// also viable: eccentricity, impact parameter, ancestor cross-check plot
82+
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);
8283

8384
// void Print(Option_t *option="") const;
8485

0 commit comments

Comments
 (0)