Logo ROOT  
Reference Guide
RooKeysPdf.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitModels *
4  * File: $Id: RooKeysPdf.h,v 1.10 2007/05/11 09:13:07 verkerke Exp $
5  * Authors: *
6  * GR, Gerhard Raven, UC San Diego, raven@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
9  * *
10  * Copyright (c) 2000-2005, Regents of the University of California *
11  * and Stanford University. All rights reserved. *
12  * *
13  * Redistribution and use in source and binary forms, *
14  * with or without modification, are permitted according to the terms *
15  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
16  *****************************************************************************/
17 #ifndef ROO_KEYS
18 #define ROO_KEYS
19 
20 #include "RooAbsPdf.h"
21 #include "RooRealProxy.h"
22 
23 class RooRealVar;
24 
25 class RooKeysPdf : public RooAbsPdf {
26 public:
31  RooKeysPdf() ;
32  RooKeysPdf(const char *name, const char *title,
33  RooAbsReal& x, RooDataSet& data, Mirror mirror= NoMirror,
34  Double_t rho=1);
35  RooKeysPdf(const char *name, const char *title,
36  RooAbsReal& x, RooRealVar& xdata, RooDataSet& data, Mirror mirror= NoMirror,
37  Double_t rho=1);
38  RooKeysPdf(const RooKeysPdf& other, const char* name=0);
39  virtual TObject* clone(const char* newname) const {return new RooKeysPdf(*this,newname); }
40  virtual ~RooKeysPdf();
41 
42  virtual Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars,
43  const char* rangeName = 0) const;
44  virtual Double_t analyticalIntegral(Int_t code, const char* rangeName = 0) const;
45  virtual Int_t getMaxVal(const RooArgSet& vars) const;
46  virtual Double_t maxVal(Int_t code) const;
47 
48  void LoadDataSet( RooDataSet& data);
49 
50 protected:
51 
53  Double_t evaluate() const;
54 
55 private:
56  // how far you have to go out in a Gaussian until it is smaller than the
57  // machine precision
58  static const Double_t _nSigma; //!
59 
61  Double_t *_dataPts; //[_nEvents]
62  Double_t *_dataWgts; //[_nEvents]
63  Double_t *_weights; //[_nEvents]
65 
66  enum { _nPoints = 1000 };
68 
70 
73 
74  // cached info on variable
78 
79  ClassDef(RooKeysPdf,2) // One-dimensional non-parametric kernel estimation p.d.f.
80 };
81 
82 #endif
RooKeysPdf::evaluate
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooKeysPdf.cxx:306
RooKeysPdf::_sumWgt
Double_t _sumWgt
Definition: RooKeysPdf.h:64
RooKeysPdf::g
Double_t g(Double_t x, Double_t sigma) const
Definition: RooKeysPdf.cxx:393
RooKeysPdf::_x
RooRealProxy _x
Definition: RooKeysPdf.h:52
RooAbsReal::sigma
RooAbsMoment * sigma(RooRealVar &obs)
Definition: RooAbsReal.h:335
RooKeysPdf::_varName
Char_t _varName[128]
Definition: RooKeysPdf.h:75
RooKeysPdf::LoadDataSet
void LoadDataSet(RooDataSet &data)
Definition: RooKeysPdf.cxx:178
RooKeysPdf::_mirrorRight
Bool_t _mirrorRight
Definition: RooKeysPdf.h:71
RooKeysPdf::_nPoints
@ _nPoints
Definition: RooKeysPdf.h:66
x
Double_t x[n]
Definition: legend1.C:17
RooKeysPdf::_nSigma
static const Double_t _nSigma
Definition: RooKeysPdf.h:58
RooAbsReal
Definition: RooAbsReal.h:61
RooKeysPdf::MirrorLeft
@ MirrorLeft
Definition: RooKeysPdf.h:27
RooKeysPdf::getMaxVal
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise capability to determine maximum value of function for given set of observables.
Definition: RooKeysPdf.cxx:376
RooKeysPdf::_rho
Double_t _rho
Definition: RooKeysPdf.h:77
bool
RooKeysPdf::MirrorAsymBoth
@ MirrorAsymBoth
Definition: RooKeysPdf.h:30
RooKeysPdf::MirrorLeftAsymRight
@ MirrorLeftAsymRight
Definition: RooKeysPdf.h:29
RooKeysPdf::MirrorRight
@ MirrorRight
Definition: RooKeysPdf.h:27
RooKeysPdf::analyticalIntegral
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
Definition: RooKeysPdf.cxx:336
RooKeysPdf::MirrorAsymLeftRight
@ MirrorAsymLeftRight
Definition: RooKeysPdf.h:28
RooKeysPdf::clone
virtual TObject * clone(const char *newname) const
Definition: RooKeysPdf.h:39
RooKeysPdf::getAnalyticalIntegral
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
Definition: RooKeysPdf.cxx:329
RooAbsPdf.h
RooKeysPdf::Mirror
Mirror
Definition: RooKeysPdf.h:27
RooKeysPdf::_lookupTable
Double_t _lookupTable[_nPoints+1]
Definition: RooKeysPdf.h:67
RooRealProxy.h
RooKeysPdf::_mirrorLeft
Bool_t _mirrorLeft
Definition: RooKeysPdf.h:71
RooKeysPdf::_asymLeft
Bool_t _asymLeft
Definition: RooKeysPdf.h:72
RooKeysPdf::_weights
Double_t * _weights
Definition: RooKeysPdf.h:63
RooKeysPdf::maxVal
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
Definition: RooKeysPdf.cxx:382
RooTemplateProxy< RooAbsReal >
Double_t
double Double_t
Definition: RtypesCore.h:59
RooKeysPdf::_dataPts
Double_t * _dataPts
Definition: RooKeysPdf.h:61
RooKeysPdf::_hi
Double_t _hi
Definition: RooKeysPdf.h:76
RooKeysPdf::_dataWgts
Double_t * _dataWgts
Definition: RooKeysPdf.h:62
RooKeysPdf::_nEvents
Int_t _nEvents
Definition: RooKeysPdf.h:60
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooKeysPdf::MirrorAsymRight
@ MirrorAsymRight
Definition: RooKeysPdf.h:29
name
char name[80]
Definition: TGX11.cxx:110
RooKeysPdf::~RooKeysPdf
virtual ~RooKeysPdf()
Definition: RooKeysPdf.cxx:156
RooDataSet
Definition: RooDataSet.h:33
RooKeysPdf::RooKeysPdf
RooKeysPdf()
coverity[UNINIT_CTOR]
Definition: RooKeysPdf.cxx:60
RooKeysPdf::_asymRight
Bool_t _asymRight
Definition: RooKeysPdf.h:72
RooKeysPdf::_lo
Double_t _lo
Definition: RooKeysPdf.h:76
RooAbsPdf
Definition: RooAbsPdf.h:40
RooKeysPdf::_binWidth
Double_t _binWidth
Definition: RooKeysPdf.h:76
RooRealVar
Definition: RooRealVar.h:36
Char_t
char Char_t
Definition: RtypesCore.h:33
RooKeysPdf::NoMirror
@ NoMirror
Definition: RooKeysPdf.h:27
RooKeysPdf
Definition: RooKeysPdf.h:25
RooKeysPdf::MirrorBoth
@ MirrorBoth
Definition: RooKeysPdf.h:27
RooKeysPdf::MirrorAsymLeft
@ MirrorAsymLeft
Definition: RooKeysPdf.h:28
RooArgSet
Definition: RooArgSet.h:28
int