60 Log() << kFATAL <<
"Called without valid histogram pointer (hist)!" <<
Endl;
89 if ( (par[1]<=0) || (
x[0]>
x[1]))
return -1.;
95 if (xs2==0)
return 0.;
129 Log() << kFATAL <<
"<SetKernelType> KDE sigma has invalid value ( <=0 ) !" <<
Endl;
151 fHist->GetBinCenter(i),
159 if (i < fHist->GetNbinsX()/5 ) {
165 2*histoLowEdge-
fHist->GetBinCenter(i),
170 if (i > 4*
fHist->GetNbinsX()/5) {
176 2*histoUpperEdge-
fHist->GetBinCenter(i),
201 Log() << kFATAL <<
"<SetKernelType> KDE sigma has invalid value ( <=0 ) !" <<
Endl;
209 Log() << kFATAL <<
"KDE kernel not correctly initialized!" <<
Endl;
Double_t GaussIntegral(Double_t *x, Double_t *par)
when using Gaussian as Kernel function this is faster way to calculate the integrals
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
1-D histogram with a float per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
TH1F * fHist
copy of input histogram
virtual ~KDEKernel(void)
destructor
TH1F * fSigmaHist
contains the Sigmas Widths for adaptive KDE
TH1F * fFirstIterHist
histogram to be filled in the hidden iteration
EKernelIter fIter
iteration number
Float_t fFineFactor
fine tuning factor for Adaptive KDE: factor to multiply the "width" of the Kernel function
EKernelBorder fKDEborder
The method to take care about "border" effects.
Float_t fSigma
Width of the Kernel function.
MsgLogger * fLogger
! message logger
void SetKernelType(EKernelType ktype=kGauss)
fIter == 1 ---> nonadaptive KDE fIter == 2 ---> adaptive KDE
Float_t fUpperEdge
the upper edge of the PDF
KDEKernel(EKernelIter kiter=kNonadaptiveKDE, const TH1 *hist=nullptr, Float_t lower_edge=0., Float_t upper_edge=1., EKernelBorder kborder=kNoTreatment, Float_t FineFactor=1.)
constructor sanity check
TF1 * fKernel_integ
the integral of the Kernel function
Bool_t fHiddenIteration
Defines if whats currently running is the.
Float_t fLowerEdge
the lower edge of the PDF
Float_t GetBinKernelIntegral(Float_t lowr, Float_t highr, Float_t mean, Int_t binnum)
calculates the integral of the Kernel
ostringstream derivative to redirect and format output
MsgLogger & Endl(MsgLogger &ml)
Double_t Erf(Double_t x)
Computation of the error function erf(x).
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.