85 _convSetIter(_convSet.createIterator())
100 _convSet(
"!convSet",
"Set of resModel X basisFunc convolutions",this),
174 <<
" declare basis functions in a copied RooAbsAnaConvPdf" << endl ;
182 <<
" doesn't support basis function " << expression << endl ;
188 basisArgs.
add(params) ;
190 TString basisName(expression) ;
191 TIterator* iter = basisArgs.createIterator() ;
194 basisName.Append(
"_") ;
195 basisName.Append(arg->
GetName()) ;
208 coutE(
InputArguments) <<
"RooAbsAnaConvPdf::declareBasis(" <<
GetName() <<
"): unable to construct convolution with basis function '" 209 << expression <<
"'" << endl ;
232 if (!newConvSet.
add(*newConv)) {
284 if (numAddDep>0 || !pdfCanDir || !resCanDir) {
288 if (numAddDep>0) reason +=
"Resolution model has more onservables that the convolution variable. " ;
289 if (!pdfCanDir) reason +=
"PDF does not support internal generation of convolution observable. " ;
290 if (!resCanDir) reason +=
"Resolution model does not support internal generation of convolution observable. " ;
292 coutI(
Generation) <<
"RooAbsAnaConvPdf::genContext(" <<
GetName() <<
") Using regular accept/reject generator for convolution p.d.f because: " << reason.c_str() << endl ;
293 return new RooGenContext(*
this,vars,prototype,auxProto,verbose) ;
297 if (context)
return context;
330 if (!conv)
return 0 ;
354 cxcoutD(
Eval) <<
"RooAbsAnaConvPdf::evaluate(" <<
GetName() <<
") val += coef*conv [" << index-1 <<
"/" 356 result += conv->
getVal(0)*coef ;
384 if (allVars.
getSize()==0)
return 0 ;
411 intCoefSet->
add(*arg) ;
413 intConvSet->
add(*arg) ;
434 normCoefSet->
add(*arg) ;
436 normConvSet->
add(*arg) ;
444 if (intCoefSet->
getSize()==0) {
445 delete intCoefSet ; intCoefSet=0 ;
447 if (intConvSet->
getSize()==0) {
448 delete intConvSet ; intConvSet=0 ;
450 if (normCoefSet->
getSize()==0) {
451 delete normCoefSet ; normCoefSet=0 ;
453 if (normConvSet->
getSize()==0) {
454 delete normConvSet ; normConvSet=0 ;
460 Int_t masterCode(0) ;
461 std::vector<Int_t> tmp(1, 0) ;
463 masterCode =
_codeReg.
store(tmp, intCoefSet, intConvSet, normCoefSet, normConvSet) + 1 ;
465 analVars.
add(*allDeps) ;
467 if (normSet)
delete normSet ;
468 if (normSetAll)
delete normSetAll ;
509 if (code==0)
return getVal(normSet) ;
512 RooArgSet *intCoefSet, *intConvSet, *normCoefSet, *normConvSet ;
520 if (normCoefSet==0&&normConvSet==0) {
529 integral += coef*(_rangeName ? conv->
getNormObj(0,intConvSet,_rangeName)->
getVal() : conv->
getNorm(intConvSet) ) ;
530 cxcoutD(
Eval) <<
"RooAbsAnaConv::aiWN(" <<
GetName() <<
") [" << index-1 <<
"] integral += " << conv->
getNorm(intConvSet) << endl ;
548 integral += coefInt*term ;
555 norm += coefNorm*term ;
560 answer = integral/
norm ;
589 coutE(
InputArguments) <<
"RooAbsAnaConvPdf::coefAnalyticalIntegral(" <<
GetName() <<
") ERROR: unrecognized integration code: " << code << endl ;
692 os << indent <<
"--- RooAbsAnaConvPdf ---" << endl;
707 while ((carg=citer.
next())) {
709 trackNodes.
add(*carg) ;
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
virtual const char * GetName() const
Returns name of object.
TIterator * createIterator(Bool_t dir=kIterForward) const
Double_t getCoefNorm(Int_t coefIdx, const RooArgSet &nset, const char *rangeName) const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
virtual Double_t coefAnalyticalIntegral(Int_t coef, Int_t code, const char *rangeName=0) const
Default implementation of function implementing advertised integrals.
Int_t index(const RooAbsArg *arg) const
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print multi line detailed information of this RooAbsPdf.
Double_t getVal(const RooArgSet *set=0) const
virtual Double_t coefficient(Int_t basisIndex) const =0
virtual RooAbsGenContext * modelGenContext(const RooAbsAnaConvPdf &, const RooArgSet &, const RooDataSet *, const RooArgSet *, Bool_t) const
virtual Int_t getCoefAnalyticalIntegral(Int_t coef, RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Default implementation of function advertising integration capabilities.
static const char * str(const TNamed *ptr)
Return C++ string corresponding to given TNamed pointer.
RooAbsAnaConvPdf()
Default constructor, required for persistence.
virtual ~RooAbsAnaConvPdf()
Destructor.
void makeCoefVarList(RooArgList &) const
Build complete list of coefficient variables.
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Advertise capability to perform (analytical) integrals internally.
RooRealVar & convVar() const
Return the convolution variable of the resolution model.
virtual RooResolutionModel * convolution(RooFormulaVar *basis, RooAbsArg *owner) const
Instantiate a clone of this resolution model representing a convolution with given basis function...
Iterator abstract base class.
const RooFormulaVar & basis() const
virtual void setCacheAndTrackHints(RooArgSet &)
Label OK'ed components with cache-and-track.
The TNamed class is the base class for all named ROOT classes.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
RooArgSet * _convNormSet
List of created basis functions.
const RooRealVar * convVar() const
Return a pointer to the convolution variable instance used in the resolution model.
virtual Bool_t changeModel(const RooResolutionModel &newModel)
Change the current resolution model to newModel.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
RooRealVar represents a fundamental (non-derived) real valued object.
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.
RooAbsReal * createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, 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
Create an object that represents the integral of the function over one or more observables listed in ...
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...
RooObjCacheManager _coefNormMgr
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
RooAbsArg * at(Int_t idx) const
RooConvCoefVar is an auxilary class that represents the coefficient of a RooAbsAnaConvPdf implementat...
static const TNamed * ptr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
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.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Reimplementation of standard RooArgList::remove()
char * Form(const char *fmt,...)
RooAbsArg * absArg() const
OperMode operMode() const
static void indent(ostringstream &buf, int indent_level)
virtual Bool_t setArg(RooAbsReal &newRef)
Change object held in proxy into newRef.
RooDataSet is a container class to hold unbinned data.
Double_t getNorm(const RooArgSet *nset=0) const
Return the integral of this PDF over all elements of 'nset'.
Class RooGenContext implement a universal generator context for all RooAbsPdf classes that do not hav...
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 ...
virtual Bool_t isDirectGenSafe(const RooAbsArg &arg) const
Check if given observable can be safely generated using the pdfs internal generator mechanism (if tha...
Iterator over _convNormSet.
Int_t store(const std::vector< Int_t > &codeList, RooArgSet *set1=0, RooArgSet *set2=0, RooArgSet *set3=0, RooArgSet *set4=0)
Store given arrays of integer codes, and up to four RooArgSets in the registry (each setX pointer may...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
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...
RooFIter fwdIterator() const
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
static RooMathCoreReg dummy
Int_t declareBasis(const char *expression, const RooArgList ¶ms)
Declare a basis function for use in this physics model.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::addOwned()
TIterator * _convSetIter
Subset of last normalization that applies to convolutions.
virtual Double_t evaluate() const
Calculate the current unnormalized value of the PDF.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
friend class RooConvGenContext
virtual void removeAll()
Reimplementation of standard RooArgList::removeAll()
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual RooArgSet * coefVars(Int_t coefIdx) const
Return set of parameters with are used exclusively by the coefficient functions.
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 TObject * Next()=0
virtual Bool_t forceAnalyticalInt(const RooAbsArg &dep) const
This function forces RooRealIntegral to offer all integration dependents to RooAbsAnaConvPdf::getAnal...
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.
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
const RooAbsReal & arg() const
double norm(double *x, double *p)
const std::vector< Int_t > & retrieve(Int_t masterCode) const
Retrieve the array of integer codes associated with the given master code.
virtual CacheMode canNodeBeCached() const