rarRelBreitWigner.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: rarRelBreitWigner.cc,v 1.4 2011/08/26 17:54:18 fwilson Exp $
00005  * Authors: Fergus Wilson
00006  * History:
00007  * 
00008  * Copyright (C) 2005-2012, RAL
00009  *****************************************************************************/
00010 
00011 // -- CLASS DESCRIPTION [RooRarFit] --
00012 // This class provides RelBreitWigner Pdf class for RooRarFit
00014 //
00015 // BEGIN_HTML
00016 // This class provides RelBreitWigner 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/RooRelBreitWigner.hh"
00031 #include "RooRarFit/rarRelBreitWigner.hh"
00032 
00033 ClassImp(rarRelBreitWigner);
00034 
00038 rarRelBreitWigner::rarRelBreitWigner()
00039   : rarBasePdf(),
00040     _x(0), _mean(0), _width(0), _radius(0), _mass_a(0), _mass_b(0), _spin(0)
00041 {
00042   init();
00043 }
00044 
00057 rarRelBreitWigner::rarRelBreitWigner(const char *configFile, 
00058                                      const char *configSec,
00059                                      const char *configStr,
00060                                      rarDatasets *theDatasets, 
00061                                      RooDataSet *theData,
00062                                      const char *name, const char *title)
00063   : rarBasePdf(configFile, configSec, configStr,
00064                theDatasets, theData, name, title),
00065     _x(0), _mean(0), _width(0),  _radius(0), _mass_a(0), _mass_b(0), _spin(0)
00066 {
00067   init();
00068 }
00069 
00070 rarRelBreitWigner::~rarRelBreitWigner()
00071 {
00072 }
00073 
00079 void rarRelBreitWigner::init()
00080 {
00081   // read in _parSpin from config section
00082   //_parSpin=atoi(readConfStr("spin", Form("%d", _parSpin), getVarSec()));
00083 
00084   cout <<"init of rarRelBreitWigner for "<<GetName()<<endl;
00085   
00086   // first get its obs
00087   _x=createAbsReal("x", "observable"); assert(_x);
00088 
00089   // Config pdf params
00090   _mean=createAbsReal("mean", "mean", 0, -10, 10);
00091   _width=createAbsReal("width", "width", 0, 0, 100);
00092   _radius=createAbsReal("radius", "radius", 3.1, "RooConstVar");
00093   _mass_a=createAbsReal("mass_a", "mass_a", 0.493677, "RooConstVar");
00094   _mass_b=createAbsReal("mass_b", "mass_b", 0.139570, "RooConstVar");
00095   _spin=createAbsReal("spin", "spin", 1, "RooConstVar");
00096 
00097   _params.Print("v");
00098   
00099   // create pdf
00100   _thePdf=new RooRelBreitWigner(Form("the_%s", GetName()),_pdfType+" "+GetTitle(),
00101                                 *_x, *_mean, *_width, *_radius, *_mass_a, *_mass_b, *_spin);
00102 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7