rarUsrPdf Class Reference

User-defined PDF builder. More...

#include <rarUsrPdf.hh>

Inheritance diagram for rarUsrPdf:

rarBasePdf rarConfig List of all members.

Public Member Functions

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

Protected Member Functions

void init ()
 Initial function called by ctor.

Protected Attributes

RooAbsReal * _x
 Default obs.
RooAbsReal * _a
 Param a.
RooAbsReal * _b
 Param b.
RooAbsReal * _c
 Param c.
RooAbsReal * _d
 Param d.
RooAbsReal * _e
 Param e.

Private Member Functions

 rarUsrPdf (const rarUsrPdf &)
 ClassDef (rarUsrPdf, 0)

Detailed Description

User-defined PDF builder.

Config Directives:
See doc for UsrPdf configs.

Definition at line 24 of file rarUsrPdf.hh.


Constructor & Destructor Documentation

rarUsrPdf::rarUsrPdf (  ) 

Trivial ctor.

Usually the objects should be created using other ctors.

Definition at line 68 of file rarUsrPdf.cc.

References init().

00069   : rarBasePdf(),
00070     _x(0), _a(0), _b(0), _c(0), _d(0), _e(0)
00071 {
00072   init();
00073 }

rarUsrPdf::rarUsrPdf ( 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 87 of file rarUsrPdf.cc.

References init().

00091   : rarBasePdf(configFile, configSec, configStr,
00092                theDatasets, theData, name, title),
00093     _x(0), _a(0), _b(0), _c(0), _d(0), _e(0)
00094 {
00095   init();
00096 }

rarUsrPdf::~rarUsrPdf (  )  [virtual]

Definition at line 98 of file rarUsrPdf.cc.

00099 {
00100 }

rarUsrPdf::rarUsrPdf ( const rarUsrPdf  )  [private]


Member Function Documentation

rarUsrPdf::ClassDef ( rarUsrPdf  ,
 
) [private]

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

Initial function called by ctor.

init is called by the ctor. It first creates the parameters by calling createAbsReal, and finally it builds the User-defined PDF.

Reimplemented from rarBasePdf.

Definition at line 107 of file rarUsrPdf.cc.

References _a, _b, _c, _d, _e, rarBasePdf::_params, _x, and rarConfig::createAbsReal().

Referenced by rarUsrPdf().

00108 {
00109   cout<<"init of rarUsrPdf for "<<GetName()<<":"<<endl;
00110   
00111   //==================================================================>
00112   // change the lines in between the marks as you want                v
00113   //                                                                  v
00114   // first get its obs
00115   _x=createAbsReal("x", "observable"); assert(_x);
00116   // Config pdf params
00117   // instead of a b c etc, you can give them more meaningful names and titles
00118   // for example
00119   // _a=createAbsReal("mean", "#mu", 0, -10, 10);
00120   // _b=createAbsReal("sigma", "#sigma", 0, -10, 10);
00121   // if you give them different names, please use those names
00122   // in the PDF config sections,
00123   // for example, a is now mean, b sigma, etc.
00124   // [myPdf Config]
00125   // configStr = UsrPdf
00126   // x = AbsReal Def
00127   // mean = AbsReal Def
00128   // sigma = AbsReal Def
00129   
00130   // Default param creation
00131   _a=createAbsReal("a", "a", 0, -10, 10);
00132   _b=createAbsReal("b", "b", 0, -10, 10);
00133   _c=createAbsReal("c", "c", 0, -10, 10);
00134   _d=createAbsReal("d", "d", 0, -10, 10);
00135   _e=createAbsReal("e", "e", 0, -10, 10);
00136   _params.Print("v");
00137   
00138   // YOU MUST CREATE YOUR PDF AND SET IT TO _thePdf
00139   // create pdf
00140   //_thePdf=new myPdf(Form("the_%s", GetName()),_pdfType+" "+GetTitle(),
00141   // *_x, *_a, *_b, *_c, *_d, *_e);
00142   //                                                                  ^
00143   // change the lines in between the marks as you want                ^
00144   //==================================================================>
00145 
00146 }


Member Data Documentation

RooAbsReal* rarUsrPdf::_a [protected]

Param a.

Definition at line 38 of file rarUsrPdf.hh.

Referenced by init().

RooAbsReal* rarUsrPdf::_b [protected]

Param b.

Definition at line 39 of file rarUsrPdf.hh.

Referenced by init().

RooAbsReal* rarUsrPdf::_c [protected]

Param c.

Definition at line 40 of file rarUsrPdf.hh.

Referenced by init().

RooAbsReal* rarUsrPdf::_d [protected]

Param d.

Definition at line 41 of file rarUsrPdf.hh.

Referenced by init().

RooAbsReal* rarUsrPdf::_e [protected]

Param e.

Definition at line 42 of file rarUsrPdf.hh.

Referenced by init().

RooAbsReal* rarUsrPdf::_x [protected]

Default obs.

Definition at line 37 of file rarUsrPdf.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