rarCruijff.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: rarCruijff.cc,v 1.4 2011/06/16 13:18:49 fwilson Exp $
00005  * Authors: Karsten Koeneke, Lei Zhang
00006  * History:
00007  * 
00008  *****************************************************************************/
00009 
00010 // -- CLASS DESCRIPTION [RooRarFit] --
00011 // This class provides the Cruijff Pdf class for RooRarFit
00012 //
00014 //
00015 // BEGIN_HTML
00016 // This class provides the Cruijff Pdf class for RooRarFit
00017 //
00018 // END_HTML
00019 //
00020 
00021 #include "RooRarFit/rarVersion.hh"
00022 
00023 #include "Riostream.h"
00024 
00025 #include "RooFitCore/RooArgList.hh"
00026 #include "RooFitCore/RooDataSet.hh"
00027 #include "RooFitCore/RooProdPdf.hh"
00028 #include "RooFitCore/RooRealVar.hh"
00029 #include "RooFitCore/RooStringVar.hh"
00030 
00031 // Include the RooFit Pdf
00032 #include "RooRarFit/RooCruijff.hh"
00033 
00034 // Include this classes header
00035 #include "RooRarFit/rarCruijff.hh"
00036 
00037 ClassImp(rarCruijff)
00038   ;
00039 
00043 rarCruijff::rarCruijff()
00044   : rarBasePdf(),
00045     _x(0), _m0(0), _sigmaL(0), _sigmaR(0), _alphaL(0), _alphaR(0)
00046 {
00047   init();
00048 }
00049 
00062 rarCruijff::rarCruijff(const char *configFile, const char *configSec,
00063                        const char *configStr,
00064                        rarDatasets *theDatasets, RooDataSet *theData,
00065                        const char *name, const char *title)
00066   : rarBasePdf(configFile, configSec, configStr,
00067                theDatasets, theData, name, title),
00068     _x(0), _m0(0), _sigmaL(0), _sigmaR(0), _alphaL(0), _alphaR(0)
00069 {
00070   init();
00071 }
00072 
00073 rarCruijff::~rarCruijff()
00074 {
00075 }
00076 
00082 void rarCruijff::init()
00083 {
00084   cout<<"init of rarCruijff for "<<GetName()<<":"<<endl;
00085   
00086   // first get its obs
00087   _x=createAbsReal("x", "observable"); assert(_x);
00088   // Config pdf params
00089   // for example, a is now mean, b sigma, etc.
00090   // [myPdf Config]
00091   // configStr = UsrPdf
00092   // x = AbsReal Def
00093   // mean = AbsReal Def
00094   // sigmaL = AbsReal Def
00095   // sigmaR = AbsReal Def
00096   // alphaL = AbsReal Def
00097   // alphaR = AbsReal Def
00098   
00099   // Default param creation
00100   _m0     = createAbsReal("mean", "#mu", 0, -10, 10);
00101   _sigmaL = createAbsReal("sigmaL", "#sigma_{L}", 0, -10, 10);
00102   _sigmaR = createAbsReal("sigmaR", "#sigma_{R}", 0, -10, 10);
00103   _alphaL = createAbsReal("alphaL", "#alpha_{L}", 0, -10, 10);
00104   _alphaR = createAbsReal("alphaR", "#alpha_{R}", 0, -10, 10);
00105   _params.Print("v");
00106 
00107   // create pdf
00108   _thePdf=new RooCruijff(Form("the_%s", GetName()),_pdfType+" "+GetTitle(),
00109                          *_x, *_m0, *_sigmaL, *_sigmaR, *_alphaL, *_alphaR);
00110 
00111 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7