RooCBShape.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitModels                                                     *
00004  *    File: $Id: RooCBShape.h,v 1.11 2007/07/12 20:30:49 wouter Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_CB_SHAPE
00017 #define ROO_CB_SHAPE
00018 
00019 #include "RooAbsPdf.h"
00020 #include "RooRealProxy.h"
00021 
00022 class RooRealVar;
00023 
00024 class RooCBShape : public RooAbsPdf {
00025 public:
00026   RooCBShape() {} ;
00027   RooCBShape(const char *name, const char *title, RooAbsReal& _m,
00028              RooAbsReal& _m0, RooAbsReal& _sigma,
00029              RooAbsReal& _alpha, RooAbsReal& _n);
00030 
00031   RooCBShape(const RooCBShape& other, const char* name = 0);
00032   virtual TObject* clone(const char* newname) const { return new RooCBShape(*this,newname); }
00033 
00034   inline virtual ~RooCBShape() { }
00035 
00036   virtual Int_t getAnalyticalIntegral( RooArgSet& allVars,  RooArgSet& analVars, const char* rangeName=0 ) const;
00037   virtual Double_t analyticalIntegral( Int_t code, const char* rangeName=0 ) const;
00038 
00039   // Optimized accept/reject generator support
00040   virtual Int_t getMaxVal(const RooArgSet& vars) const ;
00041   virtual Double_t maxVal(Int_t code) const ;
00042 
00043 protected:
00044 
00045   Double_t ApproxErf(Double_t arg) const ;
00046 
00047   RooRealProxy m;
00048   RooRealProxy m0;
00049   RooRealProxy sigma;
00050   RooRealProxy alpha;
00051   RooRealProxy n;
00052 
00053   Double_t evaluate() const;
00054 
00055 private:
00056 
00057   ClassDef(RooCBShape,1) // Crystal Ball lineshape PDF
00058 };
00059 
00060 #endif

Generated on Tue Jul 5 14:26:05 2011 for ROOT_528-00b_version by  doxygen 1.5.1