RooKeysPdf.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitModels                                                     *
00004  *    File: $Id: RooKeysPdf.h,v 1.10 2007/05/11 09:13:07 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   GR, Gerhard Raven,   UC San Diego,        raven@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00009  *                                                                           *
00010  * Copyright (c) 2000-2005, Regents of the University of California          *
00011  *                          and Stanford University. All rights reserved.    *
00012  *                                                                           *
00013  * Redistribution and use in source and binary forms,                        *
00014  * with or without modification, are permitted according to the terms        *
00015  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00016  *****************************************************************************/
00017 #ifndef ROO_KEYS
00018 #define ROO_KEYS
00019 
00020 #include "RooAbsPdf.h"
00021 #include "RooRealProxy.h"
00022 
00023 class RooRealVar;
00024 
00025 class RooKeysPdf : public RooAbsPdf {
00026 public:
00027   enum Mirror { NoMirror, MirrorLeft, MirrorRight, MirrorBoth,
00028                 MirrorAsymLeft, MirrorAsymLeftRight,
00029                 MirrorAsymRight, MirrorLeftAsymRight,
00030                 MirrorAsymBoth };
00031   RooKeysPdf() ;
00032   RooKeysPdf(const char *name, const char *title,
00033              RooAbsReal& x, RooDataSet& data, Mirror mirror= NoMirror,
00034              Double_t rho=1);
00035   RooKeysPdf(const RooKeysPdf& other, const char* name=0);
00036   virtual TObject* clone(const char* newname) const {return new RooKeysPdf(*this,newname); }
00037   virtual ~RooKeysPdf();
00038   
00039   void LoadDataSet( RooDataSet& data);
00040 
00041 protected:
00042   
00043   RooRealProxy _x ;
00044   Double_t evaluate() const;
00045 
00046 private:
00047   
00048   Double_t evaluateFull(Double_t x) const;
00049 
00050   Int_t _nEvents;
00051   Double_t *_dataPts;  //[_nEvents]
00052   Double_t *_dataWgts; //[_nEvents]
00053   Double_t *_weights;  //[_nEvents]
00054   Double_t _sumWgt ;
00055   
00056   enum { _nPoints = 1000 };
00057   Double_t _lookupTable[_nPoints+1];
00058   
00059   Double_t g(Double_t x,Double_t sigma) const;
00060 
00061   Bool_t _mirrorLeft, _mirrorRight;
00062   Bool_t _asymLeft, _asymRight;
00063 
00064   // cached info on variable
00065   Char_t _varName[128];
00066   Double_t _lo, _hi, _binWidth;
00067   Double_t _rho;
00068   
00069   ClassDef(RooKeysPdf,2) // One-dimensional non-parametric kernel estimation p.d.f.
00070 };
00071 
00072 #endif

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