00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00014
00015
00016
00017
00018
00019
00020 #include "RooRarFit/rarVersion.hh"
00021
00022 #include "Riostream.h"
00023
00024 #include "RooFitCore/RooArgList.hh"
00025 #include "RooFitCore/RooDataSet.hh"
00026 #include "RooFitCore/RooProdPdf.hh"
00027 #include "RooFitCore/RooRealVar.hh"
00028 #include "RooFitCore/RooStringVar.hh"
00029
00030 #include "RooFitModels/RooVoigtian.hh"
00031
00032 #include "RooRarFit/rarVoigtian.hh"
00033
00034 ClassImp(rarVoigtian)
00035 ;
00036
00040 rarVoigtian::rarVoigtian()
00041 : rarBasePdf(),
00042 _x(0), _mean(0), _width(0), _sigma(0)
00043 {
00044 init();
00045 }
00046
00059 rarVoigtian::rarVoigtian(const char *configFile, const char *configSec,
00060 const char *configStr,
00061 rarDatasets *theDatasets, RooDataSet *theData,
00062 const char *name, const char *title)
00063 : rarBasePdf(configFile, configSec, configStr,
00064 theDatasets, theData, name, title),
00065 _x(0), _mean(0), _width(0), _sigma(0)
00066 {
00067 init();
00068 }
00069
00070 rarVoigtian::~rarVoigtian()
00071 {
00072 }
00073
00080 void rarVoigtian::init()
00081 {
00082 cout<<"init of rarVoigtian for "<<GetName()<<":"<<endl;
00083
00084
00085 _x=createAbsReal("x", "observable"); assert(_x);
00086 RooRealVar *x=(RooRealVar *)RooArgList(_obsSet).at(0); assert(x);
00087
00088
00089 _mean=createAbsReal("mean", "#mu", (x->getMin()+x->getMax())/2,
00090 x->getMin(), x->getMax(), _x->getUnit());
00091
00092 _width=createAbsReal("width", "#mu", (x->getMin()+x->getMax())/8,
00093 x->getMin(), x->getMax(), _x->getUnit());
00094
00095 _sigma=createAbsReal("sigma", "#sigma", 0.0, 0., 1., _x->getUnit());
00096
00097 _params.Print("v");
00098
00099
00100 Bool_t doFast = kTRUE;
00101 _thePdf=new RooVoigtian(Form("the_%s", GetName()), _pdfType+" "+GetTitle(),
00102 *_x, *_mean, *_width, *_sigma, doFast);
00103 }