rarMultPdf.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: rarMultPdf.cc,v 1.5 2011/06/16 13:18:50 fwilson Exp $
00005  * Authors: Lei Zhang, Wolfgang Gradl
00006  * History:
00007  * 
00008  * Copyright (C) 2005-2012, University of California, Riverside
00009  *****************************************************************************/
00010 
00011 // -- CLASS DESCRIPTION [RooRarFit] --
00012 // This class provides MultPdf class for RooRarFit
00014 //
00015 // BEGIN_HTML
00016 // This class provides MultPdf class for RooRarFit
00017 // END_HTML
00018 //
00019 
00020 #include "RooRarFit/rarVersion.hh"
00021 
00022 #include "Riostream.h"
00023 #include <string>
00024 
00025 #include "RooFitCore/RooArgList.hh"
00026 #include "RooFitCore/RooDataSet.hh"
00027 
00028 #include "RooFitCore/RooRealVar.hh"
00029 #include "RooFitCore/RooStringVar.hh"
00030 #include "RooFitCore/RooGlobalFunc.hh"
00031 using namespace RooFit;
00032 
00033 #include "RooRarFit/rarMultPdf.hh"
00034 
00035 ClassImp(rarMultPdf)
00036   ;
00037 
00041 rarMultPdf::rarMultPdf()
00042   : rarCompBase()
00043 {
00044   init();
00045 }
00046 
00059 rarMultPdf::rarMultPdf(const char *configFile, const char *configSec,
00060                        const char *configStr,
00061                        rarDatasets *theDatasets, RooDataSet *theData,
00062                        const char *name, const char *title)
00063   : rarCompBase(configFile, configSec, configStr,
00064                 theDatasets, theData, name, title, kTRUE)
00065 {
00066   init();
00067 }
00068 
00069 rarMultPdf::~rarMultPdf()
00070 {
00071 }
00072 
00080 void rarMultPdf::init()
00081 {
00082   
00083   TString format = "@0";
00084   for(Int_t i = 1; i < _subPdfs.getSize(); ++i) {
00085     format += Form (" * @%d", i);
00086   }
00087   
00088   _thePdf=new RooGenericPdf(Form("the_%s", GetName()), _pdfType+" "+GetTitle(),
00089                             format, _subPdfs);
00090   
00091   
00092   cout<<"done init of rarMultPdf for "<<GetName()<<endl<<endl;
00093 }
00094 
00102 RooPlot *rarMultPdf::doPdfPlot(TList &plotList, TString pdfList)
00103 {
00104   return rarBasePdf::doPdfPlot(plotList, pdfList);
00105 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7