#include <rarCBShape.hh>
Inheritance diagram for rarCBShape:
Public Member Functions | |
rarCBShape () | |
Trivial ctor. | |
rarCBShape (const char *configFile, const char *configSec, const char *configStr, rarDatasets *theDatasets, RooDataSet *theData, const char *name, const char *title) | |
Default ctor. | |
virtual | ~rarCBShape () |
Protected Member Functions | |
void | init () |
Initial function called by ctor. | |
Protected Attributes | |
RooAbsReal * | _x |
Default obs. | |
RooAbsReal * | _mean |
Pdf mean. | |
RooAbsReal * | _sigma |
Pdf sigma. | |
RooAbsReal * | _alpha |
Pdf alpha. | |
RooAbsReal * | _n |
Pdf n. | |
Private Member Functions | |
rarCBShape (const rarCBShape &) | |
ClassDef (rarCBShape, 0) |
Build RooCBShape Pdf.
/// configStr = CBShape ["<Optional Title>"] /// x = AbsReal Def /// mean = AbsReal Def /// sigma = AbsReal Def /// alpha = AbsReal Def /// n = AbsReal Def
x
is the default observable. mean
is the mean of the pdf, sigma
is the sigma of the pdf, alpha
is the alpha of the pdf, n
is the n of the pdf. All the variables can be RooRealVar
or RooFormulaVar
.
Definition at line 37 of file rarCBShape.hh.
rarCBShape::rarCBShape | ( | ) |
Trivial ctor.
Usually the objects should be created using other ctors.
Definition at line 40 of file rarCBShape.cc.
References init().
00041 : rarBasePdf(), 00042 _x(0), _mean(0), _sigma(0), _alpha(0), _n(0) 00043 { 00044 init(); 00045 }
rarCBShape::rarCBShape | ( | 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 61 of file rarCBShape.cc.
References init().
00065 : rarBasePdf(configFile, configSec, configStr, 00066 theDatasets, theData, name, title), 00067 _x(0), _mean(0), _sigma(0), _alpha(0), _n(0) 00068 { 00069 init(); 00070 }
rarCBShape::~rarCBShape | ( | ) | [virtual] |
rarCBShape::rarCBShape | ( | const rarCBShape & | ) | [private] |
rarCBShape::ClassDef | ( | rarCBShape | , | |
0 | ||||
) | [private] |
void rarCBShape::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 RooCBShape PDF.
Reimplemented from rarBasePdf.
Definition at line 81 of file rarCBShape.cc.
References _alpha, _mean, _n, rarBasePdf::_obsSet, rarBasePdf::_params, rarBasePdf::_pdfType, _sigma, rarBasePdf::_thePdf, _x, and rarConfig::createAbsReal().
Referenced by rarCBShape().
00082 { 00083 cout<<"init of rarCBShape for "<<GetName()<<":"<<endl; 00084 00085 // first get its dependent/observable 00086 _x=createAbsReal("x", "observable"); assert(_x); 00087 RooRealVar *x=(RooRealVar *)RooArgList(_obsSet).at(0); assert(x); 00088 // Config pdf params 00089 _mean=createAbsReal("mean", "#mu", (x->getMin()+x->getMax())/2, 00090 x->getMin(), x->getMax(), _x->getUnit()); 00091 _sigma=createAbsReal("sigma", "#sigma", .1, 0., 1., _x->getUnit()); 00092 _alpha=createAbsReal("alpha", "#alpha", .9); 00093 _n=createAbsReal("n", "n", 10, 0.1, 200.); 00094 _params.Print("v"); 00095 00096 // create pdf 00097 _thePdf=new RooCBShape(Form("the_%s", GetName()), _pdfType+" "+GetTitle(), 00098 *_x, *_mean, *_sigma, *_alpha, *_n); 00099 }
RooAbsReal* rarCBShape::_alpha [protected] |
RooAbsReal* rarCBShape::_mean [protected] |
RooAbsReal* rarCBShape::_n [protected] |
RooAbsReal* rarCBShape::_sigma [protected] |
RooAbsReal* rarCBShape::_x [protected] |