Skip to content

Commit

Permalink
Changes for 2023 Pb-Pb Glau fitting
Browse files Browse the repository at this point in the history
  • Loading branch information
ddobrigk committed Sep 27, 2023
1 parent ccfce49 commit ffb5b57
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
19 changes: 17 additions & 2 deletions Common/Tools/Multiplicity/multGlauberNBDFitter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ multGlauberNBDFitter::multGlauberNBDFitter() : TNamed(),
fNNpNcPairs(-1),
fMaxNpNcPairs(1000000),
fMu(45),
fdMu(0.0),
fk(1.5),
ff(0.8),
fnorm(100),
Expand All @@ -76,6 +77,12 @@ multGlauberNBDFitter::multGlauberNBDFitter() : TNamed(),
fGlauberNBD->SetParameter(1, fk);
fGlauberNBD->SetParameter(2, ff);
fGlauberNBD->SetParameter(3, fnorm);

fGlauberNBD->SetParName(0,"mu");
fGlauberNBD->SetParName(1,"k");
fGlauberNBD->SetParName(2,"f");
fGlauberNBD->SetParName(3,"norm");
fGlauberNBD->SetParName(4,"dMu/dNanc");
}

multGlauberNBDFitter::multGlauberNBDFitter(const char* name, const char* title) : TNamed(name, title),
Expand All @@ -91,6 +98,7 @@ multGlauberNBDFitter::multGlauberNBDFitter(const char* name, const char* title)
fNNpNcPairs(-1),
fMaxNpNcPairs(1000000),
fMu(45),
fdMu(0.0),
fk(1.5),
ff(0.8),
fnorm(100),
Expand All @@ -111,11 +119,17 @@ multGlauberNBDFitter::multGlauberNBDFitter(const char* name, const char* title)

//master function
fGlauberNBD = new TF1("fGlauberNBD", this, &multGlauberNBDFitter::ProbDistrib,
0, 50000, 4, "multGlauberNBDFitter", "ProbDistrib");
0, 50000, 5, "multGlauberNBDFitter", "ProbDistrib");
fGlauberNBD->SetParameter(0, fMu);
fGlauberNBD->SetParameter(1, fk);
fGlauberNBD->SetParameter(2, ff);
fGlauberNBD->SetParameter(3, fnorm);

fGlauberNBD->SetParName(0,"mu");
fGlauberNBD->SetParName(1,"k");
fGlauberNBD->SetParName(2,"f");
fGlauberNBD->SetParName(3,"norm");
fGlauberNBD->SetParName(4,"dMu/dNanc");
}
//________________________________________________________________
multGlauberNBDFitter::~multGlauberNBDFitter()
Expand Down Expand Up @@ -185,7 +199,8 @@ Double_t multGlauberNBDFitter::ProbDistrib(Double_t* x, Double_t* par)
Double_t lNancestorCount = fhNanc->GetBinContent(iNanc);
//if(lNancestorCount<1e-12&&lNancestors>10) break;

Double_t lThisMu = (((Double_t)lNancestors)) * par[0];
// allow for variable mu in case requested
Double_t lThisMu = (((Double_t)lNancestors)) * (par[0] + par[4]*lNancestors);
Double_t lThisk = (((Double_t)lNancestors)) * par[1];
Double_t lpval = TMath::Power(1.0 + lThisMu / lThisk, -1);
fNBD->SetParameter(1, lThisk);
Expand Down
1 change: 1 addition & 0 deletions Common/Tools/Multiplicity/multGlauberNBDFitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class multGlauberNBDFitter : public TNamed

//The actual output: mu, k, f, norm
Double_t fMu;
Double_t fdMu; // variable mu option
Double_t fk;
Double_t ff;
Double_t fnorm;
Expand Down

0 comments on commit ffb5b57

Please sign in to comment.