Show the different kinds of Bessel functions available in ROOT To execute the macro type in:
It will create one canvas with the representation of the cylindrical and spherical Bessel functions regular and modified
Based on Bessel.C by Magdalena Slawinska
import ROOT
from ROOT import TCanvas, TF1, gSystem, gPad, TLegend, TPaveLabel, kBlack
DistCanvas =
TCanvas(
"DistCanvas",
"Bessel functions example", 10, 10, 800, 600)
leg =
TLegend(0.75, 0.7, 0.89, 0.89)
n = 5
JBessel = []
jbessel =
TF1(
"J_0",
"ROOT::Math::cyl_bessel_j([0],x)", 0, 10)
xaxis = JBessel[0].GetXaxis()
p1 =
TPaveLabel(.0, .90, .0 + .50, .90 + .10,
"Bessel J functions",
"NDC")
leg2 =
TLegend(0.75, 0.7, 0.89, 0.89)
KBessel = []
kbessel =
TF1(
"J_0",
"ROOT::Math::cyl_bessel_k([0],x)", 0, 10)
kxaxis = KBessel[0].GetXaxis()
p2 =
TPaveLabel(.0, .90, .0 + .50, .90 + .10,
"Bessel K functions",
"NDC")
leg3 =
TLegend(0.75, 0.7, 0.89, 0.89)
iBessel = []
ibessel =
TF1(
"J_0",
"ROOT::Math::cyl_bessel_i([0],x)", 0, 10)
iaxis = iBessel[0].GetXaxis()
p3 =
TPaveLabel(.0, .90, .0 + .50, .90 + .10,
"Bessel I functions",
"NDC")
leg4 =
TLegend(0.75, 0.7, 0.89, 0.89)
jBessel = []
jbessel =
TF1(
"J_0",
"ROOT::Math::sph_bessel([0],x)", 0, 10)
jaxis = jBessel[0].GetXaxis()
p4 =
TPaveLabel(.0, .90, .0 + .50, .90 + .10,
"Bessel j functions",
"NDC")
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
This class displays a legend box (TPaveText) containing several legend entries.
A Pave (see TPave) with a text centered in the Pave.
- Author
- Juan Fernando Jaramillo Botero
Definition in file pdf009_Bessel.py.