1 #include "KVEvaporationSpectrum.h"
12 : spe_calc{ncomponents,constrain_sigma},
TF1(name, &spe_calc, 0., 500., ncomponents*(constrain_sigma ? 3 : 4))
18 SetParNames(
"N",
"B",
"T");
19 SetParLimits(0,1.,1.e+09);
20 SetParLimits(1,0.,100.);
21 SetParLimits(2,1.e-2,100.);
24 SetParName(3,
"#sigma");
25 SetParLimits(3,.1,20.);
30 int npar = constrain_sigma ? 3 : 4;
31 for(
int nc=0; nc<ncomponents; ++nc)
33 SetParName(nc*npar,
Form(
"N_%d",nc+1));
34 SetParName(nc*npar+1,
Form(
"B_%d",nc+1));
35 SetParName(nc*npar+2,
Form(
"T_%d",nc+1));
36 SetParLimits(nc*npar,1.,1.e+09);
37 SetParLimits(nc*npar+1,0.,100.);
38 SetParLimits(nc*npar+2,1.e-2,100.);
41 SetParName(nc*npar+3,
Form(
"#sigma_%d",nc+1));
42 SetParLimits(nc*npar+3,.1,20.);
73 auto B = 2*sp_max - sp_mean;
74 auto T = sp_mean - sp_max;
81 for(
int nc=1; nc<ncomp; ++nc)
98 static std::vector<Style_t> line_styles = {2, 7, 9, 3, 4, 5, 6, 8, 10, 11};
109 g->SetLineStyle(line_styles[nc]);
110 g->SetLineColor(line_colors[nc]);
118 for(
int i=0; i<npoints; ++i)
120 double x =
xmin+i*dx;
166 for(
int i=0; i<Nc; ++i)
169 if(i && (par[i*3+2]<par[(i-1)*3+2]))
172 sum += SC(
x, &par[i*3]);
Option_t Option_t SetLineColor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
char * Form(const char *fmt,...)
Fittable parametrisation of energy spectra for evaporated particles.
void SetInitialParameters(const TH1 *)
multi_comp_spectrum_calculator spe_calc
TMultiGraph * GetComponents(const std::vector< Color_t > &line_colors={kGray+3, kGray+2, kGray+1, kGray}) const
Int_t GetNComponents() const
virtual Double_t GetParameter(const TString &name) const
virtual Double_t * GetParameters() const
virtual void GetRange(Double_t &xmin, Double_t &xmax) const
virtual void SetParameter(const TString &name, Double_t value)
virtual Int_t GetNpx() const
virtual Double_t GetBinCenter(Int_t bin) const
virtual Double_t GetMean(Int_t axis=1) const
virtual Double_t GetEntries() const
virtual Int_t GetMaximumBin() const
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Double_t Sqrt(Double_t x)
constexpr Double_t TwoPi()
double operator()(double *, double *) const
double operator()(double *, double *) const