Crystal Ball function
# Crystal Ball function

The Crystal Ball function, named after the Crystal Ball Collaboration (hence the capitalized initial letters), is a probability density function commonly used to model various lossy processes in high-energy physics. It consists of a Gaussian core portion and a power-law low-end tail, below a certain threshold. The function itself and its first derivative are both continuous.

The Crystal Ball function is given by:

    $f(x;\alpha ,n,{\bar {x}},\sigma )=N\cdot {\begin{cases}\exp(-{\frac {(x-{\bar {x}})^{2}}{2\sigma ^{2}}}),&{\mbox{for }}{\frac {x-{\bar {x}}}{\sigma }}>-\alpha \\A\cdot (B-{\frac {x-{\bar {x}}}{\sigma }})^{-n},&{\mbox{for }}{\frac {x-{\bar {x}}}{\sigma }}\leqslant -\alpha \end{cases}}$

where

    $A=\left({\frac {n}{\left|\alpha \right|}}\right)^{n}\cdot \exp \left(-{\frac {\left|\alpha \right|^{2}}{2}}\right)$,
    $B={\frac {n}{\left|\alpha \right|}}-\left|\alpha \right|$,
    $N={\frac {1}{\sigma (C+D)}}$,
    $C={\frac {n}{\left|\alpha \right|}}\cdot {\frac {1}{n-1}}\cdot \exp \left(-{\frac {\left|\alpha \right|^{2}}{2}}\right)$,
    $D={\sqrt {\frac {\pi }{2}}}\left(1+\operatorname {erf} \left({\frac {\left|\alpha \right|}{\sqrt {2}}}\right)\right)$.

$N$ (Skwarnicki 1986) is a normalization factor and $\alpha$, $n$, ${\bar {x}}$ and $\sigma$ are parameters which are fitted with the data. erf is the error function.

