rarHistPdf Class Reference

HistPdf PDF builder. More...

#include <rarHistPdf.hh>

Inheritance diagram for rarHistPdf:

rarBasePdf rarConfig List of all members.

Public Member Functions

 rarHistPdf ()
 Trivial ctor.
 rarHistPdf (const char *configFile, const char *configSec, const char *configStr, rarDatasets *theDatasets, RooDataSet *theData, const char *name, const char *title)
 Default ctor.
virtual ~rarHistPdf ()

Protected Member Functions

void init ()
 Initial function called by ctor.

Protected Attributes

RooDataHist * _theHist
 RooDataHist for the PDF.

Private Member Functions

 rarHistPdf (const rarHistPdf &)
 ClassDef (rarHistPdf, 0)

Detailed Description

HistPdf PDF builder.

Build RooHistPdf Pdf.

Config Directives:
See doc for HistPdf PDF configs.

Definition at line 28 of file rarHistPdf.hh.


Constructor & Destructor Documentation

rarHistPdf::rarHistPdf (  ) 

Trivial ctor.

Usually the objects should be created using other ctors.

Definition at line 40 of file rarHistPdf.cc.

References init().

00041   : rarBasePdf(),
00042     _theHist(0)
00043 {
00044   init();
00045 }

rarHistPdf::rarHistPdf ( const char *  configFile,
const char *  configSec,
const char *  configStr,
rarDatasets theDatasets,
RooDataSet *  theData,
const char *  name,
const char *  title 
)

Default ctor.

Parameters:
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
The default ctor first initializes data members, and then calls init.

Definition at line 59 of file rarHistPdf.cc.

References init().

00063   : rarBasePdf(configFile, configSec, configStr,
00064                theDatasets, theData, name, title),
00065     _theHist(0)
00066 {
00067   init();
00068 }

rarHistPdf::~rarHistPdf (  )  [virtual]

Definition at line 70 of file rarHistPdf.cc.

00071 {
00072 }

rarHistPdf::rarHistPdf ( const rarHistPdf  )  [private]


Member Function Documentation

rarHistPdf::ClassDef ( rarHistPdf  ,
 
) [private]

void rarHistPdf::init (  )  [protected, virtual]

Initial function called by ctor.

init is called by the ctor. It first reads in observable info from config item obs, and use getFormulaArgs to get ArgList of the PDF, and finally it builds RooHistPdf.

Reimplemented from rarBasePdf.

Definition at line 80 of file rarHistPdf.cc.

References rarBasePdf::_obsSet, rarBasePdf::_pdfType, rarBasePdf::_theData, _theHist, rarBasePdf::_thePdf, rarBasePdf::getFormulaArgs(), rarBasePdf::getVarSec(), rarConfig::readConfStr(), and rarBasePdf::setControlBits().

Referenced by rarHistPdf().

00081 {
00082   cout<<"init of rarHistPdf for "<<GetName()<<":"<<endl;
00083   
00084   // no need for pdf fit
00085   setControlBits("noPdfFit");
00086   
00087   // read the obs string
00088   rarStrParser obsStrParser=readConfStr("obs", "", getVarSec());
00089   // get obs list
00090   getFormulaArgs(obsStrParser);
00091   
00092   cout<<" Obs in pdf:"<<endl;
00093   _obsSet.Print("v");
00094   
00095   // it should always have fitData
00096   if (!_theData) {
00097     cout<<" No dataset for HistPdf"<<endl;
00098     exit(-1);
00099   }
00100   // create the RooDataHist
00101   _theHist=new RooDataHist(Form("the_%s_Hist", GetName()),
00102                            "pdf histogram", _obsSet, *_theData);
00103   // create the generic pdf
00104   _thePdf=new RooHistPdf(Form("the_%s", GetName()), _pdfType+" "+GetTitle(),
00105                          _obsSet, *_theHist);
00106 }


Member Data Documentation

RooDataHist* rarHistPdf::_theHist [protected]

RooDataHist for the PDF.

Definition at line 40 of file rarHistPdf.hh.

Referenced by init().


The documentation for this class was generated from the following files:
Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7