rarCBShape Class Reference

CBShape PDF builder. More...

#include <rarCBShape.hh>

Inheritance diagram for rarCBShape:

rarBasePdf rarConfig List of all members.

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)

Detailed Description

CBShape PDF builder.

Build RooCBShape Pdf.

Config Directives:
/// 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.


Constructor & Destructor Documentation

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.

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, _configFile, _configSec, _configStr, name, title, _x, _mean, _sigma, _alpha, _n, and then calls init.

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]

Definition at line 72 of file rarCBShape.cc.

00073 {
00074 }

rarCBShape::rarCBShape ( const rarCBShape  )  [private]


Member Function Documentation

rarCBShape::ClassDef ( rarCBShape  ,
 
) [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 }


Member Data Documentation

RooAbsReal* rarCBShape::_alpha [protected]

Pdf alpha.

Definition at line 53 of file rarCBShape.hh.

Referenced by init().

RooAbsReal* rarCBShape::_mean [protected]

Pdf mean.

Definition at line 51 of file rarCBShape.hh.

Referenced by init().

RooAbsReal* rarCBShape::_n [protected]

Pdf n.

Definition at line 54 of file rarCBShape.hh.

Referenced by init().

RooAbsReal* rarCBShape::_sigma [protected]

Pdf sigma.

Definition at line 52 of file rarCBShape.hh.

Referenced by init().

RooAbsReal* rarCBShape::_x [protected]

Default obs.

Definition at line 50 of file rarCBShape.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