rarArgusBG.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: rarArgusBG.cc,v 1.5 2011/06/16 13:18:49 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 ArgusBG Pdf class for RooRarFit
00014 //
00015 // BEGIN_HTML
00016 // This class provides ArgusBG 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 "RooFitModels/RooArgusBG.hh"
00031 
00032 #include "RooRarFit/rarArgusBG.hh"
00033 
00034 ClassImp(rarArgusBG)
00035   ;
00036 
00040 rarArgusBG::rarArgusBG()
00041   : rarBasePdf(),
00042     _x(0), _max(0), _c(0), _pow(0)
00043 {
00044   init();
00045 }
00046 
00059 rarArgusBG::rarArgusBG(const char *configFile, const char *configSec,
00060                        const char *configStr,
00061                        rarDatasets *theDatasets, RooDataSet *theData,
00062                        const char *name, const char *title)
00063   : rarBasePdf(configFile, configSec, configStr,
00064                theDatasets, theData, name, title),
00065     _x(0), _max(0), _c(0), _pow(0)
00066 {
00067   init();
00068 }
00069 
00070 rarArgusBG::~rarArgusBG()
00071 {
00072 }
00073 
00079 void rarArgusBG::init()
00080 {
00081   cout<<"init of rarArgusBG 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   _max=createAbsReal("max", "E_{end}", x->getMax(), _x->getUnit());
00088   _c=createAbsReal("c", "#xi", -23, -80, -1);
00089   _pow=createAbsReal("pow", "n", 0.5);
00090   _params.Print("v");
00091   
00092   // create pdf
00093   _thePdf=new RooArgusBG(Form("the_%s",GetName()), _pdfType+" "+GetTitle(),
00094                          *_x, *_max, *_c, *_pow);
00095 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7