ROOT
6.12/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
n
o
p
r
s
v
w
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
tutorials
graphics
feynman.C File Reference
Tutorials
»
Graphics tutorials
Detailed Description
Draw Feynman diagrams.
void
feynman()
{
TCanvas
*c1 =
new
TCanvas
(
"c1"
,
"A canvas"
, 10,10, 600, 300);
c1->
Range
(0, 0, 140, 60);
Int_t
linsav =
gStyle
->
GetLineWidth
();
gStyle
->
SetLineWidth
(3);
TLatex
t;
t.
SetTextAlign
(22);
t.
SetTextSize
(0.1);
TLine
*
l
;
l =
new
TLine
(10, 10, 30, 30); l->
Draw
();
l =
new
TLine
(10, 50, 30, 30); l->
Draw
();
TCurlyArc
*ginit =
new
TCurlyArc
(30, 30, 12.5*
sqrt
(2), 135, 225);
ginit->
SetWavy
();
ginit->
Draw
();
t.
DrawLatex
(7,6,
"e^{-}"
);
t.
DrawLatex
(7,55,
"e^{+}"
);
t.
DrawLatex
(7,30,
"#gamma"
);
TCurlyLine
*
Gamma
=
new
TCurlyLine
(30, 30, 55, 30);
Gamma->
SetWavy
();
Gamma->
Draw
();
t.
DrawLatex
(42.5,37.7,
"#gamma"
);
TArc
*a =
new
TArc
(70, 30, 15);
a->
Draw
();
t.
DrawLatex
(55, 45,
"#bar{q}"
);
t.
DrawLatex
(85, 15,
"q"
);
TCurlyLine
*gluon =
new
TCurlyLine
(70, 45, 70, 15);
gluon->
Draw
();
t.
DrawLatex
(77.5,30,
"g"
);
TCurlyLine
*z0 =
new
TCurlyLine
(85, 30, 110, 30);
z0->
SetWavy
();
z0->
Draw
();
t.
DrawLatex
(100, 37.5,
"Z^{0}"
);
l =
new
TLine
(110, 30, 130, 10); l->
Draw
();
l =
new
TLine
(110, 30, 130, 50); l->
Draw
();
TCurlyArc
*gluon1 =
new
TCurlyArc
(110, 30, 12.5*
sqrt
(2), 315, 45);
gluon1->
Draw
();
t.
DrawLatex
(135,6,
"#bar{q}"
);
t.
DrawLatex
(135,55,
"q"
);
t.
DrawLatex
(135,30,
"g"
);
c1->
Update
();
gStyle
->
SetLineWidth
(linsav);
}
Author
Otto Schaile
Definition in file
feynman.C
.