Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooCBShape.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitModels *
4  * File: $Id: RooCBShape.h,v 1.11 2007/07/12 20:30:49 wouter Exp $
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_CB_SHAPE
17 #define ROO_CB_SHAPE
18 
19 #include "RooAbsPdf.h"
20 #include "RooRealProxy.h"
21 
22 class RooRealVar;
23 
24 class RooCBShape : public RooAbsPdf {
25 public:
26  RooCBShape() {} ;
27  RooCBShape(const char *name, const char *title, RooAbsReal& _m,
28  RooAbsReal& _m0, RooAbsReal& _sigma,
29  RooAbsReal& _alpha, RooAbsReal& _n);
30 
31  RooCBShape(const RooCBShape& other, const char* name = 0);
32  virtual TObject* clone(const char* newname) const { return new RooCBShape(*this,newname); }
33 
34  inline virtual ~RooCBShape() { }
35 
36  virtual Int_t getAnalyticalIntegral( RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0 ) const;
37  virtual Double_t analyticalIntegral( Int_t code, const char* rangeName=0 ) const;
38 
39  // Optimized accept/reject generator support
40  virtual Int_t getMaxVal(const RooArgSet& vars) const ;
41  virtual Double_t maxVal(Int_t code) const ;
42 
43 protected:
44 
45  Double_t ApproxErf(Double_t arg) const ;
46 
47  RooRealProxy m;
48  RooRealProxy m0;
49  RooRealProxy sigma;
50  RooRealProxy alpha;
51  RooRealProxy n;
52 
53  Double_t evaluate() const;
54  RooSpan<double> evaluateBatch(std::size_t begin, std::size_t batchSize) const;
55 
56 private:
57 
58  ClassDef(RooCBShape,1) // Crystal Ball lineshape PDF
59 };
60 
61 #endif