mathmoreIntegration.C File Reference

#include "TMath.h"
#include "TH1.h"
#include "TCanvas.h"
#include "TLegend.h"
#include "Math/Functor.h"
#include "Math/WrappedFunction.h"
#include "Math/IFunction.h"
#include "Math/Integrator.h"
#include <iostream>
#include "TStopwatch.h"
#include "TF1.h"
#include <limits>

Go to the source code of this file.

Functions

double exactIntegral (double a, double b)
double func (double x)
double func2 (const double *x, const double *=0)
void testIntegPerf (double x1, double x2, int n=100000)
void DrawCumulative (double x1, double x2, int n=100)
void mathmoreIntegration (double a=-2, double b=2)

Variables

int nc = 0


Function Documentation

void DrawCumulative ( double  x1,
double  x2,
int  n = 100 
)

Definition at line 100 of file mathmoreIntegration.C.

References c1, TCanvas::cd(), TPad::Divide(), TH1::Draw(), TCanvas::Draw(), TH1D::DrawCopy(), E, RootCsg::epsilon, exactIntegral(), func(), TH1D::GetBinContent(), i, TF1::Integral(), ROOT::Math::IntegratorOneDim::Integral(), ROOT::Math::IntegrationOneDim::kADAPTIVE, kBlack, kBlue, kRed, l, n, TH1D::SetBinContent(), TH1::SetBinError(), TAttLine::SetLineColor(), TAttLine::SetLineStyle(), TH1::SetStats(), TH1::SetTitle(), TCanvas::Update(), and x.

Referenced by mathmoreIntegration().

double exactIntegral ( double  a,
double  b 
)

Definition at line 37 of file mathmoreIntegration.C.

References TMath::ATan(), and TMath::Pi().

double func ( double  x  ) 

Definition at line 41 of file mathmoreIntegration.C.

References TMath::BreitWigner(), and nc.

double func2 ( const double x,
const double = 0 
)

Definition at line 46 of file mathmoreIntegration.C.

References TMath::BreitWigner(), and nc.

Referenced by RooRealSumPdf::RooRealSumPdf(), testIntegPerf(), and testIntegration().

void mathmoreIntegration ( double  a = -2,
double  b = 2 
)

Definition at line 188 of file mathmoreIntegration.C.

References a, b, DrawCumulative(), and testIntegPerf().

void testIntegPerf ( double  x1,
double  x2,
int  n = 100000 
)

Definition at line 54 of file mathmoreIntegration.C.

References func(), func2(), i, TF1::Integral(), ROOT::Math::IntegratorOneDim::Integral(), n, nc, pr(), TStopwatch::RealTime(), s1, s2, TStopwatch::Start(), TStopwatch::Stop(), timer, and x.


Variable Documentation

int nc = 0

calculates exact integral of Breit Wigner distribution and compares with existing methods

Definition at line 36 of file mathmoreIntegration.C.


Generated on Tue Jul 5 16:09:36 2011 for ROOT_528-00b_version by  doxygen 1.5.1