ROOT 6.10/09 Reference Guide |
Class wrapping convolution of two functions.
Class wrapping convolution of two functions: evaluation of \(\int f(x)g(x-t)dx\)
The convolution is performed by default using FFTW if it is available . One can pass optionally the range of the convolution (by default the first function range is used). Note that when using Discrete Fouriere Transform (as FFTW), it is a circular transform, so the functions should be approximatly zero at the end of the range. If they are significantly different than zero on one side (e.g. the left side) a spill over will occur on the other side (e.g right side). If no function range is given by default the function1 range + 10% is used One shoud use also a not too small number of points for the DFT (a minimum of 1000). By default 10000 points are used.
Definition at line 26 of file TF1Convolution.h.
Public Member Functions | |
TF1Convolution (TF1 *function1, TF1 *function2, Bool_t useFFT=true) | |
constructor from the two function pointer and a flag is using FFT More... | |
TF1Convolution (TF1 *function1, TF1 *function2, Double_t xmin, Double_t xmax, Bool_t useFFT=true) | |
constructor from the two function pointer and the convolution range More... | |
TF1Convolution (TString formula, Double_t xmin=1., Double_t xmax=0., Bool_t useFFT=true) | |
constructor from a formula expression as f1 * f2 where f1 and f2 are two functions known to ROOT More... | |
TF1Convolution (TString formula1, TString formula2, Double_t xmin=1., Double_t xmax=0., Bool_t useFFT=true) | |
constructor from 2 function names where f1 and f2 are two functions known to ROOT if the function names are not knwon to ROOT then a corresponding More... | |
Int_t | GetNpar () const |
const char * | GetParName (Int_t ipar) const |
Double_t | GetXmax () const |
Double_t | GetXmin () const |
Double_t | operator() (Double_t *t, Double_t *p) |
void | SetExtraRange (Double_t percentage) |
void | SetNofPointsFFT (Int_t n) |
void | SetNumConv (Bool_t flag=true) |
void | SetParameters (Double_t *p) |
void | SetParameters (Double_t p0, Double_t p1, Double_t p2=0., Double_t p3=0., Double_t p4=0., Double_t p5=0., Double_t p6=0., Double_t p7=0.) |
void | SetRange (Double_t a, Double_t b) |
Private Member Functions | |
Double_t | EvalFFTConv (Double_t t) |
Double_t | EvalNumConv (Double_t t) |
perform numerical convolution could in principle cache the integral in a Graph as it is done for the FFTW More... | |
void | InitializeDataMembers (TF1 *function1, TF1 *function2, Bool_t useFFT) |
use copy instead of Clone More... | |
void | MakeFFTConv () |
perform the FFT of the two functions More... | |
Private Attributes | |
Int_t | fCstIndex |
Bool_t | fFlagFFT |
Bool_t | fFlagGraph |
std::shared_ptr< TF1 > | fFunction1 |
std::shared_ptr< TF1 > | fFunction2 |
std::shared_ptr< TGraph > | fGraphConv |
Int_t | fNofParams1 |
Int_t | fNofParams2 |
Int_t | fNofPoints |
std::vector< Double_t > | fParams1 |
std::vector< Double_t > | fParams2 |
std::vector< TString > | fParNames |
Double_t | fXmax |
Double_t | fXmin |
#include <TF1Convolution.h>
constructor from the two function pointer and a flag is using FFT
Definition at line 128 of file TF1Convolution.cxx.
TF1Convolution::TF1Convolution | ( | TF1 * | function1, |
TF1 * | function2, | ||
Double_t | xmin, | ||
Double_t | xmax, | ||
Bool_t | useFFT = true |
||
) |
constructor from the two function pointer and the convolution range
Definition at line 136 of file TF1Convolution.cxx.
TF1Convolution::TF1Convolution | ( | TString | formula, |
Double_t | xmin = 1. , |
||
Double_t | xmax = 0. , |
||
Bool_t | useFFT = true |
||
) |
constructor from a formula expression as f1 * f2 where f1 and f2 are two functions known to ROOT
Definition at line 148 of file TF1Convolution.cxx.
TF1Convolution::TF1Convolution | ( | TString | formula1, |
TString | formula2, | ||
Double_t | xmin = 1. , |
||
Double_t | xmax = 0. , |
||
Bool_t | useFFT = true |
||
) |
constructor from 2 function names where f1 and f2 are two functions known to ROOT if the function names are not knwon to ROOT then a corresponding
Definition at line 182 of file TF1Convolution.cxx.
Definition at line 275 of file TF1Convolution.cxx.
perform numerical convolution could in principle cache the integral in a Graph as it is done for the FFTW
Definition at line 289 of file TF1Convolution.cxx.
|
inline |
Definition at line 67 of file TF1Convolution.h.
|
inline |
Definition at line 70 of file TF1Convolution.h.
|
inline |
Definition at line 69 of file TF1Convolution.h.
|
inline |
Definition at line 68 of file TF1Convolution.h.
|
private |
use copy instead of Clone
Definition at line 76 of file TF1Convolution.cxx.
|
private |
perform the FFT of the two functions
Definition at line 211 of file TF1Convolution.cxx.
Definition at line 309 of file TF1Convolution.cxx.
Definition at line 382 of file TF1Convolution.cxx.
Definition at line 320 of file TF1Convolution.cxx.
Definition at line 65 of file TF1Convolution.h.
Definition at line 330 of file TF1Convolution.cxx.
void TF1Convolution::SetParameters | ( | Double_t | p0, |
Double_t | p1, | ||
Double_t | p2 = 0. , |
||
Double_t | p3 = 0. , |
||
Double_t | p4 = 0. , |
||
Double_t | p5 = 0. , |
||
Double_t | p6 = 0. , |
||
Double_t | p7 = 0. |
||
) |
Definition at line 373 of file TF1Convolution.cxx.
Definition at line 393 of file TF1Convolution.cxx.
|
private |
Definition at line 41 of file TF1Convolution.h.
|
private |
Definition at line 43 of file TF1Convolution.h.
|
private |
Definition at line 44 of file TF1Convolution.h.
|
private |
Definition at line 28 of file TF1Convolution.h.
|
private |
Definition at line 29 of file TF1Convolution.h.
|
private |
Definition at line 30 of file TF1Convolution.h.
|
private |
Definition at line 39 of file TF1Convolution.h.
|
private |
Definition at line 40 of file TF1Convolution.h.
|
private |
Definition at line 42 of file TF1Convolution.h.
|
private |
Definition at line 32 of file TF1Convolution.h.
|
private |
Definition at line 33 of file TF1Convolution.h.
|
private |
Definition at line 35 of file TF1Convolution.h.
|
private |
Definition at line 38 of file TF1Convolution.h.
|
private |
Definition at line 37 of file TF1Convolution.h.