library: libRooFit
#include "RooAddModel.h"

RooAddModel


class description - header file - source file - inheritance tree (.pdf)

class RooAddModel : public RooResolutionModel

Inheritance Chart:
TObject
<-
TNamed
RooPrintable
<-
RooAbsArg
<-
RooAbsReal
<-
RooAbsPdf
<-
RooResolutionModel
<-
RooAddModel

    public:
RooAddModel(const char* name, const char* title, const RooArgList& modelList, const RooArgList& coefList) RooAddModel(const RooAddModel& other, const char* name = "0") virtual ~RooAddModel() virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName = "0") const virtual Int_t basisCode(const char* name) const virtual Bool_t checkObservables(const RooArgSet* nset) const static TClass* Class() virtual TObject* clone(const char* newname) const virtual RooResolutionModel* convolution(RooFormulaVar* basis, RooAbsArg* owner) const virtual Double_t evaluate() const virtual Bool_t forceAnalyticalInt(const RooAbsArg& dep) const virtual void generateEvent(Int_t code) virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, const RooArgSet* normSet, const char* rangeName = "0") const virtual Int_t getGenerator(const RooArgSet& directVars, RooArgSet& generateVars, Bool_t staticInitOK = kTRUE) const virtual Double_t getNorm(const RooArgSet* nset = 0) const virtual void initGenerator(Int_t code) virtual TClass* IsA() const virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const virtual void normLeafServerList(RooArgSet& list) const virtual Bool_t selfNormalized() const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual Bool_t syncNormalization(const RooArgSet* nset, Bool_t adjustProxies = kTRUE) const

Data Members


    protected:
RooNormSetCache _nsetCache Normalization set cache RooAICRegistry _codeReg ! Registry of component analytical integration codes RooAICRegistry _genReg ! Registry of component generator codes Double_t* _genThresh ! Generator fraction thresholds const Int_t* _genSubCode ! Subgenerator code mapping (owned by _genReg) ; Bool_t _isCopy Flag set if we own our components RooRealProxy _dummyProxy Dummy proxy to hold current normalization set TList _modelProxyList List of component resolution models TList _coefProxyList List of coefficients TIterator* _modelProxyIter ! Iterator over list of models TIterator* _coefProxyIter ! Iterator over list of coefficients

Class Description

RooAddModel(const char *name, const char *title, const RooArgList& modelList, const RooArgList& coefList)
 Constructor from list of PDFs and list of coefficients.
 Each model list element (i) is paired with coefficient list element (i).
 The number of coefficients must be one less than the number of PDFs.

 All modelss must inherit from RooResolutionModel. All
 coefficients must inherit from RooAbsReal
RooAddModel(const RooAddModel& other, const char* name)
 Copy constructor
~RooAddModel()
 Destructor
RooResolutionModel* convolution(RooFormulaVar* basis, RooAbsArg* owner)
 Instantiate a clone of this resolution model representing a convolution with given
 basis function. The owners object name is incorporated in the clones name
 to avoid multiple convolution objects with the same name in complex PDF structures.

 RooAddModel will clone all the component models to create a composite convolution object
Int_t basisCode(const char* name)
 Return code for basis function representing by 'name' string.
 The basis code of the first component model will be returned,
 if the basis is supported by all components. Otherwise 0
 is returned
Double_t evaluate()
 Calculate current value of object

 MODEL = sum(i=0,n-1) coef_i * model_i + (1 - sum(i=0,n-1) coef_i) * model_n
Double_t getNorm(const RooArgSet* nset)
 Calculate current normalization of object

 Norm = sum(i=0,n-1) coef_i * norm(model_i) + (1 - sum(i=0,n-1)coef_i) * norm(model_n)
Bool_t checkObservables(const RooArgSet* set)
 Check if model is valid with dependent configuration given by specified data set
 Each model may not share any dependents with its coefficient
void normLeafServerList(RooArgSet& list)
 Fill list with leaf server nodes of normalization integral
Bool_t syncNormalization(const RooArgSet* nset, Bool_t adjustProxies)
 Fan out syncNormalization call to component models
Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet, const char* /*rangeName*/)
{
 Determine which part (if any) of given integral can be performed analytically.
 If any analytical integration is possible, return integration scenario code

 RooAddModel queries each component model for its analytical integration capability of the requested
 set ('allVars'). It finds the largest common set of variables that can be integrated
 by all components. If such a set exists, it reconfirms that each component is capable of
 analytically integrating the common set, and combines the components individual integration
 codes into a single integration code valid for RooAddModel.

 Analytical integrations are only supported in non-convoluted form
if (_basisCode!=0) {
return 0 ;
}

_modelProxyIter->Reset() ;
RooResolutionModel* model ;
RooArgSet allAnalVars(allVars) ;
TIterator* avIter = allVars.createIterator() ;

Int_t n(0) ;
 First iteration, determine what each component can integrate analytically
RooRealProxy* proxy ;
while((proxy=(RooRealProxy*)_modelProxyIter->Next())) {
model = (RooResolutionModel*) proxy->absArg() ;
RooArgSet subAnalVars ;
model->getAnalyticalIntegralWN(allVars,subAnalVars,normSet) ;
Int_t subCode = model->getAnalyticalIntegralWN(allVars,subAnalVars,normSet) ;
cout << "RooAddModel::getAI(" << GetName() << ") ITER1 subCode(" << n << "," << model->GetName() << ") = " << subCode << endl ;
Bool_t isDirectGenSafe(const RooAbsArg& arg)
Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK)
 Ask all the components what they can generate
void initGenerator(Int_t code)
 Setup fraction threshold table
TObject* clone(const char* newname)
Bool_t forceAnalyticalInt(const RooAbsArg& dep)
Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0)
Bool_t selfNormalized()
void generateEvent(Int_t code)

Last update: Tue Jul 11 11:45:13 2006
Copyright (c) 2000-2005, Regents of the University of California *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.