16 #ifndef TSBETHEBLOCHFUNC_H_
17 #define TSBETHEBLOCHFUNC_H_
26 #include "BetheBlochFunctions.h"
35 TSBetheBlochFunc(TString name, TString title,
double (*fcn)(
double*,
double*),
double xmin,
double xmax,
int npar);
40 TGraph* BuildGraphFromFunction(
int npt=300,
double xmin=0,
double xmax=0)
const;
45 TGraph *CloneTable(TString =
"")
const;
47 void ComputeMoments(std::vector<double> &ptot_data,
double mass,
double &mean,
double &rms)
const;
48 void ComputeMoments(TH1F &h_ptot,
double mass,
double &mean,
double &rms)
const;
50 Double_t
Eval(Double_t momentum, Double_t mass = 0, Double_t z = 0, Double_t t = 0)
const;
53 bool HasFunction()
const {
return fHasFunc;}
54 bool HasTable()
const {
return fHasTable;}
56 TString GetAxisTitleX()
const {
return fAxisTitleX;}
57 TString GetAxisTitleY()
const {
return fAxisTitleY;}
59 int GetInterpType()
const {
return fInterpType;}
60 TString GetInterpOpt()
const {
return fInterpOpt;}
61 int GetNumOfPoints()
const {
return fTable.GetN();}
62 double* GetPointsArrayX()
const {
return fTable.GetX();}
63 double* GetPointsArrayY()
const {
return fTable.GetY();}
66 bool ImportGraph(
const TGraph &);
67 bool ImportTable(
const TGraph& g) {
return ImportGraph(g);}
68 bool ImportTable(TString file_name);
71 void SetInterpolation(
int);
72 void SetParNames(TString, TString =
"",TString =
"",TString =
"",TString =
"", TString =
"");
73 void UseFunction(
bool);
75 bool UsingFunction()
const {
return fUseFunc;}
76 bool UsingTable()
const {
return fUseTable;}
80 double fEvalFunction(
double,
int opt=0)
const;
81 double fEvalTabular(
double,
int opt=0)
const;
void BuildTableFromFunction(int npts, int opt=0)
Definition: TSBetheBlochFunc.cc:116
Double_t Eval(Double_t momentum, Double_t mass=0, Double_t z=0, Double_t t=0) const
Definition: TSBetheBlochFunc.cc:235
Definition: TSBetheBlochFunc.h:30