Logo ROOT   6.10/09
Reference Guide
RooAbsPdf.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooAbsPdf.h,v 1.90 2007/07/21 21:32:52 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_ABS_PDF
17 #define ROO_ABS_PDF
18 
19 #include "RooAbsReal.h"
20 //#include "RooRealIntegral.h"
21 #include "RooNameSet.h"
22 #include "RooObjCacheManager.h"
23 #include "RooCmdArg.h"
24 
25 class RooDataSet;
26 class RooDataHist ;
27 class RooArgSet ;
28 class RooRealProxy ;
29 class RooAbsGenContext ;
30 class RooFitResult ;
31 class RooExtendPdf ;
32 class RooCategory ;
33 class TPaveText;
34 class TH1F;
35 class TH2F;
36 class TList ;
37 class RooLinkedList ;
38 class RooNumGenConfig ;
39 class RooRealIntegral ;
40 
41 class RooAbsPdf : public RooAbsReal {
42 public:
43 
44  // Constructors, assignment etc
45  RooAbsPdf() ;
46  RooAbsPdf(const char *name, const char *title=0) ;
47  RooAbsPdf(const char *name, const char *title, Double_t minVal, Double_t maxVal) ;
48  // RooAbsPdf(const RooAbsPdf& other, const char* name=0);
49  virtual ~RooAbsPdf();
50 
51  // Toy MC generation
52  RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg& arg1,
53  const RooCmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(),
54  const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none()) ;
55  RooDataSet *generate(const RooArgSet &whatVars,
56  const RooCmdArg& arg1=RooCmdArg::none(),const RooCmdArg& arg2=RooCmdArg::none(),
57  const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& arg4=RooCmdArg::none(),
58  const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none()) ;
59  RooDataSet *generate(const RooArgSet &whatVars, Double_t nEvents = 0, Bool_t verbose=kFALSE, Bool_t autoBinned=kTRUE,
60  const char* binnedTag="", Bool_t expectedData=kFALSE, Bool_t extended = kFALSE) const;
61  RooDataSet *generate(const RooArgSet &whatVars, const RooDataSet &prototype, Int_t nEvents= 0,
62  Bool_t verbose=kFALSE, Bool_t randProtoOrder=kFALSE, Bool_t resampleProto=kFALSE) const;
63 
64 
65  class GenSpec {
66  public:
67  virtual ~GenSpec() ;
69  private:
70  GenSpec(RooAbsGenContext* context, const RooArgSet& whatVars, RooDataSet* protoData, Int_t nGen, Bool_t extended,
71  Bool_t randProto, Bool_t resampleProto, TString dsetName, Bool_t init=kFALSE) ;
72  GenSpec(const GenSpec& other) ;
73 
74  friend class RooAbsPdf ;
84  ClassDef(GenSpec,0) // Generation specification
85  } ;
86 
87  GenSpec* prepareMultiGen(const RooArgSet &whatVars,
88  const RooCmdArg& arg1=RooCmdArg::none(),const RooCmdArg& arg2=RooCmdArg::none(),
89  const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& arg4=RooCmdArg::none(),
90  const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none()) ;
91  RooDataSet* generate(GenSpec&) const ;
92 
93 
94  virtual RooDataHist *generateBinned(const RooArgSet &whatVars, Double_t nEvents, const RooCmdArg& arg1,
95  const RooCmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(),
96  const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none()) ;
97  virtual RooDataHist *generateBinned(const RooArgSet &whatVars,
98  const RooCmdArg& arg1=RooCmdArg::none(),const RooCmdArg& arg2=RooCmdArg::none(),
99  const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& arg4=RooCmdArg::none(),
100  const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none()) ;
101  virtual RooDataHist *generateBinned(const RooArgSet &whatVars, Double_t nEvents, Bool_t expectedData=kFALSE, Bool_t extended=kFALSE) const;
102 
103  virtual RooDataSet* generateSimGlobal(const RooArgSet& whatVars, Int_t nEvents) ;
104 
105  virtual RooPlot* plotOn(RooPlot* frame,
106  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
107  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
108  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
109  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none(),
110  const RooCmdArg& arg9=RooCmdArg::none(), const RooCmdArg& arg10=RooCmdArg::none()
111  ) const {
112  return RooAbsReal::plotOn(frame,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) ;
113  }
114  virtual RooPlot* plotOn(RooPlot* frame, RooLinkedList& cmdList) const ;
115 
116 
117  virtual RooPlot* paramOn(RooPlot* frame,
118  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
119  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
120  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
121  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
122 
123  virtual RooPlot* paramOn(RooPlot* frame, const RooAbsData* data, const char *label= "", Int_t sigDigits = 2,
124  Option_t *options = "NELU", Double_t xmin=0.50,
125  Double_t xmax= 0.99,Double_t ymax=0.95) ;
126 
127  // Built-in generator support
128  virtual Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const;
129  virtual void initGenerator(Int_t code) ;
130  virtual void generateEvent(Int_t code);
131  virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const ;
132 
133  // Configuration of MC generators used for this pdf
134  const RooNumGenConfig* getGeneratorConfig() const ;
138  void setGeneratorConfig() ;
139  void setGeneratorConfig(const RooNumGenConfig& config) ;
140 
141  // -log(L) fits to binned and unbinned data
142  virtual RooFitResult* fitTo(RooAbsData& data, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
143  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
144  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
145  virtual RooFitResult* fitTo(RooAbsData& data, const RooLinkedList& cmdList) ;
146 
147  virtual RooAbsReal* createNLL(RooAbsData& data, const RooLinkedList& cmdList) ;
148  virtual RooAbsReal* createNLL(RooAbsData& data, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
149  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
150  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
151 
152  // Chi^2 fits to histograms
153  using RooAbsReal::chi2FitTo ;
154  using RooAbsReal::createChi2 ;
155  virtual RooFitResult* chi2FitTo(RooDataHist& data, const RooLinkedList& cmdList) ;
156  virtual RooAbsReal* createChi2(RooDataHist& data, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
157  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
158  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
159 
160  // Chi^2 fits to X-Y datasets
161  virtual RooAbsReal* createChi2(RooDataSet& data, const RooLinkedList& cmdList) ;
162 
163 
164 
165 
166 
167  // Constraint management
168  virtual RooArgSet* getConstraints(const RooArgSet& /*observables*/, RooArgSet& /*constrainedParams*/, Bool_t /*stripDisconnected*/) const {
169  // Interface to retrieve constraint terms on this pdf. Default implementation returns null
170  return 0 ;
171  }
172  virtual RooArgSet* getAllConstraints(const RooArgSet& observables, RooArgSet& constrainedParams, Bool_t stripDisconnected=kTRUE) const ;
173 
174  // Project p.d.f into lower dimensional p.d.f
175  virtual RooAbsPdf* createProjection(const RooArgSet& iset) ;
176 
177  // Create cumulative density function from p.d.f
178  RooAbsReal* createCdf(const RooArgSet& iset, const RooArgSet& nset=RooArgSet()) ;
179  RooAbsReal* createCdf(const RooArgSet& iset, const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg::none(),
180  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
181  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
182  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
183  RooAbsReal* createScanCdf(const RooArgSet& iset, const RooArgSet& nset, Int_t numScanBins, Int_t intOrder) ;
184 
185  // Function evaluation support
186  virtual Bool_t traceEvalHook(Double_t value) const ;
187  virtual Double_t getValV(const RooArgSet* set=0) const ;
188  virtual Double_t getLogVal(const RooArgSet* set=0) const ;
189 
190  Double_t getNorm(const RooArgSet& nset) const {
191  // Get p.d.f normalization term needed for observables 'nset'
192  return getNorm(&nset) ;
193  }
194  virtual Double_t getNorm(const RooArgSet* set=0) const ;
195 
196  virtual void resetErrorCounters(Int_t resetValue=10) ;
197  void setTraceCounter(Int_t value, Bool_t allNodes=kFALSE) ;
198  Bool_t traceEvalPdf(Double_t value) const ;
199 
200  Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
201 
202  virtual Bool_t selfNormalized() const {
203  // If true, p.d.f is taken as self-normalized and no attempt is made to add a normalization term
204  // This default implementation return false
205  return kFALSE ;
206  }
207 
208  // Support for extended maximum likelihood, switched off by default
210  virtual ExtendMode extendMode() const {
211  // Returns ability of p.d.f to provided extended likelihood terms. Possible
212  // answers are CanNotBeExtended, CanBeExtended or MustBeExtended. This
213  // default implementation always return CanNotBeExtended
214  return CanNotBeExtended ;
215  }
216  inline Bool_t canBeExtended() const {
217  // If true p.d.f can provide extended likelihood term
218  return (extendMode() != CanNotBeExtended) ;
219  }
220  inline Bool_t mustBeExtended() const {
221  // If true p.d.f must extended likelihood term
222  return (extendMode() == MustBeExtended) ;
223  }
224  virtual Double_t expectedEvents(const RooArgSet* nset) const ;
225  virtual Double_t expectedEvents(const RooArgSet& nset) const {
226  // Return expecteded number of p.d.fs to be used in calculated of extended likelihood
227  return expectedEvents(&nset) ;
228  }
229 
230  // Printing interface (human readable)
231  virtual void printValue(std::ostream& os) const ;
232  virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
233 
234  static void verboseEval(Int_t stat) ;
235  static int verboseEval() ;
236 
237  virtual Double_t extendedTerm(Double_t observedEvents, const RooArgSet* nset=0) const ;
238 
239  static void clearEvalError() ;
240  static Bool_t evalError() ;
241 
242  void setNormRange(const char* rangeName) ;
243  const char* normRange() const {
244  return _normRange.Length()>0 ? _normRange.Data() : 0 ;
245  }
246  void setNormRangeOverride(const char* rangeName) ;
247 
248  const RooAbsReal* getNormIntegral(const RooArgSet& nset) const { return getNormObj(0,&nset,0) ; }
249 
250 protected:
251 
252 public:
253  virtual const RooAbsReal* getNormObj(const RooArgSet* set, const RooArgSet* iset, const TNamed* rangeName=0) const ;
254 
255  virtual RooAbsGenContext* binnedGenContext(const RooArgSet &vars, Bool_t verbose= kFALSE) const ;
256 
257  virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype=0,
258  const RooArgSet* auxProto=0, Bool_t verbose= kFALSE) const ;
259 
260  virtual RooAbsGenContext* autoGenContext(const RooArgSet &vars, const RooDataSet* prototype=0, const RooArgSet* auxProto=0,
261  Bool_t verbose=kFALSE, Bool_t autoBinned=kTRUE, const char* binnedTag="") const ;
262 
263 protected:
264 
265  RooDataSet *generate(RooAbsGenContext& context, const RooArgSet& whatVars, const RooDataSet* prototype,
266  Double_t nEvents, Bool_t verbose, Bool_t randProtoOrder, Bool_t resampleProto, Bool_t skipInit=kFALSE,
267  Bool_t extended=kFALSE) const ;
268 
269  // Implementation version
270  virtual RooPlot* paramOn(RooPlot* frame, const RooArgSet& params, Bool_t showConstants=kFALSE,
271  const char *label= "", Int_t sigDigits = 2, Option_t *options = "NELU", Double_t xmin=0.65,
272  Double_t xmax= 0.99,Double_t ymax=0.95, const RooCmdArg* formatCmd=0) ;
273 
274 
275  virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const;
276 
277  friend class RooEffGenContext ;
278  friend class RooAddGenContext ;
279  friend class RooProdGenContext ;
280  friend class RooSimGenContext ;
281  friend class RooSimSplitGenContext ;
282  friend class RooConvGenContext ;
283  friend class RooSimultaneous ;
284  friend class RooAddGenContextOrig ;
285  friend class RooProdPdf ;
286  friend class RooMCStudy ;
287 
288  Int_t* randomizeProtoOrder(Int_t nProto,Int_t nGen,Bool_t resample=kFALSE) const ;
289 
290  friend class RooExtendPdf ;
291  // This also forces the definition of a copy ctor in derived classes
292  RooAbsPdf(const RooAbsPdf& other, const char* name = 0);
293 
294  friend class RooRealIntegral ;
296 
297  virtual Bool_t syncNormalization(const RooArgSet* dset, Bool_t adjustProxies=kTRUE) const ;
298 
299  friend class RooAbsAnaConvPdf ;
300  mutable Double_t _rawValue ;
301  mutable RooAbsReal* _norm ; //! Normalization integral (owned by _normMgr)
302  mutable RooArgSet* _normSet ; //! Normalization set with for above integral
303 
304  class CacheElem : public RooAbsCacheElement {
305  public:
306  CacheElem(RooAbsReal& norm) : _norm(&norm) {} ;
308  virtual ~CacheElem() ;
309  virtual RooArgList containedArgs(Action) { return RooArgList(*_norm) ; }
311  } ;
312  mutable RooObjCacheManager _normMgr ; // The cache manager
313 
314  friend class CacheElem ; // Cache needs to be able to clear _norm pointer
315 
317  // Hook function intercepting redirectServer calls. Discard current normalization
318  // object if any server is redirected
319 
320  // Object is own by _normCacheManager that will delete object as soon as cache
321  // is sterilized by server redirect
322  _norm = 0 ;
323  return kFALSE ;
324  } ;
325 
326 
327  mutable Int_t _errorCount ; // Number of errors remaining to print
328  mutable Int_t _traceCount ; // Number of traces remaining to print
329  mutable Int_t _negCount ; // Number of negative probablities remaining to print
330 
331  Bool_t _selectComp ; // Component selection flag for RooAbsPdf::plotCompOn
332 
333  static void raiseEvalError() ;
334 
336 
337  RooNumGenConfig* _specGeneratorConfig ; //! MC generator configuration specific for this object
338 
339  TString _normRange ; // Normalization range
341 
342  ClassDef(RooAbsPdf,4) // Abstract PDF with normalization support
343 };
344 
345 
346 #endif
virtual RooAbsReal * createNLL(RooAbsData &data, const RooLinkedList &cmdList)
Construct representation of -log(L) of PDFwith given dataset.
Definition: RooAbsPdf.cxx:777
RooMCStudy is a help class to facilitate Monte Carlo studies such as 'goodness-of-fit' studies...
Definition: RooMCStudy.h:32
Bool_t _selectComp
Definition: RooAbsPdf.h:331
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg(), const RooCmdArg &arg10=RooCmdArg()) const
Plot (project) PDF on specified frame.
float xmin
Definition: THbookFile.cxx:93
virtual RooFitResult * chi2FitTo(RooDataHist &data, const RooLinkedList &cmdList)
Internal back-end function to steer chi2 fits.
Definition: RooAbsPdf.cxx:1451
friend class RooAbsPdf
Definition: RooAbsPdf.h:74
void setTraceCounter(Int_t value, Bool_t allNodes=kFALSE)
Reset trace counter to given value, limiting the number of future trace messages for this pdf to 'val...
Definition: RooAbsPdf.cxx:580
virtual RooAbsReal * createChi2(RooDataHist &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Create a chi-2 from a histogram and this function.
Definition: RooAbsPdf.cxx:1487
virtual RooDataHist * generateBinned(const RooArgSet &whatVars, Double_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
Generate a new dataset containing the specified variables with events sampled from our distribution...
Definition: RooAbsPdf.cxx:2175
const char Option_t
Definition: RtypesCore.h:62
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print multi line detailed information of this RooAbsPdf.
Definition: RooAbsPdf.cxx:1611
RooProdPdf is an efficient implementation of a product of PDFs of the form.
Definition: RooProdPdf.h:31
virtual ~RooAbsPdf()
Destructor.
Definition: RooAbsPdf.cxx:234
virtual Bool_t selfNormalized() const
Definition: RooAbsPdf.h:202
void setGeneratorConfig()
Remove the specialized numeric MC generator configuration associated with this object.
Definition: RooAbsPdf.cxx:3245
Int_t _errorCount
Definition: RooAbsPdf.h:324
TString _normRange
MC generator configuration specific for this object.
Definition: RooAbsPdf.h:339
Normalization set with for above integral.
Definition: RooAbsPdf.h:304
void setNormRange(const char *rangeName)
Definition: RooAbsPdf.cxx:3276
virtual RooAbsReal * createChi2(RooDataHist &data, const RooLinkedList &cmdList)
Internal back-end function to create a chi2.
Basic string class.
Definition: TString.h:129
static Bool_t _evalError
Definition: RooAbsPdf.h:335
tomato 1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:551
Int_t * randomizeProtoOrder(Int_t nProto, Int_t nGen, Bool_t resample=kFALSE) const
Return lookup table with randomized access order for prototype events, given nProto prototype data ev...
Definition: RooAbsPdf.cxx:2057
virtual Double_t getLogVal(const RooArgSet *set=0) const
Return the log of the current value with given normalization An error message is printed if the argum...
Definition: RooAbsPdf.cxx:606
RooNumGenConfig * _specGeneratorConfig
Definition: RooAbsPdf.h:337
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
GenSpec * prepareMultiGen(const RooArgSet &whatVars, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none())
Prepare GenSpec configuration object for efficient generation of multiple datasets from idetical spec...
Definition: RooAbsPdf.cxx:1855
RooSimSplitGenContext is an efficient implementation of the generator context specific for RooSimulta...
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none(), const RooCmdArg &arg10=RooCmdArg::none()) const
Plot (project) PDF on specified frame.
Definition: RooAbsPdf.h:105
static TString _normRangeOverride
Definition: RooAbsPdf.h:340
static int verboseEval()
Return global level of verbosity for p.d.f. evaluations.
Definition: RooAbsPdf.cxx:2950
Bool_t mustBeExtended() const
Definition: RooAbsPdf.h:220
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
Definition: RooAbsPdf.cxx:321
RooDataSet * _protoData
Definition: RooAbsPdf.h:77
RooAbsGenContext * _genContext
Definition: RooAbsPdf.h:75
RooAbsReal * createCdf(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Create a cumulative distribution function of this p.d.f in terms of the observables listed in iset...
Definition: RooAbsPdf.cxx:3027
RooAbsReal * createScanCdf(const RooArgSet &iset, const RooArgSet &nset, Int_t numScanBins, Int_t intOrder)
Definition: RooAbsPdf.cxx:3106
static const RooCmdArg & none()
Return reference to null argument.
Definition: RooCmdArg.cxx:50
const char * normRange() const
Definition: RooAbsPdf.h:243
Bool_t traceEvalPdf(Double_t value) const
Check that passed value is positive and not 'not-a-number'.
Definition: RooAbsPdf.cxx:341
RooDataSet is a container class to hold N-dimensional binned data.
Definition: RooDataHist.h:40
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects The class perfor...
#define ClassDef(name, id)
Definition: Rtypes.h:297
RooAbsPdf()
Default constructor.
Definition: RooAbsPdf.cxx:176
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
RooNumGenConfig * specialGeneratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
Definition: RooAbsPdf.cxx:3190
virtual RooArgSet * getConstraints(const RooArgSet &, RooArgSet &, Bool_t) const
Definition: RooAbsPdf.h:168
TString _dsetName
Definition: RooAbsPdf.h:82
RooConvGenContext is an efficient implementation of the generator context specific for RooAbsAnaConvP...
friend class RooArgSet
Definition: RooAbsArg.h:469
virtual RooAbsPdf * createProjection(const RooArgSet &iset)
Return a p.d.f that represent a projection of this p.d.f integrated over given observables.
Definition: RooAbsPdf.cxx:2989
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
Definition: RooAbsPdf.cxx:2930
virtual RooAbsGenContext * binnedGenContext(const RooArgSet &vars, Bool_t verbose=kFALSE) const
Return a binned generator context.
Definition: RooAbsPdf.cxx:1628
static void clearEvalError()
Clear the evaluation error flag.
Definition: RooAbsPdf.cxx:3150
virtual Bool_t syncNormalization(const RooArgSet *dset, Bool_t adjustProxies=kTRUE) const
Verify that the normalization integral cached with this PDF is valid for given set of normalization o...
Definition: RooAbsPdf.cxx:435
virtual void operModeHook()
Definition: RooAbsArg.h:428
virtual RooArgList containedArgs(Action)
Definition: RooAbsPdf.h:309
virtual Double_t expectedEvents(const RooArgSet &nset) const
Definition: RooAbsPdf.h:225
A doubly linked list.
Definition: TList.h:43
const RooAbsReal * getNormIntegral(const RooArgSet &nset) const
Definition: RooAbsPdf.h:248
virtual Double_t getValV(const RooArgSet *set=0) const
Return current value, normalizated by integrating over the observables in 'nset'. ...
Definition: RooAbsPdf.cxx:252
const int nEvents
Definition: testRooFit.cxx:42
RooAbsReal * _norm
Definition: RooAbsPdf.h:301
float ymax
Definition: THbookFile.cxx:93
RooAbsReal * _norm
Definition: RooAbsPdf.h:310
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
RooEffGenContext is a specialized generator context for p.d.fs represented by class RooEffProd...
RooSimGenContext is an efficient implementation of the generator context specific for RooSimultaneous...
static Int_t _verboseEval
Definition: RooAbsPdf.h:295
void setNormRangeOverride(const char *rangeName)
Definition: RooAbsPdf.cxx:3293
virtual void generateEvent(Int_t code)
Interface for generation of anan event using the algorithm corresponding to the specified code...
Definition: RooAbsPdf.cxx:2123
RooObjCacheManager _normMgr
Definition: RooAbsPdf.h:312
tomato 2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:249
static void raiseEvalError()
Raise the evaluation error flag.
Definition: RooAbsPdf.cxx:3170
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
bool verbose
Int_t _negCount
Definition: RooAbsPdf.h:329
Ssiz_t Length() const
Definition: TString.h:388
Double_t getNorm(const RooArgSet &nset) const
Definition: RooAbsPdf.h:190
Int_t _traceCount
Definition: RooAbsPdf.h:328
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:37
float xmax
Definition: THbookFile.cxx:93
virtual void resetErrorCounters(Int_t resetValue=10)
Reset error counter to given value, limiting the number of future error messages for this pdf to 'res...
Definition: RooAbsPdf.cxx:568
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:29
RooCategory represents a fundamental (non-derived) discrete value object.
Definition: RooCategory.h:24
virtual RooAbsGenContext * autoGenContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="") const
Definition: RooAbsPdf.cxx:1647
Bool_t canBeExtended() const
Definition: RooAbsPdf.h:216
virtual const RooAbsReal * getNormObj(const RooArgSet *set, const RooArgSet *iset, const TNamed *rangeName=0) const
Return pointer to RooAbsReal object that implements calculation of integral over observables iset in ...
Definition: RooAbsPdf.cxx:400
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
Definition: RooPlot.h:41
virtual Bool_t isDirectGenSafe(const RooAbsArg &arg) const
Check if given observable can be safely generated using the pdfs internal generator mechanism (if tha...
Definition: RooAbsPdf.cxx:2136
const Bool_t kFALSE
Definition: RtypesCore.h:92
const RooNumGenConfig * getGeneratorConfig() const
Return the numeric MC generator configuration used for this object.
Definition: RooAbsPdf.cxx:3218
virtual ExtendMode extendMode() const
Definition: RooAbsPdf.h:210
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
A Pave (see TPave) with text, lines or/and boxes inside.
Definition: TPaveText.h:21
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Definition: RooAbsPdf.h:316
static Int_t init()
double Double_t
Definition: RtypesCore.h:55
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
virtual Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
Definition: RooAbsPdf.cxx:2101
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Interface function to create a generator context from a p.d.f.
Definition: RooAbsPdf.cxx:1638
RooArgSet _whatVars
Definition: RooAbsPdf.h:76
static RooNumGenConfig * defaultGeneratorConfig()
Returns the default numeric MC generator configuration for all RooAbsReals.
Definition: RooAbsPdf.cxx:3180
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
virtual Bool_t traceEvalHook(Double_t value) const
WVE 08/21/01 Probably obsolete now.
Definition: RooAbsPdf.cxx:534
CacheElem(RooAbsReal &norm)
Definition: RooAbsPdf.h:306
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
friend class RooAddGenContextOrig
Definition: RooAbsPdf.h:284
virtual RooPlot * paramOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Add a box with parameter values (and errors) to the specified frame.
Definition: RooAbsPdf.cxx:2779
virtual void printValue(std::ostream &os) const
Print value of p.d.f, also print normalization integral that was last used, if any.
Definition: RooAbsPdf.cxx:1595
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
RooDataSet * generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
Generate a new dataset containing the specified variables with events sampled from our distribution...
Definition: RooAbsPdf.cxx:1702
static Bool_t evalError()
Return the evaluation error flag.
Definition: RooAbsPdf.cxx:3160
virtual void initGenerator(Int_t code)
Interface for one-time initialization to setup the generator for the specified code.
Definition: RooAbsPdf.cxx:2111
RooAddGenContext is an efficient implementation of the generator context specific for RooAddPdf PDFs...
virtual RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, Bool_t stripDisconnected=kTRUE) const
This helper function finds and collects all constraints terms of all coponent p.d.f.s and returns a RooArgSet with all those terms.
Definition: RooAbsPdf.cxx:3123
RooProdGenContext is an efficient implementation of the generator context specific for RooProdPdf PDF...
RooRealProxy is the concrete proxy for RooAbsReal objects A RooRealProxy is the general mechanism to ...
Definition: RooRealProxy.h:23
virtual RooFitResult * fitTo(RooAbsData &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Fit PDF to given dataset.
Definition: RooAbsPdf.cxx:1056
RooNumGenConfig holds the configuration parameters of the various numeric integrators used by RooReal...
RooArgSet * _normSet
Normalization integral (owned by _normMgr)
Definition: RooAbsPdf.h:302
Bool_t _resampleProto
Definition: RooAbsPdf.h:81
Double_t _rawValue
Definition: RooAbsPdf.h:300
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset...
virtual RooDataSet * generateSimGlobal(const RooArgSet &whatVars, Int_t nEvents)
Special generator interface for generation of &#39;global observables&#39; – for RooStats tools...
Definition: RooAbsPdf.cxx:2383
const Bool_t kTRUE
Definition: RtypesCore.h:91
double norm(double *x, double *p)
Definition: unuranDistr.cxx:40
virtual Double_t extendedTerm(Double_t observedEvents, const RooArgSet *nset=0) const
Returned the extended likelihood term (Nexpect - Nobserved*log(NExpected) of this PDF for the given n...
Definition: RooAbsPdf.cxx:646
virtual RooFitResult * chi2FitTo(RooDataHist &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Perform a chi^2 fit to given histogram By default the fit is executed through the MINUIT commands MIG...
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Definition: RooCmdArg.h:27
const char * Data() const
Definition: TString.h:347