Belle II Software  release-08-01-10
XTFunction Class Reference

Class to perform fitting for each xt function. More...

#include <XTFunction.h>

Collaboration diagram for XTFunction:

Public Member Functions

 XTFunction (TProfile *h1)
 Initialized with TProfile histogram.
 
 XTFunction (TProfile *h1, int mode)
 Initialized with TProfile histogram and mode.
 
 XTFunction (TH1F *h1, int mode)
 Initialized with TH1D histogram and mode.
 
 XTFunction (const XTFunction &x)
 Copy constructor.
 
XTFunctionoperator= (const XTFunction &x)
 Assignment operator.
 
void setP6 (double p6)
 Set Parameter 6 for polynomia fit.
 
bool isValid ()
 Is valid.
 
void setMode (int mode)
 Set XT mode. More...
 
void setBField (bool bfield)
 set to use BField
 
void setXTParams (const double p[8])
 Set Parameters for fit.
 
void setXTParams (double p0, double p1, double p2, double p3, double p4, double p5, double p6, double p7)
 Set Initial parameters for fitting.
 
void setFitRange (double tmin, double tmax)
 Set Fit range.
 
void setSmallestEntryRequired (int min)
 Set minimum number of entry required for fit.
 
void setDebug (bool debug)
 Set Debug.
 
int getFitStatus ()
 get fitted flag.
 
double getProb ()
 Get the chi2 probability.
 
void getFittedXTParams (double pa[8])
 get fit parameters.
 
TF1 * getXTFunction ()
 Get XT function.
 
TProfile * getFittedHisto ()
 Get histogram.
 
void fitXT ()
 Do fitting.
 
void FitPol5 ()
 Fit xt histogram incase 5th order polynomial is used.
 
void FitChebyshev ()
 Fit xt histogram incase 5th order Chebeshev polynomial is used.
 
bool validate ()
 Validate the xt has proper shape. More...
 

Private Attributes

TProfile * m_h1
 Histogram of xt relation.
 
TF1 * m_fitFunc
 Fit function.
 
int m_mode = c_Chebyshev
 XT mode, 0 is for 5th order polynomial, 1 is Chebshev polynomial.
 
bool m_debug = true
 Print debug durring fitting or not.
 
bool m_draw = false
 Draw and store png plot of each histo or not.
 
bool m_bField = true
 With magnetic field or not.
 
int m_minRequiredEntry = 800
 Minimum entry required for each histo.
 
double m_XTParam [8] = {}
 Parameter fo xt.
 
double m_FittedXTParams [8] = {}
 Fitted parameters.
 
int m_fitflag = 0
 Fit Flag =-1: low statitic =1: good =0: Fit failure =2: Error Outer =3: Error Inner part;.
 
double m_Prob = 0
 Chi2 prob of fitting.
 
double m_tmin = 20
 lower boundary of fit range
 
double m_tmax = m_XTParam[6] + 50
 upper boundary of fit range
 

Detailed Description

Class to perform fitting for each xt function.

Definition at line 69 of file XTFunction.h.

Member Function Documentation

◆ setMode()

void setMode ( int  mode)
inline

Set XT mode.

1 is 5th order Chebshev polynomial. 0 is 5th order polynomial.

Definition at line 189 of file XTFunction.h.

190  {
191  m_mode = mode;
192  }
int m_mode
XT mode, 0 is for 5th order polynomial, 1 is Chebshev polynomial.
Definition: XTFunction.h:309

◆ validate()

bool validate ( )

Validate the xt has proper shape.

Suppose to be bad xt if |xt(0)| > 0.2.

Definition at line 419 of file XTFunction.h.


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