Skip to content

Commit ef258fa

Browse files
committed
Add lowest probability cutoff for faster processing
1 parent 8cd8f71 commit ef258fa

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Common/Tools/Multiplicity/multGlauberNBDFitter.cxx

Lines changed: 8 additions & 3 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, TH3D* lNpNcB, TH2F* lB2DPlot, TH2F* lNancestor2DPlot)
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, Double_t fProbabilityCutoff)
388388
{
389389
cout << "Calculating <Npart>, <Ncoll> in centrality bins..." << endl;
390390
cout << "Range to calculate: " << lLoRange << " to " << lHiRange << endl;
@@ -415,7 +415,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol
415415
}
416416
// bypass to zero
417417
for (int ibin = 0; ibin < fNNpNcPairs; ibin++) {
418-
if (ibin % 2000 == 0)
418+
if (ibin % 200 == 0)
419419
cout << "At NpNc pair #" << ibin << " of " << fNNpNcPairs << "..." << endl;
420420
Double_t lNAncestors0 = (Int_t)(fNpart[ibin] * ff + fNcoll[ibin] * (1.0 - ff));
421421
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
459459
if (lMultValue > 1e-6)
460460
lMult = fAncestorMode != 2 ? fNBD->Eval(lMultValue) : ContinuousNBD(lMultValue, lThisMu, lThisk);
461461
Double_t lProbability = lNancestorCount * lMult;
462+
463+
if(lProbability < fProbabilityCutoff){
464+
continue; // skip if probability of contributing too small
465+
}
466+
462467
Double_t lMultValueToFill = lMultValue;
463468
if (hPercentileMap)
464469
lMultValueToFill = hPercentileMap->GetBinContent(hPercentileMap->FindBin(lMultValue));
@@ -479,7 +484,7 @@ void multGlauberNBDFitter::CalculateAvNpNc(TProfile* lNPartProf, TProfile* lNCol
479484
}
480485
}
481486
if (lNpNcB) {
482-
// collapse the entire eccentricity distribution for this combo
487+
// collapse the entire impact parameter distribution for this combo
483488
for (int ib = 1; ib < hImpactParameter->GetNbinsX() + 1; ib++) {
484489
lB2DPlot->Fill(lMultValueToFill, hImpactParameter->GetBinCenter(ib), lProbability * hImpactParameter->GetBinContent(ib));
485490
}

Common/Tools/Multiplicity/multGlauberNBDFitter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class multGlauberNBDFitter : public TNamed
7979

8080
// For estimating Npart, Ncoll in multiplicity bins
8181
// 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);
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, Double_t fProbabilityCutoff = -1);
8383

8484
// void Print(Option_t *option="") const;
8585

0 commit comments

Comments
 (0)