#include "RooFit.h"
#include "Riostream.h"
#include "Riostream.h"
#include <math.h>
#include "RooExponential.h"
#include "RooRealVar.h"
ClassImp(RooExponential)
RooExponential::RooExponential(const char *name, const char *title,
RooAbsReal& _x, RooAbsReal& _c) :
RooAbsPdf(name, title),
x("x","Dependent",this,_x),
c("c","Exponent",this,_c)
{
}
RooExponential::RooExponential(const RooExponential& other, const char* name) :
RooAbsPdf(other, name), x("x",this,other.x), c("c",this,other.c)
{
}
Double_t RooExponential::evaluate() const{
return exp(c*x);
}
Int_t RooExponential::getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* ) const
{
if (matchArgs(allVars,analVars,x)) return 1 ;
return 0 ;
}
Double_t RooExponential::analyticalIntegral(Int_t code, const char* rangeName) const
{
switch(code) {
case 1:
{
if(c == 0.0) return 0;
return ( exp( c*x.max(rangeName) ) - exp( c*x.min(rangeName) ) )/c;
}
}
assert(0) ;
return 0 ;
}
Last update: Thu Jan 17 08:44:37 2008
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.