ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 * @(#)root/roofitcore:$Id: RooMath.cxx 28259 2009-04-16 16:21:16Z wouter $
 * 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)             *
 *****************************************************************************/

// -- CLASS DESCRIPTION [MISC] --
// RooMath is a singleton class implementing various mathematical
// functions not found in TMath, mostly involving complex algebra
//
//

#include "RooFit.h"

#include "RooMath.h"
#include "RooMath.h"
#include "TMath.h"
#include <math.h>
#include "Riostream.h"
#include "RooMsgService.h"
#include "RooSentinel.h"
#include "TSystem.h"

ClassImp(RooMath)
;


RooComplex RooMath::FastComplexErrFunc(const RooComplex& z)
{
  return ITPComplexErrFunc(z,z.im()>0?3:4) ;
}
  
Double_t RooMath::FastComplexErrFuncRe(const RooComplex& z) 
{
  return ITPComplexErrFuncRe(z,z.im()>0?3:4) ;
}

Double_t RooMath::FastComplexErrFuncIm(const RooComplex& z) 
{
  return ITPComplexErrFuncIm(z,z.im()>0?3:4) ;
}

void RooMath::cacheCERF(Bool_t flag) 
{ 
  _cacheTable = flag ; 
}


RooComplex RooMath::ComplexErrFunc(Double_t re, Double_t im) {
  // Return CERNlib complex error function for Z(re,im)
  return ComplexErrFunc(RooComplex(re,im));
}

RooComplex RooMath::ComplexErrFunc(const RooComplex& Z) {
  // Return CERNlib complex error function
  //
  // This code is translated from the fortran version in the CERN mathlib.
  // (see ftp://asisftp.cern.ch/cernlib/share/pro/src/mathlib/gen/c/cwerf64.F)

  RooComplex ZH,S,T,V;
  static RooComplex R[38];

  static const Double_t Z1= 1, HF= Z1/2, Z10= 10;
  static const Double_t C1= 74/Z10, C2= 83/Z10, C3= Z10/32, C4 = 16/Z10;
  static const Double_t C = 1.12837916709551257, P = pow(2*C4,33);
  static const RooComplex zero(0);

  Double_t X(Z.re()),Y(Z.im()), XA(fabs(X)), YA(fabs(Y));
  int N;
  if((YA < C1) && (XA < C2)) {
    ZH= RooComplex(YA+C4,XA);
    R[37]=zero;
    N= 36;
    while(N > 0) {
      T=ZH+R[N+1].conj()*N;
      R[N--]=(T*HF)/T.abs2();
    }
    Double_t XL=P;
    S=zero;
    N= 33;
    while(N > 0) {
      XL=C3*XL;
      S=R[N--]*(S+XL);
    }
    V=S*C;
  }
  else {
    ZH=RooComplex(YA,XA);
    R[1]=zero;
    N= 9;
    while(N > 0) {
      T=ZH+R[1].conj()*N;
      R[1]=(T*HF)/T.abs2();
      N--;
    }
    V=R[1]*C;
  }
  if(YA==0) V=RooComplex(exp(-(XA*XA)),V.im());

  if(Y < 0) {
    RooComplex tmp(XA,YA);
    tmp= -tmp*tmp;
    V=tmp.exp()*2-V;
    if(X > 0) V= V.conj();
  }
  else {
    if(X < 0) V= V.conj();
  }
  return V;
}



void RooMath::initFastCERF(Int_t reBins, Double_t reMin, Double_t reMax, Int_t imBins, Double_t imMin, Double_t imMax) 
{
  // Allocate and initialize lookup table for interpolated complex error function
  // for given grid parameters

  // Store grid dimensions and related parameters
  _reBins = reBins ;
  _imBins = imBins ;
  _reMin = reMin ;
  _reMax = reMax ;
  _reRange = _reMax-_reMin ;
  _reStep  = _reRange/_reBins ;

  _imMin = imMin ;
  _imMax = imMax ;
  _imRange = _imMax-_imMin ;
  _imStep = _imRange/_imBins ;

  oocxcoutD((TObject*)0,Eval) << endl
			      << "RooMath::initFastCERF: Allocating Complex Error Function lookup table" << endl
			      << "                       Re: " << _reBins << " bins in range (" << _reMin << "," << _reMax << ")" << endl
			      << "                       Im: " << _imBins << " bins in range (" << _imMin << "," << _imMax << ")" << endl
			      << "                       Allocation size : " << _reBins*_imBins * 2 * sizeof(Double_t) / 1024 << " kB" << endl ;


  // Allocate storage matrix for Im(cerf) and Re(cerf) and fill it using ComplexErrFunc()
  RooSentinel::activate() ;
  Int_t imIdx,reIdx ;
  _reCerfArray = new pDouble_t[_imBins] ;
  _imCerfArray = new pDouble_t[_imBins] ;
  for (imIdx=0 ; imIdx<_imBins ; imIdx++) {
    _reCerfArray[imIdx] = new Double_t[_reBins] ;
    _imCerfArray[imIdx] = new Double_t[_reBins] ;
  }
  
  Bool_t cacheLoaded(kFALSE) ;
  if (!_cacheTable || !(cacheLoaded=loadCache())) {
    
    oocxcoutD((TObject*)0,Eval) << endl
				<< "                       Filling table: |..................................................|\r" 
				<< "                       Filling table: |" ;
    
    // Allocate storage matrix for Im(cerf) and Re(cerf) and fill it using ComplexErrFunc()
    for (imIdx=0 ; imIdx<_imBins ; imIdx++) {
      if (imIdx % (_imBins/50) ==0) {
	ooccxcoutD((TObject*)0,Eval) << ">" ; cout.flush() ;
      }
      for (reIdx=0 ; reIdx<_reBins ; reIdx++) {
	RooComplex val=ComplexErrFunc(_reMin+reIdx*_reStep,_imMin+imIdx*_imStep) ;
	_reCerfArray[imIdx][reIdx] = val.re();
	_imCerfArray[imIdx][reIdx] = val.im() ;
      }
    }
    ooccoutI((TObject*)0,Eval) << endl ;
  } 

  if (_cacheTable && !cacheLoaded) storeCache() ;
}


void RooMath::cleanup()
{
  if (_reCerfArray) {
    for (Int_t imIdx=0 ; imIdx<_imBins ; imIdx++) {
      delete[] _reCerfArray[imIdx] ;
      delete[] _imCerfArray[imIdx] ;
    }
    delete[] _reCerfArray ;
    delete[] _imCerfArray ;
    _reCerfArray = 0 ;
    _imCerfArray = 0 ;
  }
  
}


RooComplex RooMath::ITPComplexErrFunc(const RooComplex& z, Int_t nOrder)
{
  // Return complex error function interpolated from lookup tabel created
  // by initFastCERF(). Interpolation is performed in Im and Re plane
  // to specified order.

  // Initialize grid
  if (!_reCerfArray) initFastCERF() ;

  // Located nearest grid point
  Double_t imPrime = (z.im()-_imMin) / _imStep ;
  Double_t rePrime = (z.re()-_reMin) / _reStep ;

  // Calculate corners of nOrder X nOrder grid box
  Int_t imIdxLo = Int_t(imPrime - 1.0*nOrder/2 + 0.5) ;
  Int_t imIdxHi = imIdxLo+nOrder-1 ;
  Int_t reIdxLo = Int_t(rePrime - 1.0*nOrder/2 + 0.5) ;
  Int_t reIdxHi = reIdxLo+nOrder-1 ;

  // Check if the box is fully contained in the grid
  if (imIdxLo<0 || imIdxHi>_imBins-1 || reIdxLo<0 || reIdxHi>_reBins-1) {
    return ComplexErrFunc(z) ;
  }

  // Allocate temporary array space for interpolation
  Int_t imIdx /*, reIdx*/ ;
  Double_t imYR[10] ;
  Double_t imYI[10] ;

  // Loop over imaginary grid points
  for (imIdx=imIdxLo ; imIdx<=imIdxHi ; imIdx++) {
    // Interpolate real array and store as array point for imaginary interpolation
    imYR[imIdx-imIdxLo] = interpolate(&_reCerfArray[imIdx][reIdxLo],nOrder,rePrime-reIdxLo) ;
    imYI[imIdx-imIdxLo] = interpolate(&_imCerfArray[imIdx][reIdxLo],nOrder,rePrime-reIdxLo) ;
  }
  // Interpolate imaginary arrays and construct complex return value
  Double_t re = interpolate(imYR,nOrder,imPrime-imIdxLo) ;
  Double_t im = interpolate(imYI,nOrder,imPrime-imIdxLo) ;
  return RooComplex(re,im) ;
}





Double_t RooMath::ITPComplexErrFuncRe(const RooComplex& z, Int_t nOrder)
{
  // Return real component of complex error function interpolated from 
  // lookup table created by initFastCERF(). Interpolation is performed in 
  // Im and Re plane to specified order. This functions is noticably faster
  // than ITPComplexErrrFunc().re() because only the real lookup table
  // is interpolated

  // Initialize grid
  if (!_reCerfArray) initFastCERF() ;

  // Located nearest grid point
  Double_t imPrime = (z.im()-_imMin) / _imStep ;
  Double_t rePrime = (z.re()-_reMin) / _reStep ;

  // Calculate corners of nOrder X nOrder grid box
  Int_t imIdxLo = Int_t(imPrime - 1.0*nOrder/2 + 0.5) ;
  Int_t imIdxHi = imIdxLo+nOrder-1 ;
  Int_t reIdxLo = Int_t(rePrime - 1.0*nOrder/2 + 0.5) ;
  Int_t reIdxHi = reIdxLo+nOrder-1 ;
  
  // Check if the box is fully contained in the grid
  if (imIdxLo<0 || imIdxHi>_imBins-1 || reIdxLo<0 || reIdxHi>_reBins-1) {
    //cout << "RooMath::ITPComplexErrFuncRe: (" << z.re() << "," << z.im() << ") outside interpolation grid" << endl ;
    return ComplexErrFunc(z).re() ;
  }

  if (nOrder==1) return _reCerfArray[imIdxLo][reIdxLo] ;

  Int_t imIdx ;
  Double_t imYR[10] ;

  // Allocate temporary array space for interpolation
  for (imIdx=imIdxLo ; imIdx<=imIdxHi ; imIdx++) {
    // Interpolate real array and store as array point for imaginary interpolation
    imYR[imIdx-imIdxLo] = interpolate(&_reCerfArray[imIdx][reIdxLo],nOrder,rePrime-reIdxLo) ;
  }
  // Interpolate imaginary arrays and construct complex return value
  return interpolate(imYR,nOrder,imPrime-imIdxLo) ;
}



Double_t RooMath::ITPComplexErrFuncIm(const RooComplex& z, Int_t nOrder)
{
  // Return real component of complex error function interpolated from 
  // lookup table created by initFastCERF(). Interpolation is performed in 
  // Im and Re plane to specified order. This functions is noticably faster
  // than ITPComplexErrrFunc().im() because only the imaginary lookup table
  // is interpolated

  // Initialize grid
  if (!_reCerfArray) initFastCERF() ;

  // Located nearest grid point
  Double_t imPrime = (z.im()-_imMin) / _imStep ;
  Double_t rePrime = (z.re()-_reMin) / _reStep ;

  // Calculate corners of nOrder X nOrder grid box
  Int_t imIdxLo = Int_t(imPrime - 1.0*nOrder/2 + 0.5) ;
  Int_t imIdxHi = imIdxLo+nOrder-1 ;
  Int_t reIdxLo = Int_t(rePrime - 1.0*nOrder/2 + 0.5) ;
  Int_t reIdxHi = reIdxLo+nOrder-1 ;

  // Check if the box is fully contained in the grid
  if (imIdxLo<0 || imIdxHi>_imBins-1 || reIdxLo<0 || reIdxHi>_reBins-1) {
    return ComplexErrFunc(z).im() ;
  }

  // Allocate temporary array space for interpolation
  Int_t imIdx ;
  Double_t imYI[10] ;

  // Loop over imaginary grid points
  for (imIdx=imIdxLo ; imIdx<=imIdxHi ; imIdx++) {
    // Interpolate real array and store as array point for imaginary interpolation
    imYI[imIdx-imIdxLo] = interpolate(&_imCerfArray[imIdx][reIdxLo],nOrder,rePrime-reIdxLo) ;
  }
  // Interpolate imaginary arrays and construct complex return value
  return interpolate(imYI,nOrder,imPrime-imIdxLo) ;
}






Double_t RooMath::interpolate(Double_t ya[], Int_t n, Double_t x) 
{
  // Interpolate array 'ya' with 'n' elements for 'x' (between 0 and 'n'-1)

  // Int to Double conversion is faster via array lookup than type conversion!
  static Double_t itod[20] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
			      10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0} ;
  int i,m,ns=1 ;
  Double_t den,dif,dift/*,ho,hp,w*/,y,dy ;
  Double_t c[20], d[20] ;

  dif = fabs(x) ;
  for(i=1 ; i<=n ; i++) {
    if ((dift=fabs(x-itod[i-1]))<dif) {
      ns=i ;
      dif=dift ;
    }
    c[i] = ya[i-1] ;
    d[i] = ya[i-1] ;
  }
  
  y=ya[--ns] ;
  for(m=1 ; m<n; m++) {       
    for(i=1 ; i<=n-m ; i++) { 
      den=(c[i+1] - d[i])/itod[m] ;
      d[i]=(x-itod[i+m-1])*den ;
      c[i]=(x-itod[i-1])*den ;
    }
    dy = (2*ns)<(n-m) ? c[ns+1] : d[ns--] ;
    y += dy ;
  }
  return y ;
}



Double_t RooMath::interpolate(Double_t xa[], Double_t ya[], Int_t n, Double_t x) 
{
  // Interpolate array 'ya' with 'n' elements for 'xa' 

  // Int to Double conversion is faster via array lookup than type conversion!
//   static Double_t itod[20] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
// 			      10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0} ;
  int i,m,ns=1 ;
  Double_t den,dif,dift,ho,hp,w,y,dy ;
  Double_t c[20], d[20] ;

  dif = fabs(x-xa[0]) ;
  for(i=1 ; i<=n ; i++) {
    if ((dift=fabs(x-xa[i-1]))<dif) {
      ns=i ;
      dif=dift ;
    }
    c[i] = ya[i-1] ;
    d[i] = ya[i-1] ;
  }
  
  y=ya[--ns] ;
  for(m=1 ; m<n; m++) {       
    for(i=1 ; i<=n-m ; i++) { 
      ho=xa[i-1]-x ;
      hp=xa[i-1+m]-x ;
      w=c[i+1]-d[i] ;
      den=ho-hp ;
      if (den==0.) {
	oocoutE((TObject*)0,Eval) << "RooMath::interpolate ERROR: zero distance between points not allowed" << endl ;
	return 0 ;
      }
      den = w/den ;
      d[i]=hp*den ;
      c[i]=ho*den;
    }
    dy = (2*ns)<(n-m) ? c[ns+1] : d[ns--] ;
    y += dy ;
  }
  return y ;
}



Bool_t RooMath::loadCache() 
{
  // Load the complex error function lookup table from the cache file

  const char* fName = cacheFileName() ;
  // Open cache file
  ifstream ifs(fName) ;

  // Return immediately if file doesn't exist
  if (ifs.fail()) return kFALSE ;

  oocxcoutD((TObject*)0,Eval) << endl << "                       Filling table from cache file " << fName << endl ;

  // Load data in memory arrays
  Bool_t ok(kTRUE) ;
  Int_t i ;
  for (i=0 ; i<_imBins ; i++) {
    ifs.read((char*)_imCerfArray[i],_reBins*sizeof(Double_t)) ;
    if (ifs.fail()) ok=kFALSE ;
    ifs.read((char*)_reCerfArray[i],_reBins*sizeof(Double_t)) ;
    if (ifs.fail()) ok=kFALSE ;
  }  

  // Issue error message on partial read failure
  if (!ok) {
    oocoutE((TObject*)0,Eval) << "RooMath::loadCERFCache: error reading file " << cacheFileName() << endl ;
  }
  return ok ;
}


void RooMath::storeCache()
{
  // Store the complex error function lookup table in the cache file

  ofstream ofs(cacheFileName()) ;
  
  oocxcoutI((TObject*)0,Eval) << endl << "                       Writing table to cache file " << cacheFileName() << endl ;
  Int_t i ;
  for (i=0 ; i<_imBins ; i++) {
    ofs.write((char*)_imCerfArray[i],_reBins*sizeof(Double_t)) ;
    ofs.write((char*)_reCerfArray[i],_reBins*sizeof(Double_t)) ;
  }
}



const char* RooMath::cacheFileName() 
{
  // Construct and return the name of the complex error function cache file
  static char fileName[1024] ;  
  sprintf(fileName,"/tmp/RooMath_CERFcache_R%04d_I%04d_%d.dat",_reBins,_imBins,gSystem->GetUid()) ;
  return fileName ;
}


Double_t RooMath::erf(Double_t x) 
{
  return TMath::Erf(x) ;
}

Double_t RooMath::erfc(Double_t x)
{
  return TMath::Erfc(x) ;
}



// Instantiation of static members
Int_t RooMath::_reBins(0) ;
Int_t RooMath::_imBins(0) ;
Double_t RooMath::_reMin(0) ;
Double_t RooMath::_reMax(0) ;
Double_t RooMath::_reRange(0) ;
Double_t RooMath::_reStep(0) ;
Double_t RooMath::_imMin(0) ;
Double_t RooMath::_imMax(0) ;
Double_t RooMath::_imRange(0) ;
Double_t RooMath::_imStep(0) ;
pDouble_t* RooMath::_reCerfArray = 0;
pDouble_t* RooMath::_imCerfArray = 0;
Bool_t RooMath::_cacheTable(kTRUE) ;

 RooMath.cxx:1
 RooMath.cxx:2
 RooMath.cxx:3
 RooMath.cxx:4
 RooMath.cxx:5
 RooMath.cxx:6
 RooMath.cxx:7
 RooMath.cxx:8
 RooMath.cxx:9
 RooMath.cxx:10
 RooMath.cxx:11
 RooMath.cxx:12
 RooMath.cxx:13
 RooMath.cxx:14
 RooMath.cxx:15
 RooMath.cxx:16
 RooMath.cxx:17
 RooMath.cxx:18
 RooMath.cxx:19
 RooMath.cxx:20
 RooMath.cxx:21
 RooMath.cxx:22
 RooMath.cxx:23
 RooMath.cxx:24
 RooMath.cxx:25
 RooMath.cxx:26
 RooMath.cxx:27
 RooMath.cxx:28
 RooMath.cxx:29
 RooMath.cxx:30
 RooMath.cxx:31
 RooMath.cxx:32
 RooMath.cxx:33
 RooMath.cxx:34
 RooMath.cxx:35
 RooMath.cxx:36
 RooMath.cxx:37
 RooMath.cxx:38
 RooMath.cxx:39
 RooMath.cxx:40
 RooMath.cxx:41
 RooMath.cxx:42
 RooMath.cxx:43
 RooMath.cxx:44
 RooMath.cxx:45
 RooMath.cxx:46
 RooMath.cxx:47
 RooMath.cxx:48
 RooMath.cxx:49
 RooMath.cxx:50
 RooMath.cxx:51
 RooMath.cxx:52
 RooMath.cxx:53
 RooMath.cxx:54
 RooMath.cxx:55
 RooMath.cxx:56
 RooMath.cxx:57
 RooMath.cxx:58
 RooMath.cxx:59
 RooMath.cxx:60
 RooMath.cxx:61
 RooMath.cxx:62
 RooMath.cxx:63
 RooMath.cxx:64
 RooMath.cxx:65
 RooMath.cxx:66
 RooMath.cxx:67
 RooMath.cxx:68
 RooMath.cxx:69
 RooMath.cxx:70
 RooMath.cxx:71
 RooMath.cxx:72
 RooMath.cxx:73
 RooMath.cxx:74
 RooMath.cxx:75
 RooMath.cxx:76
 RooMath.cxx:77
 RooMath.cxx:78
 RooMath.cxx:79
 RooMath.cxx:80
 RooMath.cxx:81
 RooMath.cxx:82
 RooMath.cxx:83
 RooMath.cxx:84
 RooMath.cxx:85
 RooMath.cxx:86
 RooMath.cxx:87
 RooMath.cxx:88
 RooMath.cxx:89
 RooMath.cxx:90
 RooMath.cxx:91
 RooMath.cxx:92
 RooMath.cxx:93
 RooMath.cxx:94
 RooMath.cxx:95
 RooMath.cxx:96
 RooMath.cxx:97
 RooMath.cxx:98
 RooMath.cxx:99
 RooMath.cxx:100
 RooMath.cxx:101
 RooMath.cxx:102
 RooMath.cxx:103
 RooMath.cxx:104
 RooMath.cxx:105
 RooMath.cxx:106
 RooMath.cxx:107
 RooMath.cxx:108
 RooMath.cxx:109
 RooMath.cxx:110
 RooMath.cxx:111
 RooMath.cxx:112
 RooMath.cxx:113
 RooMath.cxx:114
 RooMath.cxx:115
 RooMath.cxx:116
 RooMath.cxx:117
 RooMath.cxx:118
 RooMath.cxx:119
 RooMath.cxx:120
 RooMath.cxx:121
 RooMath.cxx:122
 RooMath.cxx:123
 RooMath.cxx:124
 RooMath.cxx:125
 RooMath.cxx:126
 RooMath.cxx:127
 RooMath.cxx:128
 RooMath.cxx:129
 RooMath.cxx:130
 RooMath.cxx:131
 RooMath.cxx:132
 RooMath.cxx:133
 RooMath.cxx:134
 RooMath.cxx:135
 RooMath.cxx:136
 RooMath.cxx:137
 RooMath.cxx:138
 RooMath.cxx:139
 RooMath.cxx:140
 RooMath.cxx:141
 RooMath.cxx:142
 RooMath.cxx:143
 RooMath.cxx:144
 RooMath.cxx:145
 RooMath.cxx:146
 RooMath.cxx:147
 RooMath.cxx:148
 RooMath.cxx:149
 RooMath.cxx:150
 RooMath.cxx:151
 RooMath.cxx:152
 RooMath.cxx:153
 RooMath.cxx:154
 RooMath.cxx:155
 RooMath.cxx:156
 RooMath.cxx:157
 RooMath.cxx:158
 RooMath.cxx:159
 RooMath.cxx:160
 RooMath.cxx:161
 RooMath.cxx:162
 RooMath.cxx:163
 RooMath.cxx:164
 RooMath.cxx:165
 RooMath.cxx:166
 RooMath.cxx:167
 RooMath.cxx:168
 RooMath.cxx:169
 RooMath.cxx:170
 RooMath.cxx:171
 RooMath.cxx:172
 RooMath.cxx:173
 RooMath.cxx:174
 RooMath.cxx:175
 RooMath.cxx:176
 RooMath.cxx:177
 RooMath.cxx:178
 RooMath.cxx:179
 RooMath.cxx:180
 RooMath.cxx:181
 RooMath.cxx:182
 RooMath.cxx:183
 RooMath.cxx:184
 RooMath.cxx:185
 RooMath.cxx:186
 RooMath.cxx:187
 RooMath.cxx:188
 RooMath.cxx:189
 RooMath.cxx:190
 RooMath.cxx:191
 RooMath.cxx:192
 RooMath.cxx:193
 RooMath.cxx:194
 RooMath.cxx:195
 RooMath.cxx:196
 RooMath.cxx:197
 RooMath.cxx:198
 RooMath.cxx:199
 RooMath.cxx:200
 RooMath.cxx:201
 RooMath.cxx:202
 RooMath.cxx:203
 RooMath.cxx:204
 RooMath.cxx:205
 RooMath.cxx:206
 RooMath.cxx:207
 RooMath.cxx:208
 RooMath.cxx:209
 RooMath.cxx:210
 RooMath.cxx:211
 RooMath.cxx:212
 RooMath.cxx:213
 RooMath.cxx:214
 RooMath.cxx:215
 RooMath.cxx:216
 RooMath.cxx:217
 RooMath.cxx:218
 RooMath.cxx:219
 RooMath.cxx:220
 RooMath.cxx:221
 RooMath.cxx:222
 RooMath.cxx:223
 RooMath.cxx:224
 RooMath.cxx:225
 RooMath.cxx:226
 RooMath.cxx:227
 RooMath.cxx:228
 RooMath.cxx:229
 RooMath.cxx:230
 RooMath.cxx:231
 RooMath.cxx:232
 RooMath.cxx:233
 RooMath.cxx:234
 RooMath.cxx:235
 RooMath.cxx:236
 RooMath.cxx:237
 RooMath.cxx:238
 RooMath.cxx:239
 RooMath.cxx:240
 RooMath.cxx:241
 RooMath.cxx:242
 RooMath.cxx:243
 RooMath.cxx:244
 RooMath.cxx:245
 RooMath.cxx:246
 RooMath.cxx:247
 RooMath.cxx:248
 RooMath.cxx:249
 RooMath.cxx:250
 RooMath.cxx:251
 RooMath.cxx:252
 RooMath.cxx:253
 RooMath.cxx:254
 RooMath.cxx:255
 RooMath.cxx:256
 RooMath.cxx:257
 RooMath.cxx:258
 RooMath.cxx:259
 RooMath.cxx:260
 RooMath.cxx:261
 RooMath.cxx:262
 RooMath.cxx:263
 RooMath.cxx:264
 RooMath.cxx:265
 RooMath.cxx:266
 RooMath.cxx:267
 RooMath.cxx:268
 RooMath.cxx:269
 RooMath.cxx:270
 RooMath.cxx:271
 RooMath.cxx:272
 RooMath.cxx:273
 RooMath.cxx:274
 RooMath.cxx:275
 RooMath.cxx:276
 RooMath.cxx:277
 RooMath.cxx:278
 RooMath.cxx:279
 RooMath.cxx:280
 RooMath.cxx:281
 RooMath.cxx:282
 RooMath.cxx:283
 RooMath.cxx:284
 RooMath.cxx:285
 RooMath.cxx:286
 RooMath.cxx:287
 RooMath.cxx:288
 RooMath.cxx:289
 RooMath.cxx:290
 RooMath.cxx:291
 RooMath.cxx:292
 RooMath.cxx:293
 RooMath.cxx:294
 RooMath.cxx:295
 RooMath.cxx:296
 RooMath.cxx:297
 RooMath.cxx:298
 RooMath.cxx:299
 RooMath.cxx:300
 RooMath.cxx:301
 RooMath.cxx:302
 RooMath.cxx:303
 RooMath.cxx:304
 RooMath.cxx:305
 RooMath.cxx:306
 RooMath.cxx:307
 RooMath.cxx:308
 RooMath.cxx:309
 RooMath.cxx:310
 RooMath.cxx:311
 RooMath.cxx:312
 RooMath.cxx:313
 RooMath.cxx:314
 RooMath.cxx:315
 RooMath.cxx:316
 RooMath.cxx:317
 RooMath.cxx:318
 RooMath.cxx:319
 RooMath.cxx:320
 RooMath.cxx:321
 RooMath.cxx:322
 RooMath.cxx:323
 RooMath.cxx:324
 RooMath.cxx:325
 RooMath.cxx:326
 RooMath.cxx:327
 RooMath.cxx:328
 RooMath.cxx:329
 RooMath.cxx:330
 RooMath.cxx:331
 RooMath.cxx:332
 RooMath.cxx:333
 RooMath.cxx:334
 RooMath.cxx:335
 RooMath.cxx:336
 RooMath.cxx:337
 RooMath.cxx:338
 RooMath.cxx:339
 RooMath.cxx:340
 RooMath.cxx:341
 RooMath.cxx:342
 RooMath.cxx:343
 RooMath.cxx:344
 RooMath.cxx:345
 RooMath.cxx:346
 RooMath.cxx:347
 RooMath.cxx:348
 RooMath.cxx:349
 RooMath.cxx:350
 RooMath.cxx:351
 RooMath.cxx:352
 RooMath.cxx:353
 RooMath.cxx:354
 RooMath.cxx:355
 RooMath.cxx:356
 RooMath.cxx:357
 RooMath.cxx:358
 RooMath.cxx:359
 RooMath.cxx:360
 RooMath.cxx:361
 RooMath.cxx:362
 RooMath.cxx:363
 RooMath.cxx:364
 RooMath.cxx:365
 RooMath.cxx:366
 RooMath.cxx:367
 RooMath.cxx:368
 RooMath.cxx:369
 RooMath.cxx:370
 RooMath.cxx:371
 RooMath.cxx:372
 RooMath.cxx:373
 RooMath.cxx:374
 RooMath.cxx:375
 RooMath.cxx:376
 RooMath.cxx:377
 RooMath.cxx:378
 RooMath.cxx:379
 RooMath.cxx:380
 RooMath.cxx:381
 RooMath.cxx:382
 RooMath.cxx:383
 RooMath.cxx:384
 RooMath.cxx:385
 RooMath.cxx:386
 RooMath.cxx:387
 RooMath.cxx:388
 RooMath.cxx:389
 RooMath.cxx:390
 RooMath.cxx:391
 RooMath.cxx:392
 RooMath.cxx:393
 RooMath.cxx:394
 RooMath.cxx:395
 RooMath.cxx:396
 RooMath.cxx:397
 RooMath.cxx:398
 RooMath.cxx:399
 RooMath.cxx:400
 RooMath.cxx:401
 RooMath.cxx:402
 RooMath.cxx:403
 RooMath.cxx:404
 RooMath.cxx:405
 RooMath.cxx:406
 RooMath.cxx:407
 RooMath.cxx:408
 RooMath.cxx:409
 RooMath.cxx:410
 RooMath.cxx:411
 RooMath.cxx:412
 RooMath.cxx:413
 RooMath.cxx:414
 RooMath.cxx:415
 RooMath.cxx:416
 RooMath.cxx:417
 RooMath.cxx:418
 RooMath.cxx:419
 RooMath.cxx:420
 RooMath.cxx:421
 RooMath.cxx:422
 RooMath.cxx:423
 RooMath.cxx:424
 RooMath.cxx:425
 RooMath.cxx:426
 RooMath.cxx:427
 RooMath.cxx:428
 RooMath.cxx:429
 RooMath.cxx:430
 RooMath.cxx:431
 RooMath.cxx:432
 RooMath.cxx:433
 RooMath.cxx:434
 RooMath.cxx:435
 RooMath.cxx:436
 RooMath.cxx:437
 RooMath.cxx:438
 RooMath.cxx:439
 RooMath.cxx:440
 RooMath.cxx:441
 RooMath.cxx:442
 RooMath.cxx:443
 RooMath.cxx:444
 RooMath.cxx:445
 RooMath.cxx:446
 RooMath.cxx:447
 RooMath.cxx:448
 RooMath.cxx:449
 RooMath.cxx:450
 RooMath.cxx:451
 RooMath.cxx:452
 RooMath.cxx:453
 RooMath.cxx:454
 RooMath.cxx:455
 RooMath.cxx:456
 RooMath.cxx:457
 RooMath.cxx:458
 RooMath.cxx:459
 RooMath.cxx:460
 RooMath.cxx:461
 RooMath.cxx:462
 RooMath.cxx:463
 RooMath.cxx:464
 RooMath.cxx:465
 RooMath.cxx:466
 RooMath.cxx:467
 RooMath.cxx:468
 RooMath.cxx:469
 RooMath.cxx:470
 RooMath.cxx:471
 RooMath.cxx:472
 RooMath.cxx:473
 RooMath.cxx:474
 RooMath.cxx:475
 RooMath.cxx:476
 RooMath.cxx:477
 RooMath.cxx:478
 RooMath.cxx:479
 RooMath.cxx:480
 RooMath.cxx:481
 RooMath.cxx:482
 RooMath.cxx:483
 RooMath.cxx:484
 RooMath.cxx:485
 RooMath.cxx:486
 RooMath.cxx:487
 RooMath.cxx:488
 RooMath.cxx:489
 RooMath.cxx:490
 RooMath.cxx:491
 RooMath.cxx:492
 RooMath.cxx:493
 RooMath.cxx:494