rarOsipDisc.cc

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Project: BaBar detector at the SLAC PEP-II B-factory
00003 * Package: RooRarFit
00004  *    File: $Id: rarOsipDisc.cc,v 1.5 2011/08/26 17:54:18 fwilson Exp $
00005  * Authors: Lei Zhang
00006  * History:
00007  * 
00008  * Copyright (C) 2005-2012, University of California, Riverside
00009  *****************************************************************************/
00010 
00011 // -- CLASS DESCRIPTION [RooRarFit] --
00012 // This class provides the Osipenkov Discriminator Pdf class for RooRarFit
00014 //
00015 // BEGIN_HTML
00016 // This class provides Osipenkov Discriminator Pdf class for RooRarFit
00017 // END_HTML
00018 //
00019 
00020 #include "RooRarFit/rarVersion.hh"
00021 
00022 #include "Riostream.h"
00023 
00024 #include "RooFitCore/RooArgList.hh"
00025 #include "RooFitCore/RooDataSet.hh"
00026 #include "RooFitCore/RooProdPdf.hh"
00027 #include "RooFitCore/RooRealVar.hh"
00028 #include "RooFitCore/RooStringVar.hh"
00029 
00030 #include "RooRarFit/RooOsipDisc.hh"
00031 #include "RooRarFit/rarOsipDisc.hh"
00032 
00033 ClassImp(rarOsipDisc)
00034   ;
00035 
00039 rarOsipDisc::rarOsipDisc()
00040   : rarBasePdf(),
00041     _x(0), _r(0), _b(0), _a(0), _h(0), _s(0)
00042 {
00043   init();
00044 }
00045 
00058 rarOsipDisc::rarOsipDisc(const char *configFile, const char *configSec,
00059                          const char *configStr,
00060                          rarDatasets *theDatasets, RooDataSet *theData,
00061                          const char *name, const char *title)
00062   : rarBasePdf(configFile, configSec, configStr,
00063                theDatasets, theData, name, title),
00064     _x(0), _r(0), _b(0), _a(0), _h(0), _s(0)
00065 {
00066   init();
00067 }
00068 
00069 rarOsipDisc::~rarOsipDisc()
00070 {
00071 }
00072 
00079 void rarOsipDisc::init()
00080 {
00081   cout<<"init of rarOsipDisc for "<<GetName()<<":"<<endl;
00082   
00083   // first get its dependent/observable
00084   _x=createAbsReal("x", "observable"); assert(_x);
00085   RooRealVar *x=(RooRealVar *)RooArgList(_obsSet).at(0); assert(x);
00086   // Config pdf params
00087   
00088   _r=createAbsReal("r", "#r", .1, 0., 1., _x->getUnit());
00089   _b=createAbsReal("b", "#b", .1, 0., 1., _x->getUnit());
00090   _a=createAbsReal("a", "#a", .1, 0., 1., _x->getUnit());
00091   _h=createAbsReal("h", "#h", 1.0, -10, 10, _x->getUnit());
00092   _s=createAbsReal("s", "#s", .1, 0., 1., _x->getUnit());
00093 
00094   _params.Print("v");
00095   
00096   // create pdf
00097   if("OsipDisc"==_pdfType) {
00098     _thePdf=new RooOsipDisc(Form("the_%s", GetName()),
00099                                _pdfType+" "+GetTitle(), *_x, *_r, *_b, *_a, *_h, *_s);
00100   }
00101 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7