rarThreshold Class Reference

Threshold PDF builder. More...

#include <rarThreshold.hh>

Inheritance diagram for rarThreshold:

rarBasePdf rarConfig List of all members.

Public Member Functions

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

Protected Member Functions

void init ()
 Initial function called by ctor.

Protected Attributes

RooAbsReal * _x
 Default obs (mass).
RooAbsReal * _m0
RooAbsReal * _power
Int_t _nOrder

Private Member Functions

 rarThreshold (const rarThreshold &)
 ClassDef (rarThreshold, 0)

Detailed Description

Threshold PDF builder.

Build RooThreshold Pdf.

Config Directives:
/// configStr = Threshold ["<Optional Title>"]
/// x = AbsReal Def
/// m0  = AbsReal Def
/// power = AbsReal Def
/// nOrder = <orderval>
/// P01 = AbsReal Def
/// P02 = ...
/// 
x is the default observable. m0 is the threshold. PDF= for x<m0. power is the power nOrder is an integer representing the order of the polynomial. P01 ... P<orderVal> define all the coeffs. P00 is not needed. All the floating variables can be RooRealVar or RooFormulaVar.

Definition at line 41 of file rarThreshold.hh.


Constructor & Destructor Documentation

rarThreshold::rarThreshold (  ) 

Trivial ctor.

Usually the objects should be created using other ctors.

Definition at line 41 of file rarThreshold.cc.

References init().

00042   : rarBasePdf(),
00043     _x(0), _m0(0), _power(0), _nOrder(1)
00044 {
00045   init();
00046 }

rarThreshold::rarThreshold ( 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 60 of file rarThreshold.cc.

References init().

00066   : rarBasePdf(configFile, configSec, configStr,
00067                theDatasets, theData, name, title),
00068     _x(0), _m0(0), _power(0), _nOrder(1)
00069 {
00070   init();
00071 }

rarThreshold::~rarThreshold (  )  [virtual]

Definition at line 73 of file rarThreshold.cc.

00074 {
00075 }

rarThreshold::rarThreshold ( const rarThreshold  )  [private]


Member Function Documentation

rarThreshold::ClassDef ( rarThreshold  ,
 
) [private]

void rarThreshold::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 RooThreshold PDF.

Reimplemented from rarBasePdf.

Definition at line 82 of file rarThreshold.cc.

References rarBasePdf::_coeffs, _m0, _nOrder, rarBasePdf::_params, rarBasePdf::_pdfType, _power, rarBasePdf::_thePdf, _x, rarConfig::createAbsReal(), rarBasePdf::getVarSec(), and rarConfig::readConfStr().

Referenced by rarThreshold().

00083 {
00084 
00085   cout <<"init of rarThreshold for " << GetName() << ":"<<endl;
00086   
00087   // first get its observable
00088   _x = createAbsReal("x", "observable"); assert(_x);
00089 
00090   // Config pdf params
00091   _m0 = createAbsReal("m0", "threshold", 0, -100000, 100000);
00092   _power = createAbsReal("power", "power", 1, -1000, 1000);
00093 
00094   // read in pdf params
00095   _nOrder=atoi(readConfStr("nOrder", "1", getVarSec()));
00096   if (_nOrder<=0) {_nOrder=1;}
00097   _nOrder++;
00098   for (Int_t i=1; i<_nOrder; i++) {
00099     RooAbsReal *P=createAbsReal(Form("P%02d",i),Form("p_{%d}", i),
00100                                 0, -10000, +10000);
00101     _coeffs.add(*P);
00102   }
00103 
00104   _params.Print("v");
00105   
00106   // create pdf
00107   _thePdf=new RooThreshold(Form("the_%s", GetName()),_pdfType+" "+GetTitle(),
00108                            *_x, *_m0, *_power, _coeffs);
00109 }


Member Data Documentation

RooAbsReal* rarThreshold::_m0 [protected]

Definition at line 55 of file rarThreshold.hh.

Referenced by init().

Int_t rarThreshold::_nOrder [protected]

Definition at line 57 of file rarThreshold.hh.

Referenced by init().

RooAbsReal* rarThreshold::_power [protected]

Definition at line 56 of file rarThreshold.hh.

Referenced by init().

RooAbsReal* rarThreshold::_x [protected]

Default obs (mass).

Definition at line 54 of file rarThreshold.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