Newer
Older
Master_thesis / .ipynb_checkpoints / raremodel-nb-checkpoint.ipynb
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Import"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\sa_li\\.conda\\envs\\rmd\\lib\\site-packages\\zfit\\util\\execution.py:57: UserWarning: Not running on Linux. Determining available cpus for thread can failand be overestimated. Workaround (only if too many cpus are used):`zfit.run.set_n_cpu(your_cpu_number)`\n",
      "  warnings.warn(\"Not running on Linux. Determining available cpus for thread can fail\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.\n",
      "For more information, please see:\n",
      "  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md\n",
      "  * https://github.com/tensorflow/addons\n",
      "If you depend on functionality not listed there, please file an issue.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "\n",
    "# os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"-1\"\n",
    "\n",
    "import numpy as np\n",
    "from pdg_const import pdg\n",
    "import matplotlib\n",
    "import matplotlib.pyplot as plt\n",
    "import pickle as pkl\n",
    "import sys\n",
    "import time\n",
    "from helperfunctions import display_time, prepare_plot\n",
    "import cmath as c\n",
    "import scipy.integrate as integrate\n",
    "from scipy.optimize import fminbound\n",
    "from array import array as arr\n",
    "import collections\n",
    "from itertools import compress\n",
    "import tensorflow as tf\n",
    "import zfit\n",
    "from zfit import ztf\n",
    "# from IPython.display import clear_output\n",
    "import os\n",
    "import tensorflow_probability as tfp\n",
    "tfd = tfp.distributions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# chunksize = 10000\n",
    "# zfit.run.chunking.active = True\n",
    "# zfit.run.chunking.max_n_points = chunksize"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Build model and graphs\n",
    "## Create graphs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def formfactor(q2, subscript, b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2): #returns real value\n",
    "    #check if subscript is viable\n",
    "\n",
    "    if subscript != \"0\" and subscript != \"+\" and subscript != \"T\":\n",
    "        raise ValueError('Wrong subscript entered, choose either 0, + or T')\n",
    "\n",
    "    #get constants\n",
    "\n",
    "    mK = ztf.constant(pdg['Ks_M'])\n",
    "    mbstar0 = ztf.constant(pdg[\"mbstar0\"])\n",
    "    mbstar = ztf.constant(pdg[\"mbstar\"])\n",
    "\n",
    "\n",
    "    mmu = ztf.constant(pdg['muon_M'])\n",
    "    mb = ztf.constant(pdg['bquark_M'])\n",
    "    ms = ztf.constant(pdg['squark_M'])\n",
    "    mB = ztf.constant(pdg['Bplus_M'])\n",
    "\n",
    "    #N comes from derivation in paper\n",
    "\n",
    "    N = 3\n",
    "\n",
    "    #some helperfunctions\n",
    "\n",
    "    tpos = (mB - mK)**2\n",
    "    tzero = (mB + mK)*(ztf.sqrt(mB)-ztf.sqrt(mK))**2\n",
    "\n",
    "    z_oben = ztf.sqrt(tpos - q2) - ztf.sqrt(tpos - tzero)\n",
    "    z_unten = ztf.sqrt(tpos - q2) + ztf.sqrt(tpos - tzero)\n",
    "    z = tf.divide(z_oben, z_unten)\n",
    "\n",
    "    #calculate f0\n",
    "\n",
    "    if subscript == \"0\":\n",
    "        prefactor = 1/(1 - q2/(mbstar0**2))\n",
    "        _sum = 0\n",
    "        b0 = [b0_0, b0_1, b0_2]\n",
    "\n",
    "        for i in range(N):\n",
    "            _sum += b0[i]*(tf.pow(z,i))\n",
    "\n",
    "        return ztf.to_complex(prefactor * _sum)\n",
    "\n",
    "    #calculate f+ or fT\n",
    "\n",
    "    else:\n",
    "        prefactor = 1/(1 - q2/(mbstar**2))\n",
    "        _sum = 0\n",
    "\n",
    "        if subscript == \"T\":\n",
    "            bT = [bT_0, bT_1, bT_2]\n",
    "            for i in range(N):\n",
    "                _sum += bT[i] * (tf.pow(z, i) - ((-1)**(i-N)) * (i/N) * tf.pow(z, N))\n",
    "        else:\n",
    "            bplus = [bplus_0, bplus_1, bplus_2]\n",
    "            for i in range(N):\n",
    "                _sum += bplus[i] * (tf.pow(z, i) - ((-1)**(i-N)) * (i/N) * tf.pow(z, N))\n",
    "\n",
    "        return ztf.to_complex(prefactor * _sum)\n",
    "\n",
    "def resonance(q, _mass, width, phase, scale):\n",
    "\n",
    "    q2 = tf.pow(q, 2)\n",
    "\n",
    "    mmu = ztf.constant(pdg['muon_M'])\n",
    "\n",
    "    p = 0.5 * ztf.sqrt(q2 - 4*(mmu**2))\n",
    "\n",
    "    p0 =  0.5 * ztf.sqrt(_mass**2 - 4*mmu**2)\n",
    "\n",
    "    gamma_j = tf.divide(p, q) * _mass * width / p0\n",
    "\n",
    "    #Calculate the resonance\n",
    "\n",
    "    _top = tf.complex(_mass * width, ztf.constant(0.0))\n",
    "\n",
    "    _bottom = tf.complex(_mass**2 - q2, -_mass*gamma_j)\n",
    "\n",
    "    com = _top/_bottom\n",
    "\n",
    "    #Rotate by the phase\n",
    "\n",
    "    r = ztf.to_complex(scale*tf.abs(com))\n",
    "\n",
    "    _phase = tf.angle(com)\n",
    "\n",
    "    _phase += phase\n",
    "\n",
    "    com = r * tf.exp(tf.complex(ztf.constant(0.0), _phase))\n",
    "\n",
    "    return com\n",
    "\n",
    "\n",
    "def axiv_nonres(q, b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2):\n",
    "\n",
    "    GF = ztf.constant(pdg['GF'])\n",
    "    alpha_ew = ztf.constant(pdg['alpha_ew'])\n",
    "    Vtb = ztf.constant(pdg['Vtb'])\n",
    "    Vts = ztf.constant(pdg['Vts'])\n",
    "    C10eff = ztf.constant(pdg['C10eff'])\n",
    "\n",
    "    mmu = ztf.constant(pdg['muon_M'])\n",
    "    mb = ztf.constant(pdg['bquark_M'])\n",
    "    ms = ztf.constant(pdg['squark_M'])\n",
    "    mK = ztf.constant(pdg['Ks_M'])\n",
    "    mB = ztf.constant(pdg['Bplus_M'])\n",
    "\n",
    "    q2 = tf.pow(q, 2)\n",
    "\n",
    "    #Some helperfunctions\n",
    "\n",
    "    beta = 1. - 4. * mmu**2. / q2\n",
    "\n",
    "    kabs = ztf.sqrt(mB**2. + tf.pow(q2, 2)/mB**2. + mK**4./mB**2. - 2. * (mB**2. * mK**2. + mK**2. * q2 + mB**2. * q2) / mB**2.)\n",
    "\n",
    "    #prefactor in front of whole bracket\n",
    "\n",
    "    prefactor1 = GF**2. *alpha_ew**2. * (tf.abs(Vtb*Vts))**2. * kabs * beta / (128. * np.pi**5.)\n",
    "\n",
    "    #left term in bracket\n",
    "\n",
    "    bracket_left = 2./3. * tf.pow(kabs,2) * tf.pow(beta,2) * tf.pow(tf.abs(ztf.to_complex(C10eff)*formfactor(q2, \"+\", b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2)),2)\n",
    "\n",
    "    #middle term in bracket\n",
    "\n",
    "    _top = 4. * mmu**2. * (mB**2. - mK**2.) * (mB**2. - mK**2.)\n",
    "\n",
    "    _under = q2 * mB**2.\n",
    "\n",
    "    bracket_middle = _top/_under *tf.pow(tf.abs(ztf.to_complex(C10eff) * formfactor(q2, \"0\", b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2)), 2)\n",
    "    \n",
    "    #Note sqrt(q2) comes from derivation as we use q2 and plot q\n",
    "\n",
    "    return prefactor1 * (bracket_left + bracket_middle) * 2 * q\n",
    "\n",
    "def vec(q, funcs, b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2):\n",
    "    \n",
    "    q2 = tf.pow(q, 2)\n",
    "\n",
    "    GF = ztf.constant(pdg['GF'])\n",
    "    alpha_ew = ztf.constant(pdg['alpha_ew'])\n",
    "    Vtb = ztf.constant(pdg['Vtb'])\n",
    "    Vts = ztf.constant(pdg['Vts'])\n",
    "    C7eff = ztf.constant(pdg['C7eff'])\n",
    "\n",
    "    mmu = ztf.constant(pdg['muon_M'])\n",
    "    mb = ztf.constant(pdg['bquark_M'])\n",
    "    ms = ztf.constant(pdg['squark_M'])\n",
    "    mK = ztf.constant(pdg['Ks_M'])\n",
    "    mB = ztf.constant(pdg['Bplus_M'])\n",
    "\n",
    "    #Some helperfunctions\n",
    "\n",
    "    beta = 1. - 4. * mmu**2. / q2\n",
    "\n",
    "    kabs = ztf.sqrt(mB**2. + tf.pow(q2, 2)/mB**2. + mK**4./mB**2. - 2 * (mB**2 * mK**2 + mK**2 * q2 + mB**2 * q2) / mB**2)\n",
    "    \n",
    "    #prefactor in front of whole bracket\n",
    "\n",
    "    prefactor1 = GF**2. *alpha_ew**2. * (tf.abs(Vtb*Vts))**2 * kabs * beta / (128. * np.pi**5.)\n",
    "\n",
    "    #right term in bracket\n",
    "\n",
    "    prefactor2 = tf.pow(kabs,2) * (1. - 1./3. * beta)\n",
    "\n",
    "    abs_bracket = tf.pow(tf.abs(c9eff(q, funcs) * formfactor(q2, \"+\", b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2) + ztf.to_complex(2.0 * C7eff * (mb + ms)/(mB + mK)) * formfactor(q2, \"T\", b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2)),2)\n",
    "\n",
    "    bracket_right = prefactor2 * abs_bracket\n",
    "\n",
    "    #Note sqrt(q2) comes from derivation as we use q2 and plot q\n",
    "\n",
    "    return prefactor1 * bracket_right * 2 * q\n",
    "\n",
    "def c9eff(q, funcs):\n",
    "\n",
    "    C9eff_nr = ztf.to_complex(ztf.constant(pdg['C9eff']))\n",
    "\n",
    "    c9 = C9eff_nr + funcs\n",
    "\n",
    "    return c9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def G(y):\n",
    "    \n",
    "    def inner_rect_bracket(q):\n",
    "        return tf.log(ztf.to_complex((1+tf.sqrt(q))/(1-tf.sqrt(q)))-tf.complex(ztf.constant(0), -1*ztf.constant(np.pi)))    \n",
    "    \n",
    "    def inner_right(q):\n",
    "        return ztf.to_complex(2 * tf.atan(1/tf.sqrt(tf.math.real(-q))))\n",
    "    \n",
    "    big_bracket = tf.where(tf.math.real(y) > ztf.constant(0.0), inner_rect_bracket(y), inner_right(y))\n",
    "    \n",
    "    return ztf.to_complex(tf.sqrt(tf.abs(y))) * big_bracket\n",
    "\n",
    "def h_S(m, q):\n",
    "    \n",
    "    return ztf.to_complex(2) - G(ztf.to_complex(1) - ztf.to_complex(4*tf.pow(m, 2)) / ztf.to_complex(tf.pow(q, 2)))\n",
    "\n",
    "def h_P(m, q):\n",
    "    \n",
    "    return ztf.to_complex(2/3) + (ztf.to_complex(1) - ztf.to_complex(4*tf.pow(m, 2)) / ztf.to_complex(tf.pow(q, 2))) * h_S(m,q)\n",
    "\n",
    "def two_p_ccbar(mD, m_D_bar, m_D_star, q):\n",
    "    \n",
    "    \n",
    "    #Load constants\n",
    "    nu_D_bar = ztf.to_complex(pdg[\"nu_D_bar\"])\n",
    "    nu_D = ztf.to_complex(pdg[\"nu_D\"])\n",
    "    nu_D_star = ztf.to_complex(pdg[\"nu_D_star\"])\n",
    "    \n",
    "    phase_D_bar = ztf.to_complex(pdg[\"phase_D_bar\"])\n",
    "    phase_D = ztf.to_complex(pdg[\"phase_D\"])\n",
    "    phase_D_star = ztf.to_complex(pdg[\"phase_D_star\"])\n",
    "    \n",
    "    #Calculation\n",
    "    left_part =  nu_D_bar * tf.exp(tf.complex(ztf.constant(0.0), phase_D_bar)) * h_S(m_D_bar, q) \n",
    "    \n",
    "    right_part_D = nu_D * tf.exp(tf.complex(ztf.constant(0.0), phase_D)) * h_P(m_D, q) \n",
    "    \n",
    "    right_part_D_star = nu_D_star * tf.exp(tf.complex(ztf.constant(0.0), phase_D_star)) * h_P(m_D_star, q) \n",
    "\n",
    "    return left_part + right_part_D + right_part_D_star"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Build pdf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "class total_pdf_cut(zfit.pdf.ZPDF):\n",
    "    _N_OBS = 1  # dimension, can be omitted\n",
    "    _PARAMS = ['b0_0', 'b0_1', 'b0_2', \n",
    "               'bplus_0', 'bplus_1', 'bplus_2', \n",
    "               'bT_0', 'bT_1', 'bT_2', \n",
    "               'rho_mass', 'rho_scale', 'rho_phase', 'rho_width',\n",
    "               'jpsi_mass', 'jpsi_scale', 'jpsi_phase', 'jpsi_width',\n",
    "               'psi2s_mass', 'psi2s_scale', 'psi2s_phase', 'psi2s_width',\n",
    "               'p3770_mass', 'p3770_scale', 'p3770_phase', 'p3770_width',\n",
    "               'p4040_mass', 'p4040_scale', 'p4040_phase', 'p4040_width',\n",
    "               'p4160_mass', 'p4160_scale', 'p4160_phase', 'p4160_width',\n",
    "               'p4415_mass', 'p4415_scale', 'p4415_phase', 'p4415_width',\n",
    "               'omega_mass', 'omega_scale', 'omega_phase', 'omega_width',\n",
    "               'phi_mass', 'phi_scale', 'phi_phase', 'phi_width',\n",
    "               'Dbar_mass', 'Dbar_scale', 'Dbar_phase',\n",
    "               'Dstar_mass', 'DDstar_scale', 'DDstar_phase', 'D_mass',\n",
    "               'tau_mass', 'C_tt']\n",
    "# the name of the parameters\n",
    "\n",
    "    def _unnormalized_pdf(self, x):\n",
    "        \n",
    "        x = x.unstack_x()\n",
    "        \n",
    "        b0 = [self.params['b0_0'], self.params['b0_1'], self.params['b0_2']]\n",
    "        bplus = [self.params['bplus_0'], self.params['bplus_1'], self.params['bplus_2']]\n",
    "        bT = [self.params['bT_0'], self.params['bT_1'], self.params['bT_2']]\n",
    "        \n",
    "        def rho_res(q):\n",
    "            return resonance(q, _mass = self.params['rho_mass'], scale = self.params['rho_scale'],\n",
    "                             phase = self.params['rho_phase'], width = self.params['rho_width'])\n",
    "    \n",
    "        def omega_res(q):\n",
    "            return resonance(q, _mass = self.params['omega_mass'], scale = self.params['omega_scale'],\n",
    "                             phase = self.params['omega_phase'], width = self.params['omega_width'])\n",
    "        \n",
    "        def phi_res(q):\n",
    "            return resonance(q, _mass = self.params['phi_mass'], scale = self.params['phi_scale'],\n",
    "                             phase = self.params['phi_phase'], width = self.params['phi_width'])\n",
    "\n",
    "        def jpsi_res(q):\n",
    "            return  ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['jpsi_mass'], 2)) * resonance(q, _mass = self.params['jpsi_mass'], \n",
    "                                                                                  scale = self.params['jpsi_scale'],\n",
    "                                                                                  phase = self.params['jpsi_phase'], \n",
    "                                                                                  width = self.params['jpsi_width'])\n",
    "        def psi2s_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['psi2s_mass'], 2)) * resonance(q, _mass = self.params['psi2s_mass'], \n",
    "                                                                                   scale = self.params['psi2s_scale'],\n",
    "                                                                                   phase = self.params['psi2s_phase'], \n",
    "                                                                                   width = self.params['psi2s_width'])\n",
    "        def p3770_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['p3770_mass'], 2)) * resonance(q, _mass = self.params['p3770_mass'], \n",
    "                                                                                   scale = self.params['p3770_scale'],\n",
    "                                                                                   phase = self.params['p3770_phase'], \n",
    "                                                                                   width = self.params['p3770_width'])\n",
    "        \n",
    "        def p4040_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['p4040_mass'], 2)) * resonance(q, _mass = self.params['p4040_mass'], \n",
    "                                                                                   scale = self.params['p4040_scale'],\n",
    "                                                                                   phase = self.params['p4040_phase'], \n",
    "                                                                                   width = self.params['p4040_width'])\n",
    "        \n",
    "        def p4160_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['p4160_mass'], 2)) * resonance(q, _mass = self.params['p4160_mass'], \n",
    "                                                                                   scale = self.params['p4160_scale'],\n",
    "                                                                                   phase = self.params['p4160_phase'], \n",
    "                                                                                   width = self.params['p4160_width'])\n",
    "        \n",
    "        def p4415_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['p4415_mass'], 2)) * resonance(q, _mass = self.params['p4415_mass'], \n",
    "                                                                                   scale = self.params['p4415_scale'],\n",
    "                                                                                   phase = self.params['p4415_phase'], \n",
    "                                                                                   width = self.params['p4415_width'])\n",
    "        \n",
    "        def P2_D(q):\n",
    "            Dbar_contrib = ztf.to_complex(self.params['Dbar_scale'])*tf.exp(tf.complex(ztf.constant(0.0), self.params['Dbar_phase']))*ztf.to_complex(h_S(self.params['Dbar_mass'], q))\n",
    "            DDstar_contrib = ztf.to_complex(self.params['DDstar_scale'])*tf.exp(tf.complex(ztf.constant(0.0), self.params['DDstar_phase']))*(ztf.to_complex(h_P(self.params['Dstar_mass'], q)) + ztf.to_complex(h_P(self.params['D_mass'], q)))\n",
    "            return Dbar_contrib + DDstar_contrib\n",
    "        \n",
    "        def ttau_cusp(q):\n",
    "            return ztf.to_complex(self.params['C_tt'])*(ztf.to_complex((h_S(self.params['tau_mass'], q))) - ztf.to_complex(h_P(self.params['tau_mass'], q)))\n",
    "        \n",
    "\n",
    "        funcs = rho_res(x) + omega_res(x) + phi_res(x) + jpsi_res(x) + psi2s_res(x) + p3770_res(x) + p4040_res(x)+ p4160_res(x) + p4415_res(x) + P2_D(x) + ttau_cusp(x)\n",
    "\n",
    "        vec_f = vec(x, funcs, b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2)\n",
    "\n",
    "        axiv_nr = axiv_nonres(x, b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2)\n",
    "\n",
    "        tot = vec_f + axiv_nr\n",
    "        \n",
    "        #Cut out jpsi and psi2s\n",
    "        \n",
    "        tot = tf.where(tf.math.logical_or(x < ztf.constant(jpsi_mass-60.), x > ztf.constant(jpsi_mass+70.)), tot, 0.0*tot)\n",
    "        \n",
    "        tot = tf.where(tf.math.logical_or(x < ztf.constant(psi2s_mass-50.), x > ztf.constant(psi2s_mass+50.)), tot, 0.0*tot)\n",
    "        \n",
    "        return tot\n",
    "    \n",
    "class total_pdf_full(zfit.pdf.ZPDF):\n",
    "    _N_OBS = 1  # dimension, can be omitted\n",
    "    _PARAMS = ['b0_0', 'b0_1', 'b0_2', \n",
    "               'bplus_0', 'bplus_1', 'bplus_2', \n",
    "               'bT_0', 'bT_1', 'bT_2', \n",
    "               'rho_mass', 'rho_scale', 'rho_phase', 'rho_width',\n",
    "               'jpsi_mass', 'jpsi_scale', 'jpsi_phase', 'jpsi_width',\n",
    "               'psi2s_mass', 'psi2s_scale', 'psi2s_phase', 'psi2s_width',\n",
    "               'p3770_mass', 'p3770_scale', 'p3770_phase', 'p3770_width',\n",
    "               'p4040_mass', 'p4040_scale', 'p4040_phase', 'p4040_width',\n",
    "               'p4160_mass', 'p4160_scale', 'p4160_phase', 'p4160_width',\n",
    "               'p4415_mass', 'p4415_scale', 'p4415_phase', 'p4415_width',\n",
    "               'omega_mass', 'omega_scale', 'omega_phase', 'omega_width',\n",
    "               'phi_mass', 'phi_scale', 'phi_phase', 'phi_width',\n",
    "               'Dbar_mass', 'Dbar_scale', 'Dbar_phase',\n",
    "               'Dstar_mass', 'DDstar_scale', 'DDstar_phase', 'D_mass',\n",
    "               'tau_mass', 'C_tt']\n",
    "# the name of the parameters\n",
    "\n",
    "    def _unnormalized_pdf(self, x):\n",
    "        \n",
    "        x = x.unstack_x()\n",
    "        \n",
    "        b0 = [self.params['b0_0'], self.params['b0_1'], self.params['b0_2']]\n",
    "        bplus = [self.params['bplus_0'], self.params['bplus_1'], self.params['bplus_2']]\n",
    "        bT = [self.params['bT_0'], self.params['bT_1'], self.params['bT_2']]\n",
    "        \n",
    "        def rho_res(q):\n",
    "            return resonance(q, _mass = self.params['rho_mass'], scale = self.params['rho_scale'],\n",
    "                             phase = self.params['rho_phase'], width = self.params['rho_width'])\n",
    "    \n",
    "        def omega_res(q):\n",
    "            return resonance(q, _mass = self.params['omega_mass'], scale = self.params['omega_scale'],\n",
    "                             phase = self.params['omega_phase'], width = self.params['omega_width'])\n",
    "        \n",
    "        def phi_res(q):\n",
    "            return resonance(q, _mass = self.params['phi_mass'], scale = self.params['phi_scale'],\n",
    "                             phase = self.params['phi_phase'], width = self.params['phi_width'])\n",
    "\n",
    "        def jpsi_res(q):\n",
    "            return  ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['jpsi_mass'], 2)) * resonance(q, _mass = self.params['jpsi_mass'], \n",
    "                                                                                  scale = self.params['jpsi_scale'],\n",
    "                                                                                  phase = self.params['jpsi_phase'], \n",
    "                                                                                  width = self.params['jpsi_width'])\n",
    "        def psi2s_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['psi2s_mass'], 2)) * resonance(q, _mass = self.params['psi2s_mass'], \n",
    "                                                                                   scale = self.params['psi2s_scale'],\n",
    "                                                                                   phase = self.params['psi2s_phase'], \n",
    "                                                                                   width = self.params['psi2s_width'])\n",
    "        def p3770_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['p3770_mass'], 2)) * resonance(q, _mass = self.params['p3770_mass'], \n",
    "                                                                                   scale = self.params['p3770_scale'],\n",
    "                                                                                   phase = self.params['p3770_phase'], \n",
    "                                                                                   width = self.params['p3770_width'])\n",
    "        \n",
    "        def p4040_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['p4040_mass'], 2)) * resonance(q, _mass = self.params['p4040_mass'], \n",
    "                                                                                   scale = self.params['p4040_scale'],\n",
    "                                                                                   phase = self.params['p4040_phase'], \n",
    "                                                                                   width = self.params['p4040_width'])\n",
    "        \n",
    "        def p4160_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['p4160_mass'], 2)) * resonance(q, _mass = self.params['p4160_mass'], \n",
    "                                                                                   scale = self.params['p4160_scale'],\n",
    "                                                                                   phase = self.params['p4160_phase'], \n",
    "                                                                                   width = self.params['p4160_width'])\n",
    "        \n",
    "        def p4415_res(q):\n",
    "            return ztf.to_complex(tf.pow(q, 2) / tf.pow(self.params['p4415_mass'], 2)) * resonance(q, _mass = self.params['p4415_mass'], \n",
    "                                                                                   scale = self.params['p4415_scale'],\n",
    "                                                                                   phase = self.params['p4415_phase'], \n",
    "                                                                                   width = self.params['p4415_width'])\n",
    "        \n",
    "        def P2_D(q):\n",
    "            Dbar_contrib = ztf.to_complex(self.params['Dbar_scale'])*tf.exp(tf.complex(ztf.constant(0.0), self.params['Dbar_phase']))*ztf.to_complex(h_S(self.params['Dbar_mass'], q))\n",
    "            DDstar_contrib = ztf.to_complex(self.params['DDstar_scale'])*tf.exp(tf.complex(ztf.constant(0.0), self.params['DDstar_phase']))*(ztf.to_complex(h_P(self.params['Dstar_mass'], q)) + ztf.to_complex(h_P(self.params['D_mass'], q)))\n",
    "            return Dbar_contrib + DDstar_contrib\n",
    "        \n",
    "        def ttau_cusp(q):\n",
    "            return ztf.to_complex(self.params['C_tt'])*(ztf.to_complex((h_S(self.params['tau_mass'], q))) - ztf.to_complex(h_P(self.params['tau_mass'], q)))\n",
    "        \n",
    "\n",
    "        funcs = rho_res(x) + omega_res(x) + phi_res(x) + jpsi_res(x) + psi2s_res(x) + p3770_res(x) + p4040_res(x)+ p4160_res(x) + p4415_res(x) + P2_D(x) + ttau_cusp(x)\n",
    "\n",
    "        vec_f = vec(x, funcs, b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2)\n",
    "\n",
    "        axiv_nr = axiv_nonres(x, b0_0, b0_1, b0_2, bplus_0, bplus_1, bplus_2, bT_0, bT_1, bT_2)\n",
    "\n",
    "        tot = vec_f + axiv_nr\n",
    "        \n",
    "        #Cut out jpsi and psi2s\n",
    "        \n",
    "#         tot = tf.where(tf.math.logical_or(x < ztf.constant(jpsi_mass-60.), x > ztf.constant(jpsi_mass+70.)), tot, 0.0*tot)\n",
    "        \n",
    "#         tot = tf.where(tf.math.logical_or(x < ztf.constant(psi2s_mass-50.), x > ztf.constant(psi2s_mass+50.)), tot, 0.0*tot)\n",
    "        \n",
    "        return tot"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Setup parameters"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From C:\\Users\\sa_li\\.conda\\envs\\rmd\\lib\\site-packages\\tensorflow\\python\\ops\\resource_variable_ops.py:435: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Colocations handled automatically by placer.\n"
     ]
    }
   ],
   "source": [
    "# formfactors\n",
    "\n",
    "b0_0 = zfit.Parameter(\"b0_0\", ztf.constant(0.292), floating = False) #, lower_limit = -2.0, upper_limit= 2.0)\n",
    "b0_1 = zfit.Parameter(\"b0_1\", ztf.constant(0.281), floating = False) #, lower_limit = -2.0, upper_limit= 2.0)\n",
    "b0_2 = zfit.Parameter(\"b0_2\", ztf.constant(0.150), floating = False) #, lower_limit = -2.0, upper_limit= 2.0)\n",
    "\n",
    "bplus_0 = zfit.Parameter(\"bplus_0\", ztf.constant(0.466), floating = False)#, lower_limit = -2.0, upper_limit= 2.0)\n",
    "bplus_1 = zfit.Parameter(\"bplus_1\", ztf.constant(-0.885), floating = False)#, lower_limit = -2.0, upper_limit= 2.0)\n",
    "bplus_2 = zfit.Parameter(\"bplus_2\", ztf.constant(-0.213), floating = False)#, lower_limit = -2.0, upper_limit= 2.0)\n",
    "\n",
    "bT_0 = zfit.Parameter(\"bT_0\", ztf.constant(0.460), floating = False) #, lower_limit = -2.0, upper_limit= 2.0)\n",
    "bT_1 = zfit.Parameter(\"bT_1\", ztf.constant(-1.089), floating = False) #, lower_limit = -2.0, upper_limit= 2.0)\n",
    "bT_2 = zfit.Parameter(\"bT_2\", ztf.constant(-1.114), floating = False) #, lower_limit = -2.0, upper_limit= 2.0)\n",
    "\n",
    "\n",
    "#rho\n",
    "\n",
    "rho_mass, rho_width, rho_phase, rho_scale = pdg[\"rho\"]\n",
    "\n",
    "rho_m = zfit.Parameter(\"rho_m\", ztf.constant(rho_mass), floating = False) #lower_limit = rho_mass - rho_width, upper_limit = rho_mass + rho_width)\n",
    "rho_w = zfit.Parameter(\"rho_w\", ztf.constant(rho_width), floating = False)\n",
    "rho_p = zfit.Parameter(\"rho_p\", ztf.constant(rho_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "rho_s = zfit.Parameter(\"rho_s\", ztf.constant(rho_scale), lower_limit=rho_scale-np.sqrt(rho_scale), upper_limit=rho_scale+np.sqrt(rho_scale))\n",
    "\n",
    "#omega\n",
    "\n",
    "omega_mass, omega_width, omega_phase, omega_scale = pdg[\"omega\"]\n",
    "\n",
    "omega_m = zfit.Parameter(\"omega_m\", ztf.constant(omega_mass), floating = False)\n",
    "omega_w = zfit.Parameter(\"omega_w\", ztf.constant(omega_width), floating = False)\n",
    "omega_p = zfit.Parameter(\"omega_p\", ztf.constant(omega_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "omega_s = zfit.Parameter(\"omega_s\", ztf.constant(omega_scale), lower_limit=omega_scale-np.sqrt(omega_scale), upper_limit=omega_scale+np.sqrt(omega_scale))\n",
    "\n",
    "\n",
    "#phi\n",
    "\n",
    "phi_mass, phi_width, phi_phase, phi_scale = pdg[\"phi\"]\n",
    "\n",
    "phi_m = zfit.Parameter(\"phi_m\", ztf.constant(phi_mass), floating = False)\n",
    "phi_w = zfit.Parameter(\"phi_w\", ztf.constant(phi_width), floating = False)\n",
    "phi_p = zfit.Parameter(\"phi_p\", ztf.constant(phi_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "phi_s = zfit.Parameter(\"phi_s\", ztf.constant(phi_scale), lower_limit=phi_scale-np.sqrt(phi_scale), upper_limit=phi_scale+np.sqrt(phi_scale))\n",
    "\n",
    "#jpsi\n",
    "\n",
    "jpsi_mass, jpsi_width, jpsi_phase, jpsi_scale = pdg[\"jpsi\"]\n",
    "\n",
    "jpsi_m = zfit.Parameter(\"jpsi_m\", ztf.constant(jpsi_mass), floating = False)\n",
    "jpsi_w = zfit.Parameter(\"jpsi_w\", ztf.constant(jpsi_width), floating = False)\n",
    "jpsi_p = zfit.Parameter(\"jpsi_p\", ztf.constant(jpsi_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "jpsi_s = zfit.Parameter(\"jpsi_s\", ztf.constant(jpsi_scale), floating = False) #, lower_limit=jpsi_scale-np.sqrt(jpsi_scale), upper_limit=jpsi_scale+np.sqrt(jpsi_scale))\n",
    "\n",
    "#psi2s\n",
    "\n",
    "psi2s_mass, psi2s_width, psi2s_phase, psi2s_scale = pdg[\"psi2s\"]\n",
    "\n",
    "psi2s_m = zfit.Parameter(\"psi2s_m\", ztf.constant(psi2s_mass), floating = False)\n",
    "psi2s_w = zfit.Parameter(\"psi2s_w\", ztf.constant(psi2s_width), floating = False)\n",
    "psi2s_p = zfit.Parameter(\"psi2s_p\", ztf.constant(psi2s_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "psi2s_s = zfit.Parameter(\"psi2s_s\", ztf.constant(psi2s_scale), floating = False) #, lower_limit=psi2s_scale-np.sqrt(psi2s_scale), upper_limit=psi2s_scale+np.sqrt(psi2s_scale))\n",
    "\n",
    "#psi(3770)\n",
    "\n",
    "p3770_mass, p3770_width, p3770_phase, p3770_scale = pdg[\"p3770\"]\n",
    "\n",
    "p3770_m = zfit.Parameter(\"p3770_m\", ztf.constant(p3770_mass), floating = False)\n",
    "p3770_w = zfit.Parameter(\"p3770_w\", ztf.constant(p3770_width), floating = False)\n",
    "p3770_p = zfit.Parameter(\"p3770_p\", ztf.constant(p3770_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "p3770_s = zfit.Parameter(\"p3770_s\", ztf.constant(p3770_scale), lower_limit=p3770_scale-np.sqrt(p3770_scale), upper_limit=p3770_scale+np.sqrt(p3770_scale))\n",
    "\n",
    "#psi(4040)\n",
    "\n",
    "p4040_mass, p4040_width, p4040_phase, p4040_scale = pdg[\"p4040\"]\n",
    "\n",
    "p4040_m = zfit.Parameter(\"p4040_m\", ztf.constant(p4040_mass), floating = False)\n",
    "p4040_w = zfit.Parameter(\"p4040_w\", ztf.constant(p4040_width), floating = False)\n",
    "p4040_p = zfit.Parameter(\"p4040_p\", ztf.constant(p4040_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "p4040_s = zfit.Parameter(\"p4040_s\", ztf.constant(p4040_scale), lower_limit=p4040_scale-np.sqrt(p4040_scale), upper_limit=p4040_scale+np.sqrt(p4040_scale))\n",
    "\n",
    "#psi(4160)\n",
    "\n",
    "p4160_mass, p4160_width, p4160_phase, p4160_scale = pdg[\"p4160\"]\n",
    "\n",
    "p4160_m = zfit.Parameter(\"p4160_m\", ztf.constant(p4160_mass), floating = False)\n",
    "p4160_w = zfit.Parameter(\"p4160_w\", ztf.constant(p4160_width), floating = False)\n",
    "p4160_p = zfit.Parameter(\"p4160_p\", ztf.constant(p4160_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "p4160_s = zfit.Parameter(\"p4160_s\", ztf.constant(p4160_scale), lower_limit=p4160_scale-np.sqrt(p4160_scale), upper_limit=p4160_scale+np.sqrt(p4160_scale))\n",
    "\n",
    "#psi(4415)\n",
    "\n",
    "p4415_mass, p4415_width, p4415_phase, p4415_scale = pdg[\"p4415\"]\n",
    "\n",
    "p4415_m = zfit.Parameter(\"p4415_m\", ztf.constant(p4415_mass), floating = False)\n",
    "p4415_w = zfit.Parameter(\"p4415_w\", ztf.constant(p4415_width), floating = False)\n",
    "p4415_p = zfit.Parameter(\"p4415_p\", ztf.constant(p4415_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)\n",
    "p4415_s = zfit.Parameter(\"p4415_s\", ztf.constant(p4415_scale), lower_limit=p4415_scale-np.sqrt(p4415_scale), upper_limit=p4415_scale+np.sqrt(p4415_scale))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Dynamic generation of 2 particle contribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "m_c = 1300\n",
    "\n",
    "Dbar_phase = 0.0\n",
    "DDstar_phase = 0.0\n",
    "Dstar_mass = pdg['Dst_M']\n",
    "Dbar_mass = pdg['D0_M']\n",
    "D_mass = pdg['D0_M']\n",
    "\n",
    "Dbar_s = zfit.Parameter(\"Dbar_s\", ztf.constant(0.0), lower_limit=-0.3, upper_limit=0.3)\n",
    "Dbar_m = zfit.Parameter(\"Dbar_m\", ztf.constant(Dbar_mass), floating = False)\n",
    "Dbar_p = zfit.Parameter(\"Dbar_p\", ztf.constant(Dbar_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)#, floating = False)\n",
    "DDstar_s = zfit.Parameter(\"DDstar_s\", ztf.constant(0.0), lower_limit=-0.3, upper_limit=0.3)#, floating = False)\n",
    "Dstar_m = zfit.Parameter(\"Dstar_m\", ztf.constant(Dstar_mass), floating = False)\n",
    "D_m = zfit.Parameter(\"D_m\", ztf.constant(D_mass), floating = False)\n",
    "DDstar_p = zfit.Parameter(\"DDstar_p\", ztf.constant(DDstar_phase), lower_limit=-2*np.pi, upper_limit=2*np.pi)#, floating = False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Tau parameters"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "tau_m = zfit.Parameter(\"tau_m\", ztf.constant(pdg['tau_M']), floating = False)\n",
    "Ctt = zfit.Parameter(\"Ctt\", ztf.constant(0.0), lower_limit=-1.5, upper_limit=1.5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Load data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_min = 2*pdg['muon_M']\n",
    "x_max = (pdg[\"Bplus_M\"]-pdg[\"Ks_M\"]-0.1)\n",
    "\n",
    "# # Full spectrum\n",
    "\n",
    "obs_toy = zfit.Space('q', limits = (x_min, x_max))\n",
    "\n",
    "# Jpsi and Psi2s cut out\n",
    "\n",
    "obs1 = zfit.Space('q', limits = (x_min, jpsi_mass - 60.))\n",
    "obs2 = zfit.Space('q', limits = (jpsi_mass + 70., psi2s_mass - 50.))\n",
    "obs3 = zfit.Space('q', limits = (psi2s_mass + 50., x_max))\n",
    "\n",
    "obs_fit = obs1 + obs2 + obs3\n",
    "\n",
    "# with open(r\"./data/slim_points/slim_points_toy_0_range({0}-{1}).pkl\".format(int(x_min), int(x_max)), \"rb\") as input_file:\n",
    "#     part_set = pkl.load(input_file)\n",
    "\n",
    "# x_part = part_set['x_part']\n",
    "\n",
    "# x_part = x_part.astype('float64')\n",
    "\n",
    "# data = zfit.data.Data.from_numpy(array=x_part, obs=obs)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Setup pdf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "total_f = total_pdf_cut(obs=obs_toy, jpsi_mass = jpsi_m, jpsi_scale = jpsi_s, jpsi_phase = jpsi_p, jpsi_width = jpsi_w,\n",
    "                    psi2s_mass = psi2s_m, psi2s_scale = psi2s_s, psi2s_phase = psi2s_p, psi2s_width = psi2s_w,\n",
    "                    p3770_mass = p3770_m, p3770_scale = p3770_s, p3770_phase = p3770_p, p3770_width = p3770_w,\n",
    "                    p4040_mass = p4040_m, p4040_scale = p4040_s, p4040_phase = p4040_p, p4040_width = p4040_w,\n",
    "                    p4160_mass = p4160_m, p4160_scale = p4160_s, p4160_phase = p4160_p, p4160_width = p4160_w,\n",
    "                    p4415_mass = p4415_m, p4415_scale = p4415_s, p4415_phase = p4415_p, p4415_width = p4415_w,\n",
    "                    rho_mass = rho_m, rho_scale = rho_s, rho_phase = rho_p, rho_width = rho_w,\n",
    "                    omega_mass = omega_m, omega_scale = omega_s, omega_phase = omega_p, omega_width = omega_w,\n",
    "                    phi_mass = phi_m, phi_scale = phi_s, phi_phase = phi_p, phi_width = phi_w,\n",
    "                    Dstar_mass = Dstar_m, DDstar_scale = DDstar_s, DDstar_phase = DDstar_p, D_mass = D_m,\n",
    "                    Dbar_mass = Dbar_m, Dbar_scale = Dbar_s, Dbar_phase = Dbar_p,\n",
    "                    tau_mass = tau_m, C_tt = Ctt, b0_0 = b0_0, b0_1 = b0_1, b0_2 = b0_2,\n",
    "                    bplus_0 = bplus_0, bplus_1 = bplus_1, bplus_2 = bplus_2,\n",
    "                    bT_0 = bT_0, bT_1 = bT_1, bT_2 = bT_2)\n",
    "\n",
    "total_f_fit = total_pdf_full(obs=obs_fit, jpsi_mass = jpsi_m, jpsi_scale = jpsi_s, jpsi_phase = jpsi_p, jpsi_width = jpsi_w,\n",
    "                    psi2s_mass = psi2s_m, psi2s_scale = psi2s_s, psi2s_phase = psi2s_p, psi2s_width = psi2s_w,\n",
    "                    p3770_mass = p3770_m, p3770_scale = p3770_s, p3770_phase = p3770_p, p3770_width = p3770_w,\n",
    "                    p4040_mass = p4040_m, p4040_scale = p4040_s, p4040_phase = p4040_p, p4040_width = p4040_w,\n",
    "                    p4160_mass = p4160_m, p4160_scale = p4160_s, p4160_phase = p4160_p, p4160_width = p4160_w,\n",
    "                    p4415_mass = p4415_m, p4415_scale = p4415_s, p4415_phase = p4415_p, p4415_width = p4415_w,\n",
    "                    rho_mass = rho_m, rho_scale = rho_s, rho_phase = rho_p, rho_width = rho_w,\n",
    "                    omega_mass = omega_m, omega_scale = omega_s, omega_phase = omega_p, omega_width = omega_w,\n",
    "                    phi_mass = phi_m, phi_scale = phi_s, phi_phase = phi_p, phi_width = phi_w,\n",
    "                    Dstar_mass = Dstar_m, DDstar_scale = DDstar_s, DDstar_phase = DDstar_p, D_mass = D_m,\n",
    "                    Dbar_mass = Dbar_m, Dbar_scale = Dbar_s, Dbar_phase = Dbar_p,\n",
    "                    tau_mass = tau_m, C_tt = Ctt, b0_0 = b0_0, b0_1 = b0_1, b0_2 = b0_2,\n",
    "                    bplus_0 = bplus_0, bplus_1 = bplus_1, bplus_2 = bplus_2,\n",
    "                    bT_0 = bT_0, bT_1 = bT_1, bT_2 = bT_2)\n",
    "                   \n",
    "# print(total_pdf.obs)\n",
    "\n",
    "# print(calcs_test)\n",
    "\n",
    "# for param in total_f.get_dependents():\n",
    "#     print(zfit.run(param))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<tf.Tensor 'normalization/hook_integrate/hook_numeric_integrate/mul_1:0' shape=() dtype=float64>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "total_f_fit.normalization(obs_toy)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Test if graphs actually work and compute values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# def total_test_tf(xq):\n",
    "\n",
    "#     def jpsi_res(q):\n",
    "#         return resonance(q, jpsi_m, jpsi_s, jpsi_p, jpsi_w)\n",
    "\n",
    "#     def psi2s_res(q):\n",
    "#         return resonance(q, psi2s_m, psi2s_s, psi2s_p, psi2s_w)\n",
    "\n",
    "#     def cusp(q):\n",
    "#         return bifur_gauss(q, cusp_m, sig_L, sig_R, cusp_s)\n",
    "\n",
    "#     funcs = jpsi_res(xq) + psi2s_res(xq) + cusp(xq)\n",
    "\n",
    "#     vec_f = vec(xq, funcs)\n",
    "\n",
    "#     axiv_nr = axiv_nonres(xq)\n",
    "\n",
    "#     tot = vec_f + axiv_nr\n",
    "    \n",
    "#     return tot\n",
    "\n",
    "# def jpsi_res(q):\n",
    "#     return resonance(q, jpsi_m, jpsi_s, jpsi_p, jpsi_w)\n",
    "\n",
    "# calcs = zfit.run(total_test_tf(x_part))\n",
    "\n",
    "test_q = np.linspace(x_min, x_max, int(2e6))\n",
    "\n",
    "probs = total_f_fit.pdf(test_q, norm_range=False)\n",
    "\n",
    "calcs_test = zfit.run(probs)\n",
    "# res_y = zfit.run(jpsi_res(test_q))\n",
    "# b0 = [b0_0, b0_1, b0_2]\n",
    "# bplus = [bplus_0, bplus_1, bplus_2]\n",
    "# bT = [bT_0, bT_1, bT_2]\n",
    "# f0_y = zfit.run(tf.math.real(formfactor(test_q,\"0\", b0, bplus, bT)))\n",
    "# fplus_y = zfit.run(tf.math.real(formfactor(test_q,\"+\", b0, bplus, bT)))\n",
    "# fT_y = zfit.run(tf.math.real(formfactor(test_q,\"T\", b0, bplus, bT)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\sa_li\\.conda\\envs\\rmd\\lib\\site-packages\\ipykernel_launcher.py:12: UserWarning: Creating legend with loc=\"best\" can be slow with large amounts of data.\n",
      "  if sys.path[0] == '':\n",
      "C:\\Users\\sa_li\\.conda\\envs\\rmd\\lib\\site-packages\\IPython\\core\\pylabtools.py:128: UserWarning: Creating legend with loc=\"best\" can be slow with large amounts of data.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaUAAAD4CAYAAABMtfkzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/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OnAD6cX6LuQcnDv4isN/+XWL7Cs5BiQeAd4GlYXbuxlnArQX+PN3fawj34WqcMMI7wA77530T9F4swSnp9Y598HzVts/FeZjWAv8NZNv2HPu+1n4+N8zWP9h7tA+4Nd3f7RzuyQoGsu8m3H2w3/lt+2dX8Hk4Gj8fWmZIURRFyRg0fKcoiqJkDCpKiqIoSsagoqQoiqJkDCpKiqIoSsagoqQoiqJkDCpKiqIoSsagoqQoiqJkDP8/XqW/tC349s4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.clf()\n",
    "# plt.plot(x_part, calcs, '.')\n",
    "plt.plot(test_q, calcs_test, label = 'pdf')\n",
    "# plt.plot(test_q, f0_y, label = '0')\n",
    "# plt.plot(test_q, fT_y, label = 'T')\n",
    "# plt.plot(test_q, fplus_y, label = '+')\n",
    "# plt.plot(test_q, res_y, label = 'res')\n",
    "plt.legend()\n",
    "plt.ylim(0.0, 1.5e-6)\n",
    "# plt.yscale('log')\n",
    "# plt.xlim(770, 785)\n",
    "plt.savefig('test.png')\n",
    "# print(jpsi_width)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "\n",
    "# probs = mixture.prob(test_q)\n",
    "# probs_np = zfit.run(probs)\n",
    "# probs_np *= np.max(calcs_test) / np.max(probs_np)\n",
    "# plt.figure()\n",
    "# plt.semilogy(test_q, probs_np,label=\"importance sampling\")\n",
    "# plt.semilogy(test_q, calcs_test, label = 'pdf')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 0.213/(0.00133+0.213+0.015)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Adjust scaling of different parts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "total_f.update_integration_options(draws_per_dim=2000000, mc_sampler=None)\n",
    "# inte = total_f.integrate(limits = (950., 1050.), norm_range=False)\n",
    "# inte_fl = zfit.run(inte)\n",
    "# print(inte_fl/4500)\n",
    "# print(pdg[\"jpsi_BR\"]/pdg[\"NR_BR\"], inte_fl*pdg[\"psi2s_auc\"]/pdg[\"NR_auc\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "# # print(\"jpsi:\", inte_fl)\n",
    "# # print(\"Increase am by factor:\", np.sqrt(pdg[\"jpsi_BR\"]/pdg[\"NR_BR\"]*pdg[\"NR_auc\"]/inte_fl))\n",
    "# # print(\"New amp:\", pdg[\"jpsi\"][3]*np.sqrt(pdg[\"jpsi_BR\"]/pdg[\"NR_BR\"]*pdg[\"NR_auc\"]/inte_fl))\n",
    "\n",
    "# # print(\"psi2s:\", inte_fl)\n",
    "# # print(\"Increase am by factor:\", np.sqrt(pdg[\"psi2s_BR\"]/pdg[\"NR_BR\"]*pdg[\"NR_auc\"]/inte_fl))\n",
    "# # print(\"New amp:\", pdg[\"psi2s\"][3]*np.sqrt(pdg[\"psi2s_BR\"]/pdg[\"NR_BR\"]*pdg[\"NR_auc\"]/inte_fl))\n",
    "\n",
    "# name = \"phi\"\n",
    "\n",
    "# print(name+\":\", inte_fl)\n",
    "# print(\"Increase am by factor:\", np.sqrt(pdg[name+\"_BR\"]/pdg[\"NR_BR\"]*pdg[\"NR_auc\"]/inte_fl))\n",
    "# print(\"New amp:\", pdg[name][0]*np.sqrt(pdg[name+\"_BR\"]/pdg[\"NR_BR\"]*pdg[\"NR_auc\"]/inte_fl))\n",
    "\n",
    "\n",
    "# print(x_min)\n",
    "# print(x_max)\n",
    "# # total_f.update_integration_options(draws_per_dim=2000000, mc_sampler=None)\n",
    "# total_f.update_integration_options(mc_sampler=lambda dim, num_results,\n",
    "#                                     dtype: tf.random_uniform(maxval=1., shape=(num_results, dim), dtype=dtype),\n",
    "#                                    draws_per_dim=1000000)\n",
    "# # _ = []\n",
    "\n",
    "# # for i in range(10):\n",
    "\n",
    "# #     inte = total_f.integrate(limits = (x_min, x_max))\n",
    "# #     inte_fl = zfit.run(inte)\n",
    "# #     print(inte_fl)\n",
    "# #     _.append(inte_fl)\n",
    "\n",
    "# # print(\"mean:\", np.mean(_))\n",
    "\n",
    "# _ = time.time()\n",
    "\n",
    "# inte = total_f.integrate(limits = (x_min, x_max))\n",
    "# inte_fl = zfit.run(inte)\n",
    "# print(inte_fl)\n",
    "# print(\"Time taken: {}\".format(display_time(int(time.time() - _))))\n",
    "\n",
    "# print(pdg['NR_BR']/pdg['NR_auc']*inte_fl)\n",
    "# print(0.25**2*4.2/1000)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Sampling\n",
    "## Mixture distribution for sampling"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "    \n",
    "# print(list_of_borders[:9])\n",
    "# print(list_of_borders[-9:])\n",
    "\n",
    "\n",
    "class UniformSampleAndWeights(zfit.util.execution.SessionHolderMixin):\n",
    "    def __call__(self, limits, dtype, n_to_produce):\n",
    "        # n_to_produce = tf.cast(n_to_produce, dtype=tf.int32)\n",
    "        low, high = limits.limit1d\n",
    "        low = tf.cast(low, dtype=dtype)\n",
    "        high = tf.cast(high, dtype=dtype)\n",
    "#         uniform = tfd.Uniform(low=low, high=high)\n",
    "#         uniformjpsi = tfd.Uniform(low=tf.constant(3080, dtype=dtype), high=tf.constant(3112, dtype=dtype))\n",
    "#         uniformpsi2s = tfd.Uniform(low=tf.constant(3670, dtype=dtype), high=tf.constant(3702, dtype=dtype))\n",
    "\n",
    "#         list_of_borders = []\n",
    "#         _p = []\n",
    "#         splits = 10\n",
    "\n",
    "#         _ = np.linspace(x_min, x_max, splits)\n",
    "\n",
    "#         for i in range(splits):\n",
    "#             list_of_borders.append(tf.constant(_[i], dtype=dtype))\n",
    "#             _p.append(tf.constant(1/splits, dtype=dtype))\n",
    "    \n",
    "#         mixture = tfd.MixtureSameFamily(mixture_distribution=tfd.Categorical(probs=_p[:(splits-1)]),\n",
    "#                                         components_distribution=tfd.Uniform(low=list_of_borders[:(splits-1)], \n",
    "#                                                                             high=list_of_borders[-(splits-1):]))\n",
    "        mixture = tfd.MixtureSameFamily(mixture_distribution=tfd.Categorical(probs=[tf.constant(0.05, dtype=dtype),\n",
    "                                                                                    tf.constant(0.93, dtype=dtype),\n",
    "                                                                                    tf.constant(0.05, dtype=dtype),\n",
    "                                                                                    tf.constant(0.065, dtype=dtype),\n",
    "                                                                                    tf.constant(0.04, dtype=dtype),\n",
    "                                                                                    tf.constant(0.05, dtype=dtype)]),\n",
    "                                        components_distribution=tfd.Uniform(low=[tf.constant(x_min, dtype=dtype), \n",
    "                                                                                 tf.constant(3090, dtype=dtype),\n",
    "                                                                                 tf.constant(3681, dtype=dtype), \n",
    "                                                                                 tf.constant(3070, dtype=dtype),\n",
    "                                                                                 tf.constant(1000, dtype=dtype),\n",
    "                                                                                 tf.constant(3660, dtype=dtype)], \n",
    "                                                                            high=[tf.constant(x_max, dtype=dtype),\n",
    "                                                                                  tf.constant(3102, dtype=dtype), \n",
    "                                                                                  tf.constant(3691, dtype=dtype),\n",
    "                                                                                  tf.constant(3110, dtype=dtype),\n",
    "                                                                                  tf.constant(1040, dtype=dtype),\n",
    "                                                                                  tf.constant(3710, dtype=dtype)]))\n",
    "#         dtype = tf.float64\n",
    "#         mixture = tfd.MixtureSameFamily(mixture_distribution=tfd.Categorical(probs=[tf.constant(0.04, dtype=dtype),\n",
    "#                                                                                     tf.constant(0.90, dtype=dtype),\n",
    "#                                                                                     tf.constant(0.02, dtype=dtype),\n",
    "#                                                                                     tf.constant(0.07, dtype=dtype),\n",
    "#                                                                                     tf.constant(0.02, dtype=dtype)]),\n",
    "#                                         components_distribution=tfd.Uniform(low=[tf.constant(x_min, dtype=dtype), \n",
    "#                                                                                  tf.constant(3089, dtype=dtype),\n",
    "#                                                                                  tf.constant(3103, dtype=dtype), \n",
    "#                                                                                  tf.constant(3681, dtype=dtype),\n",
    "#                                                                                  tf.constant(3691, dtype=dtype)], \n",
    "#                                                                             high=[tf.constant(3089, dtype=dtype),\n",
    "#                                                                                   tf.constant(3103, dtype=dtype), \n",
    "#                                                                                   tf.constant(3681, dtype=dtype),\n",
    "#                                                                                   tf.constant(3691, dtype=dtype), \n",
    "#                                                                                   tf.constant(x_max, dtype=dtype)]))\n",
    "#         mixture = tfd.Uniform(tf.constant(x_min, dtype=dtype), tf.constant(x_max, dtype=dtype))\n",
    "#         sample = tf.random.uniform((n_to_produce, 1), dtype=dtype)\n",
    "        sample = mixture.sample((n_to_produce, 1))\n",
    "#         sample = tf.random.uniform((n_to_produce, 1), dtype=dtype)\n",
    "        weights = mixture.prob(sample)[:,0]\n",
    "#         weights = tf.broadcast_to(tf.constant(1., dtype=dtype), shape=(n_to_produce,))\n",
    "        # sample = tf.expand_dims(sample, axis=-1)\n",
    "#         print(sample, weights)\n",
    "        \n",
    "#         weights = tf.ones(shape=(n_to_produce,), dtype=dtype)\n",
    "        weights_max = None\n",
    "        thresholds = tf.random_uniform(shape=(n_to_produce,), dtype=dtype)\n",
    "        return sample, thresholds, weights, weights_max, n_to_produce"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "# total_f._sample_and_weights = UniformSampleAndWeights"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 0.00133/(0.00133+0.213+0.015)*(x_max-3750)/(x_max-x_min)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "# zfit.settings.set_verbosity(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "# # zfit.run.numeric_checks = False   \n",
    "\n",
    "# nr_of_toys = 1\n",
    "# nevents = int(pdg[\"number_of_decays\"])\n",
    "# nevents = pdg[\"number_of_decays\"]\n",
    "# event_stack = 1000000\n",
    "# # zfit.settings.set_verbosity(10)\n",
    "# calls = int(nevents/event_stack + 1)\n",
    "\n",
    "# total_samp = []\n",
    "\n",
    "# start = time.time()\n",
    "\n",
    "# sampler = total_f.create_sampler(n=event_stack)\n",
    "\n",
    "# for toy in range(nr_of_toys):\n",
    "    \n",
    "#     dirName = 'data/zfit_toys/toy_{0}'.format(toy)\n",
    "    \n",
    "#     if not os.path.exists(dirName):\n",
    "#         os.mkdir(dirName)\n",
    "#         print(\"Directory \" , dirName ,  \" Created \")\n",
    "\n",
    "#     for call in range(calls):\n",
    "\n",
    "#         sampler.resample(n=event_stack)\n",
    "#         s = sampler.unstack_x()\n",
    "#         sam = zfit.run(s)\n",
    "# #         clear_output(wait=True)\n",
    "\n",
    "#         c = call + 1\n",
    "        \n",
    "#         print(\"{0}/{1} of Toy {2}/{3}\".format(c, calls, toy+1, nr_of_toys))\n",
    "#         print(\"Time taken: {}\".format(display_time(int(time.time() - start))))\n",
    "#         print(\"Projected time left: {}\".format(display_time(int((time.time() - start)/(c+calls*(toy))*((nr_of_toys-toy)*calls-c)))))\n",
    "\n",
    "#         with open(\"data/zfit_toys/toy_{0}/{1}.pkl\".format(toy, call), \"wb\") as f:\n",
    "#             pkl.dump(sam, f, pkl.HIGHEST_PROTOCOL)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "# with open(r\"data/zfit_toys/toy_0/0.pkl\", \"rb\") as input_file:\n",
    "#     sam = pkl.load(input_file)\n",
    "# print(sam[:10])\n",
    "\n",
    "# with open(r\"data/zfit_toys/toy_0/1.pkl\", \"rb\") as input_file:\n",
    "#     sam2 = pkl.load(input_file)\n",
    "# print(sam2[:10])\n",
    "\n",
    "# print(np.sum(sam-sam2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# print(\"Time to generate full toy: {} s\".format(int(time.time()-start)))\n",
    "\n",
    "# total_samp = []\n",
    "\n",
    "# for call in range(calls):\n",
    "#     with open(r\"data/zfit_toys/toy_0/{}.pkl\".format(call), \"rb\") as input_file:\n",
    "#         sam = pkl.load(input_file)\n",
    "#         total_samp = np.append(total_samp, sam)\n",
    "\n",
    "# total_samp = total_samp.astype('float64')\n",
    "\n",
    "# data2 = zfit.data.Data.from_numpy(array=total_samp[:int(nevents)], obs=obs)\n",
    "\n",
    "# data3 = zfit.data.Data.from_numpy(array=total_samp, obs=obs)\n",
    "\n",
    "# print(total_samp[:nevents].shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "# plt.clf()\n",
    "\n",
    "# bins = int((x_max-x_min)/7)\n",
    "\n",
    "# # calcs = zfit.run(total_test_tf(samp))\n",
    "# print(total_samp[:nevents].shape)\n",
    "\n",
    "# plt.hist(total_samp[:nevents], bins = bins, range = (x_min,x_max), label = 'data')\n",
    "# # plt.plot(test_q, calcs_test*nevents , label = 'pdf')\n",
    "\n",
    "# # plt.plot(sam, calcs, '.')\n",
    "# # plt.plot(test_q, calcs_test)\n",
    "# # plt.yscale('log')\n",
    "# plt.ylim(0, 200)\n",
    "# # plt.xlim(3080, 3110)\n",
    "\n",
    "# plt.legend()\n",
    "\n",
    "# plt.savefig('test2.png')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "# sampler = total_f.create_sampler(n=nevents)\n",
    "# nll = zfit.loss.UnbinnedNLL(model=total_f, data=sampler, fit_range = (x_min, x_max))\n",
    "\n",
    "# # for param in pdf.get_dependents():\n",
    "# #     param.set_value(initial_value)\n",
    "\n",
    "# sampler.resample(n=nevents)\n",
    "\n",
    "# # Randomise initial values\n",
    "# # for param in pdf.get_dependents():\n",
    "# #     param.set_value(random value here)\n",
    "\n",
    "# # Minimise the NLL\n",
    "# minimizer = zfit.minimize.MinuitMinimizer(verbosity = 10)\n",
    "# minimum = minimizer.minimize(nll)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "# jpsi_width"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "# plt.hist(sample, weights=1 / prob(sample))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Fitting"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "# start = time.time()\n",
    "\n",
    "# for param in total_f.get_dependents():\n",
    "#     param.randomize()\n",
    "    \n",
    "# # for param in total_f.get_dependents():\n",
    "# #     print(zfit.run(param))\n",
    "    \n",
    "# nll = zfit.loss.UnbinnedNLL(model=total_f, data=data2, fit_range = (x_min, x_max))\n",
    "\n",
    "# minimizer = zfit.minimize.MinuitMinimizer(verbosity = 5)\n",
    "# # minimizer._use_tfgrad = False\n",
    "# result = minimizer.minimize(nll)\n",
    "\n",
    "# # param_errors = result.error()\n",
    "\n",
    "# # for var, errors in param_errors.items():\n",
    "# #     print('{}: ^{{+{}}}_{{{}}}'.format(var.name, errors['upper'], errors['lower']))\n",
    "\n",
    "# print(\"Function minimum:\", result.fmin)\n",
    "# # print(\"Results:\", result.params)\n",
    "# print(\"Hesse errors:\", result.hesse())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "# print(\"Time taken for fitting: {}\".format(display_time(int(time.time()-start))))\n",
    "\n",
    "# # probs = total_f.pdf(test_q)\n",
    "\n",
    "# calcs_test = zfit.run(probs)\n",
    "# res_y = zfit.run(jpsi_res(test_q))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "# plt.clf()\n",
    "# # plt.plot(x_part, calcs, '.')\n",
    "# plt.plot(test_q, calcs_test, label = 'pdf')\n",
    "# # plt.plot(test_q, res_y, label = 'res')\n",
    "# plt.legend()\n",
    "# plt.ylim(0.0, 10e-6)\n",
    "# # plt.yscale('log')\n",
    "# # plt.xlim(3080, 3110)\n",
    "# plt.savefig('test3.png')\n",
    "# # print(jpsi_width)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "# _tot = 4.37e-7+6.02e-5+4.97e-6\n",
    "# _probs = []\n",
    "# _probs.append(6.02e-5/_tot)\n",
    "# _probs.append(4.97e-6/_tot)\n",
    "# _probs.append(4.37e-7/_tot)\n",
    "# print(_probs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "# dtype = 'float64'\n",
    "# # mixture = tfd.Uniform(tf.constant(x_min, dtype=dtype), tf.constant(x_max, dtype=dtype))\n",
    "# mixture = tfd.MixtureSameFamily(mixture_distribution=tfd.Categorical(probs=[tf.constant(0.007, dtype=dtype),\n",
    "#                                                                             tf.constant(0.917, dtype=dtype),\n",
    "#                                                                             tf.constant(0.076, dtype=dtype)]),\n",
    "#                                 components_distribution=tfd.Uniform(low=[tf.constant(x_min, dtype=dtype), \n",
    "#                                                                          tf.constant(3080, dtype=dtype),\n",
    "#                                                                          tf.constant(3670, dtype=dtype)], \n",
    "#                                                                     high=[tf.constant(x_max, dtype=dtype),\n",
    "#                                                                           tf.constant(3112, dtype=dtype), \n",
    "#                                                                           tf.constant(3702, dtype=dtype)]))\n",
    "# # for i in range(10):\n",
    "# #     print(zfit.run(mixture.prob(mixture.sample((10, 1)))))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "# print((zfit.run(jpsi_p)%(2*np.pi))/np.pi)\n",
    "# print((zfit.run(psi2s_p)%(2*np.pi))/np.pi)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "#         def jpsi_res(q):\n",
    "#             return resonance(q, _mass = jpsi_mass, scale = jpsi_scale,\n",
    "#                              phase = jpsi_phase, width = jpsi_width)\n",
    "\n",
    "#         def psi2s_res(q):\n",
    "#             return resonance(q, _mass = psi2s_mass, scale = psi2s_scale,\n",
    "#                              phase = psi2s_phase, width = psi2s_width)\n",
    "        \n",
    "#         def p3770_res(q):\n",
    "#             return resonance(q, _mass = p3770_mass, scale = p3770_scale,\n",
    "#                              phase = p3770_phase, width = p3770_width)\n",
    "        \n",
    "#         def p4040_res(q):\n",
    "#             return resonance(q, _mass = p4040_mass, scale = p4040_scale,\n",
    "#                              phase = p4040_phase, width = p4040_width)\n",
    "        \n",
    "#         def p4160_res(q):\n",
    "#             return resonance(q, _mass = p4160_mass, scale = p4160_scale,\n",
    "#                              phase = p4160_phase, width = p4160_width)\n",
    "        \n",
    "#         def p4415_res(q):\n",
    "#             return resonance(q, _mass = p4415_mass, scale = p4415_scale,\n",
    "#                              phase = p4415_phase, width = p4415_width)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 0.15**2*4.2/1000\n",
    "# result.hesse()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Constraints"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1. Constraint - Real part of sum of Psi contrib and D contribs\n",
    "\n",
    "sum_list = []\n",
    "\n",
    "sum_list.append(ztf.to_complex(jpsi_s) * tf.exp(tf.complex(ztf.constant(0.0), jpsi_p)) * ztf.to_complex(jpsi_w / (tf.pow(jpsi_m,3))))\n",
    "sum_list.append(ztf.to_complex(psi2s_s) * tf.exp(tf.complex(ztf.constant(0.0), psi2s_p)) * ztf.to_complex(psi2s_w / (tf.pow(psi2s_m,3))))\n",
    "sum_list.append(ztf.to_complex(p3770_s) * tf.exp(tf.complex(ztf.constant(0.0), p3770_p)) * ztf.to_complex(p3770_w / (tf.pow(p3770_m,3))))\n",
    "sum_list.append(ztf.to_complex(p4040_s) * tf.exp(tf.complex(ztf.constant(0.0), p4040_p)) * ztf.to_complex(p4040_w / (tf.pow(p4040_m,3))))\n",
    "sum_list.append(ztf.to_complex(p4160_s) * tf.exp(tf.complex(ztf.constant(0.0), p4160_p)) * ztf.to_complex(p4160_w / (tf.pow(p4160_m,3))))\n",
    "sum_list.append(ztf.to_complex(p4415_s) * tf.exp(tf.complex(ztf.constant(0.0), p4415_p)) * ztf.to_complex(p4415_w / (tf.pow(p4415_m,3))))\n",
    "sum_list.append(ztf.to_complex(DDstar_s) * tf.exp(tf.complex(ztf.constant(0.0), DDstar_p)) * (ztf.to_complex(1.0 / (10.0*tf.pow(Dstar_m,2)) + 1.0 / (10.0*tf.pow(D_m,2)))))\n",
    "sum_list.append(ztf.to_complex(Dbar_s) * tf.exp(tf.complex(ztf.constant(0.0), Dbar_p)) * ztf.to_complex(1.0 / (6.0*tf.pow(Dbar_m,2))))\n",
    "\n",
    "sum_ru_1 = ztf.to_complex(ztf.constant(0.0))\n",
    "\n",
    "for part in sum_list:\n",
    "    sum_ru_1 += part\n",
    "\n",
    "sum_1 = tf.math.real(sum_ru_1)\n",
    "# constraint1 = zfit.constraint.GaussianConstraint(params = sum_1, mu = ztf.constant(1.7*10**-8), \n",
    "#                                                  sigma = ztf.constant(2.2*10**-8))\n",
    "\n",
    "constraint1 = tf.pow((sum_1-ztf.constant(1.7*10**-8))/ztf.constant(2.2*10**-8),2)/ztf.constant(2.)\n",
    "\n",
    "# 2. Constraint - Abs. of sum of Psi contribs and D contribs\n",
    "\n",
    "sum_2 = tf.abs(sum_ru_1)\n",
    "constraint2 = tf.cond(tf.greater_equal(sum_2, 5.0e-8), lambda: 100000., lambda: 0.)\n",
    "\n",
    "# 3. Constraint - Maximum eta of D contribs\n",
    "\n",
    "constraint3_0 = tf.cond(tf.greater_equal(tf.abs(Dbar_s), 0.2), lambda: 100000., lambda: 0.)\n",
    "\n",
    "constraint3_1 = tf.cond(tf.greater_equal(tf.abs(DDstar_s), 0.2), lambda: 100000., lambda: 0.)\n",
    "\n",
    "# 4. Constraint - Formfactor multivariant gaussian covariance fplus\n",
    "\n",
    "Cov_matrix = [[ztf.constant(   1.), ztf.constant( 0.45), ztf.constant( 0.19), ztf.constant(0.857), ztf.constant(0.598), ztf.constant(0.531), ztf.constant(0.752), ztf.constant(0.229), ztf.constant(0,117)],\n",
    "              [ztf.constant( 0.45), ztf.constant(   1.), ztf.constant(0.677), ztf.constant(0.708), ztf.constant(0.958), ztf.constant(0.927), ztf.constant(0.227), ztf.constant(0.443), ztf.constant(0.287)],\n",
    "              [ztf.constant( 0.19), ztf.constant(0.677), ztf.constant(   1.), ztf.constant(0.595), ztf.constant(0.770), ztf.constant(0.819),ztf.constant(-0.023), ztf.constant( 0.07), ztf.constant(0.196)],\n",
    "              [ztf.constant(0.857), ztf.constant(0.708), ztf.constant(0.595), ztf.constant(   1.), ztf.constant( 0.83), ztf.constant(0.766), ztf.constant(0.582), ztf.constant(0.237), ztf.constant(0.192)],\n",
    "              [ztf.constant(0.598), ztf.constant(0.958), ztf.constant(0.770), ztf.constant( 0.83), ztf.constant(   1.), ztf.constant(0.973), ztf.constant(0.324), ztf.constant(0.372), ztf.constant(0.272)],\n",
    "              [ztf.constant(0.531), ztf.constant(0.927), ztf.constant(0.819), ztf.constant(0.766), ztf.constant(0.973), ztf.constant(   1.), ztf.constant(0.268), ztf.constant(0.332), ztf.constant(0.269)],\n",
    "              [ztf.constant(0.752), ztf.constant(0.227),ztf.constant(-0.023), ztf.constant(0.582), ztf.constant(0.324), ztf.constant(0.268), ztf.constant(   1.), ztf.constant( 0.59), ztf.constant(0.515)],\n",
    "              [ztf.constant(0.229), ztf.constant(0.443), ztf.constant( 0.07), ztf.constant(0.237), ztf.constant(0.372), ztf.constant(0.332), ztf.constant( 0.59), ztf.constant(   1.), ztf.constant(0.897)],\n",
    "              [ztf.constant(0.117), ztf.constant(0.287), ztf.constant(0.196), ztf.constant(0.192), ztf.constant(0.272), ztf.constant(0.269), ztf.constant(0.515), ztf.constant(0.897), ztf.constant(   1.)]]\n",
    "\n",
    "def triGauss(val1,val2,val3,m = Cov_matrix):\n",
    "\n",
    "    mean1 = ztf.constant(0.466)\n",
    "    mean2 = ztf.constant(-0.885)\n",
    "    mean3 = ztf.constant(-0.213)\n",
    "    sigma1 = ztf.constant(0.014)\n",
    "    sigma2 = ztf.constant(0.128)\n",
    "    sigma3 = ztf.constant(0.548)\n",
    "    x1 = (val1-mean1)/sigma1\n",
    "    x2 = (val2-mean2)/sigma2\n",
    "    x3 = (val3-mean3)/sigma3\n",
    "    rho12 = m[0][1]\n",
    "    rho13 = m[0][2]\n",
    "    rho23 = m[1][2]\n",
    "    w = x1*x1*(rho23*rho23-1) + x2*x2*(rho13*rho13-1)+x3*x3*(rho12*rho12-1)+2*(x1*x2*(rho12-rho13*rho23)+x1*x3*(rho13-rho12*rho23)+x2*x3*(rho23-rho12*rho13))\n",
    "    d = 2*(rho12*rho12+rho13*rho13+rho23*rho23-2*rho12*rho13*rho23-1)\n",
    "    \n",
    "    fcn = -w/d\n",
    "    chisq = -2*fcn\n",
    "    return chisq\n",
    "\n",
    "constraint4 = triGauss(bplus_0, bplus_1, bplus_2)\n",
    "\n",
    "# mean1 = ztf.constant(0.466)\n",
    "# mean2 = ztf.constant(-0.885)\n",
    "# mean3 = ztf.constant(-0.213)\n",
    "# sigma1 = ztf.constant(0.014)\n",
    "# sigma2 = ztf.constant(0.128)\n",
    "# sigma3 = ztf.constant(0.548)\n",
    "# constraint4_0 = tf.pow((bplus_0-mean1)/sigma1,2)/ztf.constant(2.)\n",
    "# constraint4_1 = tf.pow((bplus_1-mean2)/sigma2,2)/ztf.constant(2.)\n",
    "# constraint4_2 = tf.pow((bplus_2-mean3)/sigma3,2)/ztf.constant(2.)\n",
    "\n",
    "# 5. Constraint - Abs. of sum of light contribs\n",
    "\n",
    "sum_list_5 = []\n",
    "\n",
    "sum_list_5.append(rho_s*rho_w/rho_m)\n",
    "sum_list_5.append(omega_s*omega_w/omega_m)\n",
    "sum_list_5.append(phi_s*phi_w/phi_m)\n",
    "\n",
    "\n",
    "sum_ru_5 = ztf.constant(0.0)\n",
    "\n",
    "for part in sum_list_5:\n",
    "    sum_ru_5 += part\n",
    "\n",
    "constraint5 = tf.cond(tf.greater_equal(tf.abs(sum_ru_5), ztf.constant(0.02)), lambda: 100000., lambda: 0.)\n",
    "\n",
    "# 6. Constraint on phases of Jpsi and Psi2s for cut out fit\n",
    "\n",
    "\n",
    "# constraint6_0 = zfit.constraint.GaussianConstraint(params = jpsi_p, mu = ztf.constant(pdg[\"jpsi_phase_unc\"]),\n",
    "#                                                    sigma = ztf.constant(jpsi_phase))\n",
    "# constraint6_1 = zfit.constraint.GaussianConstraint(params = psi2s_p, mu = ztf.constant(pdg[\"psi2s_phase_unc\"]),\n",
    "#                                                    sigma = ztf.constant(psi2s_phase))\n",
    "\n",
    "constraint6_0  =  tf.pow((jpsi_p-ztf.constant(jpsi_phase))/ztf.constant(pdg[\"jpsi_phase_unc\"]),2)/ztf.constant(2.)\n",
    "constraint6_1  =  tf.pow((psi2s_p-ztf.constant(psi2s_phase))/ztf.constant(pdg[\"psi2s_phase_unc\"]),2)/ztf.constant(2.)\n",
    "\n",
    "# 7. Constraint on Ctt with higher limits\n",
    "\n",
    "constraint7 = tf.cond(tf.greater_equal(Ctt*Ctt, 0.25), lambda: 100000., lambda: 0.)\n",
    "\n",
    "constraint7dtype = tf.float64\n",
    "\n",
    "# zfit.run(constraint6_0)\n",
    "\n",
    "# ztf.convert_to_tensor(constraint6_0)\n",
    "\n",
    "#List of all constraints\n",
    "\n",
    "constraints = [constraint1, constraint2, constraint3_0, constraint3_1,# constraint4, #constraint4_0, constraint4_1, constraint4_2,\n",
    "               constraint6_0, constraint6_1]#, constraint7]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Reset params"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "def reset_param_values():   \n",
    "    jpsi_m.set_value(jpsi_mass)\n",
    "    jpsi_s.set_value(jpsi_scale)\n",
    "    jpsi_p.set_value(jpsi_phase)\n",
    "    jpsi_w.set_value(jpsi_width)\n",
    "    psi2s_m.set_value(psi2s_mass)\n",
    "    psi2s_s.set_value(psi2s_scale)\n",
    "    psi2s_p.set_value(psi2s_phase)\n",
    "    psi2s_w.set_value(psi2s_width)\n",
    "    p3770_m.set_value(p3770_mass)\n",
    "    p3770_s.set_value(p3770_scale)\n",
    "    p3770_p.set_value(p3770_phase)\n",
    "    p3770_w.set_value(p3770_width)\n",
    "    p4040_m.set_value(p4040_mass)\n",
    "    p4040_s.set_value(p4040_scale)\n",
    "    p4040_p.set_value(p4040_phase)\n",
    "    p4040_w.set_value(p4040_width)\n",
    "    p4160_m.set_value(p4160_mass)\n",
    "    p4160_s.set_value(p4160_scale)\n",
    "    p4160_p.set_value(p4160_phase)\n",
    "    p4160_w.set_value(p4160_width)\n",
    "    p4415_m.set_value(p4415_mass)\n",
    "    p4415_s.set_value(p4415_scale)\n",
    "    p4415_p.set_value(p4415_phase)\n",
    "    p4415_w.set_value(p4415_width)\n",
    "    rho_m.set_value(rho_mass)\n",
    "    rho_s.set_value(rho_scale)\n",
    "    rho_p.set_value(rho_phase)\n",
    "    rho_w.set_value(rho_width)\n",
    "    omega_m.set_value(omega_mass)\n",
    "    omega_s.set_value(omega_scale)\n",
    "    omega_p.set_value(omega_phase)\n",
    "    omega_w.set_value(omega_width)\n",
    "    phi_m.set_value(phi_mass)\n",
    "    phi_s.set_value(phi_scale)\n",
    "    phi_p.set_value(phi_phase)\n",
    "    phi_w.set_value(phi_width)\n",
    "    Dstar_m.set_value(Dstar_mass)\n",
    "    DDstar_s.set_value(0.0)\n",
    "    DDstar_p.set_value(0.0)\n",
    "    D_m.set_value(D_mass)\n",
    "    Dbar_m.set_value(Dbar_mass)\n",
    "    Dbar_s.set_value(0.0)\n",
    "    Dbar_p.set_value(0.0)\n",
    "    tau_m.set_value(pdg['tau_M'])\n",
    "    Ctt.set_value(0.0)\n",
    "    b0_0.set_value(0.292)\n",
    "    b0_1.set_value(0.281)\n",
    "    b0_2.set_value(0.150)\n",
    "    bplus_0.set_value(0.466)\n",
    "    bplus_1.set_value(-0.885)\n",
    "    bplus_2.set_value(-0.213)\n",
    "    bT_0.set_value(0.460)\n",
    "    bT_1.set_value(-1.089)\n",
    "    bT_2.set_value(-1.114)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Analysis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From C:\\Users\\sa_li\\.conda\\envs\\rmd\\lib\\site-packages\\zfit\\core\\sample.py:163: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use tf.cast instead.\n",
      "Toy 0: Generating data...\n",
      "Toy 0: Data generation finished\n",
      "Toy 0: Loading data...\n",
      "Toy 0: Loading data finished\n",
      "Toy 0: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.977E+05               |    Ncalls=1160 (1160 total)    |\n",
      "| EDM = 7.03E-05 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297698.8532113871\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |   -0.4    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    8.1    |    1.8    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |    0.7    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |    0.7    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   18.7    |    1.5    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |   1.70    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |   1.711   |   0.023   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   -5.7    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.52    |   0.14    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   -3.20   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   -2.68   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.39    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |  -0.300   |   0.022   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   3.28    |   0.15    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   -1.40   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   1.94    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |  -0.300   |   0.017   |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   2.13    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   4.02    |   0.10    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.16    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |   -1.19   |    0.27   |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000    0.085    0.030    0.181   -0.178    0.033    0.061   -0.248   -0.133   -0.032    0.009   -0.016   -0.001    0.013    0.128   -0.009   -0.004   -0.002    0.007   -0.006    0.030 |\n",
      "|  omega_s |    0.085    1.000    0.881    0.036   -0.017   -0.003   -0.033   -0.071    0.005   -0.006   -0.004    0.001   -0.000   -0.006   -0.001   -0.005   -0.000   -0.000   -0.007    0.002    0.000 |\n",
      "|  omega_p |    0.030    0.881    1.000    0.299    0.028   -0.004   -0.033   -0.006    0.007   -0.006   -0.005    0.001   -0.000   -0.007   -0.002   -0.005   -0.000   -0.002   -0.007    0.002    0.000 |\n",
      "|    rho_s |    0.181    0.036    0.299    1.000   -0.008   -0.004   -0.011    0.017   -0.003   -0.009   -0.004   -0.006    0.001   -0.007    0.010    0.001    0.000   -0.008   -0.002   -0.002    0.009 |\n",
      "|    phi_s |   -0.178   -0.017    0.028   -0.008    1.000   -0.021   -0.076    0.857    0.075    0.008   -0.010    0.009    0.000   -0.015   -0.067   -0.002    0.002   -0.001   -0.013    0.005   -0.015 |\n",
      "|  p3770_s |    0.033   -0.003   -0.004   -0.004   -0.021    1.000    0.048   -0.016    0.035   -0.383   -0.036    0.054   -0.011   -0.093    0.035   -0.253   -0.008    0.048   -0.137    0.186    0.166 |\n",
      "|   jpsi_p |    0.061   -0.033   -0.033   -0.011   -0.076    0.048    1.000   -0.059   -0.399    0.012   -0.023   -0.096   -0.053   -0.036    0.224   -0.005   -0.046   -0.111    0.070   -0.047   -0.145 |\n",
      "|    phi_p |   -0.248   -0.071   -0.006    0.017    0.857   -0.016   -0.059    1.000    0.057    0.007   -0.008    0.008   -0.000   -0.011   -0.052   -0.003    0.001    0.001   -0.010    0.005   -0.014 |\n",
      "|      Ctt |   -0.133    0.005    0.007   -0.003    0.075    0.035   -0.399    0.057    1.000   -0.297   -0.071    0.336    0.006   -0.124   -0.137    0.305   -0.004    0.291   -0.437    0.418    0.439 |\n",
      "|  p3770_p |   -0.032   -0.006   -0.006   -0.009    0.008   -0.383    0.012    0.007   -0.297    1.000    0.043   -0.127   -0.024    0.103   -0.061   -0.213   -0.035   -0.095    0.195   -0.150   -0.165 |\n",
      "|  p4415_p |    0.009   -0.004   -0.005   -0.004   -0.010   -0.036   -0.023   -0.008   -0.071    0.043    1.000   -0.196   -0.034    0.067    0.067   -0.098   -0.016   -0.106    0.262   -0.204    0.071 |\n",
      "|  p4415_s |   -0.016    0.001    0.001   -0.006    0.009    0.054   -0.096    0.008    0.336   -0.127   -0.196    1.000    0.014    0.082    0.252    0.076    0.006    0.372   -0.145    0.189    0.004 |\n",
      "| DDstar_s |   -0.001   -0.000   -0.000    0.001    0.000   -0.011   -0.053   -0.000    0.006   -0.024   -0.034    0.014    1.000   -0.034    0.022   -0.023   -0.002    0.003   -0.053    0.013   -0.011 |\n",
      "|  p4040_p |    0.013   -0.006   -0.007   -0.007   -0.015   -0.093   -0.036   -0.011   -0.124    0.103    0.067    0.082   -0.034    1.000    0.011   -0.226   -0.024    0.328   -0.045   -0.219    0.111 |\n",
      "| DDstar_p |    0.128   -0.001   -0.002    0.010   -0.067    0.035    0.224   -0.052   -0.137   -0.061    0.067    0.252    0.022    0.011    1.000    0.072   -0.011    0.237   -0.210    0.238   -0.665 |\n",
      "|  psi2s_p |   -0.009   -0.005   -0.005    0.001   -0.002   -0.253   -0.005   -0.003    0.305   -0.213   -0.098    0.076   -0.023   -0.226    0.072    1.000   -0.024   -0.030   -0.184    0.145    0.054 |\n",
      "|   Dbar_s |   -0.004   -0.000   -0.000    0.000    0.002   -0.008   -0.046    0.001   -0.004   -0.035   -0.016    0.006   -0.002   -0.024   -0.011   -0.024    1.000    0.005   -0.032    0.012    0.015 |\n",
      "|  p4160_s |   -0.002   -0.000   -0.002   -0.008   -0.001    0.048   -0.111    0.001    0.291   -0.095   -0.106    0.372    0.003    0.328    0.237   -0.030    0.005    1.000   -0.245   -0.049    0.121 |\n",
      "|  p4160_p |    0.007   -0.007   -0.007   -0.002   -0.013   -0.137    0.070   -0.010   -0.437    0.195    0.262   -0.145   -0.053   -0.045   -0.210   -0.184   -0.032   -0.245    1.000   -0.530    0.000 |\n",
      "|  p4040_s |   -0.006    0.002    0.002   -0.002    0.005    0.186   -0.047    0.005    0.418   -0.150   -0.204    0.189    0.013   -0.219    0.238    0.145    0.012   -0.049   -0.530    1.000    0.029 |\n",
      "|   Dbar_p |    0.030    0.000    0.000    0.009   -0.015    0.166   -0.145   -0.014    0.439   -0.165    0.071    0.004   -0.011    0.111   -0.665    0.054    0.015    0.121    0.000    0.029    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.4837472298559913}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.8230423175976291}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.452729301427385}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.31705121493663646}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.4871082055111255}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2631626205737271}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.023395072427270236}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.34291663689305096}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1382524227983245}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.15454495067808272}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.14765622133701495}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19125316798637082}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.02194924057582351}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.14881866482336825}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.2284167183553456}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.0322565248156339}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.017151566032725857}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17088081601709282}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10376333863688103}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18592794223223952}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.2744720989913345})])\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\sa_li\\.conda\\envs\\rmd\\lib\\site-packages\\ipykernel_launcher.py:196: UserWarning: Creating legend with loc=\"best\" can be slow with large amounts of data.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 1/10\n",
      "Time taken: 1 min, 56 s\n",
      "Projected time left: 17 min, 24 s\n",
      "Toy 1: Generating data...\n",
      "Toy 1: Data generation finished\n",
      "Toy 1: Loading data...\n",
      "Toy 1: Loading data finished\n",
      "Toy 1: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.978E+05               |    Ncalls=1005 (1005 total)    |\n",
      "| EDM = 6.22E-05 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297771.1911008895\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |   -6.28   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    9.1    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |   1.19    |   0.25    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |    1.5    |    0.4    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   16.6    |    1.1    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |   2.06    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |  -4.579   |   0.024   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   -0.29   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.64    |   0.13    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   -3.41   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   3.53    |   0.15    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.30    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |   0.300   |   0.027   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   -3.20   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   -4.49   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   1.97    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |   0.300   |   0.023   |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   2.26    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   3.94    |   0.10    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.46    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |   2.05    |   0.30    |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000   -0.014   -0.044    0.036    0.035    0.005    0.008    0.025   -0.025   -0.006    0.001   -0.002   -0.000    0.001    0.024   -0.002   -0.001    0.001   -0.001   -0.001    0.003 |\n",
      "|  omega_s |   -0.014    1.000    0.444    0.092   -0.002   -0.007   -0.028   -0.024    0.028    0.001   -0.004    0.002    0.000   -0.006   -0.024   -0.001    0.001   -0.002   -0.003    0.002   -0.003 |\n",
      "|  omega_p |   -0.044    0.444    1.000    0.668    0.035   -0.002   -0.016    0.040    0.002   -0.007   -0.003   -0.002   -0.000   -0.006    0.003   -0.001   -0.000   -0.004   -0.004    0.000    0.002 |\n",
      "|    rho_s |    0.036    0.092    0.668    1.000    0.046   -0.004   -0.019    0.031    0.000   -0.013   -0.005   -0.004    0.001   -0.010    0.007    0.000    0.001   -0.007   -0.005   -0.001    0.009 |\n",
      "|    phi_s |    0.035   -0.002    0.035    0.046    1.000   -0.012   -0.050    0.692    0.043   -0.003   -0.007    0.001    0.001   -0.012   -0.034   -0.001    0.002   -0.005   -0.007    0.003   -0.001 |\n",
      "|  p3770_s |    0.005   -0.007   -0.002   -0.004   -0.012    1.000    0.033   -0.001    0.067   -0.354   -0.036    0.059   -0.010   -0.094    0.018   -0.185   -0.006    0.055   -0.149    0.180    0.157 |\n",
      "|   jpsi_p |    0.008   -0.028   -0.016   -0.019   -0.050    0.033    1.000   -0.020   -0.416    0.042   -0.036   -0.084   -0.060   -0.043    0.254    0.001   -0.058   -0.115    0.063   -0.024   -0.206 |\n",
      "|    phi_p |    0.025   -0.024    0.040    0.031    0.692   -0.001   -0.020    1.000   -0.004   -0.009   -0.003   -0.001   -0.001   -0.006    0.009   -0.003   -0.001   -0.002   -0.005    0.001    0.002 |\n",
      "|      Ctt |   -0.025    0.028    0.002    0.000    0.043    0.067   -0.416   -0.004    1.000   -0.321   -0.042    0.320    0.004   -0.089   -0.159    0.286   -0.011    0.305   -0.429    0.381    0.447 |\n",
      "|  p3770_p |   -0.006    0.001   -0.007   -0.013   -0.003   -0.354    0.042   -0.009   -0.321    1.000    0.017   -0.117   -0.034    0.068   -0.002   -0.255   -0.053   -0.107    0.171   -0.098   -0.191 |\n",
      "|  p4415_p |    0.001   -0.004   -0.003   -0.005   -0.007   -0.036   -0.036   -0.003   -0.042    0.017    1.000   -0.171   -0.038    0.031    0.085   -0.093   -0.021   -0.098    0.235   -0.186    0.059 |\n",
      "|  p4415_s |   -0.002    0.002   -0.002   -0.004    0.001    0.059   -0.084   -0.001    0.320   -0.117   -0.171    1.000    0.015    0.099    0.252    0.073    0.007    0.376   -0.142    0.153   -0.016 |\n",
      "| DDstar_s |   -0.000    0.000   -0.000    0.001    0.001   -0.010   -0.060   -0.001    0.004   -0.034   -0.038    0.015    1.000   -0.046    0.032   -0.027   -0.002    0.003   -0.064    0.015   -0.014 |\n",
      "|  p4040_p |    0.001   -0.006   -0.006   -0.010   -0.012   -0.094   -0.043   -0.006   -0.089    0.068    0.031    0.099   -0.046    1.000    0.045   -0.218   -0.036    0.311   -0.111   -0.235    0.081 |\n",
      "| DDstar_p |    0.024   -0.024    0.003    0.007   -0.034    0.018    0.254    0.009   -0.159   -0.002    0.085    0.252    0.032    0.045    1.000    0.089   -0.009    0.236   -0.193    0.210   -0.720 |\n",
      "|  psi2s_p |   -0.002   -0.001   -0.001    0.000   -0.001   -0.185    0.001   -0.003    0.286   -0.255   -0.093    0.073   -0.027   -0.218    0.089    1.000   -0.032   -0.030   -0.182    0.166    0.015 |\n",
      "|   Dbar_s |   -0.001    0.001   -0.000    0.001    0.002   -0.006   -0.058   -0.001   -0.011   -0.053   -0.021    0.007   -0.002   -0.036   -0.009   -0.032    1.000    0.005   -0.044    0.016    0.022 |\n",
      "|  p4160_s |    0.001   -0.002   -0.004   -0.007   -0.005    0.055   -0.115   -0.002    0.305   -0.107   -0.098    0.376    0.003    0.311    0.236   -0.030    0.005    1.000   -0.273   -0.090    0.110 |\n",
      "|  p4160_p |   -0.001   -0.003   -0.004   -0.005   -0.007   -0.149    0.063   -0.005   -0.429    0.171    0.235   -0.142   -0.064   -0.111   -0.193   -0.182   -0.044   -0.273    1.000   -0.489   -0.010 |\n",
      "|  p4040_s |   -0.001    0.002    0.000   -0.001    0.003    0.180   -0.024    0.001    0.381   -0.098   -0.186    0.153    0.015   -0.235    0.210    0.166    0.016   -0.090   -0.489    1.000   -0.010 |\n",
      "|   Dbar_p |    0.003   -0.003    0.002    0.009   -0.001    0.157   -0.206    0.002    0.447   -0.191    0.059   -0.016   -0.014    0.081   -0.720    0.015    0.022    0.110   -0.010   -0.010    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.12714020334238896}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.9110103885391752}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2460069060649248}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3563319128397502}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.0772374995228464}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25935040803259213}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.02373819154920831}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.24601393087014545}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1346308082213049}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1232910506439493}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.15494883031381956}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19229245139061413}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.026888783503803526}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.11733959684499085}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.24494151750819793}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03223014448246175}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.02301682578992814}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17218414806610172}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.0965882723114424}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18228913672392133}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.3036868434218727})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 2/10\n",
      "Time taken: 3 min, 31 s\n",
      "Projected time left: 14 min\n",
      "Toy 2: Generating data...\n",
      "Toy 2: Data generation finished\n",
      "Toy 2: Loading data...\n",
      "Toy 2: Loading data finished\n",
      "Toy 2: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.979E+05               |    Ncalls=1132 (1132 total)    |\n",
      "| EDM = 7.59E-06 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297868.2298033267\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |   -0.6    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    6.9    |    1.1    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |   0.15    |   0.28    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |   1.15    |   0.29    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   19.7    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |   1.97    |   0.27    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |   1.670   |   0.024   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   0.77    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.66    |   0.14    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   -3.47   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   -2.43   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.28    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |   -0.30   |    0.04   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   3.22    |   0.15    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   4.91    |   0.25    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   2.00    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |   0.300   |   0.027   |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   2.18    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   -2.46   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.18    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |   1.99    |   0.31    |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000    0.140   -0.046    0.153   -0.118    0.028    0.053   -0.244   -0.125   -0.029    0.010   -0.010   -0.001    0.012    0.120   -0.007   -0.005   -0.000    0.001   -0.004    0.030 |\n",
      "|  omega_s |    0.140    1.000    0.600   -0.369   -0.028    0.006   -0.000   -0.124   -0.027   -0.008    0.001   -0.001   -0.001    0.001    0.026   -0.004   -0.001    0.001   -0.002    0.000    0.005 |\n",
      "|  omega_p |   -0.046    0.600    1.000    0.006    0.006    0.003   -0.002   -0.036   -0.015   -0.005    0.000   -0.001   -0.001    0.000    0.015   -0.003   -0.001    0.000   -0.002    0.000    0.002 |\n",
      "|    rho_s |    0.153   -0.369    0.006    1.000    0.004   -0.009   -0.023    0.093    0.029   -0.003   -0.005   -0.004    0.001   -0.010   -0.022    0.004    0.002   -0.008   -0.003   -0.001    0.003 |\n",
      "|    phi_s |   -0.118   -0.028    0.006    0.004    1.000   -0.018   -0.062    0.583    0.073    0.006   -0.010    0.003    0.001   -0.015   -0.065    0.000    0.003   -0.003   -0.008    0.003   -0.012 |\n",
      "|  p3770_s |    0.028    0.006    0.003   -0.009   -0.018    1.000    0.032   -0.012    0.103   -0.353   -0.052    0.064   -0.011   -0.103    0.016   -0.142   -0.002    0.068   -0.155    0.186    0.168 |\n",
      "|   jpsi_p |    0.053   -0.000   -0.002   -0.023   -0.062    0.032    1.000   -0.037   -0.404    0.036   -0.006   -0.104   -0.088   -0.045    0.240   -0.007   -0.067   -0.109    0.051   -0.035   -0.180 |\n",
      "|    phi_p |   -0.244   -0.124   -0.036    0.093    0.583   -0.012   -0.037    1.000    0.050    0.009   -0.006    0.004   -0.001   -0.008   -0.047   -0.000    0.001   -0.001   -0.004    0.002   -0.014 |\n",
      "|      Ctt |   -0.125   -0.027   -0.015    0.029    0.073    0.103   -0.404    0.050    1.000   -0.308   -0.118    0.327    0.008   -0.090   -0.191    0.301   -0.006    0.318   -0.388    0.390    0.462 |\n",
      "|  p3770_p |   -0.029   -0.008   -0.005   -0.003    0.006   -0.353    0.036    0.009   -0.308    1.000    0.050   -0.122   -0.052    0.064   -0.022   -0.276   -0.062   -0.104    0.156   -0.097   -0.150 |\n",
      "|  p4415_p |    0.010    0.001    0.000   -0.005   -0.010   -0.052   -0.006   -0.006   -0.118    0.050    1.000   -0.140   -0.059    0.037    0.000   -0.103   -0.024   -0.207    0.258   -0.224    0.076 |\n",
      "|  p4415_s |   -0.010   -0.001   -0.001   -0.004    0.003    0.064   -0.104    0.004    0.327   -0.122   -0.140    1.000    0.021    0.101    0.276    0.057    0.008    0.333   -0.054    0.137    0.008 |\n",
      "| DDstar_s |   -0.001   -0.001   -0.001    0.001    0.001   -0.011   -0.088   -0.001    0.008   -0.052   -0.059    0.021    1.000   -0.058    0.042   -0.038   -0.004    0.007   -0.093    0.022   -0.019 |\n",
      "|  p4040_p |    0.012    0.001    0.000   -0.010   -0.015   -0.103   -0.045   -0.008   -0.090    0.064    0.037    0.101   -0.058    1.000    0.004   -0.218   -0.034    0.348   -0.032   -0.220    0.126 |\n",
      "| DDstar_p |    0.120    0.026    0.015   -0.022   -0.065    0.016    0.240   -0.047   -0.191   -0.022    0.000    0.276    0.042    0.004    1.000    0.067   -0.016    0.235   -0.187    0.228   -0.724 |\n",
      "|  psi2s_p |   -0.007   -0.004   -0.003    0.004    0.000   -0.142   -0.007   -0.000    0.301   -0.276   -0.103    0.057   -0.038   -0.218    0.067    1.000   -0.034   -0.007   -0.188    0.155    0.045 |\n",
      "|   Dbar_s |   -0.005   -0.001   -0.001    0.002    0.003   -0.002   -0.067    0.001   -0.006   -0.062   -0.024    0.008   -0.004   -0.034   -0.016   -0.034    1.000    0.008   -0.049    0.019    0.027 |\n",
      "|  p4160_s |   -0.000    0.001    0.000   -0.008   -0.003    0.068   -0.109   -0.001    0.318   -0.104   -0.207    0.333    0.007    0.348    0.235   -0.007    0.008    1.000   -0.272   -0.004    0.099 |\n",
      "|  p4160_p |    0.001   -0.002   -0.002   -0.003   -0.008   -0.155    0.051   -0.004   -0.388    0.156    0.258   -0.054   -0.093   -0.032   -0.187   -0.188   -0.049   -0.272    1.000   -0.533    0.031 |\n",
      "|  p4040_s |   -0.004    0.000    0.000   -0.001    0.003    0.186   -0.035    0.002    0.390   -0.097   -0.224    0.137    0.022   -0.220    0.228    0.155    0.019   -0.004   -0.533    1.000   -0.006 |\n",
      "|   Dbar_p |    0.030    0.005    0.002    0.003   -0.012    0.168   -0.180   -0.014    0.462   -0.150    0.076    0.008   -0.019    0.126   -0.724    0.045    0.027    0.099    0.031   -0.006    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.3192089338950037}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.137685506959543}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2846998997007937}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.29214974737534866}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9819225623644812}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2690738235920809}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.023671555100508446}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.17813011578819848}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.13852949875331488}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12504677307460277}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.16104954289529805}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18758340988883737}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.0380684391866056}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.14737125993810363}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.25487217509592686}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03241349374817748}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.026694730912351528}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1757761529731341}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.09900060329444083}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18453556087558376}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.31499935605380003})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 3/10\n",
      "Time taken: 5 min, 14 s\n",
      "Projected time left: 12 min, 8 s\n",
      "Toy 3: Generating data...\n",
      "Toy 3: Data generation finished\n",
      "Toy 3: Loading data...\n",
      "Toy 3: Loading data finished\n",
      "Toy 3: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.978E+05               |    Ncalls=1108 (1108 total)    |\n",
      "| EDM = 5.81E-05 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297821.0954135446\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |    6.3    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    6.1    |    1.1    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |   -0.14   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |    0.6    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   16.0    |    1.1    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |   2.06    |   0.27    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |  -4.565   |   0.024   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   6.08    |   0.25    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.44    |   0.14    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   -3.50   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   -2.49   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.12    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |   0.300   |   0.028   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   -2.74   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   -4.52   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   1.97    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |  -0.300   |   0.023   |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   2.00    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   -2.35   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.29    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |   -1.06   |    0.31   |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000   -0.095    0.016   -0.203   -0.063   -0.011   -0.022   -0.044    0.054    0.012   -0.004    0.004    0.000   -0.004   -0.051    0.003    0.002    0.000   -0.002   -0.000   -0.006 |\n",
      "|  omega_s |   -0.095    1.000    0.622   -0.321   -0.000   -0.005   -0.023   -0.029    0.022    0.001   -0.003    0.002   -0.000   -0.005   -0.019   -0.001    0.001    0.000   -0.004    0.001   -0.002 |\n",
      "|  omega_p |    0.016    0.622    1.000   -0.135    0.040    0.002   -0.003    0.023   -0.013   -0.005    0.000   -0.001   -0.000   -0.001    0.014   -0.002   -0.001    0.000   -0.001    0.001   -0.000 |\n",
      "|    rho_s |   -0.203   -0.321   -0.135    1.000    0.069    0.008    0.018    0.060   -0.047   -0.018    0.002   -0.009    0.001   -0.001    0.050    0.001   -0.001   -0.006    0.002   -0.003    0.014 |\n",
      "|    phi_s |   -0.063   -0.000    0.040    0.069    1.000   -0.009   -0.047    0.686    0.038   -0.005   -0.007    0.001    0.000   -0.011   -0.029   -0.002    0.001   -0.004   -0.008   -0.000    0.002 |\n",
      "|  p3770_s |   -0.011   -0.005    0.002    0.008   -0.009    1.000    0.026    0.001    0.098   -0.381   -0.054    0.070   -0.008   -0.168    0.031   -0.140   -0.003    0.065   -0.165    0.179    0.155 |\n",
      "|   jpsi_p |   -0.022   -0.023   -0.003    0.018   -0.047    0.026    1.000   -0.016   -0.433    0.066   -0.006   -0.104   -0.061   -0.005    0.283   -0.003   -0.058   -0.118    0.075   -0.073   -0.244 |\n",
      "|    phi_p |   -0.044   -0.029    0.023    0.060    0.686    0.001   -0.016    1.000   -0.009   -0.009   -0.002   -0.002   -0.000   -0.004    0.013   -0.003   -0.001   -0.002   -0.004    0.000    0.002 |\n",
      "|      Ctt |    0.054    0.022   -0.013   -0.047    0.038    0.098   -0.433   -0.009    1.000   -0.345   -0.124    0.348    0.003   -0.272   -0.147    0.292   -0.012    0.318   -0.448    0.437    0.440 |\n",
      "|  p3770_p |    0.012    0.001   -0.005   -0.018   -0.005   -0.381    0.066   -0.009   -0.345    1.000    0.044   -0.134   -0.037    0.108    0.018   -0.267   -0.056   -0.120    0.174   -0.122   -0.219 |\n",
      "|  p4415_p |   -0.004   -0.003    0.000    0.002   -0.007   -0.054   -0.006   -0.002   -0.124    0.044    1.000   -0.166   -0.038    0.100    0.034   -0.105   -0.020   -0.183    0.261   -0.213    0.047 |\n",
      "|  p4415_s |    0.004    0.002   -0.001   -0.009    0.001    0.070   -0.104   -0.002    0.348   -0.134   -0.166    1.000    0.017    0.012    0.278    0.073    0.007    0.362   -0.101    0.222    0.005 |\n",
      "| DDstar_s |    0.000   -0.000   -0.000    0.001    0.000   -0.008   -0.061   -0.000    0.003   -0.037   -0.038    0.017    1.000   -0.047    0.033   -0.027   -0.003    0.006   -0.063    0.013   -0.019 |\n",
      "|  p4040_p |   -0.004   -0.005   -0.001   -0.001   -0.011   -0.168   -0.005   -0.004   -0.272    0.108    0.100    0.012   -0.047    1.000   -0.042   -0.255   -0.038    0.278    0.133   -0.285    0.047 |\n",
      "| DDstar_p |   -0.051   -0.019    0.014    0.050   -0.029    0.031    0.283    0.013   -0.147    0.018    0.034    0.278    0.033   -0.042    1.000    0.104   -0.006    0.243   -0.171    0.244   -0.721 |\n",
      "|  psi2s_p |    0.003   -0.001   -0.002    0.001   -0.002   -0.140   -0.003   -0.003    0.292   -0.267   -0.105    0.073   -0.027   -0.255    0.104    1.000   -0.033   -0.009   -0.196    0.111    0.016 |\n",
      "|   Dbar_s |    0.002    0.001   -0.001   -0.001    0.001   -0.003   -0.058   -0.001   -0.012   -0.056   -0.020    0.007   -0.003   -0.038   -0.006   -0.033    1.000    0.006   -0.042    0.015    0.021 |\n",
      "|  p4160_s |    0.000    0.000    0.000   -0.006   -0.004    0.065   -0.118   -0.002    0.318   -0.120   -0.183    0.362    0.006    0.278    0.243   -0.009    0.006    1.000   -0.279    0.112    0.101 |\n",
      "|  p4160_p |   -0.002   -0.004   -0.001    0.002   -0.008   -0.165    0.075   -0.004   -0.448    0.174    0.261   -0.101   -0.063    0.133   -0.171   -0.196   -0.042   -0.279    1.000   -0.579   -0.022 |\n",
      "|  p4040_s |   -0.000    0.001    0.001   -0.003   -0.000    0.179   -0.073    0.000    0.437   -0.122   -0.213    0.222    0.013   -0.285    0.244    0.111    0.015    0.112   -0.579    1.000    0.066 |\n",
      "|   Dbar_p |   -0.006   -0.002   -0.000    0.014    0.002    0.155   -0.244    0.002    0.440   -0.219    0.047    0.005   -0.019    0.047   -0.721    0.016    0.021    0.101   -0.022    0.066    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.5253488076410386}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.0743625512789028}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.29737019163662826}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.32988167051897904}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.054141274608022}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2699310999673744}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.024080721050292464}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2515079933112867}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.14067675303626526}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12281932100448989}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.1812502673680072}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19350066864116627}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.027745812242241708}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.1400363699842424}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.24980753440385461}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03262849021570613}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.022641162303397938}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1743659152126219}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10974552439331475}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18158799997476216}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.30785393602108835})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 4/10\n",
      "Time taken: 7 min, 3 s\n",
      "Projected time left: 10 min, 30 s\n",
      "Toy 4: Generating data...\n",
      "Toy 4: Data generation finished\n",
      "Toy 4: Loading data...\n",
      "Toy 4: Loading data finished\n",
      "Toy 4: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.978E+05               |     Ncalls=651 (651 total)     |\n",
      "| EDM = 0.000236 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297789.2074864934\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |   -6.28   |    0.08   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    6.9    |    1.0    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |  -0.007   |   0.272   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |    1.5    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   18.6    |    2.7    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |   2.10    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |   1.697   |   0.024   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   0.29    |   0.75    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.46    |   0.14    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   -3.24   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   3.51    |   0.13    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.64    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |   0.300   |   0.023   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   -3.13   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   1.75    |   0.22    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   1.94    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |   0.300   |   0.017   |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   2.09    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   3.87    |   0.10    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.48    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |   1.94    |   0.27    |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000    0.079    0.021    0.006    0.003    0.004    0.007   -0.001   -0.018   -0.005    0.001   -0.002   -0.000    0.001    0.017   -0.001   -0.000    0.000    0.001   -0.001    0.003 |\n",
      "|  omega_s |    0.079    1.000    0.538   -0.369   -0.059   -0.006   -0.020   -0.071    0.025    0.005   -0.002    0.004    0.000   -0.003   -0.023   -0.001    0.001    0.001   -0.003    0.002   -0.005 |\n",
      "|  omega_p |    0.021    0.538    1.000   -0.050    0.109    0.000   -0.017    0.102   -0.006   -0.007   -0.003   -0.000   -0.000   -0.004    0.008   -0.004   -0.001   -0.000   -0.004    0.001    0.001 |\n",
      "|    rho_s |    0.006   -0.369   -0.050    1.000    0.026   -0.003   -0.010    0.035   -0.007   -0.011   -0.005   -0.006    0.001   -0.009    0.015    0.002    0.000   -0.008   -0.003   -0.002    0.010 |\n",
      "|    phi_s |    0.003   -0.059    0.109    0.026    1.000   -0.019   -0.115    0.963    0.061   -0.006   -0.015    0.008   -0.000   -0.023   -0.046   -0.012    0.000   -0.000   -0.022    0.009   -0.010 |\n",
      "|  p3770_s |    0.004   -0.006    0.000   -0.003   -0.019    1.000    0.054   -0.015    0.030   -0.430   -0.036    0.051   -0.010   -0.093    0.031   -0.234   -0.007    0.058   -0.130    0.182    0.161 |\n",
      "|   jpsi_p |    0.007   -0.020   -0.017   -0.010   -0.115    0.054    1.000   -0.105   -0.393    0.007   -0.029   -0.089   -0.050   -0.037    0.218   -0.003   -0.040   -0.108    0.054   -0.032   -0.134 |\n",
      "|    phi_p |   -0.001   -0.071    0.102    0.035    0.963   -0.015   -0.105    1.000    0.045   -0.009   -0.014    0.007   -0.001   -0.020   -0.032   -0.013   -0.000    0.000   -0.020    0.008   -0.008 |\n",
      "|      Ctt |   -0.018    0.025   -0.006   -0.007    0.061    0.030   -0.393    0.045    1.000   -0.289   -0.057    0.327    0.004   -0.113   -0.135    0.305   -0.005    0.319   -0.405    0.398    0.443 |\n",
      "|  p3770_p |   -0.005    0.005   -0.007   -0.011   -0.006   -0.430    0.007   -0.009   -0.289    1.000    0.034   -0.122   -0.025    0.090   -0.052   -0.190   -0.034   -0.114    0.178   -0.141   -0.177 |\n",
      "|  p4415_p |    0.001   -0.002   -0.003   -0.005   -0.015   -0.036   -0.029   -0.014   -0.057    0.034    1.000   -0.206   -0.036    0.056    0.083   -0.097   -0.017   -0.119    0.255   -0.203    0.070 |\n",
      "|  p4415_s |   -0.002    0.004   -0.000   -0.006    0.008    0.051   -0.089    0.007    0.327   -0.122   -0.206    1.000    0.012    0.083    0.242    0.078    0.005    0.367   -0.109    0.166    0.001 |\n",
      "| DDstar_s |   -0.000    0.000   -0.000    0.001   -0.000   -0.010   -0.050   -0.001    0.004   -0.025   -0.036    0.012    1.000   -0.037    0.021   -0.021   -0.001    0.004   -0.049    0.012   -0.010 |\n",
      "|  p4040_p |    0.001   -0.003   -0.004   -0.009   -0.023   -0.093   -0.037   -0.020   -0.113    0.090    0.056    0.083   -0.037    1.000    0.027   -0.220   -0.025    0.316   -0.055   -0.249    0.099 |\n",
      "| DDstar_p |    0.017   -0.023    0.008    0.015   -0.046    0.031    0.218   -0.032   -0.135   -0.052    0.083    0.242    0.021    0.027    1.000    0.070   -0.010    0.255   -0.184    0.220   -0.670 |\n",
      "|  psi2s_p |   -0.001   -0.001   -0.004    0.002   -0.012   -0.234   -0.003   -0.013    0.305   -0.190   -0.097    0.078   -0.021   -0.220    0.070    1.000   -0.021   -0.010   -0.187    0.163    0.064 |\n",
      "|   Dbar_s |   -0.000    0.001   -0.001    0.000    0.000   -0.007   -0.040   -0.000   -0.005   -0.034   -0.017    0.005   -0.001   -0.025   -0.010   -0.021    1.000    0.005   -0.028    0.011    0.013 |\n",
      "|  p4160_s |    0.000    0.001   -0.000   -0.008   -0.000    0.058   -0.108    0.000    0.319   -0.114   -0.119    0.367    0.004    0.316    0.255   -0.010    0.005    1.000   -0.264   -0.033    0.111 |\n",
      "|  p4160_p |    0.001   -0.003   -0.004   -0.003   -0.022   -0.130    0.054   -0.020   -0.405    0.178    0.255   -0.109   -0.049   -0.055   -0.184   -0.187   -0.028   -0.264    1.000   -0.515    0.014 |\n",
      "|  p4040_s |   -0.001    0.002    0.001   -0.002    0.009    0.182   -0.032    0.008    0.398   -0.141   -0.203    0.166    0.012   -0.249    0.220    0.163    0.011   -0.033   -0.515    1.000    0.012 |\n",
      "|   Dbar_p |    0.003   -0.005    0.001    0.010   -0.010    0.161   -0.134   -0.008    0.443   -0.177    0.070    0.001   -0.010    0.099   -0.670    0.064    0.013    0.111    0.014    0.012    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.08357517721798491}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.0049914177996428}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.272458798760685}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3221960515757538}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 2.6581437103506875}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.26397137630208367}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.02352616682248776}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.7542794669888098}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.13617660096433504}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12818736712297785}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.12518448663435056}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18745411898244746}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.022828856062053482}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.1178426450685306}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.223088729599501}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.032541087430189464}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.01663222847958673}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17373213442903246}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.1021550034529426}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18281533830420027}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.2690546277375332})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 5/10\n",
      "Time taken: 8 min, 38 s\n",
      "Projected time left: 8 min, 35 s\n",
      "Toy 5: Generating data...\n",
      "Toy 5: Data generation finished\n",
      "Toy 5: Loading data...\n",
      "Toy 5: Loading data finished\n",
      "Toy 5: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.98E+05                |    Ncalls=1050 (1050 total)    |\n",
      "| EDM = 1.38E-05 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297999.1346405293\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |   -6.3    |    0.8    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    6.8    |    1.1    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |   -0.11   |    0.29   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |    0.7    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   18.2    |    1.5    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |   1.89    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |  -4.598   |   0.023   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   -0.05   |    0.39   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.62    |   0.14    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   -3.54   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   3.76    |   0.15    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.41    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |   0.300   |   0.030   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   3.30    |   0.14    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   2.04    |   0.26    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   1.99    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |   0.300   |   0.027   |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   2.12    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   3.94    |   0.11    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.23    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |   2.01    |   0.31    |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000    0.349    0.070    0.003    0.124    0.019    0.020    0.096   -0.082   -0.021   -0.001   -0.006   -0.004    0.002    0.069   -0.013   -0.004    0.002   -0.006   -0.002    0.024 |\n",
      "|  omega_s |    0.349    1.000    0.623   -0.325    0.023    0.002   -0.013   -0.006   -0.007   -0.005   -0.002    0.000   -0.001   -0.002    0.006   -0.004   -0.001    0.001   -0.003    0.001    0.002 |\n",
      "|  omega_p |    0.070    0.623    1.000   -0.118    0.079    0.004   -0.007    0.065   -0.019   -0.008   -0.002   -0.002   -0.001   -0.002    0.017   -0.005   -0.001   -0.000   -0.004    0.000    0.006 |\n",
      "|    rho_s |    0.003   -0.325   -0.118    1.000    0.063    0.004   -0.000    0.065   -0.027   -0.017   -0.004   -0.008   -0.000   -0.006    0.030   -0.001   -0.000   -0.007   -0.004   -0.003    0.018 |\n",
      "|    phi_s |    0.124    0.023    0.079    0.063    1.000   -0.004   -0.052    0.860    0.015   -0.013   -0.007    0.000    0.000   -0.011   -0.005   -0.005    0.000   -0.003   -0.010    0.002    0.002 |\n",
      "|  p3770_s |    0.019    0.002    0.004    0.004   -0.004    1.000    0.024    0.002    0.114   -0.328   -0.056    0.064   -0.008   -0.130    0.004   -0.125   -0.000    0.055   -0.156    0.180    0.181 |\n",
      "|   jpsi_p |    0.020   -0.013   -0.007   -0.000   -0.052    0.024    1.000   -0.036   -0.397    0.043   -0.024   -0.147   -0.081   -0.043    0.100   -0.021   -0.070   -0.156    0.083   -0.080   -0.097 |\n",
      "|    phi_p |    0.096   -0.006    0.065    0.065    0.860    0.002   -0.036    1.000   -0.014   -0.016   -0.006   -0.002   -0.001   -0.008    0.017   -0.009   -0.001   -0.002   -0.009    0.001    0.008 |\n",
      "|      Ctt |   -0.082   -0.007   -0.019   -0.027    0.015    0.114   -0.397   -0.014    1.000   -0.309   -0.100    0.346    0.013   -0.140   -0.142    0.304   -0.006    0.313   -0.405    0.413    0.452 |\n",
      "|  p3770_p |   -0.021   -0.005   -0.008   -0.017   -0.013   -0.328    0.043   -0.016   -0.309    1.000    0.051   -0.143   -0.044    0.080   -0.087   -0.296   -0.064   -0.115    0.176   -0.105   -0.110 |\n",
      "|  p4415_p |   -0.001   -0.002   -0.002   -0.004   -0.007   -0.056   -0.024   -0.006   -0.100    0.051    1.000   -0.198   -0.052    0.078   -0.078   -0.110   -0.026   -0.182    0.288   -0.245    0.133 |\n",
      "|  p4415_s |   -0.006    0.000   -0.002   -0.008    0.000    0.064   -0.147   -0.002    0.346   -0.143   -0.198    1.000    0.011    0.045    0.279    0.047    0.008    0.360   -0.134    0.173    0.016 |\n",
      "| DDstar_s |   -0.004   -0.001   -0.001   -0.000    0.000   -0.008   -0.081   -0.001    0.013   -0.044   -0.052    0.011    1.000   -0.051    0.050   -0.034   -0.003   -0.002   -0.068    0.011    0.005 |\n",
      "|  p4040_p |    0.002   -0.002   -0.002   -0.006   -0.011   -0.130   -0.043   -0.008   -0.140    0.080    0.078    0.045   -0.051    1.000   -0.111   -0.237   -0.038    0.307    0.037   -0.286    0.168 |\n",
      "| DDstar_p |    0.069    0.006    0.017    0.030   -0.005    0.004    0.100    0.017   -0.142   -0.087   -0.078    0.279    0.050   -0.111    1.000    0.020   -0.018    0.208   -0.305    0.239   -0.703 |\n",
      "|  psi2s_p |   -0.013   -0.004   -0.005   -0.001   -0.005   -0.125   -0.021   -0.009    0.304   -0.296   -0.110    0.047   -0.034   -0.237    0.020    1.000   -0.036   -0.044   -0.172    0.129    0.075 |\n",
      "|   Dbar_s |   -0.004   -0.001   -0.001   -0.000    0.000   -0.000   -0.070   -0.001   -0.006   -0.064   -0.026    0.008   -0.003   -0.038   -0.018   -0.036    1.000    0.007   -0.047    0.018    0.031 |\n",
      "|  p4160_s |    0.002    0.001   -0.000   -0.007   -0.003    0.055   -0.156   -0.002    0.313   -0.115   -0.182    0.360   -0.002    0.307    0.208   -0.044    0.007    1.000   -0.270   -0.027    0.143 |\n",
      "|  p4160_p |   -0.006   -0.003   -0.004   -0.004   -0.010   -0.156    0.083   -0.009   -0.405    0.176    0.288   -0.134   -0.068    0.037   -0.305   -0.172   -0.047   -0.270    1.000   -0.549    0.072 |\n",
      "|  p4040_s |   -0.002    0.001    0.000   -0.003    0.002    0.180   -0.080    0.001    0.413   -0.105   -0.245    0.173    0.011   -0.286    0.239    0.129    0.018   -0.027   -0.549    1.000    0.024 |\n",
      "|   Dbar_p |    0.024    0.002    0.006    0.018    0.002    0.181   -0.097    0.008    0.452   -0.110    0.133    0.016    0.005    0.168   -0.703    0.075    0.031    0.143    0.072    0.024    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.7893690770980153}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1073110371129964}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.290718274952539}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.321432655811662}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.485231427003166}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2644285099582999}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.023233029264642546}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.38829348564946553}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.13948410995367289}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12958098981086663}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.14774882746787377}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19040016665362336}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.030256002147912242}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.1439617180047632}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.25651487234416503}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03218187655946547}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.026782207558354476}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1732156419373394}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10677934543795686}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1843266721357142}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.3074504844036339})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 6/10\n",
      "Time taken: 10 min, 45 s\n",
      "Projected time left: 7 min, 8 s\n",
      "Toy 6: Generating data...\n",
      "Toy 6: Data generation finished\n",
      "Toy 6: Loading data...\n",
      "Toy 6: Loading data finished\n",
      "Toy 6: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.977E+05               |    Ncalls=1180 (1180 total)    |\n",
      "| EDM = 0.00808 (Goal: 5E-06)   |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   False   |   False   |  True  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297738.4083025212\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |   6.16    |   0.28    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    8.3    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |    0.5    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |   1.20    |   0.30    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   19.7    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |    2.4    |    0.5    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |   4.81    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   -5.53   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.19    |   0.43    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   3.51    |   0.16    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   4.11    |   0.22    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.23    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |   0.21    |   0.51    |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   -2.76   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   -3.9    |    0.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   2.08    |   0.06    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |   -0.11   |    0.39   |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   2.15    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   -2.28   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.40    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |     4     |     4     |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000    0.183    0.112    0.249   -0.137    0.306   -0.029   -0.230    0.307    0.203    0.198    0.093   -0.317    0.287   -0.060    0.286    0.349    0.167    0.222   -0.063    0.351 |\n",
      "|  omega_s |    0.183    1.000    0.809   -0.118   -0.013    0.037   -0.011   -0.119    0.039    0.026    0.027    0.011   -0.035    0.036   -0.017    0.035    0.042    0.020    0.030   -0.008    0.043 |\n",
      "|  omega_p |    0.112    0.809    1.000    0.148   -0.015    0.070   -0.009   -0.090    0.072    0.049    0.048    0.020   -0.068    0.068   -0.024    0.066    0.080    0.038    0.055   -0.015    0.080 |\n",
      "|    rho_s |    0.249   -0.118    0.148    1.000   -0.063    0.081   -0.001   -0.035    0.090    0.049    0.049    0.025   -0.096    0.074   -0.006    0.079    0.100    0.043    0.054   -0.018    0.099 |\n",
      "|    phi_s |   -0.137   -0.013   -0.015   -0.063    1.000   -0.189    0.015    0.517   -0.186   -0.124   -0.120   -0.060    0.198   -0.176    0.027   -0.176   -0.213   -0.105   -0.134    0.037   -0.215 |\n",
      "|  p3770_s |    0.306    0.037    0.070    0.081   -0.189    1.000    0.226   -0.091    0.800    0.473    0.552    0.215   -0.683    0.742   -0.397    0.661    0.850    0.419    0.626   -0.092    0.840 |\n",
      "|   jpsi_p |   -0.029   -0.011   -0.009   -0.001    0.015    0.226    1.000    0.019    0.154    0.349    0.365   -0.123    0.197    0.336   -0.657    0.294    0.127   -0.007    0.476   -0.110    0.122 |\n",
      "|    phi_p |   -0.230   -0.119   -0.090   -0.035    0.517   -0.091    0.019    1.000   -0.094   -0.054   -0.052   -0.033    0.109   -0.082   -0.003   -0.084   -0.108   -0.053   -0.056    0.017   -0.109 |\n",
      "|      Ctt |    0.307    0.039    0.072    0.090   -0.186    0.800    0.154   -0.094    1.000    0.539    0.527    0.357   -0.846    0.760   -0.323    0.811    0.951    0.538    0.565   -0.049    0.944 |\n",
      "|  p3770_p |    0.203    0.026    0.049    0.049   -0.124    0.473    0.349   -0.054    0.539    1.000    0.508    0.045   -0.432    0.653   -0.430    0.562    0.586    0.220    0.634   -0.227    0.630 |\n",
      "|  p4415_p |    0.198    0.027    0.048    0.049   -0.120    0.552    0.365   -0.052    0.527    0.508    1.000    0.014   -0.318    0.623   -0.524    0.550    0.595    0.136    0.672   -0.265    0.549 |\n",
      "|  p4415_s |    0.093    0.011    0.020    0.025   -0.060    0.215   -0.123   -0.033    0.357    0.045    0.014    1.000   -0.319    0.197    0.162    0.186    0.271    0.359    0.095    0.063    0.291 |\n",
      "| DDstar_s |   -0.317   -0.035   -0.068   -0.096    0.198   -0.683    0.197    0.109   -0.846   -0.432   -0.318   -0.319    1.000   -0.578   -0.085   -0.610   -0.838   -0.432   -0.343    0.113   -0.907 |\n",
      "|  p4040_p |    0.287    0.036    0.068    0.074   -0.176    0.742    0.336   -0.082    0.760    0.653    0.623    0.197   -0.578    1.000   -0.530    0.713    0.825    0.501    0.717   -0.270    0.803 |\n",
      "| DDstar_p |   -0.060   -0.017   -0.024   -0.006    0.027   -0.397   -0.657   -0.003   -0.323   -0.430   -0.524    0.162   -0.085   -0.530    1.000   -0.449   -0.427   -0.042   -0.673    0.206   -0.248 |\n",
      "|  psi2s_p |    0.286    0.035    0.066    0.079   -0.176    0.661    0.294   -0.084    0.811    0.562    0.550    0.186   -0.610    0.713   -0.449    1.000    0.808    0.364    0.638   -0.125    0.811 |\n",
      "|   Dbar_s |    0.349    0.042    0.080    0.100   -0.213    0.850    0.127   -0.108    0.951    0.586    0.595    0.271   -0.838    0.825   -0.427    0.808    1.000    0.488    0.666   -0.155    0.948 |\n",
      "|  p4160_s |    0.167    0.020    0.038    0.043   -0.105    0.419   -0.007   -0.053    0.538    0.220    0.136    0.359   -0.432    0.501   -0.042    0.364    0.488    1.000    0.185   -0.074    0.479 |\n",
      "|  p4160_p |    0.222    0.030    0.055    0.054   -0.134    0.626    0.476   -0.056    0.565    0.634    0.672    0.095   -0.343    0.717   -0.673    0.638    0.666    0.185    1.000   -0.417    0.625 |\n",
      "|  p4040_s |   -0.063   -0.008   -0.015   -0.018    0.037   -0.092   -0.110    0.017   -0.049   -0.227   -0.265    0.063    0.113   -0.270    0.206   -0.125   -0.155   -0.074   -0.417    1.000   -0.158 |\n",
      "|   Dbar_p |    0.351    0.043    0.080    0.099   -0.215    0.840    0.122   -0.109    0.944    0.630    0.549    0.291   -0.907    0.803   -0.248    0.811    0.948    0.479    0.625   -0.158    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.27771994822257895}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.3959468507042243}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3691553864967809}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3006300727134063}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9091835835554605}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.46126289546140464}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03629362081781995}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.16053174956105432}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.4254592501236948}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.16063717375062758}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.22220018497165217}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18442248665248195}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5121605805414826}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2576226743388321}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.6602293730335576}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.059082172929771914}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.39460513178279527}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1812535589055404}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.16685474673584277}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1655797281434641}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 4.083121106609253})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 7/10\n",
      "Time taken: 13 min, 8 s\n",
      "Projected time left: 5 min, 36 s\n",
      "Toy 7: Generating data...\n",
      "Toy 7: Data generation finished\n",
      "Toy 7: Loading data...\n",
      "Toy 7: Loading data finished\n",
      "Toy 7: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.98E+05                |    Ncalls=1207 (1207 total)    |\n",
      "| EDM = 4.17E-06 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 298029.8179642496\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |   -0.3    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    6.9    |    1.0    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |   -6.28   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |   0.96    |   0.30    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   16.6    |    0.8    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |   1.94    |   0.27    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |  -4.566   |   0.024   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   6.28    |   0.09    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.28    |   0.14    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   2.91    |   0.14    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   -2.75   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.47    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |  -0.300   |   0.020   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   -2.69   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   -1.34   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   1.93    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |  -0.300   |   0.016   |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   2.26    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   -2.36   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   0.92    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |   -1.13   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000    0.391    0.013    0.127    0.115    0.033    0.057   -0.002   -0.144   -0.033    0.005   -0.020   -0.002    0.016    0.132   -0.009   -0.004   -0.007    0.010   -0.005    0.027 |\n",
      "|  omega_s |    0.391    1.000    0.126   -0.388    0.065    0.008    0.002    0.007   -0.032   -0.009    0.000   -0.004   -0.000    0.003    0.030   -0.005   -0.001   -0.000   -0.000    0.000    0.005 |\n",
      "|  omega_p |    0.013    0.126    1.000   -0.019    0.009    0.001    0.001    0.000   -0.006   -0.002    0.000   -0.001   -0.000    0.000    0.005   -0.001   -0.000   -0.000    0.000   -0.000    0.001 |\n",
      "|    rho_s |    0.127   -0.388   -0.019    1.000   -0.009   -0.003   -0.006   -0.004   -0.002   -0.009   -0.004   -0.005    0.001   -0.005    0.008    0.003    0.001   -0.008   -0.001   -0.003    0.009 |\n",
      "|    phi_s |    0.115    0.065    0.009   -0.009    1.000   -0.013   -0.044   -0.141    0.047    0.001   -0.006    0.005    0.001   -0.010   -0.038    0.000    0.002   -0.001   -0.009    0.001   -0.003 |\n",
      "|  p3770_s |    0.033    0.008    0.001   -0.003   -0.013    1.000    0.041    0.000    0.059   -0.411   -0.047    0.063   -0.007   -0.153    0.051   -0.185   -0.005    0.058   -0.161    0.179    0.158 |\n",
      "|   jpsi_p |    0.057    0.002    0.001   -0.006   -0.044    0.041    1.000    0.003   -0.417    0.034   -0.035   -0.108   -0.048   -0.013    0.216   -0.008   -0.042   -0.129    0.083   -0.089   -0.162 |\n",
      "|    phi_p |   -0.002    0.007    0.000   -0.004   -0.141    0.000    0.003    1.000    0.000    0.001    0.001    0.000    0.000    0.001   -0.001    0.001    0.000    0.000    0.001   -0.000   -0.000 |\n",
      "|      Ctt |   -0.144   -0.032   -0.006   -0.002    0.047    0.059   -0.417    0.000    1.000   -0.319   -0.068    0.347    0.006   -0.265   -0.106    0.295   -0.006    0.317   -0.472    0.451    0.415 |\n",
      "|  p3770_p |   -0.033   -0.009   -0.002   -0.009    0.001   -0.411    0.034    0.001   -0.319    1.000    0.032   -0.135   -0.026    0.119   -0.051   -0.243   -0.037   -0.121    0.203   -0.153   -0.194 |\n",
      "|  p4415_p |    0.005    0.000    0.000   -0.004   -0.006   -0.047   -0.035    0.001   -0.068    0.032    1.000   -0.185   -0.032    0.135    0.080   -0.106   -0.017   -0.113    0.265   -0.193    0.067 |\n",
      "|  p4415_s |   -0.020   -0.004   -0.001   -0.005    0.005    0.063   -0.108    0.000    0.347   -0.135   -0.185    1.000    0.012    0.003    0.242    0.081    0.005    0.366   -0.153    0.246    0.013 |\n",
      "| DDstar_s |   -0.002   -0.000   -0.000    0.001    0.001   -0.007   -0.048    0.000    0.006   -0.026   -0.032    0.012    1.000   -0.029    0.022   -0.021   -0.001    0.003   -0.049    0.010   -0.009 |\n",
      "|  p4040_p |    0.016    0.003    0.000   -0.005   -0.010   -0.153   -0.013    0.001   -0.265    0.119    0.135    0.003   -0.029    1.000   -0.062   -0.257   -0.023    0.300    0.163   -0.277    0.079 |\n",
      "| DDstar_p |    0.132    0.030    0.005    0.008   -0.038    0.051    0.216   -0.001   -0.106   -0.051    0.080    0.242    0.022   -0.062    1.000    0.086   -0.007    0.244   -0.205    0.258   -0.646 |\n",
      "|  psi2s_p |   -0.009   -0.005   -0.001    0.003    0.000   -0.185   -0.008    0.001    0.295   -0.243   -0.106    0.081   -0.021   -0.257    0.086    1.000   -0.023   -0.015   -0.204    0.106    0.048 |\n",
      "|   Dbar_s |   -0.004   -0.001   -0.000    0.001    0.002   -0.005   -0.042    0.000   -0.006   -0.037   -0.017    0.005   -0.001   -0.023   -0.007   -0.023    1.000    0.004   -0.032    0.011    0.013 |\n",
      "|  p4160_s |   -0.007   -0.000   -0.000   -0.008   -0.001    0.058   -0.129    0.000    0.317   -0.121   -0.113    0.366    0.003    0.300    0.244   -0.015    0.004    1.000   -0.291    0.113    0.123 |\n",
      "|  p4160_p |    0.010   -0.000    0.000   -0.001   -0.009   -0.161    0.083    0.001   -0.472    0.203    0.265   -0.153   -0.049    0.163   -0.205   -0.204   -0.032   -0.291    1.000   -0.596   -0.020 |\n",
      "|  p4040_s |   -0.005    0.000   -0.000   -0.003    0.001    0.179   -0.089   -0.000    0.451   -0.153   -0.193    0.246    0.010   -0.277    0.258    0.106    0.011    0.113   -0.596    1.000    0.091 |\n",
      "|   Dbar_p |    0.027    0.005    0.001    0.009   -0.003    0.158   -0.162   -0.000    0.415   -0.194    0.067    0.013   -0.009    0.079   -0.646    0.048    0.013    0.123   -0.020    0.091    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.36398836101189147}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.9573655938922179}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.1161196521304051}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.30100333318176625}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.7880287454443637}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.268531326789599}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.02377233463435191}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.09280934619497128}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1426871546019346}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.13564354111121535}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.1406477225445224}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1890333499607768}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.019919995842848176}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.19843285731605675}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.22233334722540876}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03243402725807609}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.015898744089318018}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17238201397747432}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.1024453058239232}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18940950203249995}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.26492991575374436})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 8/10\n",
      "Time taken: 15 min, 32 s\n",
      "Projected time left: 3 min, 52 s\n",
      "Toy 8: Generating data...\n",
      "Toy 8: Data generation finished\n",
      "Toy 8: Loading data...\n",
      "Toy 8: Loading data finished\n",
      "Toy 8: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.979E+05               |    Ncalls=1817 (1817 total)    |\n",
      "| EDM = 1.18E-05 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   False   |   False   |  True  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297909.4708085202\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |   -0.60   |    0.27   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    8.2    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |   -5.71   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |   1.48    |   0.22    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   18.0    |    0.8    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |    2.5    |    0.4    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |   -1.48   |    0.05   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   0.24    |   0.19    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   0.27    |   0.09    |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   3.33    |   0.13    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   -2.5    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.17    |   0.22    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |   -0.30   |    0.58   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   -2.78   |    0.31   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   -4.0    |    0.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   2.08    |   0.08    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |   0.28    |   0.47    |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   1.91    |   0.29    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   -2.23   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.22    |   0.29    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |   2.80    |   0.23    |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000    0.092    0.120   -0.064   -0.090    0.636    0.633    0.078   -0.230    0.526    0.660    0.542    0.703    0.660    0.673    0.673   -0.663    0.638    0.644    0.640    0.220 |\n",
      "|  omega_s |    0.092    1.000    0.591   -0.166   -0.006    0.069    0.067   -0.024   -0.020    0.058    0.072    0.060    0.077    0.072    0.075    0.073   -0.073    0.070    0.070    0.070    0.019 |\n",
      "|  omega_p |    0.120    0.591    1.000    0.161   -0.007    0.139    0.137    0.029   -0.046    0.116    0.144    0.119    0.154    0.144    0.148    0.147   -0.145    0.140    0.141    0.140    0.044 |\n",
      "|    rho_s |   -0.064   -0.166    0.161    1.000    0.029   -0.199   -0.189   -0.006    0.075   -0.165   -0.205   -0.169   -0.217   -0.205   -0.208   -0.207    0.204   -0.199   -0.199   -0.199   -0.061 |\n",
      "|    phi_s |   -0.090   -0.006   -0.007    0.029    1.000   -0.157   -0.156    0.556    0.066   -0.129   -0.162   -0.133   -0.172   -0.162   -0.163   -0.165    0.161   -0.157   -0.158   -0.157   -0.059 |\n",
      "|  p3770_s |    0.636    0.069    0.139   -0.199   -0.157    1.000    0.845    0.122   -0.252    0.633    0.851    0.705    0.905    0.844    0.881    0.841   -0.849    0.826    0.827    0.840    0.235 |\n",
      "|   jpsi_p |    0.633    0.067    0.137   -0.189   -0.156    0.845    1.000    0.119   -0.161    0.730    0.873    0.714    0.925    0.874    0.917    0.887   -0.880    0.838    0.859    0.841    0.136 |\n",
      "|    phi_p |    0.078   -0.024    0.029   -0.006    0.556    0.122    0.119    1.000   -0.036    0.102    0.127    0.105    0.135    0.127    0.131    0.129   -0.128    0.123    0.124    0.123    0.033 |\n",
      "|      Ctt |   -0.230   -0.020   -0.046    0.075    0.066   -0.252   -0.161   -0.036    1.000   -0.268   -0.219   -0.057   -0.229   -0.267   -0.217   -0.190    0.266   -0.147   -0.297   -0.128    0.040 |\n",
      "|  p3770_p |    0.526    0.058    0.116   -0.165   -0.129    0.633    0.730    0.102   -0.268    1.000    0.722    0.572    0.761    0.736    0.750    0.722   -0.711    0.684    0.728    0.689    0.046 |\n",
      "|  p4415_p |    0.660    0.072    0.144   -0.205   -0.162    0.851    0.873    0.127   -0.219    0.722    1.000    0.714    0.943    0.892    0.916    0.896   -0.894    0.845    0.884    0.845    0.270 |\n",
      "|  p4415_s |    0.542    0.060    0.119   -0.169   -0.133    0.705    0.714    0.105   -0.057    0.572    0.714    1.000    0.780    0.742    0.741    0.742   -0.746    0.754    0.727    0.724    0.231 |\n",
      "| DDstar_s |    0.703    0.077    0.154   -0.217   -0.172    0.905    0.925    0.135   -0.229    0.761    0.943    0.780    1.000    0.941    0.977    0.956   -0.959    0.914    0.918    0.914    0.287 |\n",
      "|  p4040_p |    0.660    0.072    0.144   -0.205   -0.162    0.844    0.874    0.127   -0.267    0.736    0.892    0.742    0.941    1.000    0.920    0.889   -0.886    0.887    0.862    0.841    0.243 |\n",
      "| DDstar_p |    0.673    0.075    0.148   -0.208   -0.163    0.881    0.917    0.131   -0.217    0.750    0.916    0.741    0.977    0.920    1.000    0.931   -0.927    0.878    0.907    0.881    0.362 |\n",
      "|  psi2s_p |    0.673    0.073    0.147   -0.207   -0.165    0.841    0.887    0.129   -0.190    0.722    0.896    0.742    0.956    0.889    0.931    1.000   -0.904    0.864    0.875    0.872    0.227 |\n",
      "|   Dbar_s |   -0.663   -0.073   -0.145    0.204    0.161   -0.849   -0.880   -0.128    0.266   -0.711   -0.894   -0.746   -0.959   -0.886   -0.927   -0.904    1.000   -0.868   -0.866   -0.871   -0.299 |\n",
      "|  p4160_s |    0.638    0.070    0.140   -0.199   -0.157    0.826    0.838    0.123   -0.147    0.684    0.845    0.754    0.914    0.887    0.878    0.864   -0.868    1.000    0.820    0.816    0.283 |\n",
      "|  p4160_p |    0.644    0.070    0.141   -0.199   -0.158    0.827    0.859    0.124   -0.297    0.728    0.884    0.727    0.918    0.862    0.907    0.875   -0.866    0.820    1.000    0.789    0.225 |\n",
      "|  p4040_s |    0.640    0.070    0.140   -0.199   -0.157    0.840    0.841    0.123   -0.128    0.689    0.845    0.724    0.914    0.841    0.881    0.872   -0.871    0.816    0.789    1.000    0.272 |\n",
      "|   Dbar_p |    0.220    0.019    0.044   -0.061   -0.059    0.235    0.136    0.033    0.040    0.046    0.270    0.231    0.287    0.243    0.362    0.227   -0.299    0.283    0.225    0.272    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.27098401251561155}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.8795791692660551}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.19878574130391025}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.21983936971915485}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.8158249500568697}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.42953933743718586}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.052411148720699074}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.19152864374454648}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.0904984667150246}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1320625793194541}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.3996206195703933}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.21730905065700917}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.579088304244729}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.3140623670807241}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.7361126186488691}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.08357871654532634}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4744964424913635}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.2853466413895025}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.19303201083625843}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.28818036516479095}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.2313335191639263})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 9/10\n",
      "Time taken: 18 min, 33 s\n",
      "Projected time left: 2 min, 3 s\n",
      "Toy 9: Generating data...\n",
      "Toy 9: Data generation finished\n",
      "Toy 9: Loading data...\n",
      "Toy 9: Loading data finished\n",
      "Toy 9: Fitting pdf...\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.98E+05                |    Ncalls=1130 (1130 total)    |\n",
      "| EDM = 5.08E-05 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   False   |   False   |  True  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297973.98281601147\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | rho_p    |    0.4    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | omega_s  |    6.7    |    1.2    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 2 | omega_p  |   0.05    |   0.32    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | rho_s    |    0.6    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "| 4 | phi_s    |   19.3    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 5 | p3770_s  |    2.0    |    0.3    |            |            |0.918861 | 4.08114 |       |\n",
      "| 6 | jpsi_p   |   4.75    |   0.07    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | phi_p    |   0.54    |   0.21    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | Ctt      |   -0.03   |    0.18   |            |            |   -1    |    1    |       |\n",
      "| 9 | p3770_p  |   -2.87   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| p4415_p  |   3.57    |   0.21    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4415_s  |   1.22    |   0.28    |            |            |0.126447 | 2.35355 |       |\n",
      "| 12| DDstar_s |   -0.11   |    0.34   |            |            |  -0.3   |   0.3   |       |\n",
      "| 13| p4040_p  |   3.33    |   0.23    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| DDstar_p |   -1.6    |    2.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| Dbar_s   |   0.30    |   0.52    |            |            |  -0.3   |   0.3   |       |\n",
      "| 17| p4160_s  |   1.98    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 18| p4160_p  |   -2.32   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| p4040_s  |   1.50    |   0.21    |            |            |0.00501244| 2.01499 |       |\n",
      "| 20| Dbar_p   |    5.2    |    1.2    |            |            |-6.28319 | 6.28319 |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |    rho_p  omega_s  omega_p    rho_s    phi_s  p3770_s   jpsi_p    phi_p      Ctt  p3770_p  p4415_p  p4415_s DDstar_s  p4040_p DDstar_p  psi2s_p   Dbar_s  p4160_s  p4160_p  p4040_s   Dbar_p |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|    rho_p |    1.000    0.420    0.074    0.031   -0.088   -0.145   -0.250   -0.177   -0.216   -0.144   -0.156    0.185    0.239   -0.199    0.246   -0.146    0.204    0.150   -0.219    0.155    0.227 |\n",
      "|  omega_s |    0.420    1.000    0.670   -0.124   -0.019   -0.023   -0.045   -0.090   -0.035   -0.023   -0.025    0.029    0.037   -0.031    0.039   -0.024    0.034    0.024   -0.034    0.024    0.035 |\n",
      "|  omega_p |    0.074    0.670    1.000   -0.041   -0.000   -0.028   -0.052   -0.041   -0.044   -0.029   -0.031    0.036    0.047   -0.039    0.049   -0.029    0.042    0.029   -0.043    0.030    0.044 |\n",
      "|    rho_s |    0.031   -0.124   -0.041    1.000   -0.137   -0.188   -0.289   -0.146   -0.254   -0.187   -0.199    0.226    0.296   -0.252    0.302   -0.178    0.243    0.177   -0.274    0.189    0.277 |\n",
      "|    phi_s |   -0.088   -0.019   -0.000   -0.137    1.000    0.141    0.222    0.689    0.199    0.139    0.151   -0.177   -0.230    0.192   -0.233    0.137   -0.188   -0.142    0.211   -0.148   -0.216 |\n",
      "|  p3770_s |   -0.145   -0.023   -0.028   -0.188    0.141    1.000    0.635    0.100    0.434    0.289    0.482   -0.531   -0.678    0.600   -0.651    0.308   -0.469   -0.392    0.638   -0.382   -0.670 |\n",
      "|   jpsi_p |   -0.250   -0.045   -0.052   -0.289    0.222    0.635    1.000    0.148    0.666    0.602    0.640   -0.726   -0.919    0.813   -0.884    0.614   -0.661   -0.574    0.875   -0.608   -0.848 |\n",
      "|    phi_p |   -0.177   -0.090   -0.041   -0.146    0.689    0.100    0.148    1.000    0.129    0.097    0.105   -0.121   -0.157    0.134   -0.158    0.095   -0.125   -0.096    0.145   -0.101   -0.147 |\n",
      "|      Ctt |   -0.216   -0.035   -0.044   -0.254    0.199    0.434    0.666    0.129    1.000    0.284    0.481   -0.429   -0.687    0.561   -0.711    0.538   -0.509   -0.272    0.572   -0.290   -0.743 |\n",
      "|  p3770_p |   -0.144   -0.023   -0.029   -0.187    0.139    0.289    0.602    0.097    0.284    1.000    0.442   -0.514   -0.592    0.591   -0.570    0.375   -0.324   -0.413    0.619   -0.458   -0.522 |\n",
      "|  p4415_p |   -0.156   -0.025   -0.031   -0.199    0.151    0.482    0.640    0.105    0.481    0.442    1.000   -0.598   -0.689    0.637   -0.638    0.434   -0.505   -0.460    0.705   -0.528   -0.668 |\n",
      "|  p4415_s |    0.185    0.029    0.036    0.226   -0.177   -0.531   -0.726   -0.121   -0.429   -0.514   -0.598    1.000    0.788   -0.671    0.794   -0.489    0.628    0.629   -0.748    0.581    0.764 |\n",
      "| DDstar_s |    0.239    0.037    0.047    0.296   -0.230   -0.678   -0.919   -0.157   -0.687   -0.592   -0.689    0.788    1.000   -0.872    0.967   -0.636    0.821    0.608   -0.938    0.657    0.966 |\n",
      "|  p4040_p |   -0.199   -0.031   -0.039   -0.252    0.192    0.600    0.813    0.134    0.561    0.591    0.637   -0.671   -0.872    1.000   -0.834    0.530   -0.627   -0.426    0.826   -0.651   -0.841 |\n",
      "| DDstar_p |    0.246    0.039    0.049    0.302   -0.233   -0.651   -0.884   -0.158   -0.711   -0.570   -0.638    0.794    0.967   -0.834    1.000   -0.589    0.781    0.634   -0.912    0.674    0.980 |\n",
      "|  psi2s_p |   -0.146   -0.024   -0.029   -0.178    0.137    0.308    0.614    0.095    0.538    0.375    0.434   -0.489   -0.636    0.530   -0.589    1.000   -0.381   -0.412    0.594   -0.383   -0.595 |\n",
      "|   Dbar_s |    0.204    0.034    0.042    0.243   -0.188   -0.469   -0.661   -0.125   -0.509   -0.324   -0.505    0.628    0.821   -0.627    0.781   -0.381    1.000    0.485   -0.706    0.502    0.808 |\n",
      "|  p4160_s |    0.150    0.024    0.029    0.177   -0.142   -0.392   -0.574   -0.096   -0.272   -0.413   -0.460    0.629    0.608   -0.426    0.634   -0.412    0.485    1.000   -0.623    0.373    0.571 |\n",
      "|  p4160_p |   -0.219   -0.034   -0.043   -0.274    0.211    0.638    0.875    0.145    0.572    0.619    0.705   -0.748   -0.938    0.826   -0.912    0.594   -0.706   -0.623    1.000   -0.731   -0.900 |\n",
      "|  p4040_s |    0.155    0.024    0.030    0.189   -0.148   -0.382   -0.608   -0.101   -0.290   -0.458   -0.528    0.581    0.657   -0.651    0.674   -0.383    0.502    0.373   -0.731    1.000    0.636 |\n",
      "|   Dbar_p |    0.227    0.035    0.044    0.277   -0.216   -0.670   -0.848   -0.147   -0.743   -0.522   -0.668    0.764    0.966   -0.841    0.980   -0.595    0.808    0.571   -0.900    0.636    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'rho_p' floating=True>, {'error': 0.47787650322626485}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1671499758739108}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.31811570335196127}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.33925542819480203}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.049285588071493}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.3162497785112547}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.06749011340636546}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.21307465209402388}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.18115444600402852}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1657557614253573}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.21323294268173676}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.2815031802879736}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.3353260528941947}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.23124270849511852}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 2.396064403517207}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.040594121775672676}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.5200050109920695}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.19415791959034012}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.2822154575659217}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.20817892177171948}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.166833707438908})])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Toy 10/10\n",
      "Time taken: 20 min, 56 s\n",
      "Projected time left: \n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaUAAAD4CAYAAABMtfkzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nOydeXzU5bX/32dmsgdCyMIWIAGCCMgiCCquuOGKbfWK99qr1V57W73a2va2tr/qra3ttZutrba1etUuiltVat2qYBVUBARBNgl72JKQhZB1luf3x3wnmUxmDZn5JuG8X697nXy/5/ucT6ZhzpznOc95xBiDoiiKovQFHHYLUBRFUZQAGpQURVGUPoMGJUVRFKXPoEFJURRF6TNoUFIURVH6DC67BfQ1CgsLTWlpqd0yFKXPs2NvDRm5OYzKz+pyvb7Zzd66ZiYOG0SGuw2ysiKMkGRaWthY5yY/J42ReVkcbfWw83AT44tyyPa67dM1QFmzZk2NMaboWMfRoBRCaWkpq1evtluGovR5vrXoeziv+Rd+9JmTulx/ef1+bn1yLc9/7Swmvvs6XHWVPQKfe46pGwbxL7NHc9flk1m+rYbrHl3J4186jTlrltqna4AiIrt7YxydvlMUpUc0ZGTjFOl2PXDN6zOQl5dqWZ3k5WGMISDRYX3a2a5LiYoGJUVRekSTKxOnI0xQcgQFpZycVMvqJCcHAwQkBoKlMTbrUqKiQUlRlB4x+vA+HOEypeCgtG1bqmV1sm0bPmMQS6MjoMvYrEuJiq4pKYrSI1aOPon5Yb7WdvnwP/vsFKsK4uyzMds2EwibjuBpxRTqcrvdVFZW0t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hzHqdPlF5B1+dXsWrwOPA386/G6XZ/RWjpAejD5UtJeJVdsMA79ox43Q2WhHndKZeNSXTs1HZKmAp8AT5rZH6r9y78trYWlb/tulDQd+Ay4vloyP7ekFpLuBQbMbK+kFYPmKklbWocMy8ysX9IsoEfSD8OkzU2LmClVKLNbol99qo2fB9ze0i6cJE0kDUjvmdmnbi6lFoOY2VlgB+m9QF4uv5qFZcB9kk6Qlu/vIM2cyqYDAGbW7+cB0oPKrYxD/4hBqUKZ3RJlXTgNde30oO+sWQqc8yn7NmClpDbffbPSbU2Dr/1vAo6Y2WuZP5VRi6t9hoSkK4A7Se/Y8nL51RSY2bNmNseSY9FOUrseoGQ6AEi6UtK0wTDp//ow49E/Gr3Do0gHaQfJUdJ6+vpGX88YtfED4BTwN+kp5mHSOvhXwDE/t3takX4o8ThwCLg5U85DpBe4fcCaRrdrFDrcTlpGOAjs92NVSbW4geTS66DfeJ5z+wLSzbQP+BiY7PYpHu/zvy/IlLXeNfoRuLvRbfsfmqygsvuudDp4mw/40Tt4PxyP/hFuhoIgCILCEMt3QRAEQWGIQSkIgiAoDDEoBUEQBIUhBqUgCIKgMMSgFARBEBSGGJSCIAiCwhCDUhAEQVAY/gPmeVDqnLxQNAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# zfit.run.numeric_checks = False   \n",
    "\n",
    "fitting_range = 'cut'\n",
    "total_BR = 1.7e-10 + 4.9e-10 + 2.5e-9 + 6.02e-5 + 4.97e-6 + 1.38e-9 + 4.2e-10 + 2.6e-9 + 6.1e-10 + 4.37e-7\n",
    "cut_BR = 1.0 - (6.02e-5 + 4.97e-6)/total_BR\n",
    "\n",
    "Ctt_list = []\n",
    "Ctt_error_list = []\n",
    "\n",
    "nr_of_toys = 10\n",
    "if fitting_range == 'cut':\n",
    "    nevents = int(pdg[\"number_of_decays\"]*cut_BR)\n",
    "else:\n",
    "    nevents = int(pdg[\"number_of_decays\"])\n",
    "# nevents = pdg[\"number_of_decays\"]\n",
    "event_stack = 1000000\n",
    "nevents *= 41\n",
    "# zfit.settings.set_verbosity(10)\n",
    "calls = int(nevents/event_stack + 1)\n",
    "\n",
    "total_samp = []\n",
    "\n",
    "start = time.time()\n",
    "\n",
    "sampler = total_f.create_sampler(n=event_stack)\n",
    "\n",
    "for toy in range(nr_of_toys):\n",
    "    \n",
    "    ### Generate data\n",
    "    \n",
    "#     clear_output(wait=True)\n",
    "    \n",
    "    print(\"Toy {}: Generating data...\".format(toy))\n",
    "    \n",
    "    dirName = 'data/zfit_toys/toy_{0}'.format(toy)\n",
    "    \n",
    "    if not os.path.exists(dirName):\n",
    "        os.mkdir(dirName)\n",
    "        print(\"Directory \" , dirName ,  \" Created \")\n",
    "    \n",
    "    reset_param_values()\n",
    "    \n",
    "    if fitting_range == 'cut':\n",
    "        \n",
    "        sampler.resample(n=nevents)\n",
    "        s = sampler.unstack_x()\n",
    "        sam = zfit.run(s)\n",
    "        calls = 0\n",
    "        c = 1\n",
    "        \n",
    "    else:    \n",
    "        for call in range(calls):\n",
    "\n",
    "            sampler.resample(n=event_stack)\n",
    "            s = sampler.unstack_x()\n",
    "            sam = zfit.run(s)\n",
    "\n",
    "            c = call + 1\n",
    "\n",
    "            with open(\"data/zfit_toys/toy_{0}/{1}.pkl\".format(toy, call), \"wb\") as f:\n",
    "                pkl.dump(sam, f, pkl.HIGHEST_PROTOCOL)\n",
    "            \n",
    "    print(\"Toy {}: Data generation finished\".format(toy))\n",
    "        \n",
    "    ### Load data\n",
    "    \n",
    "    print(\"Toy {}: Loading data...\".format(toy))\n",
    "    \n",
    "    if fitting_range == 'cut':\n",
    "        \n",
    "        total_samp = sam\n",
    "    \n",
    "    else:\n",
    "                \n",
    "        for call in range(calls):\n",
    "            with open(r\"data/zfit_toys/toy_0/{}.pkl\".format(call), \"rb\") as input_file:\n",
    "                sam = pkl.load(input_file)\n",
    "            total_samp = np.append(total_samp, sam)\n",
    "\n",
    "        total_samp = total_samp.astype('float64')\n",
    "    \n",
    "    if fitting_range == 'full':\n",
    "\n",
    "        data = zfit.data.Data.from_numpy(array=total_samp[:int(nevents)], obs=obs)\n",
    "    \n",
    "        print(\"Toy {}: Loading data finished\".format(toy))\n",
    "\n",
    "        ### Fit data\n",
    "\n",
    "        print(\"Toy {}: Fitting pdf...\".format(toy))\n",
    "\n",
    "        for param in total_f.get_dependents():\n",
    "            param.randomize()\n",
    "\n",
    "        nll = zfit.loss.UnbinnedNLL(model=total_f, data=data, fit_range = (x_min, x_max), constraints = constraints)\n",
    "\n",
    "        minimizer = zfit.minimize.MinuitMinimizer(verbosity = 5)\n",
    "        # minimizer._use_tfgrad = False\n",
    "        result = minimizer.minimize(nll)\n",
    "\n",
    "        print(\"Toy {}: Fitting finished\".format(toy))\n",
    "\n",
    "        print(\"Function minimum:\", result.fmin)\n",
    "        print(\"Hesse errors:\", result.hesse())\n",
    "\n",
    "        params = result.params\n",
    "        Ctt_list.append(params[Ctt]['value'])\n",
    "        Ctt_error_list.append(params[Ctt]['minuit_hesse']['error'])\n",
    "\n",
    "        #plotting the result\n",
    "\n",
    "        plotdirName = 'data/plots'.format(toy)\n",
    "\n",
    "        if not os.path.exists(plotdirName):\n",
    "            os.mkdir(plotdirName)\n",
    "#             print(\"Directory \" , dirName ,  \" Created \")\n",
    "        \n",
    "        probs = total_f.pdf(test_q, norm_range=False)\n",
    "        calcs_test = zfit.run(probs)\n",
    "        plt.clf()\n",
    "        plt.plot(test_q, calcs_test, label = 'pdf')\n",
    "        plt.legend()\n",
    "        plt.ylim(0.0, 6e-6)\n",
    "        plt.savefig(plotdirName + '/toy_fit_full_range{}.png'.format(toy))\n",
    "\n",
    "        print(\"Toy {0}/{1}\".format(toy+1, nr_of_toys))\n",
    "        print(\"Time taken: {}\".format(display_time(int(time.time() - start))))\n",
    "        print(\"Projected time left: {}\".format(display_time(int((time.time() - start)/(c+calls*(toy))*((nr_of_toys-toy)*calls-c)))))\n",
    "    \n",
    "    if fitting_range == 'cut':\n",
    "        \n",
    "        _1 = np.where((total_samp >= x_min) & (total_samp <= (jpsi_mass - 60.)))\n",
    "        \n",
    "        tot_sam_1 = total_samp[_1]\n",
    "    \n",
    "        _2 = np.where((total_samp >= (jpsi_mass + 70.)) & (total_samp <= (psi2s_mass - 50.)))\n",
    "        \n",
    "        tot_sam_2 = total_samp[_2]\n",
    "\n",
    "        _3 = np.where((total_samp >= (psi2s_mass + 50.)) & (total_samp <= x_max))\n",
    "        \n",
    "        tot_sam_3 = total_samp[_3]\n",
    "\n",
    "        tot_sam = np.append(tot_sam_1, tot_sam_2)\n",
    "        tot_sam = np.append(tot_sam, tot_sam_3)\n",
    "    \n",
    "        data = zfit.data.Data.from_numpy(array=tot_sam[:int(nevents)], obs=obs_fit)\n",
    "        \n",
    "        print(\"Toy {}: Loading data finished\".format(toy))\n",
    "        \n",
    "        ### Fit data\n",
    "\n",
    "        print(\"Toy {}: Fitting pdf...\".format(toy))\n",
    "\n",
    "        for param in total_f_fit.get_dependents():\n",
    "            param.randomize()\n",
    "\n",
    "        nll = zfit.loss.UnbinnedNLL(model=total_f_fit, data=data, constraints = constraints)\n",
    "\n",
    "        minimizer = zfit.minimize.MinuitMinimizer(verbosity = 5)\n",
    "        # minimizer._use_tfgrad = False\n",
    "        result = minimizer.minimize(nll)\n",
    "\n",
    "        print(\"Function minimum:\", result.fmin)\n",
    "        print(\"Hesse errors:\", result.hesse())\n",
    "\n",
    "        params = result.params\n",
    "        \n",
    "        if result.converged:\n",
    "            Ctt_list.append(params[Ctt]['value'])\n",
    "            Ctt_error_list.append(params[Ctt]['minuit_hesse']['error'])\n",
    "\n",
    "        #plotting the result\n",
    "\n",
    "        plotdirName = 'data/plots'.format(toy)\n",
    "\n",
    "        if not os.path.exists(plotdirName):\n",
    "            os.mkdir(plotdirName)\n",
    "        #         print(\"Directory \" , dirName ,  \" Created \")\n",
    "        \n",
    "        plt.clf()\n",
    "        plt.hist(tot_sam, bins = int((x_max-x_min)/7.), label = 'toy data')\n",
    "        plt.savefig(plotdirName + '/toy_histo_cut_region{}.png'.format(toy))\n",
    "\n",
    "        \n",
    "        probs = total_f_fit.pdf(test_q, norm_range=False)\n",
    "        calcs_test = zfit.run(probs)\n",
    "        plt.clf()\n",
    "        plt.plot(test_q, calcs_test, label = 'pdf')\n",
    "        plt.axvline(x=jpsi_mass-60.,color='red', linewidth=0.7, linestyle = 'dotted')\n",
    "        plt.axvline(x=jpsi_mass+70.,color='red', linewidth=0.7, linestyle = 'dotted')\n",
    "        plt.axvline(x=psi2s_mass-50.,color='red', linewidth=0.7, linestyle = 'dotted')\n",
    "        plt.axvline(x=psi2s_mass+50.,color='red', linewidth=0.7, linestyle = 'dotted')\n",
    "        plt.legend()\n",
    "        plt.ylim(0.0, 1.5e-6)\n",
    "        plt.savefig(plotdirName + '/toy_fit_cut_region{}.png'.format(toy))\n",
    "        \n",
    "        print(\"Toy {0}/{1}\".format(toy+1, nr_of_toys))\n",
    "        print(\"Time taken: {}\".format(display_time(int(time.time() - start))))\n",
    "        print(\"Projected time left: {}\".format(display_time(int((time.time() - start)/(toy+1))*((nr_of_toys-toy-1)))))\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open(\"data/results/Ctt_list.pkl\", \"wb\") as f:\n",
    "    pkl.dump(Ctt_list, f, pkl.HIGHEST_PROTOCOL)\n",
    "with open(\"data/results/Ctt_error_list.pkl\", \"wb\") as f:\n",
    "    pkl.dump(Ctt_error_list, f, pkl.HIGHEST_PROTOCOL)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9/10 fits converged\n",
      "Mean Ctt value = 0.4273973892545019\n",
      "Mean Ctt error = 0.13801002900535617\n",
      "95 Sensitivy = 0.0003199857041817954\n"
     ]
    }
   ],
   "source": [
    "print('{0}/{1} fits converged'.format(len(Ctt_list), nr_of_toys))\n",
    "print('Mean Ctt value = {}'.format(np.mean(Ctt_list)))\n",
    "print('Mean Ctt error = {}'.format(np.mean(Ctt_error_list)))\n",
    "print('95 Sensitivy = {}'.format(((2*np.mean(Ctt_error_list))**2)*4.2/1000))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAD4CAYAAAAO9oqkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAATI0lEQVR4nO3dfaxkdX3H8fenoNiqLYtcDAGaCwZNaWtXckNNrAa1KA8GtGlaSFNpNd1aNfGhSbvWxD4kTaj1oWnaatZKxEQRFY3EpdUNWolJ0d7VZVmKyIJrXNmwV6i0RmMLfvvHnMsOy+zeuffM3Jk5834lN3PmN2dmvue3O7/PeZozqSokSfPtpyZdgCRp8gwDSZJhIEkyDCRJGAaSJODESRcAcOqpp9bi4uKky5CkmbJ79+7vVdXCKF5rKsJgcXGR5eXlSZchSTMlybdH9VruJpIkGQaSJMNAkoRhIEnCMJAkYRhIkjAMJEkYBpIkDANJEoaBpE22uH3npEvQAIaBpE1nIEwfw0CSZBhIkgwDSRKGgSQJw0CSxBBhkOTaJIeT7OtruyHJnubvQJI9Tftikh/1Pfb+cRYvSRqNYX7p7EPAPwAfXm2oqt9enU7ybuDhvvnvraqtoypQkjR+a24ZVNWtwEODHksS4LeA60dcl6SO87sG06XtMYMXAg9U1T19bWcn+XqSLyV54bGemGRbkuUkyysrKy3LkCS10TYMruLxWwWHgJ+vqucBbwU+muRnBz2xqnZU1VJVLS0sLLQsQ5LUxobDIMmJwG8AN6y2VdWPq+rBZno3cC/w7LZFS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LYF4vXfFAszlHc3u4aT9Wf3Smn5I8iV4QfKSqPtU0z21/AFTV94F/o7ff9+Qkqytq/cv12DI3j/8cvd2Ps94XLwAuT3KA3m7il9DbUpi3fgCgqu5vbg/TW0G4gE34fExDGMzrpStuAlaP8F8NfKav/dXNWQLPBx5uNgs/B7wsyZbmTIKXNW0zpdm3+0Hgrqp6T99Dc9cfSRaaLQKS/DTw6/SOoXwR+M1mtqP7YrWPfhP4QvWOFt4EXNmcZXM2cC7w1c1Zivaq6m1VdWZVLdL7/H+hqn6HOesHgCRPTfL01Wl6/6/3sRmfj0kfOe87Iv5NevtL3z7pesawfNcDh4D/o5fYr6W3j/MW4J7m9pRm3tD7YaB7gTuApb7XeQ29g2L7gd+f9HJtsC9+jd7m6l5gT/N36Tz2B/Bc4OtNX+wD3tG0n0NvENsPfAI4qWl/SnN/f/P4OX2v9famj+4GLpn0srXokws5cjbR3PVDs8y3N393ro6Hm/H58HIUkqSp2E0kSZoww0CSZBhIkgwDSRKGgSQJw0CShGEgSQL+HwvJLWyYw7gGAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "(36668,)"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plt.hist(tot_sam, bins = int((x_max-x_min)/7.))\n",
    "\n",
    "plt.show()\n",
    "\n",
    "# _ = np.where((total_samp >= x_min) & (total_samp <= (jpsi_mass - 50.)))\n",
    "\n",
    "tot_sam.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "# sample from original values"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}