FairRoot/PandaRoot
|
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <cmath>
#include "mzparameters.h"
#include "mzfunctions.h"
#include "ranlxs.h"
#include "ranlxd.h"
Go to the source code of this file.
Functions | |
void | ranlxs (float r[], int n) |
void | ranlxd (double r[], int n) |
void | rlxs_init (int level, int seed) |
void | rlxd_init (int level, int seed) |
double | mzdelta (int i, int k) |
double | mzvscalar (int n, double *p, double *q) |
double | mzvmod2 (int n, double *p) |
void | mzboost (int flag, double *p, double *q, double *q_prime) |
double | mzenergy (double m, double p_x, double p_y, double p_z) |
double | mzpolar (double *p) |
double | mzazimuthal (double *p) |
double | mzcospolar (double *p) |
double | mzangle (double *p, double *q) |
double | mzrnd (double a, double b) |
double | mzcomplexmod (double Re_z, double Im_z) |
double | mz_E_to_s (double E) |
double | mz_legendre_polynomial (int n, double x) |
double | mz_linear_extrapolation (double x1, double y1, double x2, double y2, double x) |
double mz_E_to_s | ( | double | E | ) |
double mz_legendre_polynomial | ( | int | n, |
double | x | ||
) |
function mz_legendre_polynomial
INPUT:
n -> polynomial degree, [0,10] x -> independent variable, [-1,1]
returns:
P_{n}(x)
Definition at line 470 of file mzfunctions.cxx.
References exit(), printf(), x, and y.
Referenced by mz_pp_to_pipi_vandewi_sigma_legendre().
double mz_linear_extrapolation | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
double | x | ||
) |
funtion mz_linear_extrapolation
INPUT:
(x1,y1) first point in (x,y)-plane (x2,y2) second point in (x,y)-plane
x independent variable
RETURNS:
y=f(x), with f the linear function atisfying y1=f(x1) and y2=f(x2)
Definition at line 558 of file mzfunctions.cxx.
References a, b, exit(), printf(), and y.
Referenced by mz_pp_to_pipi_sigma().
double mzangle | ( | double * | p, |
double * | q | ||
) |
function mzangle
input: 4-mom p, 4-mom q output: angle between 3-dim components of p, q in range [0,180]
Definition at line 310 of file mzfunctions.cxx.
References acos(), alpha, mzvmod2(), mzvscalar(), and PI.
double mzazimuthal | ( | double * | p | ) |
void mzboost | ( | int | flag, |
double * | p, | ||
double * | q, | ||
double * | q_prime | ||
) |
function mzboost
input: flag=0 lab->CM, flag=1 CM->lab p 4-mom of CM particle (M!=0) in lab frame q 4-mom of test particle in lab frame (flag=0) / CM frame (flag=1)
output: q_prime 4-mom of test particle in the CM frame (flag=0) / lab frame (flag=1)
Definition at line 123 of file mzfunctions.cxx.
References i, L, m, mzdelta(), and mzvmod2().
Referenced by mz_pp_to_leplep_vandewi_event(), and mz_pp_to_pipi_vandewi_event().
double mzcomplexmod | ( | double | Re_z, |
double | Im_z | ||
) |
function mzcomplexmod
arguments:
Re_z = real part of complex number z Im_z = imaginary part of complex number z
returns:
modulus of complex number z
Definition at line 389 of file mzfunctions.cxx.
References y.
double mzcospolar | ( | double * | p | ) |
function mzcospolar
input: 4-mom p output: cos of polar angle theta
Definition at line 285 of file mzfunctions.cxx.
References mzvmod2().
double mzdelta | ( | int | i, |
int | k | ||
) |
Mainz, May 2011
function mzdelta
input: i,k integers output: kroneker delta(i,k)
Definition at line 30 of file mzfunctions.cxx.
References d.
Referenced by mzboost().
double mzenergy | ( | double | m, |
double | p_x, | ||
double | p_y, | ||
double | p_z | ||
) |
input: mass m, 3-mom components px, py, pz of a particle
output: energy of the particle
Definition at line 207 of file mzfunctions.cxx.
double mzpolar | ( | double * | p | ) |
double mzrnd | ( | double | a, |
double | b | ||
) |
function mzrnd
arguments:
a = inf[a,b] b = sup[a,b]
returns:
random number in interval [a,b]
Definition at line 353 of file mzfunctions.cxx.
References a, exit(), printf(), ranlxd(), x, and y.
Referenced by mz_pp_to_leplep_vandewi_event(), and mz_pp_to_pipi_vandewi_event().
double mzvmod2 | ( | int | n, |
double * | p | ||
) |
function mzvmod2
input: int n, 4-vector p
output:
n=2 -> returns p[1]*p[1] + p[2]*p[2] n=3 -> returns p[1]*p[1] + p[2]*p[2] + p[3]*p[3] n=4 -> returns p[0]*p[0] -p[1]*p[1] -p[2]*p[2] -p[3]*p[3]
Definition at line 93 of file mzfunctions.cxx.
References exit(), m2(), mzvscalar(), and printf().
Referenced by mz_E_to_s(), mz_pp_to_leplep_vandewi_event(), mz_pp_to_pipi_vandewi_event(), mz_pp_to_pipi_vandewi_init(), mzangle(), mzboost(), mzcospolar(), and mzpolar().
double mzvscalar | ( | int | n, |
double * | p, | ||
double * | q | ||
) |
function mzvscalar
input: int n, 4-vector p, 4-vector q
output:
n=2 -> returns p[1]*q[1] + p[2]*q[2] n=3 -> returns p[1]*q[1] + p[2]*q[2] + p[3]*q[3] n=4 -> returns p[0]*q[0] -p[1]*q[1] -p[2]*q[2] -p[3]*q[3]
Definition at line 53 of file mzfunctions.cxx.
References exit(), printf(), and s.
Referenced by mzangle(), and mzvmod2().
void ranlxd | ( | double | r[], |
int | n | ||
) |
void ranlxs | ( | float | r[], |
int | n | ||
) |
void rlxd_init | ( | int | level, |
int | seed | ||
) |
Definition at line 501 of file ranlxd.cxx.
Referenced by mz_pp_to_leplep_vandewi_init(), mz_pp_to_pipi_vandewi_init(), and ranlxd().
void rlxs_init | ( | int | level, |
int | seed | ||
) |