rarLass.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: rarLass.cc,v 1.4 2011/06/16 13:18:50 fwilson Exp $
00005  * Authors: F. Wilson
00006  * History:
00007  * 
00008  * Copyright (C) 2005-2012, RAL
00009  *****************************************************************************/
00010 
00011 // -- CLASS DESCRIPTION [RooRarFit] --
00012 // This class provides parameterisation of LASS lineshape Pdf class for RooRarFit
00014 //
00015 // BEGIN_HTML
00016 // This class provides parameterisation of LASS lineshape 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 the RooFit Pdf
00031 #include "RooRarFit/RooLass.hh"
00032 
00033 // Include this classes header
00034 #include "RooRarFit/rarLass.hh"
00035 
00036 ClassImp(rarLass)
00037   ;
00038 
00042 rarLass::rarLass()
00043   : rarBasePdf(),
00044     _x(0), _mean(0), _width(0), _effRange(0), _scatlen(0), _turnOffVal(0)
00045 {
00046   init();
00047 }
00048 
00061 rarLass::rarLass(const char *configFile, const char *configSec,
00062                      const char *configStr,
00063                      rarDatasets *theDatasets, RooDataSet *theData,
00064                      const char *name, const char *title)
00065   : rarBasePdf(configFile, configSec, configStr,
00066                theDatasets, theData, name, title),
00067     _x(0), _mean(0), _width(0), _effRange(0), _scatlen(0), _turnOffVal(0)
00068 {
00069   init();
00070 }
00071 
00072 rarLass::~rarLass()
00073 {
00074 }
00075 
00081 void rarLass::init()
00082 {
00083   cout<<"init of rarLass for "<<GetName()<<":"<<endl;
00084   
00085   _x=createAbsReal("x", "observable"); assert(_x);
00086   RooRealVar *x=(RooRealVar *)RooArgList(_obsSet).at(0); assert(x);
00087  
00088   _mean=createAbsReal("mean", "#mu", (x->getMin()+x->getMax())/2,
00089                       x->getMin(), x->getMax(), _x->getUnit());
00090   // initialise with values from Bill's 34pt fit
00091   // http://www.slac.stanford.edu/~wmd/kpi_swave/kpi_swave_fit.note
00092   // They should replace those in Nucl Phys B296, 493 (1988)
00093   _width      = createAbsReal("width", "#Lambda", 0.279, 0, 1000);
00094   _effRange   = createAbsReal("effRange", "R", 1.76, 0, 1000);
00095   _scatlen    = createAbsReal("scatlen", "s", 1.95, 0, 1000);
00096   // LASS not tested beyond about 1.65 GeV
00097   _turnOffVal = createAbsReal("turnOffVal", "t", 1.825, 0, 1000);
00098   _params.Print("v");
00099 
00100   _thePdf = new RooLass(Form("the_%s", GetName()),_pdfType+" "+GetTitle(),
00101                                *_x, *_mean, *_width, *_effRange, *_scatlen, *_turnOffVal);
00102 
00103 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7