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 "RooRarFit/rarGeneric.hh"
00031
00032 ClassImp(rarGeneric)
00033 ;
00034
00038 rarGeneric::rarGeneric()
00039 : rarBasePdf()
00040 {
00041 init();
00042 }
00043
00056 rarGeneric::rarGeneric(const char *configFile, const char *configSec,
00057 const char *configStr,
00058 rarDatasets *theDatasets, RooDataSet *theData,
00059 const char *name, const char *title)
00060 : rarBasePdf(configFile, configSec, configStr,
00061 theDatasets, theData, name, title)
00062 {
00063 init();
00064 }
00065
00066 rarGeneric::~rarGeneric()
00067 {
00068 }
00069
00077 void rarGeneric::init()
00078 {
00079 cout<<"init of rarGeneric for "<<GetName()<<":"<<endl;
00080
00081
00082 TString formulaStr=readConfStr("formula", "1", getVarSec());
00083 rarStrParser formulaStrParser=formulaStr;
00084
00085 TString formula=formulaStrParser[0];
00086 formulaStrParser.Remove();
00087
00088 RooArgList *depVarList=getFormulaArgs(formulaStrParser);
00089 _params.Print("v");
00090 cout<<"formula string:\t"<<formulaStr<<endl;
00091
00092
00093 _thePdf=new RooGenericPdf(Form("the_%s", GetName()), _pdfType+" "+GetTitle(),
00094 formula, *depVarList);
00095 }