rarUniform.cc

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Project: BaBar detector at the SLAC PEP-II B-factory
00003 * Package: RooRarFit
00004  *    File: $Id: rarUniform.cc,v 1.1 2011/08/26 17:54:19 fwilson Exp $
00005  * Authors: F. wilson
00006  * History:
00007  * 
00008  * Copyright (C) 2005-2012, RAL/STFC
00009  *****************************************************************************/
00010 
00011 // -- CLASS DESCRIPTION [RooRarFit] --
00012 // This class provides Polynomial/Chebychev Pdf class for RooRarFit
00014 //
00015 // BEGIN_HTML
00016 // This class provides Polynomial/Chebychev Pdf class for RooRarFit
00017 // END_HTML
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 // not available in analysis-52 version of babar root
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    // read the obs string
00085   rarStrParser obsStrParser=readConfStr("obs", "", getVarSec());
00086 
00087   // get obs list
00088   getFormulaArgs(obsStrParser);
00089 
00090   // print out the observables
00091   cout<<" Obs in pdf: "<<endl;
00092   _obsSet.Print("v");
00093  
00094   // create pdf
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 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7