rarGounarisSakurai.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: rarGounarisSakurai.cc,v 1.2 2011/06/16 13:18:50 fwilson Exp $
00005  *****************************************************************************/
00006 
00007 // -- CLASS DESCRIPTION [RooRarFit] --
00008 // This class provides GounarisSakurai Pdf class for RooRarFit
00010 //
00011 // BEGIN_HTML
00012 // This class provides GounarisSakurai Pdf class for RooRarFit
00013 // END_HTML
00014 //
00015 
00016 #include "RooRarFit/rarVersion.hh"
00017 
00018 #include <iostream>
00019 #include <fstream>
00020 using namespace std;
00021 
00022 #include "RooFitCore/RooArgList.hh"
00023 #include "RooFitCore/RooDataSet.hh"
00024 #include "RooFitCore/RooProdPdf.hh"
00025 #include "RooFitCore/RooRealVar.hh"
00026 #include "RooFitCore/RooStringVar.hh"
00027 
00028 #include "RooRarFit/RooGounarisSakurai.hh"
00029 #include "RooRarFit/rarGounarisSakurai.hh"
00030 
00031 ClassImp(rarGounarisSakurai);
00032 
00036 rarGounarisSakurai::rarGounarisSakurai()
00037   : rarBasePdf(),
00038     _x(0), _mean(0), _width(0), _spin(0), 
00039     _radius(0), _mass_a(0), _mass_b(0)
00040 {
00041   init();
00042 }
00043 
00056 rarGounarisSakurai::rarGounarisSakurai(const char *configFile, 
00057                                      const char *configSec,
00058                                      const char *configStr,
00059                                      rarDatasets *theDatasets, 
00060                                      RooDataSet *theData,
00061                                      const char *name, const char *title)
00062   : rarBasePdf(configFile, configSec, configStr,
00063                theDatasets, theData, name, title),
00064     _x(0), _mean(0), _width(0), _spin(0),
00065     _radius(0), _mass_a(0), _mass_b(0)
00066 {
00067   init();
00068 }
00069 
00070 rarGounarisSakurai::~rarGounarisSakurai()
00071 {
00072 }
00073 
00079 void rarGounarisSakurai::init()
00080 {
00081   
00082   // first get its obs
00083   _x=createAbsReal("x", "observable"); assert(_x);
00084 
00085   // Config pdf params
00086   _mean   = createAbsReal("mean", "mean", 0, -10, 10);
00087   _width  = createAbsReal("width", "width", 0, 0, 10);
00088   _spin   = createAbsReal("spin", "spin", 1, 0, 3);
00089   _radius = createAbsReal("radius", "radius", 3.1, 0, 10); // GeV-1
00090   _mass_a = createAbsReal("mass_a", "mass_a", 0.1359, 0, 10); // pi mass
00091   _mass_b = createAbsReal("mass_b", "mass_b", 0.1359, 0, 10);
00092 
00093   // set spin and masses to fixed ?
00094   _spin->setAttribute("Constant", kTRUE);
00095   _mass_a->setAttribute("Constant", kTRUE);
00096   _mass_b->setAttribute("Constant", kTRUE);
00097 
00098   _params.Print("v");
00099   
00100   // create pdf
00101   _thePdf=new RooGounarisSakurai(Form("the_%s", GetName()),_pdfType+" "+GetTitle(),
00102                                  *_x, *_mean, *_width, *_spin, 
00103                                  *_radius, *_mass_a, *_mass_b);
00104 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7