9#define GlauberFitter_H 1
26 explicit Fitter(std::unique_ptr<TTree> tree);
31 void Init(
int nEntries);
32 void SetGlauberFitHisto(
double f,
double mu,
double k, Int_t n = 10000, Bool_t Norm2Data =
true);
33 void NormalizeGlauberFit();
36 double FitGlauber(
double* par,
double f0, Int_t k0, Int_t k1, Int_t nEvents);
43 Int_t nEvents = 10000,
48 double NBD(
double n,
double mu,
double k)
const;
50 double Nancestors(
double f)
const;
51 double NancestorsMax(
double f)
const;
53 std::unique_ptr<TH1F>
GetModelHisto(
const double range[2],
const TString& name,
const double par[3], Int_t nEvents);
58 void SetInputHisto(
const TH1F& h) { fDataHisto = h; }
59 void SetFitMinBin(Int_t min) { fFitMinBin = min; }
60 void SetFitMaxBin(Int_t min) { fFitMaxBin = min; }
61 void SetNormMinBin(Int_t min) { fNormMinBin = min; }
62 void SetBinSize(Int_t size) { fBinSize = size; }
63 void SetOutDirName(
const TString& name) { fOutDirName = name; }
64 void SetMode(
const TString& mode) { fMode = mode; }
69 TH1F GetGlauberFitHisto()
const {
return fGlauberFitHisto; }
70 TH1F GetDataHisto()
const {
return fDataHisto; }
71 TH1F GetNBDHisto()
const {
return fNbdHisto; }
72 TH1F GetNpartHisto()
const {
return fNpartHisto; }
73 TH1F GetNcollHisto()
const {
return fNcollHisto; }
74 TH1F GetBestFiHisto()
const {
return fBestFitHisto; }
82 TH1F fGlauberFitHisto;
86 std::unique_ptr<TTree> fSimTree{
nullptr};
91 double fMaxValue{-1.};
99 Int_t fNormMinBin{-1};
101 TString fMode{
"Default"};
103 TString fOutDirName{
""};
Class to fit histo with Glauber based function.
Definition Fitter.hpp:20
virtual ~Fitter()=default
void FindMuGoldenSection(double *mu, double *chi2, double mu_min, double mu_max, double f, double k, Int_t nEvents=10000, Int_t nIter=5)
Definition Fitter.cpp:148
std::unique_ptr< TH1F > GetModelHisto(const double range[2], const TString &name, const double par[3], Int_t nEvents)
Definition Fitter.cpp:339
double GetChi2() const
Definition Fitter.cpp:267
void SetNBDhist(double mu, double k)
Definition Fitter.cpp:290
double FitGlauber(double *par, double f0, Int_t k0, Int_t k1, Int_t nEvents)
Definition Fitter.cpp:206
double NBD(double n, double mu, double k) const
Definition Fitter.cpp:311