00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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;
00052 Double_t *_dataWgts;
00053 Double_t *_weights;
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
00065 Char_t _varName[128];
00066 Double_t _lo, _hi, _binWidth;
00067 Double_t _rho;
00068
00069 ClassDef(RooKeysPdf,2)
00070 };
00071
00072 #endif