Logo ROOT   6.12/07
Reference Guide
RooResolutionModel.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooResolutionModel.h,v 1.26 2007/05/14 18:37:46 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_RESOLUTION_MODEL
17 #define ROO_RESOLUTION_MODEL
18 
19 #include "RooAbsPdf.h"
20 #include "RooRealProxy.h"
21 #include "RooRealVar.h"
22 #include "RooFormulaVar.h"
23 
24 class RooAbsAnaConvPdf;
25 
26 class RooResolutionModel : public RooAbsPdf {
27 public:
28 
29  // Constructors, assignment etc
30  inline RooResolutionModel() : _basis(0) { }
31  RooResolutionModel(const char *name, const char *title, RooRealVar& x) ;
32  RooResolutionModel(const RooResolutionModel& other, const char* name=0);
33  virtual TObject* clone(const char* newname) const = 0 ;
34  virtual ~RooResolutionModel();
35 
37  const RooDataSet*, const RooArgSet*,
38  Bool_t) const { return 0; }
39 
40  Double_t getValV(const RooArgSet* nset=0) const ;
42  RooRealVar& convVar() const ;
43  const RooRealVar& basisConvVar() const ;
44 
45  inline Bool_t isBasisSupported(const char* name) const { return basisCode(name)?kTRUE:kFALSE ; }
46  virtual Int_t basisCode(const char* name) const = 0 ;
47 
48  virtual void normLeafServerList(RooArgSet& list) const ;
49  Double_t getNorm(const RooArgSet* nset=0) const ;
50 
51  inline const RooFormulaVar& basis() const { return _basis?*_basis:*identity() ; }
52  Bool_t isConvolved() { return _basis ? kTRUE : kFALSE ; }
53 
54  virtual void printMultiline(std::ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
55 
56  static void cleanup() ;
57 
58  static RooFormulaVar* identity() ;
59 
60  virtual void changeBasis(RooFormulaVar* basis) ;
61 
62 protected:
63 
64  static RooFormulaVar* _identity ; // Identity basis function pointe
65 
66 
67  friend class RooConvGenContext ;
68  friend class RooAddModel ;
69  RooRealProxy x ; // Dependent/convolution variable
70 
71  virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ;
72  Bool_t traceEvalHook(Double_t value) const ;
73 
74 
75  friend class RooAbsAnaConvPdf ;
76 
77  Int_t _basisCode ; // Identifier code for selected basis function
78  RooFormulaVar* _basis ; // Basis function convolved with this resolution model
79  Bool_t _ownBasis ; // Flag indicating ownership of _basis
80 
81  ClassDef(RooResolutionModel,1) // Abstract Resolution Model
82 };
83 
84 #endif
virtual ~RooResolutionModel()
Destructor.
virtual RooAbsGenContext * modelGenContext(const RooAbsAnaConvPdf &, const RooArgSet &, const RooDataSet *, const RooArgSet *, Bool_t) const
const RooRealVar & basisConvVar() const
Return the convolution variable of the selection basis function.
Basic string class.
Definition: TString.h:125
RooRealVar & convVar() const
Return the convolution variable of the resolution model.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual RooResolutionModel * convolution(RooFormulaVar *basis, RooAbsArg *owner) const
Instantiate a clone of this resolution model representing a convolution with given basis function...
Double_t getValV(const RooArgSet *nset=0) const
Modified version of RooAbsPdf::getValF().
const RooFormulaVar & basis() const
#define ClassDef(name, id)
Definition: Rtypes.h:320
Bool_t isBasisSupported(const char *name) const
RooConvGenContext is an efficient implementation of the generator context specific for RooAbsAnaConvP...
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
static void cleanup()
Cleanup hook for RooSentinel atexit handler.
RooFormulaVar * _basis
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print info about this object to the specified stream.
virtual void changeBasis(RooFormulaVar *basis)
Change the basis function we convolute with.
static RooFormulaVar * identity()
Return identity formula pointer.
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:29
Double_t getNorm(const RooArgSet *nset=0) const
Return the integral of this PDF over all elements of 'nset'.
const Bool_t kFALSE
Definition: RtypesCore.h:88
double Double_t
Definition: RtypesCore.h:55
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
static RooFormulaVar * _identity
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
RooRealProxy is the concrete proxy for RooAbsReal objects A RooRealProxy is the general mechanism to ...
Definition: RooRealProxy.h:23
virtual TObject * clone(const char *newname) const =0
virtual void normLeafServerList(RooArgSet &list) const
Return the list of servers used by our normalization integral.
virtual Int_t basisCode(const char *name) const =0
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Forward redirectServers call to our basis function, which is not connected to either resolution model...
Bool_t traceEvalHook(Double_t value) const
Floating point error checking and tracing for given float value.
const Bool_t kTRUE
Definition: RtypesCore.h:87
char name[80]
Definition: TGX11.cxx:109