Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Hal::Spline2D Class Reference

#include <Splines.h>

Inheritance diagram for Hal::Spline2D:

Public Member Functions

 Spline2D (TH2 *h=NULL, Option_t *interpolation="")
 
void Refit ()
 
Double_t GetExtrapolationParam (Double_t x, Double_t y, Int_t param) const
 
Double_t Eval (Double_t x, Double_t y) const
 
Double_t GetError (Double_t x, Double_t y) const
 
Double_t EvalBin (Int_t bin_x, Int_t bin_y) const
 
Double_t ErrorBin (Int_t bin_x, Int_t bin_y) const
 
void SetPoint (Int_t xbin, Int_t ybin, Double_t val, Double_t err=0)
 
void PrintParams (Double_t x, Double_t y)
 
void Eval (Double_t x, Double_t y, Double_t &f, Double_t &error) const
 
TAxis * GetXaxis () const
 
TAxis * GetYaxis () const
 
virtual TH2D * GetTHD (TString name="spline_thd") const
 

Detailed Description

class that intepolate 2D histogram by parabolic interpolation, interpolation parameters are different fo each bin of this "pseudohistogram". Therefore on bin edges interpolation is not continuous - this can be fixed by call Refit method

Definition at line 115 of file Splines.h.

Constructor & Destructor Documentation

◆ Spline2D()

Hal::Spline2D::Spline2D ( TH2 * h = NULL,
Option_t * interpolation = "" )
Parameters
h
interpolationedge option of "edge" interpolation, by default no interpolation is used and "edge values" corresponds to underflow/overflow bins other options are "linear" to linear interpolation, "const" - assunming that upper bin is equal to first bin and underflow bin is the same as last bin

Definition at line 213 of file Splines.cxx.

◆ ~Spline2D()

Hal::Spline2D::~Spline2D ( )
virtual

Definition at line 487 of file Splines.cxx.

Member Function Documentation

◆ ErrorBin()

Double_t Hal::Spline2D::ErrorBin ( Int_t bin_x,
Int_t bin_y ) const

return value error at given bin

Parameters
bin_x
bin_y
Returns

Definition at line 356 of file Splines.cxx.

◆ Eval() [1/2]

Double_t Hal::Spline2D::Eval ( Double_t x,
Double_t y ) const

return interpolated value at x,y

Parameters
x
y
Returns

Definition at line 327 of file Splines.cxx.

◆ Eval() [2/2]

void Hal::Spline2D::Eval ( Double_t x,
Double_t y,
Double_t & f,
Double_t & error ) const

like Double_t Eval(Double_t x,Double_t y) but return value and error simultaneously

Parameters
x
y
f
error

Definition at line 358 of file Splines.cxx.

◆ EvalBin()

Double_t Hal::Spline2D::EvalBin ( Int_t bin_x,
Int_t bin_y ) const

return value at given bin

Parameters
bin_x
bin_y
Returns

Definition at line 347 of file Splines.cxx.

◆ GetError()

Double_t Hal::Spline2D::GetError ( Double_t x,
Double_t y ) const

return error of interpolated value at x, y

Parameters
x
y
Returns

Definition at line 481 of file Splines.cxx.

◆ GetExtrapolationParam()

Double_t Hal::Spline2D::GetExtrapolationParam ( Double_t x,
Double_t y,
Int_t param ) const

return A(param)

Parameters
x
y
param
Returns

Definition at line 445 of file Splines.cxx.

◆ GetTHD()

TH2D * Hal::Spline2D::GetTHD ( TString name = "spline_thd") const
virtual

try to reproduce histogram used to create of this object

Parameters
name
Returns

Definition at line 698 of file Splines.cxx.

◆ GetXaxis()

TAxis * Hal::Spline2D::GetXaxis ( ) const
inline
Returns

Definition at line 204 of file Splines.h.

◆ GetYaxis()

TAxis * Hal::Spline2D::GetYaxis ( ) const
inline
Returns

Definition at line 209 of file Splines.h.

◆ PrintParams()

void Hal::Spline2D::PrintParams ( Double_t x,
Double_t y )

print interpolation parameters at given x, y

Parameters
x
y

Definition at line 399 of file Splines.cxx.

◆ Refit()

void Hal::Spline2D::Refit ( )

smear this histogram

Definition at line 274 of file Splines.cxx.

◆ SetPoint()

void Hal::Spline2D::SetPoint ( Int_t xbin,
Int_t ybin,
Double_t val,
Double_t err = 0 )

set const value at given bin

Parameters
xbin
ybin
val
err

Definition at line 508 of file Splines.cxx.


The documentation for this class was generated from the following files: