Belle II Software
release-06-02-00
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
z
Typedefs
a
b
c
d
e
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
function_library.py
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
# This file is part of the UFO.
5
#
6
# This file contains definitions for functions that
7
# are extensions of the cmath library, and correspond
8
# either to functions that are in cmath, but inconvenient
9
# to access from there (e.g. z.conjugate()),
10
# or functions that are simply not defined.
11
#
12
#
13
14
__date__ =
'22 July 2010'
15
__author__ =
'claude.duhr@durham.ac.uk'
16
17
import
cmath
18
from
object_library
import
all_functions, Function
19
20
#
21
# shortcuts for functions from cmath
22
#
23
24
complexconjugate = Function(name=
'complexconjugate'
, arguments=(
'z'
, ),
25
expression=
'z.conjugate()'
)
26
27
re = Function(name=
're'
, arguments=(
'z'
, ), expression=
'z.real'
)
28
29
im = Function(name=
'im'
, arguments=(
'z'
, ), expression=
'z.imag'
)
30
31
# New functions (trigonometric)
32
33
sec = Function(name=
'sec'
, arguments=(
'z'
, ), expression=
'1./cmath.cos(z)'
)
34
35
asec = Function(name=
'asec'
, arguments=(
'z'
, ), expression=
'cmath.acos(1./z)'
)
36
37
csc = Function(name=
'csc'
, arguments=(
'z'
, ), expression=
'1./cmath.sin(z)'
)
38
39
acsc = Function(name=
'acsc'
, arguments=(
'z'
, ), expression=
'cmath.asin(1./z)'
)
40
41
cot = Function(name=
'cot'
, arguments=(
'z'
, ), expression=
'1./cmath.tan(z)'
)
42
43
# Heaviside theta function
44
45
theta_function = Function(name=
'theta_function'
, arguments=(
'x'
,
'y'
,
'z'
),
46
expression=
'y if x else z'
)
47
48
# Auxiliary functions for NLO
49
50
cond = Function(name=
'cond'
, arguments=(
'condition'
,
'ExprTrue'
,
'ExprFalse'
),
51
expression=
'(ExprTrue if condition==0.0 else ExprFalse)'
)
52
53
reglog = Function(name=
'reglog'
, arguments=
'z'
,
54
expression=
'(0.0 if z==0.0 else cmath.log(z))'
)
generators
madgraph
models
darkphoton
function_library.py
Generated on Thu Dec 28 2023 02:26:25 for Belle II Software by
1.9.1