@@ -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 }
0 commit comments