Logo ROOT  
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 "RooTemplateProxy.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, RooAbsRealLValue& 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  /// Return the convolution variable of the resolution model.
43  RooAbsRealLValue& convVar() const {return *x;}
44  const RooRealVar& basisConvVar() const ;
45 
46  inline Bool_t isBasisSupported(const char* name) const { return basisCode(name)?kTRUE:kFALSE ; }
47  virtual Int_t basisCode(const char* name) const = 0 ;
48 
49  virtual void normLeafServerList(RooArgSet& list) const ;
50  Double_t getNorm(const RooArgSet* nset=0) const ;
51 
52  inline const RooFormulaVar& basis() const { return _basis?*_basis:*identity() ; }
53  Bool_t isConvolved() { return _basis ? kTRUE : kFALSE ; }
54 
55  virtual void printMultiline(std::ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
56 
57  static RooFormulaVar* identity() ;
58 
59  virtual void changeBasis(RooFormulaVar* basis) ;
60 
61 protected:
62 
63  friend class RooConvGenContext ;
64  friend class RooAddModel ;
65  RooTemplateProxy<RooAbsRealLValue> x; // Dependent/convolution variable
66 
67  virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ;
68 // Bool_t traceEvalHook(Double_t value) const ;
69 
70 
71  friend class RooAbsAnaConvPdf ;
72 
73  Int_t _basisCode ; // Identifier code for selected basis function
74  RooFormulaVar* _basis ; // Basis function convolved with this resolution model
75  Bool_t _ownBasis ; // Flag indicating ownership of _basis
76 
77  ClassDef(RooResolutionModel, 2) // Abstract Resolution Model
78 };
79 
80 #endif
RooFormulaVar.h
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooResolutionModel::_ownBasis
Bool_t _ownBasis
Definition: RooResolutionModel.h:75
RooResolutionModel::convVar
RooAbsRealLValue & convVar() const
Return the convolution variable of the resolution model.
Definition: RooResolutionModel.h:43
RooResolutionModel::_basis
RooFormulaVar * _basis
Definition: RooResolutionModel.h:74
RooResolutionModel::getValV
Double_t getValV(const RooArgSet *nset=0) const
Modified version of RooAbsPdf::getValF().
Definition: RooResolutionModel.cxx:249
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooTemplateProxy.h
RooResolutionModel::basisConvVar
const RooRealVar & basisConvVar() const
Return the convolution variable of the selection basis function.
Definition: RooResolutionModel.cxx:233
TString
Basic string class.
Definition: TString.h:136
bool
RooResolutionModel::normLeafServerList
virtual void normLeafServerList(RooArgSet &list) const
Floating point error checking and tracing for given float value.
Definition: RooResolutionModel.cxx:312
RooResolutionModel::redirectServersHook
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...
Definition: RooResolutionModel.cxx:273
RooResolutionModel::convolution
virtual RooResolutionModel * convolution(RooFormulaVar *basis, RooAbsArg *owner) const
Instantiate a clone of this resolution model representing a convolution with given basis function.
Definition: RooResolutionModel.cxx:154
RooResolutionModel::printMultiline
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.
Definition: RooResolutionModel.cxx:345
RooResolutionModel::basisCode
virtual Int_t basisCode(const char *name) const =0
RooResolutionModel::~RooResolutionModel
virtual ~RooResolutionModel()
Destructor.
Definition: RooResolutionModel.cxx:124
RooFormulaVar
A RooFormulaVar is a generic implementation of a real-valued object, which takes a RooArgList of serv...
Definition: RooFormulaVar.h:30
RooResolutionModel::x
RooTemplateProxy< RooAbsRealLValue > x
Definition: RooResolutionModel.h:65
RooResolutionModel
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
Definition: RooResolutionModel.h:26
RooResolutionModel::isBasisSupported
Bool_t isBasisSupported(const char *name) const
Definition: RooResolutionModel.h:46
RooAbsPdf.h
RooConvGenContext
RooConvGenContext is an efficient implementation of the generator context specific for RooAbsAnaConvP...
Definition: RooConvGenContext.h:31
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsCollection
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
Definition: RooAbsCollection.h:31
RooAbsGenContext
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
Definition: RooAbsGenContext.h:26
RooResolutionModel::modelGenContext
virtual RooAbsGenContext * modelGenContext(const RooAbsAnaConvPdf &, const RooArgSet &, const RooDataSet *, const RooArgSet *, Bool_t) const
Definition: RooResolutionModel.h:36
RooRealVar.h
RooResolutionModel::RooResolutionModel
RooResolutionModel()
Definition: RooResolutionModel.h:30
RooTemplateProxy< RooAbsRealLValue >
RooResolutionModel::_basisCode
Int_t _basisCode
Definition: RooResolutionModel.h:73
Double_t
double Double_t
Definition: RtypesCore.h:59
RooResolutionModel::clone
virtual TObject * clone(const char *newname) const =0
RooResolutionModel::identity
static RooFormulaVar * identity()
Return identity formula pointer.
Definition: RooResolutionModel.cxx:136
RooResolutionModel::getNorm
Double_t getNorm(const RooArgSet *nset=0) const
Return the integral of this PDF over all elements of 'nset'.
Definition: RooResolutionModel.cxx:322
RooAddModel
RooAddModel is an efficient implementation of a sum of PDFs of the form.
Definition: RooAddModel.h:28
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooDataSet
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooAbsArg
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
RooResolutionModel::changeBasis
virtual void changeBasis(RooFormulaVar *basis)
Change the basis function we convolute with.
Definition: RooResolutionModel.cxx:196
RooAbsPdf
Definition: RooAbsPdf.h:43
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:37
RooAbsRealLValue
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
Definition: RooAbsRealLValue.h:31
RooResolutionModel::isConvolved
Bool_t isConvolved()
Definition: RooResolutionModel.h:53
RooAbsAnaConvPdf
RooAbsAnaConvPdf is the base class for PDFs that represent a physics model that can be analytically c...
Definition: RooAbsAnaConvPdf.h:34
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
RooResolutionModel::basis
const RooFormulaVar & basis() const
Definition: RooResolutionModel.h:52
int