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/RooFormulaVar.hh"
00027 #include "RooFitCore/RooRealVar.hh"
00028 #include "RooFitCore/RooStringVar.hh"
00029
00030
00031 #ifdef USENEWROOT
00032 #include "RooFitModels/RooUniform.hh"
00033 #endif
00034
00035 #include "RooRarFit/rarUniform.hh"
00036
00037 ClassImp(rarUniform)
00038 ;
00039
00043 rarUniform::rarUniform()
00044 : rarBasePdf()
00045 {
00046 init();
00047 }
00048
00061 rarUniform::rarUniform(const char *configFile, const char *configSec,
00062 const char *configStr, rarDatasets *theDatasets,
00063 RooDataSet *theData, const char *name, const char *title)
00064 : rarBasePdf(configFile, configSec, configStr,
00065 theDatasets, theData, name, title)
00066 {
00067 init();
00068 }
00069
00070 rarUniform::~rarUniform()
00071 {
00072 }
00073
00080 void rarUniform::init()
00081 {
00082 cout<<"init of rarUniform for "<<GetName()<<":"<<endl;
00083
00084
00085 rarStrParser obsStrParser=readConfStr("obs", "", getVarSec());
00086
00087
00088 getFormulaArgs(obsStrParser);
00089
00090
00091 cout<<" Obs in pdf: "<<endl;
00092 _obsSet.Print("v");
00093
00094
00095 #ifdef USENEWROOT
00096 _thePdf=new RooUniform(Form("the_%s",GetName()),_pdfType+" "+GetTitle(), _obsSet);
00097 #else
00098 cout << "Uniform not implemented in old root versions." << endl;
00099 exit(-1);
00100 #endif
00101 }