```/*****************************************************************************
* Project: RooFit                                                           *
* Package: RooFitModels                                                     *
* @(#)root/roofit:\$Id\$
* 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          *
*                                                                           *
* Redistribution and use in source and binary forms,                        *
* with or without modification, are permitted according to the terms        *
*****************************************************************************/

//////////////////////////////////////////////////////////////////////////////
//
// BEGIN_HTML
// Multivariate Gaussian p.d.f. with correlations
// END_HTML
//

#include "RooFit.h"

#include "Riostream.h"
#include <math.h>

#include "RooMultiVarGaussian.h"
#include "RooAbsReal.h"
#include "RooRealVar.h"
#include "RooRandom.h"
#include "RooMath.h"
#include "RooGlobalFunc.h"
#include "RooConstVar.h"
#include "TDecompChol.h"
#include "RooFitResult.h"

using namespace std;

ClassImp(RooMultiVarGaussian)
;

//_____________________________________________________________________________
RooMultiVarGaussian::RooMultiVarGaussian(const char *name, const char *title,
const RooArgList& xvec, const RooArgList& mu, const TMatrixDSym& cov) :
RooAbsPdf(name,title),
_x("x","Observables",this,kTRUE,kFALSE),
_mu("mu","Offset vector",this,kTRUE,kFALSE),
_cov(cov),
_covI(cov),
_z(4)
{

_det = _cov.Determinant() ;

// Invert covariance matrix
_covI.Invert() ;
}

//_____________________________________________________________________________
RooMultiVarGaussian::RooMultiVarGaussian(const char *name, const char *title,
const RooArgList& xvec, const RooFitResult& fr, Bool_t reduceToConditional) :
RooAbsPdf(name,title),
_x("x","Observables",this,kTRUE,kFALSE),
_mu("mu","Offset vector",this,kTRUE,kFALSE),
_cov(reduceToConditional ? fr.conditionalCovarianceMatrix(xvec) : fr.reducedCovarianceMatrix(xvec)),
_covI(_cov),
_z(4)
{
_det = _cov.Determinant() ;

// Fill mu vector with constant RooRealVars
list<string> munames ;
const RooArgList& fpf = fr.floatParsFinal() ;
for (Int_t i=0 ; i<fpf.getSize() ; i++) {
if (xvec.find(fpf.at(i)->GetName())) {
RooRealVar* parclone = (RooRealVar*) fpf.at(i)->Clone(Form("%s_centralvalue",fpf.at(i)->GetName())) ;
parclone->setConstant(kTRUE) ;
munames.push_back(fpf.at(i)->GetName()) ;
}
}

// Fill X vector in same order as mu vector
for (list<string>::iterator iter=munames.begin() ; iter!=munames.end() ; iter++) {
RooRealVar* xvar = (RooRealVar*) xvec.find(iter->c_str()) ;
}

// Invert covariance matrix
_covI.Invert() ;

}

//_____________________________________________________________________________
RooMultiVarGaussian::RooMultiVarGaussian(const char *name, const char *title,
const RooArgList& xvec, const TVectorD& mu, const TMatrixDSym& cov) :
RooAbsPdf(name,title),
_x("x","Observables",this,kTRUE,kFALSE),
_mu("mu","Offset vector",this,kTRUE,kFALSE),
_cov(cov),
_covI(cov),
_z(4)
{

for (Int_t i=0 ; i<mu.GetNrows() ; i++) {
}

_det = _cov.Determinant() ;

// Invert covariance matrix
_covI.Invert() ;
}

//_____________________________________________________________________________
RooMultiVarGaussian::RooMultiVarGaussian(const char *name, const char *title,
const RooArgList& xvec, const TMatrixDSym& cov) :
RooAbsPdf(name,title),
_x("x","Observables",this,kTRUE,kFALSE),
_mu("mu","Offset vector",this,kTRUE,kFALSE),
_cov(cov),
_covI(cov),
_z(4)
{

for (Int_t i=0 ; i<xvec.getSize() ; i++) {
}

_det = _cov.Determinant() ;

// Invert covariance matrix
_covI.Invert() ;
}

//_____________________________________________________________________________
RooMultiVarGaussian::RooMultiVarGaussian(const RooMultiVarGaussian& other, const char* name) :
RooAbsPdf(other,name), _aicMap(other._aicMap), _x("x",this,other._x), _mu("mu",this,other._mu),
_cov(other._cov), _covI(other._covI), _det(other._det), _z(other._z)
{
}

//_____________________________________________________________________________
void RooMultiVarGaussian::syncMuVec() const
{
_muVec.ResizeTo(_mu.getSize()) ;
for (Int_t i=0 ; i<_mu.getSize() ; i++) {
_muVec[i] = ((RooAbsReal*)_mu.at(i))->getVal() ;
}
}

//_____________________________________________________________________________
Double_t RooMultiVarGaussian::evaluate() const
{
// Represent observables as vector
TVectorD x(_x.getSize()) ;
for (int i=0 ; i<_x.getSize() ; i++) {
x[i] = ((RooAbsReal*)_x.at(i))->getVal() ;
}

// Calculate return value
syncMuVec() ;
TVectorD x_min_mu = x - _muVec ;

Double_t alpha =  x_min_mu * (_covI * x_min_mu) ;
return exp(-0.5*alpha) ;
}

//_____________________________________________________________________________
Int_t RooMultiVarGaussian::getAnalyticalIntegral(RooArgSet& allVarsIn, RooArgSet& analVars, const char* rangeName) const
{
RooArgSet allVars(allVarsIn) ;

// If allVars contains x_i it cannot contain mu_i
for (Int_t i=0 ; i<_x.getSize() ; i++) {
if (allVars.contains(*_x.at(i))) {
allVars.remove(*_mu.at(i),kTRUE,kTRUE) ;
}
}

// Analytical integral known over all observables
if (allVars.getSize()==_x.getSize() && !rangeName) {
return -1 ;
}

Int_t code(0) ;

Int_t nx = _x.getSize() ;
if (nx>127) {
// Warn that analytical integration is only provided for the first 127 observables
coutW(Integration) << "RooMultiVarGaussian::getAnalyticalIntegral(" << GetName() << ") WARNING: p.d.f. has " << _x.getSize()
<< " observables, analytical integration is only implemented for the first 127 observables" << endl ;
nx=127 ;
}

// Advertise partial analytical integral over all observables for which is wide enough to
// use asymptotic integral calculation
BitBlock bits ;
Bool_t anyBits(kFALSE) ;
syncMuVec() ;
for (int i=0 ; i<_x.getSize() ; i++) {

// Check if integration over observable #i is requested
if (allVars.find(_x.at(i)->GetName())) {
// Check if range is wider than Z sigma
RooRealVar* xi = (RooRealVar*)_x.at(i) ;
if (xi->getMin(rangeName)<_muVec(i)-_z*sqrt(_cov(i,i)) && xi->getMax(rangeName) > _muVec(i)+_z*sqrt(_cov(i,i))) {
cxcoutD(Integration) << "RooMultiVarGaussian::getAnalyticalIntegral(" << GetName()
<< ") Advertising analytical integral over " << xi->GetName() << " as range is >" << _z << " sigma" << endl ;
bits.setBit(i) ;
anyBits = kTRUE ;
} else {
cxcoutD(Integration) << "RooMultiVarGaussian::getAnalyticalIntegral(" << GetName() << ") Range of " << xi->GetName() << " is <"
<< _z << " sigma, relying on numeric integral" << endl ;
}
}

// Check if integration over parameter #i is requested
if (allVars.find(_mu.at(i)->GetName())) {
// Check if range is wider than Z sigma
RooRealVar* pi = (RooRealVar*)_mu.at(i) ;
if (pi->getMin(rangeName)<_muVec(i)-_z*sqrt(_cov(i,i)) && pi->getMax(rangeName) > _muVec(i)+_z*sqrt(_cov(i,i))) {
cxcoutD(Integration) << "RooMultiVarGaussian::getAnalyticalIntegral(" << GetName()
<< ") Advertising analytical integral over " << pi->GetName() << " as range is >" << _z << " sigma" << endl ;
bits.setBit(i) ;
anyBits = kTRUE ;
} else {
cxcoutD(Integration) << "RooMultiVarGaussian::getAnalyticalIntegral(" << GetName() << ") Range of " << pi->GetName() << " is <"
<< _z << " sigma, relying on numeric integral" << endl ;
}
}

}

// Full numeric integration over requested observables maps always to code zero
if (!anyBits) {
return 0 ;
}

// Map BitBlock into return code
for (UInt_t i=0 ; i<_aicMap.size() ; i++) {
if (_aicMap[i]==bits) {
code = i+1 ;
}
}
if (code==0) {
_aicMap.push_back(bits) ;
code = _aicMap.size() ;
}

return code ;
}

//_____________________________________________________________________________
Double_t RooMultiVarGaussian::analyticalIntegral(Int_t code, const char* /*rangeName*/) const
{
// Handle full integral here
if (code==-1) {
return pow(2*3.14159268,_x.getSize()/2.)*sqrt(fabs(_det)) ;
}

// Handle partial integrals here

// Retrieve |S22|, S22bar from cache
AnaIntData& aid = anaIntData(code) ;

// Fill position vector for non-integrated observables
syncMuVec() ;
TVectorD u(aid.pmap.size()) ;
for (UInt_t i=0 ; i<aid.pmap.size() ; i++) {
u(i) = ((RooAbsReal*)_x.at(aid.pmap[i]))->getVal() - _muVec(aid.pmap[i]) ;
}

// Calculate partial integral
Double_t ret = pow(2*3.14159268,aid.nint/2.)/sqrt(fabs(aid.S22det))*exp(-0.5*u*(aid.S22bar*u)) ;

return ret ;
}

//_____________________________________________________________________________
RooMultiVarGaussian::AnaIntData& RooMultiVarGaussian::anaIntData(Int_t code) const
{
// Check if cache entry was previously created
map<int,AnaIntData>::iterator iter =  _anaIntCache.find(code) ;
if (iter != _anaIntCache.end()) {
return iter->second ;
}

// Calculate cache contents

// Decode integration code
vector<int> map1,map2 ;
decodeCode(code,map1,map2) ;

// Rearrage observables so that all non-integrated observables
// go first (preserving relative order) and all integrated observables
// go last (preserving relative order)
TMatrixDSym S11, S22 ;
TMatrixD S12, S21 ;
blockDecompose(_covI,map1,map2,S11,S12,S21,S22) ;

// Begin calculation of partial integrals
//                                          ___
//      sqrt(2pi)^(#intObs)     (-0.5 * u1T S22 u1 )
// I =  ------------------- * e
//        sqrt(|det(S22)|)
//                                                                        ___
// Where S22 is the sub-matrix of covI for the integrated observables and S22
// is the Schur complement of S22
// ___                   -1
// S22  = S11 - S12 * S22   * S21
//
// and u1 is the vector of non-integrated observables

// Calculate Schur complement S22bar
TMatrixD S22inv(S22) ;
S22inv.Invert() ;
TMatrixD S22bar = S11 - S12*S22inv*S21 ;

// Create new cache entry
AnaIntData& cacheData = _anaIntCache[code] ;
cacheData.S22bar.ResizeTo(S22bar) ;
cacheData.S22bar=S22bar ;
cacheData.S22det= S22.Determinant() ;
cacheData.pmap = map1  ;
cacheData.nint = map2.size() ;

return cacheData ;
}

//_____________________________________________________________________________
Int_t RooMultiVarGaussian::getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t /*staticInitOK*/) const
{
// Special case: generate all observables
if (directVars.getSize()==_x.getSize()) {
return -1 ;
}

Int_t nx = _x.getSize() ;
if (nx>127) {
// Warn that analytical integration is only provided for the first 127 observables
coutW(Integration) << "RooMultiVarGaussian::getGenerator(" << GetName() << ") WARNING: p.d.f. has " << _x.getSize()
<< " observables, partial internal generation is only implemented for the first 127 observables" << endl ;
nx=127 ;
}

// Advertise partial generation over all permutations of observables
Int_t code(0) ;
BitBlock bits ;
for (int i=0 ; i<_x.getSize() ; i++) {
RooAbsArg* arg = directVars.find(_x.at(i)->GetName()) ;
if (arg) {
bits.setBit(i) ;
//       code |= (1<<i) ;
}
}

// Map BitBlock into return code
for (UInt_t i=0 ; i<_aicMap.size() ; i++) {
if (_aicMap[i]==bits) {
code = i+1 ;
}
}
if (code==0) {
_aicMap.push_back(bits) ;
code = _aicMap.size() ;
}

return code ;
}

//_____________________________________________________________________________
void RooMultiVarGaussian::initGenerator(Int_t /*code*/)
{
// Clear the GenData cache as its content is not invariant under changes in
// the mu vector.
_genCache.clear() ;

}

//_____________________________________________________________________________
void RooMultiVarGaussian::generateEvent(Int_t code)
{
// Retrieve generator config from cache
GenData& gd = genData(code) ;
TMatrixD& TU = gd.UT ;
Int_t nobs = TU.GetNcols() ;
vector<int>& omap = gd.omap ;

while(1) {

// Create unit Gaussian vector
TVectorD xgen(nobs);
for(Int_t k= 0; k <nobs; k++) {
xgen(k)= RooRandom::gaussian();
}

// Apply transformation matrix
xgen *= TU ;

// Apply shift
if (code == -1) {

// Simple shift if we generate all observables
xgen += gd.mu1 ;

} else {

// Non-generated observable dependent shift for partial generations

// mubar  = mu1 + S12 S22Inv ( x2 - mu2)
TVectorD mubar(gd.mu1) ;
TVectorD x2(gd.pmap.size()) ;
for (UInt_t i=0 ; i<gd.pmap.size() ; i++) {
x2(i) = ((RooAbsReal*)_x.at(gd.pmap[i]))->getVal() ;
}
mubar += gd.S12S22I * (x2 - gd.mu2) ;

xgen += mubar ;

}

// Transfer values and check if values are in range
Bool_t ok(kTRUE) ;
for (int i=0 ; i<nobs ; i++) {
RooRealVar* xi = (RooRealVar*)_x.at(omap[i]) ;
if (xgen(i)<xi->getMin() || xgen(i)>xi->getMax()) {
ok = kFALSE ;
break ;
} else {
xi->setVal(xgen(i)) ;
}
}

// If all values are in range, accept event and return
// otherwise retry
if (ok) {
break ;
}
}

return;
}

//_____________________________________________________________________________
RooMultiVarGaussian::GenData& RooMultiVarGaussian::genData(Int_t code) const
{
// WVE -- CHECK THAT GENDATA IS VALID GIVEN CURRENT VALUES OF _MU

// Check if cache entry was previously created
map<int,GenData>::iterator iter =  _genCache.find(code) ;
if (iter != _genCache.end()) {
return iter->second ;
}

// Create new entry
GenData& cacheData = _genCache[code] ;

if (code==-1) {

// Do eigen value decomposition
TDecompChol tdc(_cov) ;
tdc.Decompose() ;
TMatrixD U = tdc.GetU() ;
TMatrixD TU(TMatrixD::kTransposed,U) ;

// Fill cache data
cacheData.UT.ResizeTo(TU) ;
cacheData.UT = TU ;
cacheData.omap.resize(_x.getSize()) ;
for (int i=0 ; i<_x.getSize() ; i++) {
cacheData.omap[i] = i ;
}
syncMuVec() ;
cacheData.mu1.ResizeTo(_muVec) ;
cacheData.mu1 = _muVec ;

} else {

// Construct observables: map1 = generated, map2 = given
vector<int> map1, map2 ;
decodeCode(code,map2,map1) ;

// Do block decomposition of covariance matrix
TMatrixDSym S11, S22 ;
TMatrixD S12, S21 ;
blockDecompose(_cov,map1,map2,S11,S12,S21,S22) ;

// Constructed conditional matrix form
//                                             -1
// F(X1|X2) --> CovI --> S22bar = S11 - S12 S22  S21
//                                             -1
//          --> mu   --> mubar  = mu1 + S12 S22  ( x2 - mu2)

// Do eigenvalue decomposition
TMatrixD S22Inv(TMatrixD::kInverted,S22) ;
TMatrixD S22bar =  S11 - S12 * (S22Inv * S21) ;

// Do eigen value decomposition of S22bar
TDecompChol tdc(S22bar) ;
tdc.Decompose() ;
TMatrixD U = tdc.GetU() ;
TMatrixD TU(TMatrixD::kTransposed,U) ;

// Split mu vector into mu1 and mu2
TVectorD mu1(map1.size()),mu2(map2.size()) ;
syncMuVec() ;
for (UInt_t i=0 ; i<map1.size() ; i++) {
mu1(i) = _muVec(map1[i]) ;
}
for (UInt_t i=0 ; i<map2.size() ; i++) {
mu2(i) = _muVec(map2[i]) ;
}

// Calculate rotation matrix for mu vector
TMatrixD S12S22Inv = S12 * S22Inv ;

// Fill cache data
cacheData.UT.ResizeTo(TU) ;
cacheData.UT = TU ;
cacheData.omap = map1 ;
cacheData.pmap = map2 ;
cacheData.mu1.ResizeTo(mu1) ;
cacheData.mu2.ResizeTo(mu2) ;
cacheData.mu1 = mu1 ;
cacheData.mu2 = mu2 ;
cacheData.S12S22I.ResizeTo(S12S22Inv) ;
cacheData.S12S22I = S12S22Inv ;

}

return cacheData ;
}

//_____________________________________________________________________________
void RooMultiVarGaussian::decodeCode(Int_t code, vector<int>& map1, vector<int>& map2) const
{
// Decode analytical integration/generation code into index map of integrated/generated (map2)
// and non-integrated/generated observables (map1)
if (code<0 || code> (Int_t)_aicMap.size()) {
cout << "RooMultiVarGaussian::decodeCode(" << GetName() << ") ERROR don't have bit pattern for code " << code << endl ;
throw string("RooMultiVarGaussian::decodeCode() ERROR don't have bit pattern for code") ;
}

BitBlock b = _aicMap[code-1] ;
map1.clear() ;
map2.clear() ;
for (int i=0 ; i<_x.getSize() ; i++) {
if (b.getBit(i)) {
map2.push_back(i) ;
} else {
map1.push_back(i) ;
}
}
}

//_____________________________________________________________________________
void RooMultiVarGaussian::blockDecompose(const TMatrixD& input, const vector<int>& map1, const vector<int>& map2, TMatrixDSym& S11, TMatrixD& S12, TMatrixD& S21, TMatrixDSym& S22)
{
// Block decomposition of covI according to given maps of observables

// Allocate and fill reordered covI matrix in 2x2 block structure

S11.ResizeTo(map1.size(),map1.size()) ;
S12.ResizeTo(map1.size(),map2.size()) ;
S21.ResizeTo(map2.size(),map1.size()) ;
S22.ResizeTo(map2.size(),map2.size()) ;

for (UInt_t i=0 ; i<map1.size() ; i++) {
for (UInt_t j=0 ; j<map1.size() ; j++)
S11(i,j) = input(map1[i],map1[j]) ;
for (UInt_t j=0 ; j<map2.size() ; j++)
S12(i,j) = input(map1[i],map2[j]) ;
}
for (UInt_t i=0 ; i<map2.size() ; i++) {
for (UInt_t j=0 ; j<map1.size() ; j++)
S21(i,j) = input(map2[i],map1[j]) ;
for (UInt_t j=0 ; j<map2.size() ; j++)
S22(i,j) = input(map2[i],map2[j]) ;
}

}

void RooMultiVarGaussian::BitBlock::setBit(Int_t ibit)
{
if (ibit<32) { b0 |= (1<<ibit) ; return ; }
if (ibit<64) { b1 |= (1<<(ibit-32)) ; return ; }
if (ibit<96) { b2 |= (1<<(ibit-64)) ; return ; }
if (ibit<128) { b3 |= (1<<(ibit-96)) ; return ; }
}

Bool_t RooMultiVarGaussian::BitBlock::getBit(Int_t ibit)
{
if (ibit<32) return (b0 & (1<<ibit)) ;
if (ibit<64) return (b1 & (1<<(ibit-32))) ;
if (ibit<96) return (b2 & (1<<(ibit-64))) ;
if (ibit<128) return (b3 & (1<<(ibit-96))) ;
return kFALSE ;
}

Bool_t RooMultiVarGaussian::BitBlock::operator==(const BitBlock& other)
{
if (b0 != other.b0) return kFALSE ;
if (b1 != other.b1) return kFALSE ;
if (b2 != other.b2) return kFALSE ;
if (b3 != other.b3) return kFALSE ;
return kTRUE ;
}

```
RooMultiVarGaussian.cxx:1
RooMultiVarGaussian.cxx:2
RooMultiVarGaussian.cxx:3
RooMultiVarGaussian.cxx:4
RooMultiVarGaussian.cxx:5
RooMultiVarGaussian.cxx:6
RooMultiVarGaussian.cxx:7
RooMultiVarGaussian.cxx:8
RooMultiVarGaussian.cxx:9
RooMultiVarGaussian.cxx:10
RooMultiVarGaussian.cxx:11
RooMultiVarGaussian.cxx:12
RooMultiVarGaussian.cxx:13
RooMultiVarGaussian.cxx:14
RooMultiVarGaussian.cxx:15
RooMultiVarGaussian.cxx:16
RooMultiVarGaussian.cxx:17
RooMultiVarGaussian.cxx:18
RooMultiVarGaussian.cxx:19
RooMultiVarGaussian.cxx:20
RooMultiVarGaussian.cxx:21
RooMultiVarGaussian.cxx:22
RooMultiVarGaussian.cxx:23
RooMultiVarGaussian.cxx:24
RooMultiVarGaussian.cxx:25
RooMultiVarGaussian.cxx:26
RooMultiVarGaussian.cxx:27
RooMultiVarGaussian.cxx:28
RooMultiVarGaussian.cxx:29
RooMultiVarGaussian.cxx:30
RooMultiVarGaussian.cxx:31
RooMultiVarGaussian.cxx:32
RooMultiVarGaussian.cxx:33
RooMultiVarGaussian.cxx:34
RooMultiVarGaussian.cxx:35
RooMultiVarGaussian.cxx:36
RooMultiVarGaussian.cxx:37
RooMultiVarGaussian.cxx:38
RooMultiVarGaussian.cxx:39
RooMultiVarGaussian.cxx:40
RooMultiVarGaussian.cxx:41
RooMultiVarGaussian.cxx:42
RooMultiVarGaussian.cxx:43
RooMultiVarGaussian.cxx:44
RooMultiVarGaussian.cxx:45
RooMultiVarGaussian.cxx:46
RooMultiVarGaussian.cxx:47
RooMultiVarGaussian.cxx:48
RooMultiVarGaussian.cxx:49
RooMultiVarGaussian.cxx:50
RooMultiVarGaussian.cxx:51
RooMultiVarGaussian.cxx:52
RooMultiVarGaussian.cxx:53
RooMultiVarGaussian.cxx:54
RooMultiVarGaussian.cxx:55
RooMultiVarGaussian.cxx:56
RooMultiVarGaussian.cxx:57
RooMultiVarGaussian.cxx:58
RooMultiVarGaussian.cxx:59
RooMultiVarGaussian.cxx:60
RooMultiVarGaussian.cxx:61
RooMultiVarGaussian.cxx:62
RooMultiVarGaussian.cxx:63
RooMultiVarGaussian.cxx:64
RooMultiVarGaussian.cxx:65
RooMultiVarGaussian.cxx:66
RooMultiVarGaussian.cxx:67
RooMultiVarGaussian.cxx:68
RooMultiVarGaussian.cxx:69
RooMultiVarGaussian.cxx:70
RooMultiVarGaussian.cxx:71
RooMultiVarGaussian.cxx:72
RooMultiVarGaussian.cxx:73
RooMultiVarGaussian.cxx:74
RooMultiVarGaussian.cxx:75
RooMultiVarGaussian.cxx:76
RooMultiVarGaussian.cxx:77
RooMultiVarGaussian.cxx:78
RooMultiVarGaussian.cxx:79
RooMultiVarGaussian.cxx:80
RooMultiVarGaussian.cxx:81
RooMultiVarGaussian.cxx:82
RooMultiVarGaussian.cxx:83
RooMultiVarGaussian.cxx:84
RooMultiVarGaussian.cxx:85
RooMultiVarGaussian.cxx:86
RooMultiVarGaussian.cxx:87
RooMultiVarGaussian.cxx:88
RooMultiVarGaussian.cxx:89
RooMultiVarGaussian.cxx:90
RooMultiVarGaussian.cxx:91
RooMultiVarGaussian.cxx:92
RooMultiVarGaussian.cxx:93
RooMultiVarGaussian.cxx:94
RooMultiVarGaussian.cxx:95
RooMultiVarGaussian.cxx:96
RooMultiVarGaussian.cxx:97
RooMultiVarGaussian.cxx:98
RooMultiVarGaussian.cxx:99
RooMultiVarGaussian.cxx:100
RooMultiVarGaussian.cxx:101
RooMultiVarGaussian.cxx:102
RooMultiVarGaussian.cxx:103
RooMultiVarGaussian.cxx:104
RooMultiVarGaussian.cxx:105
RooMultiVarGaussian.cxx:106
RooMultiVarGaussian.cxx:107
RooMultiVarGaussian.cxx:108
RooMultiVarGaussian.cxx:109
RooMultiVarGaussian.cxx:110
RooMultiVarGaussian.cxx:111
RooMultiVarGaussian.cxx:112
RooMultiVarGaussian.cxx:113
RooMultiVarGaussian.cxx:114
RooMultiVarGaussian.cxx:115
RooMultiVarGaussian.cxx:116
RooMultiVarGaussian.cxx:117
RooMultiVarGaussian.cxx:118
RooMultiVarGaussian.cxx:119
RooMultiVarGaussian.cxx:120
RooMultiVarGaussian.cxx:121
RooMultiVarGaussian.cxx:122
RooMultiVarGaussian.cxx:123
RooMultiVarGaussian.cxx:124
RooMultiVarGaussian.cxx:125
RooMultiVarGaussian.cxx:126
RooMultiVarGaussian.cxx:127
RooMultiVarGaussian.cxx:128
RooMultiVarGaussian.cxx:129
RooMultiVarGaussian.cxx:130
RooMultiVarGaussian.cxx:131
RooMultiVarGaussian.cxx:132
RooMultiVarGaussian.cxx:133
RooMultiVarGaussian.cxx:134
RooMultiVarGaussian.cxx:135
RooMultiVarGaussian.cxx:136
RooMultiVarGaussian.cxx:137
RooMultiVarGaussian.cxx:138
RooMultiVarGaussian.cxx:139
RooMultiVarGaussian.cxx:140
RooMultiVarGaussian.cxx:141
RooMultiVarGaussian.cxx:142
RooMultiVarGaussian.cxx:143
RooMultiVarGaussian.cxx:144
RooMultiVarGaussian.cxx:145
RooMultiVarGaussian.cxx:146
RooMultiVarGaussian.cxx:147
RooMultiVarGaussian.cxx:148
RooMultiVarGaussian.cxx:149
RooMultiVarGaussian.cxx:150
RooMultiVarGaussian.cxx:151
RooMultiVarGaussian.cxx:152
RooMultiVarGaussian.cxx:153
RooMultiVarGaussian.cxx:154
RooMultiVarGaussian.cxx:155
RooMultiVarGaussian.cxx:156
RooMultiVarGaussian.cxx:157
RooMultiVarGaussian.cxx:158
RooMultiVarGaussian.cxx:159
RooMultiVarGaussian.cxx:160
RooMultiVarGaussian.cxx:161
RooMultiVarGaussian.cxx:162
RooMultiVarGaussian.cxx:163
RooMultiVarGaussian.cxx:164
RooMultiVarGaussian.cxx:165
RooMultiVarGaussian.cxx:166
RooMultiVarGaussian.cxx:167
RooMultiVarGaussian.cxx:168
RooMultiVarGaussian.cxx:169
RooMultiVarGaussian.cxx:170
RooMultiVarGaussian.cxx:171
RooMultiVarGaussian.cxx:172
RooMultiVarGaussian.cxx:173
RooMultiVarGaussian.cxx:174
RooMultiVarGaussian.cxx:175
RooMultiVarGaussian.cxx:176
RooMultiVarGaussian.cxx:177
RooMultiVarGaussian.cxx:178
RooMultiVarGaussian.cxx:179
RooMultiVarGaussian.cxx:180
RooMultiVarGaussian.cxx:181
RooMultiVarGaussian.cxx:182
RooMultiVarGaussian.cxx:183
RooMultiVarGaussian.cxx:184
RooMultiVarGaussian.cxx:185
RooMultiVarGaussian.cxx:186
RooMultiVarGaussian.cxx:187
RooMultiVarGaussian.cxx:188
RooMultiVarGaussian.cxx:189
RooMultiVarGaussian.cxx:190
RooMultiVarGaussian.cxx:191
RooMultiVarGaussian.cxx:192
RooMultiVarGaussian.cxx:193
RooMultiVarGaussian.cxx:194
RooMultiVarGaussian.cxx:195
RooMultiVarGaussian.cxx:196
RooMultiVarGaussian.cxx:197
RooMultiVarGaussian.cxx:198
RooMultiVarGaussian.cxx:199
RooMultiVarGaussian.cxx:200
RooMultiVarGaussian.cxx:201
RooMultiVarGaussian.cxx:202
RooMultiVarGaussian.cxx:203
RooMultiVarGaussian.cxx:204
RooMultiVarGaussian.cxx:205
RooMultiVarGaussian.cxx:206
RooMultiVarGaussian.cxx:207
RooMultiVarGaussian.cxx:208
RooMultiVarGaussian.cxx:209
RooMultiVarGaussian.cxx:210
RooMultiVarGaussian.cxx:211
RooMultiVarGaussian.cxx:212
RooMultiVarGaussian.cxx:213
RooMultiVarGaussian.cxx:214
RooMultiVarGaussian.cxx:215
RooMultiVarGaussian.cxx:216
RooMultiVarGaussian.cxx:217
RooMultiVarGaussian.cxx:218
RooMultiVarGaussian.cxx:219
RooMultiVarGaussian.cxx:220
RooMultiVarGaussian.cxx:221
RooMultiVarGaussian.cxx:222
RooMultiVarGaussian.cxx:223
RooMultiVarGaussian.cxx:224
RooMultiVarGaussian.cxx:225
RooMultiVarGaussian.cxx:226
RooMultiVarGaussian.cxx:227
RooMultiVarGaussian.cxx:228
RooMultiVarGaussian.cxx:229
RooMultiVarGaussian.cxx:230
RooMultiVarGaussian.cxx:231
RooMultiVarGaussian.cxx:232
RooMultiVarGaussian.cxx:233
RooMultiVarGaussian.cxx:234
RooMultiVarGaussian.cxx:235
RooMultiVarGaussian.cxx:236
RooMultiVarGaussian.cxx:237
RooMultiVarGaussian.cxx:238
RooMultiVarGaussian.cxx:239
RooMultiVarGaussian.cxx:240
RooMultiVarGaussian.cxx:241
RooMultiVarGaussian.cxx:242
RooMultiVarGaussian.cxx:243
RooMultiVarGaussian.cxx:244
RooMultiVarGaussian.cxx:245
RooMultiVarGaussian.cxx:246
RooMultiVarGaussian.cxx:247
RooMultiVarGaussian.cxx:248
RooMultiVarGaussian.cxx:249
RooMultiVarGaussian.cxx:250
RooMultiVarGaussian.cxx:251
RooMultiVarGaussian.cxx:252
RooMultiVarGaussian.cxx:253
RooMultiVarGaussian.cxx:254
RooMultiVarGaussian.cxx:255
RooMultiVarGaussian.cxx:256
RooMultiVarGaussian.cxx:257
RooMultiVarGaussian.cxx:258
RooMultiVarGaussian.cxx:259
RooMultiVarGaussian.cxx:260
RooMultiVarGaussian.cxx:261
RooMultiVarGaussian.cxx:262
RooMultiVarGaussian.cxx:263
RooMultiVarGaussian.cxx:264
RooMultiVarGaussian.cxx:265
RooMultiVarGaussian.cxx:266
RooMultiVarGaussian.cxx:267
RooMultiVarGaussian.cxx:268
RooMultiVarGaussian.cxx:269
RooMultiVarGaussian.cxx:270
RooMultiVarGaussian.cxx:271
RooMultiVarGaussian.cxx:272
RooMultiVarGaussian.cxx:273
RooMultiVarGaussian.cxx:274
RooMultiVarGaussian.cxx:275
RooMultiVarGaussian.cxx:276
RooMultiVarGaussian.cxx:277
RooMultiVarGaussian.cxx:278
RooMultiVarGaussian.cxx:279
RooMultiVarGaussian.cxx:280
RooMultiVarGaussian.cxx:281
RooMultiVarGaussian.cxx:282
RooMultiVarGaussian.cxx:283
RooMultiVarGaussian.cxx:284
RooMultiVarGaussian.cxx:285
RooMultiVarGaussian.cxx:286
RooMultiVarGaussian.cxx:287
RooMultiVarGaussian.cxx:288
RooMultiVarGaussian.cxx:289
RooMultiVarGaussian.cxx:290
RooMultiVarGaussian.cxx:291
RooMultiVarGaussian.cxx:292
RooMultiVarGaussian.cxx:293
RooMultiVarGaussian.cxx:294
RooMultiVarGaussian.cxx:295
RooMultiVarGaussian.cxx:296
RooMultiVarGaussian.cxx:297
RooMultiVarGaussian.cxx:298
RooMultiVarGaussian.cxx:299
RooMultiVarGaussian.cxx:300
RooMultiVarGaussian.cxx:301
RooMultiVarGaussian.cxx:302
RooMultiVarGaussian.cxx:303
RooMultiVarGaussian.cxx:304
RooMultiVarGaussian.cxx:305
RooMultiVarGaussian.cxx:306
RooMultiVarGaussian.cxx:307
RooMultiVarGaussian.cxx:308
RooMultiVarGaussian.cxx:309
RooMultiVarGaussian.cxx:310
RooMultiVarGaussian.cxx:311
RooMultiVarGaussian.cxx:312
RooMultiVarGaussian.cxx:313
RooMultiVarGaussian.cxx:314
RooMultiVarGaussian.cxx:315
RooMultiVarGaussian.cxx:316
RooMultiVarGaussian.cxx:317
RooMultiVarGaussian.cxx:318
RooMultiVarGaussian.cxx:319
RooMultiVarGaussian.cxx:320
RooMultiVarGaussian.cxx:321
RooMultiVarGaussian.cxx:322
RooMultiVarGaussian.cxx:323
RooMultiVarGaussian.cxx:324
RooMultiVarGaussian.cxx:325
RooMultiVarGaussian.cxx:326
RooMultiVarGaussian.cxx:327
RooMultiVarGaussian.cxx:328
RooMultiVarGaussian.cxx:329
RooMultiVarGaussian.cxx:330
RooMultiVarGaussian.cxx:331
RooMultiVarGaussian.cxx:332
RooMultiVarGaussian.cxx:333
RooMultiVarGaussian.cxx:334
RooMultiVarGaussian.cxx:335
RooMultiVarGaussian.cxx:336
RooMultiVarGaussian.cxx:337
RooMultiVarGaussian.cxx:338
RooMultiVarGaussian.cxx:339
RooMultiVarGaussian.cxx:340
RooMultiVarGaussian.cxx:341
RooMultiVarGaussian.cxx:342
RooMultiVarGaussian.cxx:343
RooMultiVarGaussian.cxx:344
RooMultiVarGaussian.cxx:345
RooMultiVarGaussian.cxx:346
RooMultiVarGaussian.cxx:347
RooMultiVarGaussian.cxx:348
RooMultiVarGaussian.cxx:349
RooMultiVarGaussian.cxx:350
RooMultiVarGaussian.cxx:351
RooMultiVarGaussian.cxx:352
RooMultiVarGaussian.cxx:353
RooMultiVarGaussian.cxx:354
RooMultiVarGaussian.cxx:355
RooMultiVarGaussian.cxx:356
RooMultiVarGaussian.cxx:357
RooMultiVarGaussian.cxx:358
RooMultiVarGaussian.cxx:359
RooMultiVarGaussian.cxx:360
RooMultiVarGaussian.cxx:361
RooMultiVarGaussian.cxx:362
RooMultiVarGaussian.cxx:363
RooMultiVarGaussian.cxx:364
RooMultiVarGaussian.cxx:365
RooMultiVarGaussian.cxx:366
RooMultiVarGaussian.cxx:367
RooMultiVarGaussian.cxx:368
RooMultiVarGaussian.cxx:369
RooMultiVarGaussian.cxx:370
RooMultiVarGaussian.cxx:371
RooMultiVarGaussian.cxx:372
RooMultiVarGaussian.cxx:373
RooMultiVarGaussian.cxx:374
RooMultiVarGaussian.cxx:375
RooMultiVarGaussian.cxx:376
RooMultiVarGaussian.cxx:377
RooMultiVarGaussian.cxx:378
RooMultiVarGaussian.cxx:379
RooMultiVarGaussian.cxx:380
RooMultiVarGaussian.cxx:381
RooMultiVarGaussian.cxx:382
RooMultiVarGaussian.cxx:383
RooMultiVarGaussian.cxx:384
RooMultiVarGaussian.cxx:385
RooMultiVarGaussian.cxx:386
RooMultiVarGaussian.cxx:387
RooMultiVarGaussian.cxx:388
RooMultiVarGaussian.cxx:389
RooMultiVarGaussian.cxx:390
RooMultiVarGaussian.cxx:391
RooMultiVarGaussian.cxx:392
RooMultiVarGaussian.cxx:393
RooMultiVarGaussian.cxx:394
RooMultiVarGaussian.cxx:395
RooMultiVarGaussian.cxx:396
RooMultiVarGaussian.cxx:397
RooMultiVarGaussian.cxx:398
RooMultiVarGaussian.cxx:399
RooMultiVarGaussian.cxx:400
RooMultiVarGaussian.cxx:401
RooMultiVarGaussian.cxx:402
RooMultiVarGaussian.cxx:403
RooMultiVarGaussian.cxx:404
RooMultiVarGaussian.cxx:405
RooMultiVarGaussian.cxx:406
RooMultiVarGaussian.cxx:407
RooMultiVarGaussian.cxx:408
RooMultiVarGaussian.cxx:409
RooMultiVarGaussian.cxx:410
RooMultiVarGaussian.cxx:411
RooMultiVarGaussian.cxx:412
RooMultiVarGaussian.cxx:413
RooMultiVarGaussian.cxx:414
RooMultiVarGaussian.cxx:415
RooMultiVarGaussian.cxx:416
RooMultiVarGaussian.cxx:417
RooMultiVarGaussian.cxx:418
RooMultiVarGaussian.cxx:419
RooMultiVarGaussian.cxx:420
RooMultiVarGaussian.cxx:421
RooMultiVarGaussian.cxx:422
RooMultiVarGaussian.cxx:423
RooMultiVarGaussian.cxx:424
RooMultiVarGaussian.cxx:425
RooMultiVarGaussian.cxx:426
RooMultiVarGaussian.cxx:427
RooMultiVarGaussian.cxx:428
RooMultiVarGaussian.cxx:429
RooMultiVarGaussian.cxx:430
RooMultiVarGaussian.cxx:431
RooMultiVarGaussian.cxx:432
RooMultiVarGaussian.cxx:433
RooMultiVarGaussian.cxx:434
RooMultiVarGaussian.cxx:435
RooMultiVarGaussian.cxx:436
RooMultiVarGaussian.cxx:437
RooMultiVarGaussian.cxx:438
RooMultiVarGaussian.cxx:439
RooMultiVarGaussian.cxx:440
RooMultiVarGaussian.cxx:441
RooMultiVarGaussian.cxx:442
RooMultiVarGaussian.cxx:443
RooMultiVarGaussian.cxx:444
RooMultiVarGaussian.cxx:445
RooMultiVarGaussian.cxx:446
RooMultiVarGaussian.cxx:447
RooMultiVarGaussian.cxx:448
RooMultiVarGaussian.cxx:449
RooMultiVarGaussian.cxx:450
RooMultiVarGaussian.cxx:451
RooMultiVarGaussian.cxx:452
RooMultiVarGaussian.cxx:453
RooMultiVarGaussian.cxx:454
RooMultiVarGaussian.cxx:455
RooMultiVarGaussian.cxx:456
RooMultiVarGaussian.cxx:457
RooMultiVarGaussian.cxx:458
RooMultiVarGaussian.cxx:459
RooMultiVarGaussian.cxx:460
RooMultiVarGaussian.cxx:461
RooMultiVarGaussian.cxx:462
RooMultiVarGaussian.cxx:463
RooMultiVarGaussian.cxx:464
RooMultiVarGaussian.cxx:465
RooMultiVarGaussian.cxx:466
RooMultiVarGaussian.cxx:467
RooMultiVarGaussian.cxx:468
RooMultiVarGaussian.cxx:469
RooMultiVarGaussian.cxx:470
RooMultiVarGaussian.cxx:471
RooMultiVarGaussian.cxx:472
RooMultiVarGaussian.cxx:473
RooMultiVarGaussian.cxx:474
RooMultiVarGaussian.cxx:475
RooMultiVarGaussian.cxx:476
RooMultiVarGaussian.cxx:477
RooMultiVarGaussian.cxx:478
RooMultiVarGaussian.cxx:479
RooMultiVarGaussian.cxx:480
RooMultiVarGaussian.cxx:481
RooMultiVarGaussian.cxx:482
RooMultiVarGaussian.cxx:483
RooMultiVarGaussian.cxx:484
RooMultiVarGaussian.cxx:485
RooMultiVarGaussian.cxx:486
RooMultiVarGaussian.cxx:487
RooMultiVarGaussian.cxx:488
RooMultiVarGaussian.cxx:489
RooMultiVarGaussian.cxx:490
RooMultiVarGaussian.cxx:491
RooMultiVarGaussian.cxx:492
RooMultiVarGaussian.cxx:493
RooMultiVarGaussian.cxx:494
RooMultiVarGaussian.cxx:495
RooMultiVarGaussian.cxx:496
RooMultiVarGaussian.cxx:497
RooMultiVarGaussian.cxx:498
RooMultiVarGaussian.cxx:499
RooMultiVarGaussian.cxx:500
RooMultiVarGaussian.cxx:501
RooMultiVarGaussian.cxx:502
RooMultiVarGaussian.cxx:503
RooMultiVarGaussian.cxx:504
RooMultiVarGaussian.cxx:505
RooMultiVarGaussian.cxx:506
RooMultiVarGaussian.cxx:507
RooMultiVarGaussian.cxx:508
RooMultiVarGaussian.cxx:509
RooMultiVarGaussian.cxx:510
RooMultiVarGaussian.cxx:511
RooMultiVarGaussian.cxx:512
RooMultiVarGaussian.cxx:513
RooMultiVarGaussian.cxx:514
RooMultiVarGaussian.cxx:515
RooMultiVarGaussian.cxx:516
RooMultiVarGaussian.cxx:517
RooMultiVarGaussian.cxx:518
RooMultiVarGaussian.cxx:519
RooMultiVarGaussian.cxx:520
RooMultiVarGaussian.cxx:521
RooMultiVarGaussian.cxx:522
RooMultiVarGaussian.cxx:523
RooMultiVarGaussian.cxx:524
RooMultiVarGaussian.cxx:525
RooMultiVarGaussian.cxx:526
RooMultiVarGaussian.cxx:527
RooMultiVarGaussian.cxx:528
RooMultiVarGaussian.cxx:529
RooMultiVarGaussian.cxx:530
RooMultiVarGaussian.cxx:531
RooMultiVarGaussian.cxx:532
RooMultiVarGaussian.cxx:533
RooMultiVarGaussian.cxx:534
RooMultiVarGaussian.cxx:535
RooMultiVarGaussian.cxx:536
RooMultiVarGaussian.cxx:537
RooMultiVarGaussian.cxx:538
RooMultiVarGaussian.cxx:539
RooMultiVarGaussian.cxx:540
RooMultiVarGaussian.cxx:541
RooMultiVarGaussian.cxx:542
RooMultiVarGaussian.cxx:543
RooMultiVarGaussian.cxx:544
RooMultiVarGaussian.cxx:545
RooMultiVarGaussian.cxx:546
RooMultiVarGaussian.cxx:547
RooMultiVarGaussian.cxx:548
RooMultiVarGaussian.cxx:549
RooMultiVarGaussian.cxx:550
RooMultiVarGaussian.cxx:551
RooMultiVarGaussian.cxx:552
RooMultiVarGaussian.cxx:553
RooMultiVarGaussian.cxx:554
RooMultiVarGaussian.cxx:555
RooMultiVarGaussian.cxx:556
RooMultiVarGaussian.cxx:557
RooMultiVarGaussian.cxx:558
RooMultiVarGaussian.cxx:559
RooMultiVarGaussian.cxx:560
RooMultiVarGaussian.cxx:561
RooMultiVarGaussian.cxx:562
RooMultiVarGaussian.cxx:563
RooMultiVarGaussian.cxx:564
RooMultiVarGaussian.cxx:565
RooMultiVarGaussian.cxx:566
RooMultiVarGaussian.cxx:567
RooMultiVarGaussian.cxx:568
RooMultiVarGaussian.cxx:569
RooMultiVarGaussian.cxx:570
RooMultiVarGaussian.cxx:571
RooMultiVarGaussian.cxx:572
RooMultiVarGaussian.cxx:573
RooMultiVarGaussian.cxx:574
RooMultiVarGaussian.cxx:575
RooMultiVarGaussian.cxx:576
RooMultiVarGaussian.cxx:577
RooMultiVarGaussian.cxx:578
RooMultiVarGaussian.cxx:579
RooMultiVarGaussian.cxx:580
RooMultiVarGaussian.cxx:581
RooMultiVarGaussian.cxx:582
RooMultiVarGaussian.cxx:583
RooMultiVarGaussian.cxx:584
RooMultiVarGaussian.cxx:585
RooMultiVarGaussian.cxx:586
RooMultiVarGaussian.cxx:587
RooMultiVarGaussian.cxx:588
RooMultiVarGaussian.cxx:589
RooMultiVarGaussian.cxx:590
RooMultiVarGaussian.cxx:591
RooMultiVarGaussian.cxx:592
RooMultiVarGaussian.cxx:593
RooMultiVarGaussian.cxx:594
RooMultiVarGaussian.cxx:595
RooMultiVarGaussian.cxx:596
RooMultiVarGaussian.cxx:597
RooMultiVarGaussian.cxx:598
RooMultiVarGaussian.cxx:599
RooMultiVarGaussian.cxx:600
RooMultiVarGaussian.cxx:601
RooMultiVarGaussian.cxx:602
RooMultiVarGaussian.cxx:603
RooMultiVarGaussian.cxx:604
RooMultiVarGaussian.cxx:605
RooMultiVarGaussian.cxx:606
RooMultiVarGaussian.cxx:607
RooMultiVarGaussian.cxx:608
RooMultiVarGaussian.cxx:609
RooMultiVarGaussian.cxx:610
RooMultiVarGaussian.cxx:611
RooMultiVarGaussian.cxx:612
RooMultiVarGaussian.cxx:613
RooMultiVarGaussian.cxx:614
RooMultiVarGaussian.cxx:615
RooMultiVarGaussian.cxx:616
RooMultiVarGaussian.cxx:617
RooMultiVarGaussian.cxx:618
RooMultiVarGaussian.cxx:619
RooMultiVarGaussian.cxx:620
RooMultiVarGaussian.cxx:621
RooMultiVarGaussian.cxx:622
RooMultiVarGaussian.cxx:623
RooMultiVarGaussian.cxx:624
RooMultiVarGaussian.cxx:625
RooMultiVarGaussian.cxx:626
RooMultiVarGaussian.cxx:627
RooMultiVarGaussian.cxx:628
RooMultiVarGaussian.cxx:629
RooMultiVarGaussian.cxx:630
RooMultiVarGaussian.cxx:631
RooMultiVarGaussian.cxx:632
RooMultiVarGaussian.cxx:633
RooMultiVarGaussian.cxx:634
RooMultiVarGaussian.cxx:635
RooMultiVarGaussian.cxx:636
RooMultiVarGaussian.cxx:637
RooMultiVarGaussian.cxx:638
RooMultiVarGaussian.cxx:639
RooMultiVarGaussian.cxx:640
RooMultiVarGaussian.cxx:641
RooMultiVarGaussian.cxx:642
RooMultiVarGaussian.cxx:643
RooMultiVarGaussian.cxx:644
RooMultiVarGaussian.cxx:645
RooMultiVarGaussian.cxx:646
RooMultiVarGaussian.cxx:647
RooMultiVarGaussian.cxx:648
RooMultiVarGaussian.cxx:649
RooMultiVarGaussian.cxx:650
RooMultiVarGaussian.cxx:651
RooMultiVarGaussian.cxx:652
RooMultiVarGaussian.cxx:653
RooMultiVarGaussian.cxx:654
RooMultiVarGaussian.cxx:655
RooMultiVarGaussian.cxx:656
RooMultiVarGaussian.cxx:657