library: libRooFit #include "RooAddModel.h" |
RooAddModel
class description - header file - source file - inheritance tree (.pdf)
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
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
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
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
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 ;
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.