#include <rarSimPdf.hh>
Inheritance diagram for rarSimPdf:
Public Member Functions | |
rarSimPdf () | |
Trivial ctor. | |
rarSimPdf (const char *configFile, const char *configSec, const char *configStr, rarDatasets *theDatasets, RooDataSet *theData, const char *name, const char *title) | |
Default ctor. | |
virtual | ~rarSimPdf () |
virtual RooAbsPdf * | getPdfWOvar (RooArgList ignoredObs) |
Get a PDF not depending on specified observables for sPlot. | |
virtual RooAbsPdf * | getProtGen () |
Return prototype var generator for toy study. | |
Protected Member Functions | |
void | init () |
Initial function called by ctor. | |
Protected Attributes | |
RooSimPdfBuilder * | _simBuilder |
SimPdf builder. | |
RooArgSet * | _simConfig |
SimPdf config ArgSet. | |
Private Member Functions | |
rarSimPdf (const rarSimPdf &) | |
ClassDef (rarSimPdf, 0) |
Build RooSimultaneous Pdf.
Definition at line 29 of file rarSimPdf.hh.
rarSimPdf::rarSimPdf | ( | ) |
Trivial ctor.
Usually the objects should be created using other ctors.
Definition at line 43 of file rarSimPdf.cc.
References init().
00044 : rarCompBase(), 00045 _simBuilder(0), _simConfig(0) 00046 { 00047 init(); 00048 }
rarSimPdf::rarSimPdf | ( | const char * | configFile, | |
const char * | configSec, | |||
const char * | configStr, | |||
rarDatasets * | theDatasets, | |||
RooDataSet * | theData, | |||
const char * | name, | |||
const char * | title | |||
) |
Default ctor.
configFile | The config file | |
configSec | The config section | |
configStr | The config string | |
theDatasets | Available datasets | |
theData | Default dataset for this PDF | |
name | The name | |
title | The title |
Definition at line 63 of file rarSimPdf.cc.
References init().
00067 : rarCompBase(configFile, configSec, configStr, 00068 theDatasets, theData, name, title, kFALSE), 00069 _simBuilder(0), _simConfig(0) 00070 { 00071 init(); 00072 }
rarSimPdf::~rarSimPdf | ( | ) | [virtual] |
rarSimPdf::rarSimPdf | ( | const rarSimPdf & | ) | [private] |
rarSimPdf::ClassDef | ( | rarSimPdf | , | |
0 | ||||
) | [private] |
RooAbsPdf * rarSimPdf::getPdfWOvar | ( | RooArgList | ignoredObs | ) | [virtual] |
Get a PDF not depending on specified observables for sPlot.
ignoredObs | The observables to check |
Reimplemented from rarBasePdf.
Definition at line 125 of file rarSimPdf.cc.
References rarBasePdf::_thePdf.
00126 { 00127 RooAbsPdf *thePdf=_thePdf; 00128 cout<<"This pdf can not be used in model"<<endl; 00129 exit(-1); 00130 ignoredObs.getHashTableSize() ; // avoid "unused" warning 00131 return thePdf; 00132 }
RooAbsPdf * rarSimPdf::getProtGen | ( | ) | [virtual] |
Return prototype var generator for toy study.
Reimplemented from rarCompBase.
Definition at line 138 of file rarSimPdf.cc.
References rarBasePdf::_theProtGen.
00139 { 00140 cout<<"This pdf can not be used in model"<<endl; 00141 exit(-1); 00142 return _theProtGen; 00143 }
void rarSimPdf::init | ( | ) | [protected, virtual] |
Initial function called by ctor.
init
is called by the ctor. The initialization work to read in component config info is done with rarCompBase::init. init
here then reads in category info for SimPdf, then it builds datasets for each category type so that each SimPdf component built has its own default fit dataset, and finally it builds RooSimultaneous PDF with configured components.
Reimplemented from rarCompBase.
Definition at line 87 of file rarSimPdf.cc.
References rarConfig::_configFile, _simBuilder, _simConfig, rarBasePdf::_subPdfs, rarBasePdf::_theData, rarBasePdf::_thePdf, rarBasePdf::getFitter(), rarMLFitter::getSimBuilder(), rarBasePdf::getVarSec(), and rarBasePdf::setControlBits().
Referenced by rarSimPdf().
00088 { 00089 // it should always have fitData 00090 if (!_theData) { 00091 cout<<" No dataset for Sim Pdf"<<endl; 00092 exit(-1); 00093 } 00094 // create SimPdfBuilder 00095 _simBuilder=new RooSimPdfBuilder(_subPdfs); 00096 _simConfig=_simBuilder->createProtoBuildConfig(); 00097 _simConfig->readFromFile(_configFile, 0, getVarSec()); 00098 cout<<"simPdfBuilder configs in the config file:"<<endl; 00099 _simConfig->Print("v"); 00100 // do we need to use _simBuilder->addSpecializations? 00101 // Yes, let's do it 00102 if (getFitter()->getSimBuilder()) { 00103 RooSimPdfBuilder *theFitterBuilder=getFitter()->getSimBuilder(); 00104 _simBuilder->addSpecializations(theFitterBuilder->splitLeafList()); 00105 } 00106 // build SimPdf 00107 _thePdf=(RooAbsPdf*)_simBuilder->buildPdf(*_simConfig, _theData, 0, kTRUE); 00108 _thePdf->SetName(Form("the_%s", GetName())); 00109 // fit the total pdf for pdfFit as well 00110 setControlBits("UseAlsoBasePdfFit"); 00111 00112 //_thePdf->Print(); 00113 //_thePdf->Print("v"); 00114 //_thePdf->getComponents()->Print("v"); 00115 cout<<"done init of rarSimPdf for "<<GetName()<<endl<<endl; 00116 }
RooSimPdfBuilder* rarSimPdf::_simBuilder [protected] |
RooArgSet* rarSimPdf::_simConfig [protected] |