#ifndef QVALUE_FITTER_H_ #define QVALUE_FITTER_H_ #include #include #include "TObject.h" #include "TTree.h" #include "TH1I.h" #include "TF1.h" #include "TString.h" #include #include "qvalue_data.h" #include "RooPlot.h" #include "RooCmdArg.h" #include "RooAbsPdf.h" #include "RooRealProxy.h" #include "RooAbsCollection.h" #include "RooArgList.h" #include "RooDataSet.h" #include "RooRealVar.h" #include "RooFitResult.h" #include "RooGlobalFunc.h" #include "RooFit.h" #include "RooGaussian.h" #include "RooLandau.h" #include "RooArgusBG.h" #include "RooChebychev.h" #include "RooPolynomial.h" #include "RooArgusBG.h" #include "RooAddPdf.h" #include "RooProdPdf.h" #include "Riostream.h" #include "Rtypes.h" #include "TString.h" #include "RooPrintable.h" #include "RooMinuit.h" #include "RooExtendPdf.h" #include "RooNumConvPdf.h" #include "RooVoigtian.h" #include "TMinuit.h" #include "TLegend.h" #include "RooPrintable.h" #include "RooMinuit.h" #include "RooExtendPdf.h" #include "RooNumConvPdf.h" #include "RooDataHist.h" #include "RooHistPdf.h" #include "RooGenericPdf.h" #include "RooDerivative.h" #include #include "TCanvas.h" #include "TMatrix.h" #include "TText.h" #include "RooMinimizer.h" class Qvalue_Fitter : public TNamed { // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // Created by Andrew Wilson // FSU Physics // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // private: std::vector *varibles; RooAbsPdf *backgroundpdf; RooAbsPdf *signalpdf; RooRealVar *signalfraction; RooRealVar *DataVariable; RooDataSet *DataSet_p; // RooFitResult *FitResult; float Qvalue[2]; float Qvalue_error[2]; float seateventvalue[2]; float fitrange[2]; std::vector *Varnames; int Nvars; std::vector *vartype; int NumNN; public: Qvalue_Fitter(); virtual ~Qvalue_Fitter(); void SetBackgroundVariable(RooRealVar *var); // // // // // // // // // // // // // // // // // // // // // // Lets the fitter know about a parameter used to fit the background distribution. // Must be called before fitting. // // // // // // // // // // // // // // // // // // // d void SetBackgroundPdf(RooAbsPdf *var); // // // // // // // // // // // // // // // // // // // // // // Tells the fitter about the background pdf. // Must be called before fitting. // // // // // // // // // // // // // // // // // // // d void SetSignalVariable(RooRealVar *var); // // // // // // // // // // // // // // // // // // // // // // Lets the fitter know about a parameter used to fit the signal distribution. // Must be called before fitting. // // // // // // // // // // // // // // // // // // // d void SetSignalPdf(RooAbsPdf *var); // // // // // // // // // // // // // // // // // // // // // // Tells the fitter about the signal pdf. // Must be called before fitting. // // // // // // // // // // // // // // // // // // // d void SetSeatEventValue(float value1, float value2 = -9.); // // // // // // // // // // // // // // // // // // // // // // Tells the fitter at what value in the fitted distribution to determine the QValue, Can handle up to two diff points. // Multiple values handle combinatorial possibilies. // Must be called before fitting. // // // // // // // // // // // // // // // // // // // d void SetDataSet(RooRealVar *DataVar, RooDataSet *DataSet, int NumofNN); // // // // // // // // // // // // // // // // // // // // // // Tells the fitter the variable and the data set to be fitted to. // Must be called before fitting. // // // // // // // // // // // // // // // // // // // d void SetFitRange(float minrange, float maxrange); // // // // // // // // // // // // // // // // // // // // // // Tells the fitter variable fit range // Must be called before fitting. // // // // // // // // // // // // // // // // // // // d // void Fit(float *chi2 = NULL, TCanvas *C1 = NULL, float *SigFrac = NULL, int *NDF = NULL, int hist_Binning = NULL, int *SigFlag = NULL, double *signalFitmean = NULL, double *signalFitgamma = NULL, double *signalFitsigma = NULL, double *Max_total = NULL); //void Fit(float *chi2 = NULL, TCanvas *C1 = NULL, float *SigFrac = NULL, int *NDF = NULL, int hist_Binning = NULL, int *SigFlag = NULL, double *signalFitmean = NULL, double *signalFitsigma = NULL, double *Max_total = NULL, double *poly_c1 = NULL, double *poly_c2 = NULL); // void Fit(float *chi2 = NULL, TCanvas *C1 = NULL, float *SigFrac = NULL, int *NDF = NULL, int hist_Binning = NULL, int *SigFlag = NULL, double *signalFitmean = NULL, double *signalFitsigma = NULL, double *Max_total = NULL, double *arguspar = NULL); //void Fit(float *chi2 = NULL, TCanvas *C1 = NULL, float *SigFrac = NULL, int *NDF = NULL, int hist_Binning = NULL, int *SigFlag = NULL, double *signalFitmean = NULL, double *signalFitsigma = NULL, double *C0 = NULL, float *Qvalue_error_total = NULL, int flag = NULL); void Fit(float *chi2 = NULL, TCanvas *C1 = NULL, float *SigFrac = NULL, int *NDF = NULL, int hist_Binning = NULL, int OmegaFlag = NULL, double *par1 = NULL, double *par2 = NULL, double *par3 = NULL, float *Qvalue_error_total = NULL, int flag = NULL); // // // // // // // // // // // // // // // // // // // // // // Does the fitting // chi2 is the reduced chi squared of the fit. // C1 is a canvas that will be used to visually show the fit // // // // // // // // // // // // // // // // // // // d float GetQvalue(int index = 0, float *error = NULL); // // // // // // // // // // // // // // // // // // // // // // returns the qvalue of the fit. // index corresponds to the order of Seat Event values specified in SetSeatEventValue. // value1 is index = 0. // // // // // // // // // // // // // // // // // // // d }; #endif /*QVALUE_FITTER_H_*/ //