/usr/include/root/RooProdPdf.h is in libroot-roofit-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | /*****************************************************************************
* Project: RooFit *
* Package: RooFitCore *
* File: $Id: RooProdPdf.h,v 1.44 2007/07/16 21:04:28 wouter Exp $
* Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* *
* Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. *
* *
* Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
*****************************************************************************/
#ifndef ROO_PROD_PDF
#define ROO_PROD_PDF
#include "Riosfwd.h"
#include "RooAbsPdf.h"
#include "RooListProxy.h"
#include "RooLinkedList.h"
#include "RooAICRegistry.h"
#include "RooCacheManager.h"
#include "RooObjCacheManager.h"
#include "RooCmdArg.h"
#include <vector>
typedef RooArgList* pRooArgList ;
typedef RooLinkedList* pRooLinkedList ;
class RooProdPdf : public RooAbsPdf {
public:
RooProdPdf() ;
RooProdPdf(const char *name, const char *title, Double_t cutOff=0);
RooProdPdf(const char *name, const char *title,
RooAbsPdf& pdf1, RooAbsPdf& pdf2, Double_t cutOff=0) ;
RooProdPdf(const char* name, const char* title, const RooArgList& pdfList, Double_t cutOff=0) ;
RooProdPdf(const char* name, const char* title, const RooArgSet& fullPdfSet, const RooLinkedList& cmdArgList) ;
RooProdPdf(const char* name, const char* title, const RooArgSet& fullPdfSet,
const RooCmdArg& arg1 , const RooCmdArg& arg2=RooCmdArg(),
const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=RooCmdArg(),
const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg(),
const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=RooCmdArg()) ;
RooProdPdf(const char* name, const char* title,
const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg(),
const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=RooCmdArg(),
const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg(),
const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=RooCmdArg()) ;
RooProdPdf(const RooProdPdf& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooProdPdf(*this,newname) ; }
virtual ~RooProdPdf() ;
virtual Double_t getValV(const RooArgSet* set=0) const ;
Double_t evaluate() const ;
virtual Bool_t checkObservables(const RooArgSet* nset) const ;
virtual Bool_t forceAnalyticalInt(const RooAbsArg& dep) const ;
Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, const RooArgSet* normSet, const char* rangeName=0) const ;
Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
virtual Bool_t selfNormalized() const { return _selfNorm ; }
virtual ExtendMode extendMode() const ;
virtual Double_t expectedEvents(const RooArgSet* nset) const ;
virtual Double_t expectedEvents(const RooArgSet& nset) const { return expectedEvents(&nset) ; }
const RooArgList& pdfList() const { return _pdfList ; }
virtual Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const;
virtual void initGenerator(Int_t code) ;
virtual void generateEvent(Int_t code);
virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const ;
// Constraint management
virtual RooArgSet* getConstraints(const RooArgSet& observables, RooArgSet& constrainedParams, Bool_t stripDisconnected) const ;
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const ;
virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const ;
Bool_t isBinnedDistribution(const RooArgSet& obs) const ;
void printMetaArgs(std::ostream& os) const ;
virtual void selectNormalizationRange(const char* rangeName=0, Bool_t force=kFALSE) ;
void fixRefRange(const char* rangeName) ;
void setSelfNormalized(Bool_t flag) { _selfNorm = flag ; }
void setDefNormSet(const RooArgSet& nset) { _defNormSet.removeAll() ; _defNormSet.addClone(nset) ; }
Bool_t redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) ;
RooArgSet* getConnectedParameters(const RooArgSet& observables) const ;
RooArgSet* findPdfNSet(RooAbsPdf& pdf) const ;
protected:
RooAbsReal* makeCondPdfRatioCorr(RooAbsReal& term, const RooArgSet& termNset, const RooArgSet& termImpSet, const char* normRange, const char* refRange) const ;
virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/, Bool_t stripDisconnected) const ;
void initializeFromCmdArgList(const RooArgSet& fullPdfSet, const RooLinkedList& l) ;
void factorizeProduct(const RooArgSet& normSet, const RooArgSet& intSet,
RooLinkedList& termList, RooLinkedList& normList,
RooLinkedList& impDepList, RooLinkedList& crossDepList,
RooLinkedList& intList) const;
const char* makeRGPPName(const char* pfx, const RooArgSet& term, const RooArgSet& iset, const RooArgSet& nset, const char* isetRangeName) const ;
void groupProductTerms(RooLinkedList& groupedTerms, RooArgSet& outerIntDeps,
const RooLinkedList& terms, const RooLinkedList& norms,
const RooLinkedList& imps, const RooLinkedList& ints, const RooLinkedList& cross) const ;
void getPartIntList(const RooArgSet* nset, const RooArgSet* iset, pRooArgList& partList, pRooLinkedList& nsetList,
Int_t& code, const char* isetRangeName=0) const ;
std::vector<RooAbsReal*> processProductTerm(const RooArgSet* nset, const RooArgSet* iset, const char* isetRangeName,
const RooArgSet* term,const RooArgSet& termNSet, const RooArgSet& termISet,
Bool_t& isOwned, Bool_t forceWrap=kFALSE) const ;
virtual CacheMode canNodeBeCached() const { return RooAbsArg::NotAdvised ; } ;
virtual void setCacheAndTrackHints(RooArgSet&) ;
// The cache object
class CacheElem : public RooAbsCacheElement {
public:
CacheElem() : _isRearranged(kFALSE), _rearrangedNum(0), _rearrangedDen(0) {}
virtual ~CacheElem() ;
// Payload
RooArgList _partList ;
RooArgList _numList ;
RooArgList _denList ;
RooArgList _ownedList ;
RooLinkedList _normList ;
Bool_t _isRearranged ;
RooAbsReal* _rearrangedNum ;
RooAbsReal* _rearrangedDen ;
// Cache management functions
virtual RooArgList containedArgs(Action) ;
virtual void printCompactTreeHook(std::ostream&, const char *, Int_t, Int_t) ;
private:
CacheElem(const CacheElem&) ;
} ;
mutable RooObjCacheManager _cacheMgr ; // The cache manager
void rearrangeProduct(CacheElem&) const;
RooAbsReal* specializeIntegral(RooAbsReal& orig, const char* targetRangeName) const ;
RooAbsReal* specializeRatio(RooFormulaVar& input, const char* targetRangeName) const ;
Double_t calculate(const RooProdPdf::CacheElem& cache, Bool_t verbose=kFALSE) const ;
Double_t calculate(const RooArgList* partIntList, const RooLinkedList* normSetList) const ;
friend class RooProdGenContext ;
virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype=0,
const RooArgSet *auxProto=0, Bool_t verbose= kFALSE) const ;
mutable RooAICRegistry _genCode ; //! Registry of composite direct generator codes
mutable RooArgSet* _curNormSet ; //!
Double_t _cutOff ; // Cutoff parameter for running product
RooListProxy _pdfList ; // List of PDF components
RooLinkedList _pdfNSetList ; // List of PDF component normalization sets
TIterator* _pdfIter ; //! Iterator of PDF list
Int_t _extendedIndex ; // Index of extended PDF (if any)
void useDefaultGen(Bool_t flag=kTRUE) { _useDefaultGen = flag ; }
Bool_t _useDefaultGen ; // Use default or distributed event generator
mutable TNamed* _refRangeName ; // Reference range name for interpretation of conditional products
Bool_t _selfNorm ; // Is self-normalized
RooArgSet _defNormSet ; // Default normalization set
private:
ClassDef(RooProdPdf,4) // PDF representing a product of PDFs
};
#endif
|