Logo ROOT   6.16/01
Reference Guide
RooAbsAnaConvPdf.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooAbsAnaConvPdf.h,v 1.8 2007/07/16 21:04:28 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_ANA_CONV_PDF
17#define ROO_ABS_ANA_CONV_PDF
18
19
20class TIterator ;
21#include "RooAbsPdf.h"
22#include "RooRealProxy.h"
23#include "RooListProxy.h"
24#include "RooDataSet.h"
25#include "RooAICRegistry.h"
26#include "RooObjCacheManager.h"
27#include "RooAbsCacheElement.h"
28
30class RooRealVar ;
31class RooAbsGenContext ;
33
35public:
36
37 // Constructors, assignment etc
39 RooAbsAnaConvPdf(const char *name, const char *title,
42
43 RooAbsAnaConvPdf(const RooAbsAnaConvPdf& other, const char* name=0);
44 virtual ~RooAbsAnaConvPdf();
45
46 Int_t declareBasis(const char* expression, const RooArgList& params) ;
47 virtual void printMultiline(std::ostream& stream, Int_t contents, Bool_t verbose=kFALSE, TString indent= "") const ;
48
49 // Coefficient normalization access
50 inline Double_t getCoefNorm(Int_t coefIdx, const RooArgSet& nset, const char* rangeName) const {
51 // Returns normalization integral for coefficient coefIdx for observables nset in range rangeNae
52 return getCoefNorm(coefIdx,&nset,rangeName) ;
53 }
54 Double_t getCoefNorm(Int_t coefIdx, const RooArgSet* nset=0, const char* rangeName=0) const {
55 return getCoefNorm(coefIdx,nset,RooNameReg::ptr(rangeName));
56 }
57
58 // Analytical integration support
59 virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet, const char* rangeName=0) const ;
60 virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
61
62 // Coefficient Analytical integration support
63 virtual Int_t getCoefAnalyticalIntegral(Int_t coef, RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
64 virtual Double_t coefAnalyticalIntegral(Int_t coef, Int_t code, const char* rangeName=0) const ;
65 virtual Bool_t forceAnalyticalInt(const RooAbsArg& dep) const ;
66
67 virtual Double_t coefficient(Int_t basisIndex) const = 0 ;
68 virtual RooArgSet* coefVars(Int_t coefIdx) const ;
69
70 virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const ;
71
72 virtual void setCacheAndTrackHints(RooArgSet&) ;
73
74 virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype=0,
75 const RooArgSet* auxProto=0, Bool_t verbose= kFALSE) const ;
76 virtual Bool_t changeModel(const RooResolutionModel& newModel) ;
77
78 const RooRealVar* convVar() const ; // Convolution variable
79
80protected:
81 Double_t getCoefNorm(Int_t coefIdx, const RooArgSet* nset, const TNamed* rangeName) const ;
82
84
85 virtual Double_t evaluate() const ;
86
87 void makeCoefVarList(RooArgList&) const ;
88
89 friend class RooConvGenContext ;
90
91 RooRealProxy _model ; // Original model
92 RooRealProxy _convVar ; // Convolution variable
93
94 RooArgSet* parseIntegrationRequest(const RooArgSet& intSet, Int_t& coefCode, RooArgSet* analVars=0) const ;
95
96 RooListProxy _convSet ; // Set of (resModel (x) basisFunc) convolution objects
97 RooArgList _basisList ; //! List of created basis functions
98 mutable RooArgSet* _convNormSet ; //! Subset of last normalization that applies to convolutions
99 mutable TIterator* _convSetIter ; //! Iterator over _convNormSet
100
101
103 public:
104 virtual ~CacheElem() {} ;
105
108 l.add(_normList) ;
109 return l ;
110 }
111
114 } ;
115 mutable RooObjCacheManager _coefNormMgr ; // Coefficient normalization manager
116
117 mutable RooAICRegistry _codeReg ; //! Registry of analytical integration codes
118
119 ClassDef(RooAbsAnaConvPdf,2) // Abstract Composite Convoluted PDF
120};
121
122#endif
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:324
RooAICRegistry is a utility class for operator p.d.f classes that keeps track of analytical integrati...
Iterator over _convNormSet.
RooArgList containedArgs(Action)
virtual Bool_t forceAnalyticalInt(const RooAbsArg &dep) const
This function forces RooRealIntegral to offer all integration dependents to RooAbsAnaConvPdf::getAnal...
Double_t getCoefNorm(Int_t coefIdx, const RooArgSet &nset, const char *rangeName) const
virtual Bool_t changeModel(const RooResolutionModel &newModel)
Change the current resolution model to newModel.
RooArgSet * parseIntegrationRequest(const RooArgSet &intSet, Int_t &coefCode, RooArgSet *analVars=0) const
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Advertise capability to perform (analytical) integrals internally.
const RooRealVar * convVar() const
Return a pointer to the convolution variable instance used in the resolution model.
virtual Int_t getCoefAnalyticalIntegral(Int_t coef, RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Default implementation of function advertising integration capabilities.
TIterator * _convSetIter
Subset of last normalization that applies to convolutions.
virtual void printMultiline(std::ostream &stream, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print info about this object to the specified stream.
RooArgList _basisList
RooObjCacheManager _coefNormMgr
void makeCoefVarList(RooArgList &) const
Build complete list of coefficient variables.
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Create a generator context for this p.d.f.
RooAICRegistry _codeReg
virtual ~RooAbsAnaConvPdf()
Destructor.
virtual Double_t evaluate() const
Calculate the current unnormalized value of the PDF.
virtual void setCacheAndTrackHints(RooArgSet &)
Label OK'ed components with cache-and-track.
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Return analytical integral defined by given code, which is returned by getAnalyticalIntegralWN()
virtual Double_t coefAnalyticalIntegral(Int_t coef, Int_t code, const char *rangeName=0) const
Default implementation of function implementing advertised integrals.
RooRealProxy _model
Double_t getCoefNorm(Int_t coefIdx, const RooArgSet *nset=0, const char *rangeName=0) const
virtual RooArgSet * coefVars(Int_t coefIdx) const
Return set of parameters with are used exclusively by the coefficient functions.
RooRealProxy _convVar
RooAbsAnaConvPdf()
Default constructor, required for persistence.
RooArgSet * _convNormSet
List of created basis functions.
virtual Double_t coefficient(Int_t basisIndex) const =0
Int_t declareBasis(const char *expression, const RooArgList &params)
Declare a basis function for use in this physics model.
RooListProxy _convSet
virtual Bool_t isDirectGenSafe(const RooAbsArg &arg) const
Return true if it is safe to generate the convolution observable from the internal generator (this is...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooConvGenContext is an efficient implementation of the generator context specific for RooAbsAnaConvP...
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:31
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
static const TNamed * ptr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
Definition: RooNameReg.cxx:125
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
RooRealProxy is the concrete proxy for RooAbsReal objects A RooRealProxy is the general mechanism to ...
Definition: RooRealProxy.h:23
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
Iterator abstract base class.
Definition: TIterator.h:30
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Basic string class.
Definition: TString.h:131
auto * l
Definition: textangle.C:4