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",
    "import random\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), lower_limit = -2.0, upper_limit= 2.0)\n",
    "bplus_1 = zfit.Parameter(\"bplus_1\", ztf.constant(-0.885), lower_limit = -2.0, upper_limit= 2.0)\n",
    "bplus_2 = zfit.Parameter(\"bplus_2\", ztf.constant(-0.213), 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=-2.5, upper_limit=2.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": [],
   "source": [
    "# total_f_fit.normalization(obs_fit)"
   ]
  },
  {
   "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",
    "\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",
    "\n",
    "Ctt.set_value(0.5)\n",
    "\n",
    "calcs_test1 = zfit.run(probs)\n",
    "\n",
    "# Ctt.set_value(4.9)\n",
    "\n",
    "# calcs_test2 = 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:14: UserWarning: Creating legend with loc=\"best\" can be slow with large amounts of data.\n",
      "  \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+/AAAADh0RVh0U29mdHdhcmUAbWF0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HShuZuuQzoOnWQbYypEZAKQIyLFl+nrtVjokVKHQC5LdNIeamP/Vtn2IV3CSURCcBLSH4wxr9vmgIzFBcaYWuA9nOsC3ir5NVhkA18WkcM4p+9vwTlyCrQ4AGCMqbB/q3C+qGQwAO8PTUodArksUecSTl1LOz1gR9ZkAnX2kH0zsFREIuzom6W2bdCw5/5fBoqMMT/u9FIgxmK8PUJCRIYDS3CusXmr5NegYIx53BgzxTiFRVfi7Nd9BFgcAERkhIiMujCN8/+6gIF4f/h6hIc/PXBGkBzAOZ/+hK+3p5/28U9AJdCC8y3mIZzz4FuBg/bvtbav4Nwo8RCQD6R3Ws7XcC7glgL/5uv96kMcFuGcRnAD++1jeYDGIhmnpJfbfvD8wLbH4nyYlgJ/BsJs+zD7vNS+HttpWU/YGJUAt/l6364iJjfRMfou4OJg9znPPgovfB4OxPtDywwppZTyG3r6TimllN/QpKSUUspvaFJSSinlNzQpKaWU8hualJRSSvkNTUpKKaX8hiYlpZRSfuOf0QlWeWtOd2MAAAAASUVORK5CYII=\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 (Ctt = 0.0)')\n",
    "plt.plot(test_q, calcs_test1, label = 'pdf (Ctt = 0.5)')\n",
    "# plt.plot(test_q, calcs_test2, label = 'pdf (Ctt = 4.9)')\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": [
    "param_values_dic = {\n",
    "    'jpsi_m': jpsi_mass,\n",
    "    'jpsi_s': jpsi_scale,\n",
    "    'jpsi_p': jpsi_phase,\n",
    "    'jpsi_w': jpsi_width,\n",
    "    'psi2s_m': psi2s_mass,\n",
    "    'psi2s_s': psi2s_scale,\n",
    "    'psi2s_p': psi2s_phase,\n",
    "    'psi2s_w': psi2s_width,\n",
    "    'p3770_m': p3770_mass,\n",
    "    'p3770_s': p3770_scale,\n",
    "    'p3770_p': p3770_phase,\n",
    "    'p3770_w': p3770_width,\n",
    "    'p4040_m': p4040_mass,\n",
    "    'p4040_s': p4040_scale,\n",
    "    'p4040_p': p4040_phase,\n",
    "    'p4040_w': p4040_width,\n",
    "    'p4160_m': p4160_mass,\n",
    "    'p4160_s': p4160_scale,\n",
    "    'p4160_p': p4160_phase,\n",
    "    'p4160_w': p4160_width,\n",
    "    'p4415_m': p4415_mass,\n",
    "    'p4415_s': p4415_scale,\n",
    "    'p4415_p': p4415_phase,\n",
    "    'p4415_w': p4415_width,\n",
    "    'rho_m': rho_mass,\n",
    "    'rho_s': rho_scale,\n",
    "    'rho_p': rho_phase,\n",
    "    'rho_w': rho_width,\n",
    "    'omega_m': omega_mass,\n",
    "    'omega_s': omega_scale,\n",
    "    'omega_p': omega_phase,\n",
    "    'omega_w': omega_width,\n",
    "    'phi_m': phi_mass,\n",
    "    'phi_s': phi_scale,\n",
    "    'phi_p': phi_phase,\n",
    "    'phi_w': phi_width,\n",
    "    'Dstar_m': Dstar_mass,\n",
    "    'DDstar_s': 0.0,\n",
    "    'DDstar_p': 0.0,\n",
    "    'D_m': D_mass,\n",
    "    'Dbar_m': Dbar_mass,\n",
    "    'Dbar_s': 0.0,\n",
    "    'Dbar_p': 0.0,\n",
    "    'tau_m': pdg['tau_M'],\n",
    "    'Ctt': 0.0,\n",
    "    'b0_0': 0.292,\n",
    "    'b0_1': 0.281,\n",
    "    'b0_2': 0.150,\n",
    "    'bplus_0': 0.466,\n",
    "    'bplus_1': -0.885,\n",
    "    'bplus_2': -0.213,\n",
    "    'bT_0': 0.460,\n",
    "    'bT_1': -1.089,\n",
    "    'bT_2': -1.114}\n",
    "\n",
    "\n",
    "def reset_param_values(variation = 0.05):\n",
    "    for param in total_f_fit.get_dependents():\n",
    "        if param.floating:\n",
    "            param.set_value(param_values_dic[param.name] + random.uniform(-1, 1) * param_values_dic[param.name]* variation)\n",
    "#             print(param.name)\n",
    "#     for param in totalf.get_dependents():\n",
    "#         param.set_value()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Analysis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "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 = 1\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": [],
   "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": [],
   "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": [
    "# Ctt.floating = False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "# zfit.run(nll.value())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "# result.fmin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "# BR_steps = np.linspace(0.0, 1e-3, 11)\n",
    "pull_dic = {}\n",
    "\n",
    "for param in total_f_fit.get_dependents():\n",
    "    if param.floating:\n",
    "        pull_dic[param.name] = []\n",
    "\n",
    "def save_pulls():\n",
    "    for param in total_f_fit.get_dependents():\n",
    "        if param.floating:\n",
    "            pull_dic[param.name].append((params[param]['value'] - param_values_dic[param.name])/params[param]['minuit_hesse']['error'])\n",
    "#             pull_dic[param.name][-1].append(params[param.name]['value'])\n",
    "#             print('worked')\n",
    "\n",
    "\n",
    "# save_pulls(New_step=True)\n",
    "# params[Ctt]['value']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "# for param in total_f_fit.get_dependents():\n",
    "#     if param.floating:\n",
    "#         print(param.name)\n",
    "\n",
    "# print(params[Ctt])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# CLS Code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.         0.48795004 0.69006556 0.84515425 0.97590007 1.09108945\n",
      " 1.19522861 1.29099445 1.38013112 1.46385011 1.5430335 ]\n",
      "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",
      "Step: 0/11\n",
      "Current Ctt: 0.0\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n",
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |    Ncalls=1150 (1150 total)    |\n",
      "| EDM = 4.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: 297273.8709291381\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.57   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.50   |    0.05   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.7    |    1.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.37    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.43   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.5    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.28    |   0.21    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |    2.7    |    0.3    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.79    |   0.16    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.75    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.69   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |  -0.028   |   1.272   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.05    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.32    |   0.16    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.18   |    0.35   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.494   |   0.012   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.879   |   0.022   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.53    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -1.95   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.42   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   21.2    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.72   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    6.5    |    1.5    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.26    |   0.29    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.482   -0.439   -0.115    0.302    0.020    0.188    0.385   -0.007   -0.299    0.533   -0.370    0.387    0.229   -0.533   -0.078   -0.158   -0.004    0.419    0.006   -0.032    0.036    0.029   -0.063 |\n",
      "|   jpsi_p |    0.482    1.000   -0.766   -0.173    0.309    0.013    0.380    0.563    0.017   -0.246    0.754   -0.525    0.684   -0.092   -0.737   -0.088   -0.144   -0.067    0.598   -0.010   -0.004   -0.013    0.016   -0.035 |\n",
      "|   Dbar_p |   -0.439   -0.766    1.000    0.234   -0.140   -0.026   -0.367   -0.577    0.003    0.283   -0.859    0.865   -0.720    0.137    0.906    0.058    0.140    0.022   -0.470    0.030    0.035   -0.049   -0.036    0.072 |\n",
      "| DDstar_s |   -0.115   -0.173    0.234    1.000    0.019   -0.004   -0.180   -0.177   -0.000    0.119   -0.243    0.287   -0.184    0.063    0.297   -0.023   -0.026    0.019   -0.111    0.053    0.006   -0.012   -0.004    0.005 |\n",
      "|  p4415_p |    0.302    0.309   -0.140    0.019    1.000    0.010    0.118    0.209   -0.009   -0.221    0.257   -0.011    0.207   -0.045   -0.194   -0.010   -0.056   -0.176    0.468    0.116   -0.033    0.054    0.014   -0.036 |\n",
      "|  omega_p |    0.020    0.013   -0.026   -0.004    0.010    1.000    0.018    0.022   -0.053   -0.010    0.025   -0.027    0.023   -0.002   -0.032   -0.025    0.007   -0.008    0.019    0.021    0.001   -0.007    0.749    0.065 |\n",
      "|      Ctt |    0.188    0.380   -0.367   -0.180    0.118    0.018    1.000    0.274   -0.011    0.140    0.279   -0.482    0.458    0.180   -0.520   -0.162   -0.294    0.102    0.028    0.513   -0.033    0.056    0.031   -0.081 |\n",
      "|  p3770_s |    0.385    0.563   -0.577   -0.177    0.209    0.022    0.274    1.000   -0.005   -0.112    0.494   -0.525    0.417   -0.043   -0.661   -0.076   -0.162   -0.035    0.410   -0.054   -0.031    0.032    0.032   -0.067 |\n",
      "|    phi_p |   -0.007    0.017    0.003   -0.000   -0.009   -0.053   -0.011   -0.005    1.000   -0.006    0.003    0.006    0.002   -0.016    0.000   -0.004   -0.018    0.004    0.002   -0.076    0.521   -0.232   -0.122    0.150 |\n",
      "|  p4040_s |   -0.299   -0.246    0.283    0.119   -0.221   -0.010    0.140   -0.112   -0.006    1.000   -0.318    0.253   -0.211   -0.039    0.290    0.091    0.137    0.180   -0.495    0.055   -0.004    0.022   -0.016    0.029 |\n",
      "|  p3770_p |    0.533    0.754   -0.859   -0.243    0.257    0.025    0.279    0.494    0.003   -0.318    1.000   -0.706    0.690   -0.116   -0.836   -0.074   -0.165   -0.084    0.594   -0.066   -0.026    0.027    0.034   -0.068 |\n",
      "| DDstar_p |   -0.370   -0.525    0.865    0.287   -0.011   -0.027   -0.482   -0.525    0.006    0.253   -0.706    1.000   -0.625    0.120    0.922    0.166    0.283    0.037   -0.274    0.010    0.025   -0.013   -0.043    0.087 |\n",
      "|  psi2s_p |    0.387    0.684   -0.720   -0.184    0.207    0.023    0.458    0.417    0.002   -0.211    0.690   -0.625    1.000   -0.120   -0.782   -0.101   -0.178   -0.038    0.472   -0.057   -0.022    0.018    0.033   -0.065 |\n",
      "|  p4160_s |    0.229   -0.092    0.137    0.063   -0.045   -0.002    0.180   -0.043   -0.016   -0.039   -0.116    0.120   -0.120    1.000    0.102    0.070    0.066    0.321   -0.136    0.130   -0.029    0.057   -0.003   -0.004 |\n",
      "|   Dbar_s |   -0.533   -0.737    0.906    0.297   -0.194   -0.032   -0.520   -0.661    0.000    0.290   -0.836    0.922   -0.782    0.102    1.000    0.168    0.294    0.066   -0.505    0.027    0.026   -0.016   -0.048    0.094 |\n",
      "|  bplus_0 |   -0.078   -0.088    0.058   -0.023   -0.010   -0.025   -0.162   -0.076   -0.004    0.091   -0.074    0.166   -0.101    0.070    0.168    1.000   -0.548    0.116   -0.072   -0.165   -0.024    0.077   -0.056    0.135 |\n",
      "|  bplus_1 |   -0.158   -0.144    0.140   -0.026   -0.056    0.007   -0.294   -0.162   -0.018    0.137   -0.165    0.283   -0.178    0.066    0.294   -0.548    1.000    0.175   -0.146   -0.161   -0.008    0.028    0.017   -0.035 |\n",
      "|  p4415_s |   -0.004   -0.067    0.022    0.019   -0.176   -0.008    0.102   -0.035    0.004    0.180   -0.084    0.037   -0.038    0.321    0.066    0.116    0.175    1.000   -0.130   -0.141    0.006    0.000   -0.014    0.034 |\n",
      "|  p4160_p |    0.419    0.598   -0.470   -0.111    0.468    0.019    0.028    0.410    0.002   -0.495    0.594   -0.274    0.472   -0.136   -0.505   -0.072   -0.146   -0.130    1.000   -0.018   -0.023    0.023    0.026   -0.054 |\n",
      "|  bplus_2 |    0.006   -0.010    0.030    0.053    0.116    0.021    0.513   -0.054   -0.076    0.055   -0.066    0.010   -0.057    0.130    0.027   -0.165   -0.161   -0.141   -0.018    1.000   -0.130    0.243    0.038   -0.123 |\n",
      "|    phi_s |   -0.032   -0.004    0.035    0.006   -0.033    0.001   -0.033   -0.031    0.521   -0.004   -0.026    0.025   -0.022   -0.029    0.026   -0.024   -0.008    0.006   -0.023   -0.130    1.000   -0.155   -0.020    0.032 |\n",
      "|    rho_p |    0.036   -0.013   -0.049   -0.012    0.054   -0.007    0.056    0.032   -0.232    0.022    0.027   -0.013    0.018    0.057   -0.016    0.077    0.028    0.000    0.023    0.243   -0.155    1.000    0.033    0.070 |\n",
      "|  omega_s |    0.029    0.016   -0.036   -0.004    0.014    0.749    0.031    0.032   -0.122   -0.016    0.034   -0.043    0.033   -0.003   -0.048   -0.056    0.017   -0.014    0.026    0.038   -0.020    0.033    1.000   -0.293 |\n",
      "|    rho_s |   -0.063   -0.035    0.072    0.005   -0.036    0.065   -0.081   -0.067    0.150    0.029   -0.068    0.087   -0.065   -0.004    0.094    0.135   -0.035    0.034   -0.054   -0.123    0.032    0.070   -0.293    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.28352621263856337}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.05038662024300322}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.5732511685984045}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.3736854789441693}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.15151420098909463}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3440702605356085}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.21319093763028918}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.32186116177258484}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.16187996423558548}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17892619329661458}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.2297087561374258}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.2724933066778785}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.053536825452390246}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16472855866030867}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.34557382690153804}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.011799429497272973}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.022403797785435886}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18959662604954086}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.1283678549426388}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07456839710503183}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.917590289385739}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.30382146980058256}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.4942980730275521}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.2874728346943007})])\n",
      "Step: 0/11\n",
      "Current Ctt: 0.0\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |    Ncalls=1071 (1071 total)    |\n",
      "| EDM = 0.000544 (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: 297274.34471378947\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.6    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.49   |    0.07   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    1.4    |    3.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.39    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.43   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.5    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.68    |   0.29    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.79    |   0.16    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.70    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.63   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |    0.4    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.27    |   0.16    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.10    |   0.48    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.490   |   0.016   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.85   |    0.03   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.54    |   0.23    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -1.91   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.48   |    0.10   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   21.2    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.7    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    6.5    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |   1.27    |   0.28    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000   -0.520    0.667   -0.410    0.329    0.021    0.417    0.013   -0.402   -0.492    0.064   -0.159    0.293   -0.645   -0.542   -0.592   -0.373    0.327   -0.474    0.094   -0.272    0.059   -0.093 |\n",
      "|   jpsi_p |   -0.520    1.000   -0.888    0.589   -0.052   -0.024   -0.430   -0.016    0.440    0.829    0.491    0.369    0.009    0.893    0.677    0.722    0.537   -0.103    0.738   -0.142    0.375   -0.074    0.100 |\n",
      "|   Dbar_p |    0.667   -0.888    1.000   -0.658    0.198    0.024    0.574    0.029   -0.511   -0.831   -0.325   -0.255   -0.008   -0.938   -0.780   -0.829   -0.622    0.319   -0.826    0.171   -0.447    0.076   -0.101 |\n",
      "| DDstar_s |   -0.410    0.589   -0.658    1.000   -0.076   -0.010   -0.365   -0.021    0.381    0.527    0.241    0.228    0.051    0.638    0.444    0.457    0.414   -0.210    0.578   -0.113    0.283   -0.039    0.041 |\n",
      "|  p4415_p |    0.329   -0.052    0.198   -0.076    1.000    0.013    0.225   -0.002   -0.214   -0.086    0.386    0.092    0.022   -0.211   -0.190   -0.226   -0.249    0.501   -0.067    0.008   -0.055    0.028   -0.057 |\n",
      "|  omega_p |    0.021   -0.024    0.024   -0.010    0.013    1.000    0.018   -0.044   -0.012   -0.020    0.006   -0.003    0.003   -0.024   -0.029   -0.014   -0.019    0.016   -0.005    0.008   -0.021    0.725    0.081 |\n",
      "|  p3770_s |    0.417   -0.430    0.574   -0.365    0.225    0.018    1.000    0.011   -0.164   -0.545    0.027   -0.263    0.063   -0.531   -0.441   -0.482   -0.332    0.260   -0.435    0.077   -0.228    0.048   -0.077 |\n",
      "|    phi_p |    0.013   -0.016    0.029   -0.021   -0.002   -0.044    0.011    1.000   -0.016   -0.023    0.000   -0.005   -0.011   -0.029   -0.029   -0.037   -0.014    0.007   -0.069    0.505   -0.210   -0.110    0.142 |\n",
      "|  p4040_s |   -0.402    0.440   -0.511    0.381   -0.214   -0.012   -0.164   -0.016    1.000    0.400    0.221    0.155   -0.165    0.468    0.428    0.463    0.380   -0.395    0.310   -0.089    0.228   -0.040    0.059 |\n",
      "|  p3770_p |   -0.492    0.829   -0.831    0.527   -0.086   -0.020   -0.545   -0.023    0.400    1.000    0.313    0.297    0.018    0.873    0.675    0.709    0.514   -0.134    0.728   -0.151    0.389   -0.065    0.083 |\n",
      "| DDstar_p |    0.064    0.491   -0.325    0.241    0.386    0.006    0.027    0.000    0.221    0.313    1.000    0.451    0.155    0.187    0.139    0.120    0.150    0.367    0.300   -0.052    0.124   -0.003   -0.013 |\n",
      "|  psi2s_p |   -0.159    0.369   -0.255    0.228    0.092   -0.003   -0.263   -0.005    0.155    0.297    0.451    1.000   -0.050    0.289    0.194    0.208    0.161    0.124    0.158   -0.050    0.117   -0.016    0.019 |\n",
      "|  p4160_s |    0.293    0.009   -0.008    0.051    0.022    0.003    0.063   -0.011   -0.165    0.018    0.155   -0.050    1.000   -0.019    0.037    0.029    0.213    0.022   -0.011   -0.025    0.038    0.003   -0.012 |\n",
      "|   Dbar_s |   -0.645    0.893   -0.938    0.638   -0.211   -0.024   -0.531   -0.029    0.468    0.873    0.187    0.289   -0.019    1.000    0.782    0.833    0.608   -0.289    0.788   -0.170    0.443   -0.075    0.102 |\n",
      "|  bplus_0 |   -0.542    0.677   -0.780    0.444   -0.190   -0.029   -0.441   -0.029    0.428    0.675    0.139    0.194    0.037    0.782    1.000    0.456    0.548   -0.309    0.566   -0.153    0.397   -0.085    0.145 |\n",
      "|  bplus_1 |   -0.592    0.722   -0.829    0.457   -0.226   -0.014   -0.482   -0.037    0.463    0.709    0.120    0.208    0.029    0.833    0.456    1.000    0.599   -0.358    0.637   -0.153    0.394   -0.052    0.059 |\n",
      "|  p4415_s |   -0.373    0.537   -0.622    0.414   -0.249   -0.019   -0.332   -0.014    0.380    0.514    0.150    0.161    0.213    0.608    0.548    0.599    1.000   -0.237    0.368   -0.099    0.269   -0.056    0.088 |\n",
      "|  p4160_p |    0.327   -0.103    0.319   -0.210    0.501    0.016    0.260    0.007   -0.395   -0.134    0.367    0.124    0.022   -0.289   -0.309   -0.358   -0.237    1.000   -0.096    0.034   -0.117    0.038   -0.073 |\n",
      "|  bplus_2 |   -0.474    0.738   -0.826    0.578   -0.067   -0.005   -0.435   -0.069    0.310    0.728    0.300    0.158   -0.011    0.788    0.566    0.637    0.368   -0.096    1.000   -0.218    0.492   -0.038    0.007 |\n",
      "|    phi_s |    0.094   -0.142    0.171   -0.113    0.008    0.008    0.077    0.505   -0.089   -0.151   -0.052   -0.050   -0.025   -0.170   -0.153   -0.153   -0.099    0.034   -0.218    1.000   -0.201   -0.002    0.008 |\n",
      "|    rho_p |   -0.272    0.375   -0.447    0.283   -0.055   -0.021   -0.228   -0.210    0.228    0.389    0.124    0.117    0.038    0.443    0.397    0.394    0.269   -0.117    0.492   -0.201    1.000   -0.010    0.110 |\n",
      "|  omega_s |    0.059   -0.074    0.076   -0.039    0.028    0.725    0.048   -0.110   -0.040   -0.065   -0.003   -0.016    0.003   -0.075   -0.085   -0.052   -0.056    0.038   -0.038   -0.002   -0.010    1.000   -0.288 |\n",
      "|    rho_s |   -0.093    0.100   -0.101    0.041   -0.057    0.081   -0.077    0.142    0.059    0.083   -0.013    0.019   -0.012    0.102    0.145    0.059    0.088   -0.073    0.007    0.008    0.110   -0.288    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.33613720769276334}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.07168486257099982}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 3.4877084075738707}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.3936049625159448}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.15282567704670336}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.32497443812384486}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.28727775868059524}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.158099828940657}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18230469609938865}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.2154444454633726}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.5681341376072901}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03529058938714513}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.15611798082374673}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4762314338619739}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.016145594420506004}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.0326255683289467}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.232651737978122}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10775947057104585}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.09594059905446628}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9103084721649708}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.3300173858898332}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.4221746835651983}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.28128763525077927})])\n",
      "Step: 1/11\n",
      "Current Ctt: 0.4879500364742666\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |      Ncalls=79 (79 total)      |\n",
      "| EDM = 5.72E-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: 297414.33649418864\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.85   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.51   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   0.016   |   2.101   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.14    |   0.20    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.63   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.14    |   0.41    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.44    |   0.16    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.74    |   0.27    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.94    |   0.14    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.14    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.84   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |  0.000E1  |  0.416E1  |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.07    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.29    |   0.16    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.21    |   0.12    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.422   |   0.010   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.763   |   0.020   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.12    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.34   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.22   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.1    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.23   |    0.48   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    6.8    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    0.9    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.502   -0.550    0.584    0.506   -0.050    0.041    0.327    0.041   -0.290    0.133    0.662    0.143    0.258   -0.489    0.283    0.369   -0.179    0.614   -0.159    0.024   -0.046   -0.069    0.095 |\n",
      "|   jpsi_p |    0.502    1.000   -0.381    0.524    0.458   -0.080    0.130    0.363    0.074   -0.143    0.286    0.606    0.347   -0.006   -0.249    0.268    0.384   -0.204    0.630   -0.147    0.059   -0.130   -0.109    0.087 |\n",
      "|   Dbar_p |   -0.550   -0.381    1.000   -0.887   -0.568    0.086   -0.175   -0.367   -0.075    0.158    0.294   -0.944   -0.069   -0.054    0.689   -0.350   -0.491    0.319   -0.705    0.277   -0.070    0.136    0.116   -0.110 |\n",
      "| DDstar_s |    0.584    0.524   -0.887    1.000    0.554   -0.099    0.189    0.410    0.076   -0.209   -0.072    0.920    0.149    0.012   -0.692    0.469    0.633   -0.311    0.757   -0.299    0.064   -0.124   -0.133    0.153 |\n",
      "|  p4415_p |    0.506    0.458   -0.568    0.554    1.000   -0.046    0.130    0.320    0.036   -0.247    0.038    0.648    0.167   -0.058   -0.452    0.258    0.339   -0.371    0.659   -0.078    0.021   -0.035   -0.064    0.093 |\n",
      "|  omega_p |   -0.050   -0.080    0.086   -0.099   -0.046    1.000   -0.009   -0.033   -0.139    0.013    0.002   -0.090   -0.018   -0.002    0.050   -0.090   -0.032    0.013   -0.068    0.093   -0.025    0.131    0.763   -0.117 |\n",
      "|      Ctt |    0.041    0.130   -0.175    0.189    0.130   -0.009    1.000    0.036   -0.002    0.248   -0.224    0.148    0.166    0.266   -0.324   -0.002    0.005    0.060    0.001    0.471   -0.008    0.034   -0.011    0.036 |\n",
      "|  p3770_s |    0.327    0.363   -0.367    0.410    0.320   -0.033    0.036    1.000    0.026    0.011   -0.134    0.450   -0.034    0.054   -0.373    0.216    0.273   -0.130    0.401   -0.140    0.011   -0.024   -0.047    0.070 |\n",
      "|    phi_p |    0.041    0.074   -0.075    0.076    0.036   -0.139   -0.002    0.026    1.000   -0.018   -0.004    0.080    0.018   -0.012   -0.058    0.030    0.024   -0.015    0.060   -0.124    0.413   -0.330   -0.202   -0.008 |\n",
      "|  p4040_s |   -0.290   -0.143    0.158   -0.209   -0.247    0.013    0.248    0.011   -0.018    1.000   -0.103   -0.189    0.013   -0.022    0.182   -0.038   -0.063    0.201   -0.400    0.074   -0.018    0.034    0.019   -0.009 |\n",
      "|  p3770_p |    0.133    0.286    0.294   -0.072    0.038    0.002   -0.224   -0.134   -0.004   -0.103    1.000   -0.088    0.147   -0.066    0.216    0.074    0.061   -0.010    0.129    0.005   -0.019    0.033    0.001    0.023 |\n",
      "| DDstar_p |    0.662    0.606   -0.944    0.920    0.648   -0.090    0.148    0.450    0.080   -0.189   -0.088    1.000    0.221    0.047   -0.651    0.414    0.566   -0.332    0.832   -0.286    0.067   -0.127   -0.123    0.132 |\n",
      "|  psi2s_p |    0.143    0.347   -0.069    0.149    0.167   -0.018    0.166   -0.034    0.018    0.013    0.147    0.221    1.000   -0.025   -0.155    0.108    0.146   -0.036    0.236   -0.089    0.008   -0.017   -0.026    0.036 |\n",
      "|  p4160_s |    0.258   -0.006   -0.054    0.012   -0.058   -0.002    0.266    0.054   -0.012   -0.022   -0.066    0.047   -0.025    1.000   -0.027    0.080    0.077    0.274   -0.066    0.059   -0.021    0.039   -0.003    0.035 |\n",
      "|   Dbar_s |   -0.489   -0.249    0.689   -0.692   -0.452    0.050   -0.324   -0.373   -0.058    0.182    0.216   -0.651   -0.155   -0.027    1.000   -0.152   -0.238    0.285   -0.556    0.254   -0.062    0.119    0.068   -0.036 |\n",
      "|  bplus_0 |    0.283    0.268   -0.350    0.469    0.258   -0.090   -0.002    0.216    0.030   -0.038    0.074    0.414    0.108    0.080   -0.152    1.000   -0.086   -0.043    0.345   -0.232    0.001   -0.035   -0.123    0.218 |\n",
      "|  bplus_1 |    0.369    0.384   -0.491    0.633    0.339   -0.032    0.005    0.273    0.024   -0.063    0.061    0.566    0.146    0.077   -0.238   -0.086    1.000   -0.069    0.460   -0.310    0.022   -0.013   -0.044    0.083 |\n",
      "|  p4415_s |   -0.179   -0.204    0.319   -0.311   -0.371    0.013    0.060   -0.130   -0.015    0.201   -0.010   -0.332   -0.036    0.274    0.285   -0.043   -0.069    1.000   -0.303   -0.057   -0.011    0.012    0.019   -0.025 |\n",
      "|  p4160_p |    0.614    0.630   -0.705    0.757    0.659   -0.068    0.001    0.401    0.060   -0.400    0.129    0.832    0.236   -0.066   -0.556    0.345    0.460   -0.303    1.000   -0.203    0.043   -0.080   -0.093    0.114 |\n",
      "|  bplus_2 |   -0.159   -0.147    0.277   -0.299   -0.078    0.093    0.471   -0.140   -0.124    0.074    0.005   -0.286   -0.089    0.059    0.254   -0.232   -0.310   -0.057   -0.203    1.000   -0.148    0.330    0.122    0.034 |\n",
      "|    phi_s |    0.024    0.059   -0.070    0.064    0.021   -0.025   -0.008    0.011    0.413   -0.018   -0.019    0.067    0.008   -0.021   -0.062    0.001    0.022   -0.011    0.043   -0.148    1.000   -0.159   -0.045   -0.072 |\n",
      "|    rho_p |   -0.046   -0.130    0.136   -0.124   -0.035    0.131    0.034   -0.024   -0.330    0.034    0.033   -0.127   -0.017    0.039    0.119   -0.035   -0.013    0.012   -0.080    0.330   -0.159    1.000    0.336    0.295 |\n",
      "|  omega_s |   -0.069   -0.109    0.116   -0.133   -0.064    0.763   -0.011   -0.047   -0.202    0.019    0.001   -0.123   -0.026   -0.003    0.068   -0.123   -0.044    0.019   -0.093    0.122   -0.045    0.336    1.000   -0.275 |\n",
      "|    rho_s |    0.095    0.087   -0.110    0.153    0.093   -0.117    0.036    0.070   -0.008   -0.009    0.023    0.132    0.036    0.035   -0.036    0.218    0.083   -0.025    0.114    0.034   -0.072    0.295   -0.275    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2072488352107431}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04034960253245101}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 2.1007795388844173}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.19748677627001832}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.22637347342585756}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.4125053845187434}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1627954794323916}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2676380680727024}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.14127373196959336}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.167503605004045}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12300993017203421}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 4.156360755891731}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03431113520279805}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16338017098667512}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.12182521122221376}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.009649965681801875}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.020279927754531912}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.20167490879077943}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.17632807612354884}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.06297570574778988}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.8607039817764175}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.4824332093182542}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.4360008623533704}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.32819699081783943})])\n",
      "Step: 1/11\n",
      "Current Ctt: 0.4879500364742666\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1022 (1022 total)    |\n",
      "| EDM = 0.00119 (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      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297412.68997827766\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.87   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.49   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   0.24    |   0.90    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.27    |   0.07    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.8    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   -0.24   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.94    |   0.28    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.85    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   1.12    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.72   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |    0.5    |    2.1    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.07    |   0.05    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.14    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.09    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.416   |   0.015   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.72   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.25    |   0.23    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.28   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.37   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   18.6    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.29   |    0.44   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    5.7    |    1.1    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |    0.8    |    0.4    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.723   -0.534   -0.120    0.732    0.048    0.377   -0.003   -0.108    0.035    0.802    0.564    0.502   -0.228   -0.182   -0.635   -0.337    0.714    0.581   -0.026    0.074    0.100   -0.221 |\n",
      "|   jpsi_p |    0.723    1.000   -0.418   -0.043    0.720    0.037    0.441    0.024   -0.076    0.130    0.797    0.686    0.241   -0.279   -0.222   -0.624   -0.414    0.795    0.485    0.014   -0.012    0.080   -0.231 |\n",
      "|   Dbar_p |   -0.534   -0.418    1.000    0.089   -0.627   -0.042   -0.195   -0.003   -0.135    0.518   -0.827   -0.375   -0.355    0.318    0.235    0.666    0.373   -0.539   -0.605   -0.002   -0.027   -0.096    0.239 |\n",
      "| DDstar_s |   -0.120   -0.043    0.089    1.000   -0.142   -0.017   -0.031    0.005   -0.032    0.157   -0.137   -0.111   -0.083    0.082    0.103    0.295    0.124   -0.087   -0.200   -0.000   -0.008   -0.044    0.111 |\n",
      "|  p4415_p |    0.732    0.720   -0.627   -0.142    1.000    0.050    0.384   -0.001   -0.092   -0.058    0.849    0.602    0.280   -0.273   -0.199   -0.672   -0.487    0.814    0.608   -0.022    0.069    0.105   -0.236 |\n",
      "|  omega_p |    0.048    0.037   -0.042   -0.017    0.050    1.000    0.027   -0.051   -0.003   -0.008    0.056    0.039    0.021   -0.018   -0.054   -0.023   -0.034    0.051    0.067   -0.003    0.002    0.501   -0.163 |\n",
      "|  p3770_s |    0.377    0.441   -0.195   -0.031    0.384    0.027    1.000   -0.007    0.126   -0.133    0.412    0.189    0.208   -0.075   -0.065   -0.312   -0.163    0.381    0.290   -0.028    0.059    0.052   -0.104 |\n",
      "|    phi_p |   -0.003    0.024   -0.003    0.005   -0.001   -0.051   -0.007    1.000    0.005    0.002    0.008    0.009   -0.006    0.001    0.017   -0.026    0.010   -0.000   -0.066    0.547   -0.279   -0.139    0.041 |\n",
      "|  p4040_s |   -0.108   -0.076   -0.135   -0.032   -0.092   -0.003    0.126    0.005    1.000   -0.187    0.038    0.016   -0.091   -0.089    0.007    0.025    0.114   -0.224   -0.169    0.013   -0.027   -0.004   -0.003 |\n",
      "|  p3770_p |    0.035    0.130    0.518    0.157   -0.058   -0.008   -0.133    0.002   -0.187    1.000   -0.192    0.054   -0.119    0.079    0.091    0.163    0.032    0.062   -0.122   -0.011    0.007   -0.026    0.067 |\n",
      "| DDstar_p |    0.802    0.797   -0.827   -0.137    0.849    0.056    0.412    0.008    0.038   -0.192    1.000    0.697    0.390   -0.348   -0.258   -0.801   -0.476    0.839    0.688   -0.006    0.049    0.120   -0.289 |\n",
      "|  psi2s_p |    0.564    0.686   -0.375   -0.111    0.602    0.039    0.189    0.009    0.016    0.054    0.697    1.000    0.198   -0.204   -0.170   -0.530   -0.312    0.643    0.361   -0.004    0.028    0.082   -0.199 |\n",
      "|  p4160_s |    0.502    0.241   -0.355   -0.083    0.280    0.021    0.208   -0.006   -0.091   -0.119    0.390    0.198    1.000   -0.164   -0.053   -0.257    0.081    0.241    0.165   -0.018    0.038    0.043   -0.089 |\n",
      "|   Dbar_s |   -0.228   -0.279    0.318    0.082   -0.273   -0.018   -0.075    0.001   -0.089    0.079   -0.348   -0.204   -0.164    1.000    0.072    0.238    0.118   -0.240   -0.302    0.011   -0.034   -0.036    0.077 |\n",
      "|  bplus_0 |   -0.182   -0.222    0.235    0.103   -0.199   -0.054   -0.065    0.017    0.007    0.091   -0.258   -0.170   -0.053    0.072    1.000   -0.274    0.148   -0.204   -0.286   -0.018   -0.066   -0.142    0.323 |\n",
      "|  bplus_1 |   -0.635   -0.624    0.666    0.295   -0.672   -0.023   -0.312   -0.026    0.025    0.163   -0.801   -0.530   -0.257    0.238   -0.274    1.000    0.467   -0.689   -0.610    0.003    0.014   -0.039    0.129 |\n",
      "|  p4415_s |   -0.337   -0.414    0.373    0.124   -0.487   -0.034   -0.163    0.010    0.114    0.032   -0.476   -0.312    0.081    0.118    0.148    0.467    1.000   -0.441   -0.577    0.025   -0.071   -0.073    0.151 |\n",
      "|  p4160_p |    0.714    0.795   -0.539   -0.087    0.814    0.051    0.381   -0.000   -0.224    0.062    0.839    0.643    0.241   -0.240   -0.204   -0.689   -0.441    1.000    0.670   -0.024    0.074    0.106   -0.238 |\n",
      "|  bplus_2 |    0.581    0.485   -0.605   -0.200    0.608    0.067    0.290   -0.066   -0.169   -0.122    0.688    0.361    0.165   -0.302   -0.286   -0.610   -0.577    0.670    1.000   -0.106    0.242    0.143   -0.215 |\n",
      "|    phi_s |   -0.026    0.014   -0.002   -0.000   -0.022   -0.003   -0.028    0.547    0.013   -0.011   -0.006   -0.004   -0.018    0.011   -0.018    0.003    0.025   -0.024   -0.106    1.000   -0.154   -0.038   -0.046 |\n",
      "|    rho_p |    0.074   -0.012   -0.027   -0.008    0.069    0.002    0.059   -0.279   -0.027    0.007    0.049    0.028    0.038   -0.034   -0.066    0.014   -0.071    0.074    0.242   -0.154    1.000    0.361    0.093 |\n",
      "|  omega_s |    0.100    0.080   -0.096   -0.044    0.105    0.501    0.052   -0.139   -0.004   -0.026    0.120    0.082    0.043   -0.036   -0.142   -0.039   -0.073    0.106    0.143   -0.038    0.361    1.000   -0.399 |\n",
      "|    rho_s |   -0.221   -0.231    0.239    0.111   -0.236   -0.163   -0.104    0.041   -0.003    0.067   -0.289   -0.199   -0.089    0.077    0.323    0.129    0.151   -0.238   -0.215   -0.046    0.093   -0.399    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.279049290337702}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.05504467438436267}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.8950709743955687}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.07141124025393239}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.3166180434334074}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.29710094586860514}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2792205155580123}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.1757076131390325}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17150525281800966}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12848355699006397}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 2.095131229301209}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04989921051831914}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1843684432990269}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.09243196053888281}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.015044205763056429}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.043281010363327654}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.23153206196379328}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.20266416707429236}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.0714449015351929}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9697185238584005}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.44360907664180704}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1150280763222735}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3561598933837779})])\n",
      "Step: 1/11\n",
      "Current Ctt: 0.4879500364742666\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1157 (1157 total)    |\n",
      "| EDM = 0.0017 (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: 297393.01804345736\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.84   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.51   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -2.1    |    1.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.41    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.49   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.026   |   0.305   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.61    |   0.29    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.88    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |    0.4    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.29    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.97   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   0.27    |   1.72    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   1.91    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.28    |   0.08    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.440   |   0.011   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.810   |   0.022   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.37    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.26   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.28   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.4    |    1.6    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.16   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    6.3    |    1.2    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.50    |   0.32    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.582    0.392    0.335    0.565    0.019   -0.396    0.114    0.005   -0.066    0.472    0.594    0.294    0.363   -0.209   -0.019   -0.108    0.007    0.562    0.145   -0.011    0.055    0.017   -0.010 |\n",
      "|   jpsi_p |    0.582    1.000    0.742    0.527    0.698    0.004   -0.562    0.084    0.016    0.178    0.499    0.882    0.440    0.183   -0.442   -0.018   -0.058   -0.025    0.710    0.231    0.005    0.006   -0.007    0.004 |\n",
      "|   Dbar_p |    0.392    0.742    1.000    0.640    0.594    0.009   -0.804   -0.127    0.017    0.261    0.376    0.922    0.221    0.174   -0.444    0.120    0.132    0.066    0.567    0.207   -0.008    0.066   -0.008    0.056 |\n",
      "| DDstar_s |    0.335    0.527    0.640    1.000    0.474    0.017   -0.511   -0.037    0.008    0.204    0.215    0.644    0.245    0.179   -0.317   -0.037   -0.129    0.029    0.420    0.215   -0.006    0.051    0.017   -0.012 |\n",
      "|  p4415_p |    0.565    0.698    0.594    0.474    1.000    0.020   -0.486    0.086    0.008    0.023    0.461    0.744    0.363    0.089   -0.269    0.002   -0.082   -0.118    0.718    0.263   -0.014    0.077    0.016    0.007 |\n",
      "|  omega_p |    0.019    0.004    0.009    0.017    0.020    1.000   -0.004    0.008    0.009    0.001    0.008    0.017    0.011    0.007   -0.002   -0.036    0.022   -0.009    0.019    0.043    0.031    0.099    0.621   -0.087 |\n",
      "|      Ctt |   -0.396   -0.562   -0.804   -0.511   -0.486   -0.004    1.000    0.050   -0.018   -0.004   -0.427   -0.753   -0.110    0.022    0.419   -0.112   -0.148    0.062   -0.581    0.209   -0.008   -0.001    0.010   -0.029 |\n",
      "|  p3770_s |    0.114    0.084   -0.127   -0.037    0.086    0.008    0.050    1.000   -0.007    0.087   -0.141    0.020   -0.058    0.058    0.048   -0.027   -0.083   -0.010    0.082   -0.018   -0.010    0.019    0.013   -0.019 |\n",
      "|    phi_p |    0.005    0.016    0.017    0.008    0.008    0.009   -0.018   -0.007    1.000    0.003    0.011    0.022    0.007   -0.004   -0.011    0.009   -0.024    0.005    0.012   -0.052    0.877   -0.175   -0.096   -0.034 |\n",
      "|  p4040_s |   -0.066    0.178    0.261    0.204    0.023    0.001   -0.004    0.087    0.003    1.000   -0.007    0.226    0.110    0.026   -0.088    0.076    0.102    0.172   -0.159    0.093   -0.008    0.035   -0.006    0.036 |\n",
      "|  p3770_p |    0.472    0.499    0.376    0.215    0.461    0.008   -0.427   -0.141    0.011   -0.007    1.000    0.503    0.247    0.070   -0.392    0.020   -0.038   -0.082    0.531    0.063    0.000    0.019    0.003   -0.000 |\n",
      "| DDstar_p |    0.594    0.882    0.922    0.644    0.744    0.017   -0.753    0.020    0.022    0.226    0.503    1.000    0.418    0.214   -0.400    0.050    0.007    0.013    0.743    0.225   -0.001    0.063    0.005    0.025 |\n",
      "|  psi2s_p |    0.294    0.440    0.221    0.245    0.363    0.011   -0.110   -0.058    0.007    0.110    0.247    0.418    1.000    0.073   -0.157   -0.049   -0.098   -0.015    0.369    0.075    0.001    0.014    0.010   -0.018 |\n",
      "|  p4160_s |    0.363    0.183    0.174    0.179    0.089    0.007    0.022    0.058   -0.004    0.026    0.070    0.214    0.073    1.000   -0.041    0.061    0.047    0.315    0.060    0.136   -0.020    0.060    0.003    0.028 |\n",
      "|   Dbar_s |   -0.209   -0.442   -0.444   -0.317   -0.269   -0.002    0.419    0.048   -0.011   -0.088   -0.392   -0.400   -0.157   -0.041    1.000   -0.120   -0.168   -0.047   -0.300   -0.074    0.005   -0.040    0.012   -0.052 |\n",
      "|  bplus_0 |   -0.019   -0.018    0.120   -0.037    0.002   -0.036   -0.112   -0.027    0.009    0.076    0.020    0.050   -0.049    0.061   -0.120    1.000   -0.642    0.105   -0.024   -0.110   -0.007   -0.026   -0.077    0.176 |\n",
      "|  bplus_1 |   -0.108   -0.058    0.132   -0.129   -0.082    0.022   -0.148   -0.083   -0.024    0.102   -0.038    0.007   -0.098    0.047   -0.168   -0.642    1.000    0.183   -0.117   -0.193   -0.019    0.064    0.043   -0.048 |\n",
      "|  p4415_s |    0.007   -0.025    0.066    0.029   -0.118   -0.009    0.062   -0.010    0.005    0.172   -0.082    0.013   -0.015    0.315   -0.047    0.105    0.183    1.000   -0.064   -0.137    0.004   -0.014   -0.018    0.034 |\n",
      "|  p4160_p |    0.562    0.710    0.567    0.420    0.718    0.019   -0.581    0.082    0.012   -0.159    0.531    0.743    0.369    0.060   -0.300   -0.024   -0.117   -0.064    1.000    0.191   -0.005    0.053    0.016   -0.009 |\n",
      "|  bplus_2 |    0.145    0.231    0.207    0.215    0.263    0.043    0.209   -0.018   -0.052    0.093    0.063    0.225    0.075    0.136   -0.074   -0.110   -0.193   -0.137    0.191    1.000   -0.099    0.276    0.057    0.035 |\n",
      "|    phi_s |   -0.011    0.005   -0.008   -0.006   -0.014    0.031   -0.008   -0.010    0.877   -0.008    0.000   -0.001    0.001   -0.020    0.005   -0.007   -0.019    0.004   -0.005   -0.099    1.000   -0.130   -0.051   -0.049 |\n",
      "|    rho_p |    0.055    0.006    0.066    0.051    0.077    0.099   -0.001    0.019   -0.175    0.035    0.019    0.063    0.014    0.060   -0.040   -0.026    0.064   -0.014    0.053    0.276   -0.130    1.000    0.346    0.222 |\n",
      "|  omega_s |    0.017   -0.007   -0.008    0.017    0.016    0.621    0.010    0.013   -0.096   -0.006    0.003    0.005    0.010    0.003    0.012   -0.077    0.043   -0.018    0.016    0.057   -0.051    0.346    1.000   -0.304 |\n",
      "|    rho_s |   -0.010    0.004    0.056   -0.012    0.007   -0.087   -0.029   -0.019   -0.034    0.036   -0.000    0.025   -0.018    0.028   -0.052    0.176   -0.048    0.034   -0.009    0.035   -0.049    0.222   -0.304    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.18835934588328995}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.05611533528362367}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.3646930668968382}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4079078914505955}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.23903419738354748}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.30544280625979603}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.2924343447676818}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25591798534866594}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.4240012344075974}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17930671951554844}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.11689608675688246}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.7183878096415879}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03888014815070484}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17440329271228727}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.07800807075373714}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.011427010147518901}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.022303879869980836}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19228401847698462}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.17759254105626399}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07124394237118636}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.6420237271890343}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.2483200921422375}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1767205466816968}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3157606403014447})])\n",
      "Step: 1/11\n",
      "Current Ctt: 0.4879500364742666\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1047 (1047 total)    |\n",
      "| EDM = 0.00117 (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: 297496.1326120764\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.73   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.480   |   0.031   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    0.7    |    5.2    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.16   |    0.13   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.15   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.81    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.61    |   0.23    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.47    |   0.31    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.87    |   0.12    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.35    |   0.13    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -3.15   |    0.09   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   0.006   |   0.942   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   1.86    |   0.13    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.06   |    0.42   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.489   |   0.009   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.984   |   0.018   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.18    |   0.15    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.20   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.16   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   20.5    |    0.7    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.70   |    0.27   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    8.6    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.23    |   0.23    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000   -0.464   -0.732    0.661    0.407   -0.018    0.616    0.535   -0.020   -0.200    0.108    0.512    0.422    0.344   -0.722   -0.601   -0.612   -0.082    0.462   -0.553    0.006   -0.068    0.018   -0.085 |\n",
      "|   jpsi_p |   -0.464    1.000    0.698   -0.667   -0.267    0.015   -0.596   -0.490    0.026    0.143    0.063   -0.745   -0.374   -0.175    0.721    0.555    0.570    0.091   -0.315    0.541    0.005    0.032   -0.020    0.098 |\n",
      "|   Dbar_p |   -0.732    0.698    1.000   -0.929   -0.459    0.026   -0.897   -0.746    0.026    0.182   -0.034   -0.855   -0.608   -0.242    0.980    0.821    0.833    0.158   -0.565    0.776   -0.020    0.110   -0.028    0.106 |\n",
      "| DDstar_s |    0.661   -0.667   -0.929    1.000    0.393   -0.023    0.850    0.677   -0.023   -0.217    0.033    0.809    0.519    0.175   -0.929   -0.707   -0.716   -0.188    0.516   -0.719    0.021   -0.103    0.025   -0.088 |\n",
      "|  p4415_p |    0.407   -0.267   -0.459    0.393    1.000   -0.011    0.402    0.358   -0.014   -0.169    0.085    0.278    0.294    0.008   -0.458   -0.390   -0.399   -0.142    0.418   -0.303   -0.002   -0.032    0.011   -0.059 |\n",
      "|  omega_p |   -0.018    0.015    0.026   -0.023   -0.011    1.000   -0.023   -0.019    0.004    0.006   -0.000   -0.024   -0.016   -0.005    0.026    0.027    0.023    0.005   -0.014    0.023    0.010    0.072    0.540    0.309 |\n",
      "|      Ctt |    0.616   -0.596   -0.897    0.850    0.402   -0.023    1.000    0.654   -0.021   -0.070   -0.042    0.759    0.578    0.295   -0.894   -0.744   -0.755   -0.060    0.436   -0.587    0.021   -0.100    0.025   -0.094 |\n",
      "|  p3770_s |    0.535   -0.490   -0.746    0.677    0.358   -0.019    0.654    1.000   -0.021   -0.063   -0.119    0.575    0.386    0.204   -0.740   -0.606   -0.617   -0.106    0.423   -0.581    0.007   -0.071    0.019   -0.085 |\n",
      "|    phi_p |   -0.020    0.026    0.026   -0.023   -0.014    0.004   -0.021   -0.021    1.000    0.003    0.002   -0.026   -0.016   -0.009    0.026    0.013    0.013    0.004   -0.015   -0.002    0.378   -0.158   -0.045    0.102 |\n",
      "|  p4040_s |   -0.200    0.143    0.182   -0.217   -0.169    0.006   -0.070   -0.063    0.003    1.000    0.011   -0.200   -0.082   -0.101    0.176    0.177    0.178    0.082   -0.336    0.133   -0.010    0.032   -0.007    0.017 |\n",
      "|  p3770_p |    0.108    0.063   -0.034    0.033    0.085   -0.000   -0.042   -0.119    0.002    0.011    1.000   -0.087   -0.027   -0.002    0.006    0.005    0.001   -0.045    0.135   -0.013   -0.004    0.000   -0.001   -0.004 |\n",
      "| DDstar_p |    0.512   -0.745   -0.855    0.809    0.278   -0.024    0.759    0.575   -0.026   -0.200   -0.087    1.000    0.395    0.171   -0.826   -0.693   -0.702   -0.125    0.335   -0.653    0.015   -0.097    0.022   -0.086 |\n",
      "|  psi2s_p |    0.422   -0.374   -0.608    0.519    0.294   -0.016    0.578    0.386   -0.016   -0.082   -0.027    0.395    1.000    0.121   -0.590   -0.497   -0.503   -0.103    0.363   -0.501    0.008   -0.064    0.015   -0.065 |\n",
      "|  p4160_s |    0.344   -0.175   -0.242    0.175    0.008   -0.005    0.295    0.204   -0.009   -0.101   -0.002    0.171    0.121    1.000   -0.248   -0.168   -0.173    0.132    0.074   -0.176   -0.006   -0.008    0.004   -0.031 |\n",
      "|   Dbar_s |   -0.722    0.721    0.980   -0.929   -0.458    0.026   -0.894   -0.740    0.026    0.176    0.006   -0.826   -0.590   -0.248    1.000    0.826    0.838    0.155   -0.554    0.776   -0.020    0.112   -0.028    0.106 |\n",
      "|  bplus_0 |   -0.601    0.555    0.821   -0.707   -0.390    0.027   -0.744   -0.606    0.013    0.177    0.005   -0.693   -0.497   -0.168    0.826    1.000    0.593    0.184   -0.480    0.585   -0.031    0.131   -0.030    0.115 |\n",
      "|  bplus_1 |   -0.612    0.570    0.833   -0.716   -0.399    0.023   -0.755   -0.617    0.013    0.178    0.001   -0.702   -0.503   -0.173    0.838    0.593    1.000    0.187   -0.490    0.588   -0.029    0.124   -0.026    0.084 |\n",
      "|  p4415_s |   -0.082    0.091    0.158   -0.188   -0.142    0.005   -0.060   -0.106    0.004    0.082   -0.045   -0.125   -0.103    0.132    0.155    0.184    0.187    1.000   -0.033    0.073   -0.004    0.018   -0.005    0.023 |\n",
      "|  p4160_p |    0.462   -0.315   -0.565    0.516    0.418   -0.014    0.436    0.423   -0.015   -0.336    0.135    0.335    0.363    0.074   -0.554   -0.480   -0.490   -0.033    1.000   -0.404    0.004   -0.051    0.014   -0.068 |\n",
      "|  bplus_2 |   -0.553    0.541    0.776   -0.719   -0.303    0.023   -0.587   -0.581   -0.002    0.133   -0.013   -0.653   -0.501   -0.176    0.776    0.585    0.588    0.073   -0.404    1.000   -0.070    0.198   -0.034    0.041 |\n",
      "|    phi_s |    0.006    0.005   -0.020    0.021   -0.002    0.010    0.021    0.007    0.378   -0.010   -0.004    0.015    0.008   -0.006   -0.020   -0.031   -0.029   -0.004    0.004   -0.070    1.000   -0.073    0.010   -0.004 |\n",
      "|    rho_p |   -0.068    0.032    0.110   -0.103   -0.032    0.072   -0.100   -0.071   -0.158    0.032    0.000   -0.097   -0.064   -0.008    0.112    0.131    0.124    0.018   -0.051    0.198   -0.073    1.000   -0.030    0.123 |\n",
      "|  omega_s |    0.018   -0.020   -0.028    0.025    0.011    0.540    0.025    0.019   -0.045   -0.007   -0.001    0.022    0.015    0.004   -0.028   -0.030   -0.026   -0.005    0.014   -0.034    0.010   -0.030    1.000   -0.109 |\n",
      "|    rho_s |   -0.085    0.098    0.106   -0.088   -0.059    0.309   -0.094   -0.085    0.102    0.017   -0.004   -0.086   -0.065   -0.031    0.106    0.115    0.084    0.023   -0.068    0.041   -0.004    0.123   -0.109    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.15898591443375}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.030788705842652586}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 5.194724495539059}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.12993098052364527}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.16479593925088154}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.1751776021295175}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.23298078296308766}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.30500215518750995}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.12241692847944696}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1280857211115678}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.08762022207882048}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.9419147311808489}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03329688391755248}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.12955617782693374}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.41505857634409565}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.008613117538932125}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.01766576744993309}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.14848262173787574}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10748602861654111}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.0679086439412313}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.7436308273490191}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.2669084540405917}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.9157096753301248}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.23276316329141383})])\n",
      "Step: 1/11\n",
      "Current Ctt: 0.4879500364742666\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1083 (1083 total)    |\n",
      "| EDM = 0.000111 (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: 297406.6475755318\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.54   |    0.27   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.51   |    0.05   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    0.4    |    1.1    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.29    |   0.06    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.39   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.29    |   0.40    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.20    |   0.23    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.91    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.56    |   0.28    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.92    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.77   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |    0.6    |    1.8    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.00    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.30   |    0.39   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.445   |   0.014   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |   -0.81   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.41    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -1.93   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.44   |    0.09   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   18.4    |    1.3    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -1.1    |    0.8    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    7.8    |    1.6    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    0.5    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.568    0.406   -0.043    0.619    0.030   -0.319    0.196   -0.011    0.032    0.063    0.618    0.348    0.508    0.264   -0.129   -0.472   -0.099    0.587    0.287   -0.021   -0.048    0.055   -0.126 |\n",
      "|   jpsi_p |    0.568    1.000    0.408   -0.021    0.660    0.016   -0.101    0.284    0.015    0.200    0.017    0.686    0.548    0.334    0.384   -0.203   -0.544   -0.168    0.651    0.370    0.015   -0.135    0.034   -0.069 |\n",
      "|   Dbar_p |    0.406    0.408    1.000   -0.066    0.657    0.032   -0.496   -0.028   -0.002    0.364   -0.533    0.904    0.266    0.415    0.569   -0.201   -0.624   -0.131    0.499    0.386   -0.004   -0.105    0.062   -0.130 |\n",
      "| DDstar_s |   -0.043   -0.021   -0.066    1.000   -0.072   -0.006    0.024    0.000    0.003   -0.059    0.086   -0.081   -0.047   -0.064   -0.062    0.046    0.134    0.015   -0.031   -0.083    0.002    0.022   -0.014    0.029 |\n",
      "|  p4415_p |    0.619    0.660    0.657   -0.072    1.000    0.038   -0.308    0.195   -0.013    0.178   -0.140    0.824    0.465    0.370    0.414   -0.180   -0.619   -0.245    0.748    0.452   -0.024   -0.060    0.070   -0.161 |\n",
      "|  omega_p |    0.030    0.016    0.032   -0.006    0.038    1.000   -0.011    0.011   -0.040    0.014   -0.012    0.041    0.022    0.023    0.019   -0.041   -0.008   -0.013    0.034    0.047    0.003   -0.025    0.828    0.020 |\n",
      "|      Ctt |   -0.319   -0.101   -0.496    0.024   -0.308   -0.011    1.000   -0.096   -0.024    0.129    0.094   -0.446   -0.043    0.006   -0.386    0.076    0.237    0.218   -0.441    0.343   -0.039    0.154   -0.022   -0.008 |\n",
      "|  p3770_s |    0.196    0.284   -0.028    0.000    0.195    0.011   -0.096    1.000   -0.010    0.116   -0.073    0.154    0.014    0.095   -0.004   -0.008   -0.115   -0.027    0.218    0.025   -0.019    0.005    0.018   -0.048 |\n",
      "|    phi_p |   -0.011    0.015   -0.002    0.003   -0.013   -0.040   -0.024   -0.010    1.000   -0.010    0.006    0.000    0.001   -0.022   -0.003    0.018   -0.023    0.007   -0.003   -0.093    0.788   -0.213   -0.115    0.233 |\n",
      "|  p4040_s |    0.032    0.200    0.364   -0.059    0.178    0.014    0.129    0.116   -0.010    1.000   -0.281    0.357    0.171    0.132    0.202   -0.054   -0.204    0.124   -0.077    0.222   -0.018    0.004    0.025   -0.068 |\n",
      "|  p3770_p |    0.063    0.017   -0.533    0.086   -0.140   -0.012    0.094   -0.073    0.006   -0.281    1.000   -0.333    0.035   -0.178   -0.149    0.088    0.202   -0.046    0.040   -0.191    0.004    0.022   -0.024    0.052 |\n",
      "| DDstar_p |    0.618    0.686    0.904   -0.081    0.824    0.041   -0.446    0.154    0.000    0.357   -0.333    1.000    0.508    0.480    0.568   -0.226   -0.724   -0.174    0.716    0.446   -0.005   -0.116    0.076   -0.158 |\n",
      "|  psi2s_p |    0.348    0.548    0.266   -0.047    0.465    0.022   -0.043    0.014    0.001    0.171    0.035    0.508    1.000    0.198    0.209   -0.124   -0.373   -0.087    0.459    0.204   -0.003   -0.064    0.040   -0.081 |\n",
      "|  p4160_s |    0.508    0.334    0.415   -0.064    0.370    0.023    0.006    0.095   -0.022    0.132   -0.178    0.480    0.198    1.000    0.228   -0.072   -0.316    0.212    0.261    0.325   -0.036    0.017    0.041   -0.114 |\n",
      "|   Dbar_s |    0.264    0.384    0.569   -0.062    0.414    0.019   -0.386   -0.004   -0.003    0.202   -0.149    0.568    0.209    0.228    1.000   -0.090   -0.320   -0.058    0.352    0.223   -0.009   -0.036    0.035   -0.079 |\n",
      "|  bplus_0 |   -0.129   -0.203   -0.201    0.046   -0.180   -0.041    0.076   -0.008    0.018   -0.054    0.088   -0.226   -0.124   -0.072   -0.090    1.000   -0.411    0.080   -0.171   -0.229   -0.004    0.120   -0.095    0.211 |\n",
      "|  bplus_1 |   -0.472   -0.544   -0.624    0.134   -0.619   -0.008    0.237   -0.115   -0.023   -0.204    0.202   -0.724   -0.373   -0.316   -0.320   -0.411    1.000    0.235   -0.573   -0.415   -0.004    0.053   -0.006    0.007 |\n",
      "|  p4415_s |   -0.099   -0.168   -0.131    0.015   -0.245   -0.013    0.218   -0.027    0.007    0.124   -0.046   -0.174   -0.087    0.212   -0.058    0.080    0.235    1.000   -0.231   -0.208    0.009    0.020   -0.025    0.060 |\n",
      "|  p4160_p |    0.587    0.651    0.499   -0.031    0.748    0.034   -0.441    0.218   -0.003   -0.077    0.040    0.716    0.459    0.261    0.352   -0.171   -0.573   -0.231    1.000    0.325   -0.010   -0.087    0.062   -0.131 |\n",
      "|  bplus_2 |    0.287    0.370    0.386   -0.083    0.452    0.047    0.343    0.025   -0.093    0.222   -0.191    0.446    0.204    0.325    0.223   -0.229   -0.415   -0.208    0.325    1.000   -0.129    0.189    0.088   -0.298 |\n",
      "|    phi_s |   -0.021    0.015   -0.004    0.002   -0.024    0.003   -0.039   -0.019    0.788   -0.018    0.004   -0.005   -0.003   -0.036   -0.009   -0.004   -0.004    0.009   -0.010   -0.129    1.000   -0.179   -0.043    0.143 |\n",
      "|    rho_p |   -0.048   -0.135   -0.105    0.022   -0.060   -0.025    0.154    0.005   -0.213    0.004    0.022   -0.116   -0.064    0.017   -0.036    0.120    0.053    0.020   -0.087    0.189   -0.179    1.000   -0.022   -0.150 |\n",
      "|  omega_s |    0.055    0.034    0.062   -0.014    0.070    0.828   -0.022    0.018   -0.115    0.025   -0.024    0.076    0.040    0.041    0.035   -0.095   -0.006   -0.025    0.062    0.088   -0.043   -0.022    1.000   -0.288 |\n",
      "|    rho_s |   -0.126   -0.069   -0.130    0.029   -0.161    0.020   -0.008   -0.048    0.233   -0.068    0.052   -0.158   -0.081   -0.114   -0.079    0.211    0.007    0.060   -0.131   -0.298    0.143   -0.150   -0.288    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.27154531764414735}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.045078762624328306}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.1078974076790153}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.05697121804464195}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.28002719880059335}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.39532869824898587}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.23184448770301436}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25889066081590895}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.28103322640032236}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.19197289421164465}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1293534979598252}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.8399796508221984}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04329700932836822}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.19148120727810947}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.39163561366350164}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.014285400308887253}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.037738746710640925}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19861054482666574}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.1811659220907793}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08595544547729306}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.3254442320650845}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.7815046491081814}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.6313306029155341}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.33109117660781123})])\n",
      "Step: 1/11\n",
      "Current Ctt: 0.4879500364742666\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1083 (1083 total)    |\n",
      "| EDM = 9.59E-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: 297407.05473014223\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.52   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.52   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    0.7    |    1.2    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.42    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.39   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.29    |   0.38    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.92    |   0.28    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.56    |   0.28    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.88    |   0.22    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.78   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |    0.8    |    1.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   1.97    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   -0.30   |    0.58   |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.446   |   0.013   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.81   |    0.03   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.38    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -1.90   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.49   |    0.10   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   18.4    |    1.3    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -1.2    |    0.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    7.8    |    1.6    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |    0.5    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.168   -0.253   -0.060    0.223    0.008    0.206   -0.006   -0.229    0.284   -0.023    0.115    0.271   -0.187   -0.026   -0.102   -0.046    0.329   -0.029   -0.009   -0.015    0.015   -0.030 |\n",
      "|   jpsi_p |    0.168    1.000    0.403    0.161    0.495    0.004   -0.055   -0.005    0.292   -0.034    0.619    0.324    0.277    0.571   -0.174   -0.410    0.041    0.291    0.439   -0.014   -0.045    0.015   -0.061 |\n",
      "|   Dbar_p |   -0.253    0.403    1.000    0.376    0.454    0.023   -0.524   -0.050    0.664   -0.588    0.911    0.029    0.484    0.758   -0.157   -0.497    0.265   -0.221    0.812   -0.080    0.106    0.046   -0.203 |\n",
      "| DDstar_s |   -0.060    0.161    0.376    1.000    0.243    0.017   -0.192   -0.024    0.311   -0.286    0.412    0.086    0.252    0.359   -0.129   -0.365    0.100   -0.085    0.391   -0.034    0.012    0.035   -0.112 |\n",
      "|  p4415_p |    0.223    0.495    0.454    0.243    1.000    0.026   -0.103   -0.040    0.238   -0.135    0.637    0.243    0.301    0.390   -0.140   -0.461   -0.045    0.381    0.544   -0.064    0.058    0.050   -0.175 |\n",
      "|  omega_p |    0.008    0.004    0.023    0.017    0.026    1.000   -0.005   -0.034    0.017   -0.013    0.032    0.010    0.018    0.019   -0.035   -0.003   -0.001    0.011    0.042    0.006   -0.031    0.821    0.040 |\n",
      "|  p3770_s |    0.206   -0.055   -0.524   -0.192   -0.103   -0.005    1.000    0.013   -0.210    0.120   -0.365   -0.097   -0.161   -0.405    0.066    0.160   -0.122    0.201   -0.360    0.020   -0.040   -0.011    0.060 |\n",
      "|    phi_p |   -0.006   -0.005   -0.050   -0.024   -0.040   -0.034    0.013    1.000   -0.034    0.025   -0.046   -0.001   -0.039   -0.046    0.018    0.001   -0.002   -0.004   -0.103    0.782   -0.202   -0.108    0.247 |\n",
      "|  p4040_s |   -0.229    0.292    0.664    0.311    0.238    0.017   -0.210   -0.034    1.000   -0.404    0.646    0.073    0.236    0.535   -0.083   -0.301    0.270   -0.352    0.454   -0.055    0.071    0.032   -0.134 |\n",
      "|  p3770_p |    0.284   -0.034   -0.588   -0.286   -0.135   -0.013    0.120    0.025   -0.404    1.000   -0.456    0.087   -0.246   -0.231    0.103    0.250   -0.180    0.308   -0.380    0.034   -0.041   -0.027    0.099 |\n",
      "| DDstar_p |   -0.023    0.619    0.911    0.412    0.637    0.032   -0.365   -0.046    0.646   -0.456    1.000    0.258    0.539    0.746   -0.203   -0.625    0.211    0.036    0.820   -0.076    0.073    0.061   -0.223 |\n",
      "|  psi2s_p |    0.115    0.324    0.029    0.086    0.243    0.010   -0.097   -0.001    0.073    0.087    0.258    1.000    0.041    0.126   -0.081   -0.193   -0.016    0.256    0.043   -0.003   -0.040    0.019   -0.035 |\n",
      "|  p4160_s |    0.271    0.277    0.484    0.252    0.301    0.018   -0.161   -0.039    0.236   -0.246    0.539    0.041    1.000    0.377   -0.067   -0.288    0.358   -0.030    0.410   -0.062    0.079    0.034   -0.141 |\n",
      "|   Dbar_s |   -0.187    0.571    0.758    0.359    0.390    0.019   -0.405   -0.046    0.535   -0.231    0.746    0.126    0.377    1.000   -0.077   -0.321    0.260   -0.117    0.695   -0.080    0.137    0.034   -0.177 |\n",
      "|  bplus_0 |   -0.026   -0.174   -0.157   -0.129   -0.140   -0.035    0.066    0.018   -0.083    0.103   -0.203   -0.081   -0.067   -0.077    1.000   -0.455    0.030   -0.070   -0.258    0.001    0.110   -0.083    0.184 |\n",
      "|  bplus_1 |   -0.102   -0.410   -0.497   -0.365   -0.461   -0.003    0.160    0.001   -0.301    0.250   -0.625   -0.193   -0.288   -0.321   -0.455    1.000    0.040   -0.195   -0.515    0.028   -0.040    0.003    0.032 |\n",
      "|  p4415_s |   -0.046    0.041    0.265    0.100   -0.045   -0.001   -0.122   -0.002    0.270   -0.180    0.211   -0.016    0.358    0.260    0.030    0.040    1.000   -0.166    0.013   -0.008    0.022   -0.004   -0.004 |\n",
      "|  p4160_p |    0.329    0.291   -0.221   -0.085    0.381    0.011    0.201   -0.004   -0.352    0.308    0.036    0.256   -0.030   -0.117   -0.070   -0.195   -0.166    1.000    0.080   -0.006   -0.027    0.020   -0.043 |\n",
      "|  bplus_2 |   -0.029    0.439    0.812    0.391    0.544    0.042   -0.360   -0.103    0.454   -0.380    0.820    0.043    0.410    0.695   -0.258   -0.515    0.013    0.080    1.000   -0.148    0.212    0.081   -0.337 |\n",
      "|    phi_s |   -0.009   -0.014   -0.080   -0.034   -0.064    0.006    0.020    0.782   -0.055    0.034   -0.076   -0.003   -0.062   -0.080    0.001    0.028   -0.008   -0.006   -0.148    1.000   -0.177   -0.040    0.162 |\n",
      "|    rho_p |   -0.015   -0.045    0.106    0.012    0.058   -0.031   -0.040   -0.202    0.071   -0.041    0.073   -0.040    0.079    0.137    0.110   -0.040    0.022   -0.027    0.212   -0.177    1.000   -0.046   -0.198 |\n",
      "|  omega_s |    0.015    0.015    0.046    0.035    0.050    0.821   -0.011   -0.108    0.032   -0.027    0.061    0.019    0.034    0.034   -0.083    0.003   -0.004    0.020    0.081   -0.040   -0.046    1.000   -0.261 |\n",
      "|    rho_s |   -0.030   -0.061   -0.203   -0.112   -0.175    0.040    0.060    0.247   -0.134    0.099   -0.223   -0.035   -0.141   -0.177    0.184    0.032   -0.004   -0.043   -0.337    0.162   -0.198   -0.261    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.23580770483259084}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03812377113913579}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.1913439472447829}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.42363428434390615}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.21152992542556848}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3833641917250792}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.284685812135415}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2764060795029013}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.22046998201200785}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.13224276343401442}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.4455851976182528}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03814076351177409}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.18948673156013018}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.5831138445426939}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.013054526120598764}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.0317297018381395}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1989122261774492}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.13093479805977548}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.10102543377867634}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.3106638024638713}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.7426734939244666}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.5928999725833517}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.33407963396105733})])\n",
      "Step: 2/11\n",
      "Current Ctt: 0.6900655593423543\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |    Ncalls=1159 (1159 total)    |\n",
      "| EDM = 8.7E-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: 297341.4362736029\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.53   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.51   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    1.1    |    0.9    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.60   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.12   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.61    |   0.27    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.46    |   0.23    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   3.04    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.16    |   0.24    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.29    |   0.16    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.87   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -1.3    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.44    |   0.16    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.24   |    0.49   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.434   |   0.009   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.825   |   0.019   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.43    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.29   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.31   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.9    |    1.1    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   0.09    |   0.42    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    8.4    |    1.1    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    0.7    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000   -0.234   -0.501   -0.580    0.482   -0.029    0.332    0.318   -0.010   -0.027   -0.323   -0.518    0.052    0.344   -0.508   -0.319   -0.349   -0.131    0.510   -0.262    0.030   -0.013    0.022   -0.134 |\n",
      "|   jpsi_p |   -0.234    1.000    0.679    0.292   -0.279    0.044   -0.511   -0.260    0.012   -0.128    0.716    0.598    0.116   -0.179    0.743    0.489    0.542    0.153   -0.092    0.365   -0.049   -0.005   -0.038    0.195 |\n",
      "|   Dbar_p |   -0.501    0.679    1.000    0.507   -0.505    0.054   -0.768   -0.502    0.023   -0.146    0.745    0.813   -0.088   -0.204    0.868    0.628    0.676    0.245   -0.395    0.465   -0.069    0.048   -0.046    0.262 |\n",
      "| DDstar_s |   -0.580    0.292    0.507    1.000   -0.639    0.035   -0.545   -0.477    0.009   -0.209    0.551    0.739   -0.217   -0.228    0.757    0.447    0.477    0.221   -0.632    0.372   -0.057    0.040   -0.037    0.193 |\n",
      "|  p4415_p |    0.482   -0.279   -0.505   -0.639    1.000   -0.032    0.442    0.364   -0.010    0.016   -0.413   -0.541    0.106    0.028   -0.574   -0.379   -0.415   -0.258    0.548   -0.207    0.033   -0.007    0.025   -0.148 |\n",
      "|  omega_p |   -0.029    0.044    0.054    0.035   -0.032    1.000   -0.043   -0.028    0.022   -0.009    0.051    0.042   -0.002   -0.012    0.057    0.065    0.039    0.019   -0.022    0.017    0.025   -0.177    0.632    0.257 |\n",
      "|      Ctt |    0.332   -0.511   -0.768   -0.545    0.442   -0.043    1.000    0.357   -0.017    0.310   -0.698   -0.728    0.125    0.334   -0.772   -0.541   -0.585   -0.088    0.240   -0.108    0.053   -0.031    0.035   -0.203 |\n",
      "|  p3770_s |    0.318   -0.260   -0.502   -0.477    0.364   -0.028    0.357    1.000   -0.010    0.196   -0.489   -0.481   -0.085    0.154   -0.488   -0.298   -0.327   -0.136    0.329   -0.280    0.028   -0.012    0.021   -0.129 |\n",
      "|    phi_p |   -0.010    0.012    0.023    0.009   -0.010    0.022   -0.017   -0.010    1.000   -0.004    0.023    0.019    0.000   -0.005    0.025    0.021    0.017    0.006   -0.005    0.013    0.722   -0.044   -0.041   -0.005 |\n",
      "|  p4040_s |   -0.027   -0.128   -0.146   -0.209    0.016   -0.009    0.310    0.196   -0.004    1.000   -0.201   -0.127    0.036    0.126   -0.198   -0.099   -0.108    0.061   -0.207   -0.078    0.007    0.001    0.006   -0.039 |\n",
      "|  p3770_p |   -0.323    0.716    0.745    0.551   -0.413    0.051   -0.698   -0.489    0.023   -0.201    1.000    0.722    0.022   -0.234    0.864    0.601    0.641    0.182   -0.220    0.404   -0.065    0.046   -0.043    0.244 |\n",
      "| DDstar_p |   -0.518    0.598    0.813    0.739   -0.541    0.042   -0.728   -0.481    0.019   -0.127    0.722    1.000   -0.042   -0.174    0.912    0.504    0.528    0.287   -0.483    0.475   -0.066    0.067   -0.041    0.222 |\n",
      "|  psi2s_p |    0.052    0.116   -0.088   -0.217    0.106   -0.002    0.125   -0.085    0.000    0.036    0.022   -0.042    1.000   -0.017   -0.024   -0.019   -0.013   -0.028    0.154   -0.090    0.002   -0.005    0.001   -0.012 |\n",
      "|  p4160_s |    0.344   -0.179   -0.204   -0.228    0.028   -0.012    0.334    0.154   -0.005    0.126   -0.234   -0.174   -0.017    1.000   -0.245   -0.117   -0.133    0.163   -0.010   -0.081    0.007    0.005    0.007   -0.046 |\n",
      "|   Dbar_s |   -0.508    0.743    0.868    0.757   -0.574    0.057   -0.772   -0.488    0.025   -0.198    0.864    0.912   -0.024   -0.245    1.000    0.659    0.706    0.264   -0.431    0.493   -0.074    0.059   -0.048    0.276 |\n",
      "|  bplus_0 |   -0.319    0.489    0.628    0.447   -0.379    0.065   -0.541   -0.298    0.021   -0.099    0.601    0.504   -0.019   -0.117    0.659    1.000    0.260    0.239   -0.265    0.201   -0.062    0.005   -0.047    0.287 |\n",
      "|  bplus_1 |   -0.349    0.542    0.676    0.477   -0.415    0.039   -0.585   -0.327    0.017   -0.108    0.641    0.528   -0.013   -0.133    0.706    0.260    1.000    0.262   -0.291    0.214   -0.057    0.069   -0.037    0.210 |\n",
      "|  p4415_s |   -0.131    0.153    0.245    0.221   -0.258    0.019   -0.088   -0.136    0.006    0.061    0.182    0.287   -0.028    0.163    0.264    0.239    0.262    1.000   -0.127    0.054   -0.021    0.005   -0.015    0.087 |\n",
      "|  p4160_p |    0.510   -0.092   -0.395   -0.632    0.548   -0.022    0.240    0.329   -0.005   -0.207   -0.220   -0.483    0.154   -0.010   -0.431   -0.265   -0.291   -0.127    1.000   -0.208    0.026   -0.010    0.019   -0.111 |\n",
      "|  bplus_2 |   -0.262    0.365    0.465    0.372   -0.207    0.017   -0.108   -0.280    0.013   -0.078    0.404    0.475   -0.090   -0.081    0.493    0.201    0.214    0.054   -0.208    1.000   -0.094    0.191   -0.046    0.207 |\n",
      "|    phi_s |    0.030   -0.049   -0.069   -0.057    0.033    0.025    0.053    0.028    0.722    0.007   -0.065   -0.066    0.002    0.007   -0.074   -0.062   -0.057   -0.021    0.026   -0.094    1.000    0.006    0.012   -0.033 |\n",
      "|    rho_p |   -0.013   -0.005    0.048    0.040   -0.007   -0.177   -0.031   -0.012   -0.044    0.001    0.046    0.067   -0.005    0.005    0.059    0.005    0.069    0.005   -0.010    0.191    0.006    1.000    0.089    0.150 |\n",
      "|  omega_s |    0.022   -0.038   -0.046   -0.037    0.025    0.632    0.035    0.021   -0.041    0.006   -0.043   -0.041    0.001    0.007   -0.048   -0.047   -0.037   -0.015    0.019   -0.046    0.012    0.089    1.000   -0.105 |\n",
      "|    rho_s |   -0.134    0.195    0.262    0.193   -0.148    0.257   -0.203   -0.129   -0.005   -0.039    0.244    0.222   -0.012   -0.046    0.276    0.287    0.210    0.087   -0.111    0.207   -0.033    0.150   -0.105    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.16976107852228806}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.0436341371951694}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.8632531501741667}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5999017122654228}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.18376993444370449}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2716640296091337}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.23037038456963366}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2578658750279481}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.24352322424017903}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1557662568030701}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1844777578586816}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.6135965353318018}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03207793987452767}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.15526191987971716}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.48785748662319994}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.009121780464896423}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.019105586365501415}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.17695368708118975}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.11003019212504528}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.05978039933655821}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.0814063481269045}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.4241671849072759}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1441736175152277}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.34300003755217656})])\n",
      "Step: 2/11\n",
      "Current Ctt: 0.6900655593423543\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |    Ncalls=1022 (1022 total)    |\n",
      "| EDM = 0.00017 (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: 297342.68940728466\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.56   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.51   |    0.07   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.5    |    2.2    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.43   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.18   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.6    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |    3.0    |    0.3    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.16    |   0.30    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   1.21    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.77   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |   -0.8    |    0.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.07    |   0.06    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.36    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.19    |   0.47    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.434   |   0.014   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |  -0.808   |   0.031   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.42    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.29   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.38   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   19.9    |    1.3    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   0.06    |   0.48    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    8.4    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |    0.7    |    0.4    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.758    0.750    0.377    0.582    0.004    0.535    0.022   -0.415    0.776    0.443    0.644    0.106   -0.805    0.092   -0.094    0.015    0.752    0.080   -0.025    0.097   -0.003    0.028 |\n",
      "|   jpsi_p |    0.758    1.000    0.910    0.455    0.596    0.007    0.633    0.022   -0.365    0.888    0.533    0.794   -0.143   -0.874    0.076   -0.061   -0.041    0.818    0.017   -0.016    0.057   -0.002    0.011 |\n",
      "|   Dbar_p |    0.750    0.910    1.000    0.590    0.576    0.004    0.622    0.030   -0.311    0.911    0.760    0.842   -0.085   -0.916    0.091   -0.163    0.016    0.780    0.133   -0.022    0.114    0.002    0.016 |\n",
      "| DDstar_s |    0.377    0.455    0.590    1.000    0.232    0.001    0.336    0.015   -0.202    0.507    0.538    0.447   -0.081   -0.592    0.048   -0.095    0.009    0.369    0.036   -0.011    0.059    0.001    0.003 |\n",
      "|  p4415_p |    0.582    0.596    0.576    0.232    1.000    0.001    0.434    0.015   -0.415    0.606    0.339    0.508   -0.255   -0.627    0.069   -0.107   -0.168    0.673    0.159   -0.027    0.095   -0.005    0.028 |\n",
      "|  omega_p |    0.004    0.007    0.004    0.001    0.001    1.000    0.003    0.024   -0.001    0.010   -0.022    0.003    0.001   -0.000    0.078   -0.032    0.009    0.007   -0.040    0.038   -0.186    0.730    0.283 |\n",
      "|  p3770_s |    0.535    0.633    0.622    0.336    0.434    0.003    1.000    0.018   -0.135    0.533    0.384    0.468   -0.030   -0.683    0.085   -0.070    0.007    0.567    0.006   -0.022    0.081   -0.003    0.022 |\n",
      "|    phi_p |    0.022    0.022    0.030    0.015    0.015    0.024    0.018    1.000   -0.012    0.028    0.015    0.024   -0.006   -0.030    0.012   -0.008    0.001    0.024   -0.020    0.809   -0.051   -0.039   -0.011 |\n",
      "|  p4040_s |   -0.415   -0.365   -0.311   -0.202   -0.415   -0.001   -0.135   -0.012    1.000   -0.360   -0.121   -0.301    0.074    0.360   -0.013    0.093    0.127   -0.556   -0.195    0.006   -0.040   -0.001   -0.002 |\n",
      "|  p3770_p |    0.776    0.888    0.911    0.507    0.606    0.010    0.533    0.028   -0.360    1.000    0.551    0.794   -0.116   -0.878    0.109   -0.079   -0.027    0.823    0.071   -0.022    0.095   -0.001    0.032 |\n",
      "| DDstar_p |    0.443    0.533    0.760    0.538    0.339   -0.022    0.384    0.015   -0.121    0.551    1.000    0.591    0.007   -0.686   -0.010   -0.438    0.039    0.403    0.299   -0.014    0.108    0.007   -0.067 |\n",
      "|  psi2s_p |    0.644    0.794    0.842    0.447    0.508    0.003    0.468    0.024   -0.301    0.794    0.591    1.000   -0.138   -0.848    0.073   -0.107   -0.017    0.706   -0.047   -0.014    0.079    0.003    0.002 |\n",
      "|  p4160_s |    0.106   -0.143   -0.085   -0.081   -0.255    0.001   -0.030   -0.006    0.074   -0.116    0.007   -0.138    1.000    0.115    0.032    0.079    0.284   -0.203   -0.145   -0.008    0.000   -0.005    0.021 |\n",
      "|   Dbar_s |   -0.805   -0.874   -0.916   -0.592   -0.627   -0.000   -0.683   -0.030    0.360   -0.878   -0.686   -0.848    0.115    1.000   -0.071    0.207    0.043   -0.830   -0.029    0.012   -0.098   -0.007    0.015 |\n",
      "|  bplus_0 |    0.092    0.076    0.091    0.048    0.069    0.078    0.085    0.012   -0.013    0.109   -0.010    0.073    0.032   -0.071    1.000   -0.692    0.041    0.094   -0.139   -0.022   -0.111   -0.020    0.235 |\n",
      "|  bplus_1 |   -0.094   -0.061   -0.163   -0.095   -0.107   -0.032   -0.070   -0.008    0.093   -0.079   -0.438   -0.107    0.079    0.207   -0.692    1.000    0.153   -0.085   -0.261    0.007    0.069    0.004   -0.065 |\n",
      "|  p4415_s |    0.015   -0.041    0.016    0.009   -0.168    0.009    0.007    0.001    0.127   -0.027    0.039   -0.017    0.284    0.043    0.041    0.153    1.000   -0.024   -0.300    0.005   -0.028    0.001    0.016 |\n",
      "|  p4160_p |    0.752    0.818    0.780    0.369    0.673    0.007    0.567    0.024   -0.556    0.823    0.403    0.706   -0.203   -0.830    0.094   -0.085   -0.024    1.000    0.113   -0.025    0.097   -0.003    0.033 |\n",
      "|  bplus_2 |    0.080    0.017    0.133    0.036    0.159   -0.040    0.006   -0.020   -0.195    0.071    0.299   -0.047   -0.145   -0.029   -0.139   -0.261   -0.300    0.113    1.000   -0.084    0.252   -0.030    0.052 |\n",
      "|    phi_s |   -0.025   -0.016   -0.022   -0.011   -0.027    0.038   -0.022    0.809    0.006   -0.022   -0.014   -0.014   -0.008    0.012   -0.022    0.007    0.005   -0.025   -0.084    1.000   -0.009    0.009   -0.020 |\n",
      "|    rho_p |    0.097    0.057    0.114    0.059    0.095   -0.186    0.081   -0.051   -0.040    0.095    0.108    0.079    0.000   -0.098   -0.111    0.069   -0.028    0.097    0.252   -0.009    1.000    0.056    0.132 |\n",
      "|  omega_s |   -0.003   -0.002    0.002    0.001   -0.005    0.730   -0.003   -0.039   -0.001   -0.001    0.007    0.003   -0.005   -0.007   -0.020    0.004    0.001   -0.003   -0.030    0.009    0.056    1.000   -0.051 |\n",
      "|    rho_s |    0.028    0.011    0.016    0.003    0.028    0.283    0.022   -0.011   -0.002    0.032   -0.067    0.002    0.021    0.015    0.235   -0.065    0.016    0.033    0.052   -0.020    0.132   -0.051    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2610898496942118}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.07448281751558206}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 2.2237808692143277}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4344372637367423}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.1969300292277556}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3425066942804249}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.3216720275204783}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.303377694159793}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1805397539207868}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.2755851843385406}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.7251539020913786}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.06416140338350562}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16603471092759392}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.47291889477970545}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.014263617580737353}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.031347027076492506}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1901759773275824}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.18676853081543277}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.058059863634335795}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.3377544137502468}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.4780217974687604}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.3768880093816591}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.36845576384454537})])\n",
      "Step: 3/11\n",
      "Current Ctt: 0.8451542547285166\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1085 (1085 total)    |\n",
      "| EDM = 1.5E-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: 297452.49771651736\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.66   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.49   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    0.7    |    1.1    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.37    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.53   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.7    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.40    |   0.27    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.51    |   0.28    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.57    |   0.24    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.21    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.86   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   0.16    |   1.28    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.18    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.30    |   0.38    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.444   |   0.020   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |   -0.75   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.52    |   0.21    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.30   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.30   |    0.08   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.4    |    1.2    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.27   |    0.49   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    8.5    |    1.5    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    0.8    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.511    0.087    0.061    0.457   -0.000   -0.118    0.176    0.000   -0.249    0.480    0.364    0.259    0.240    0.021    0.030   -0.095   -0.053    0.518    0.006   -0.018    0.029   -0.001   -0.009 |\n",
      "|   jpsi_p |    0.511    1.000   -0.102    0.097    0.554   -0.003   -0.101    0.242    0.026   -0.091    0.420    0.630    0.436   -0.006   -0.133   -0.031   -0.065   -0.137    0.641    0.020    0.022   -0.058   -0.005   -0.025 |\n",
      "|   Dbar_p |    0.087   -0.102    1.000   -0.222   -0.159   -0.012    0.591    0.213   -0.004   -0.185    0.307   -0.755    0.291   -0.098    0.276   -0.019   -0.278   -0.113   -0.076    0.039    0.003   -0.016    0.005   -0.057 |\n",
      "| DDstar_s |    0.061    0.097   -0.222    1.000    0.135   -0.002   -0.128   -0.012    0.001    0.050   -0.063    0.227    0.014    0.040   -0.081   -0.002   -0.093   -0.020    0.094    0.057   -0.003    0.004    0.000   -0.013 |\n",
      "|  p4415_p |    0.457    0.554   -0.159    0.135    1.000    0.004   -0.138    0.157   -0.002   -0.179    0.340    0.545    0.267   -0.066   -0.049    0.037   -0.042   -0.182    0.628    0.111   -0.026    0.053   -0.002    0.012 |\n",
      "|  omega_p |   -0.000   -0.003   -0.012   -0.002    0.004    1.000   -0.008   -0.002    0.002    0.005   -0.002    0.013   -0.002    0.004   -0.008    0.069   -0.054    0.006    0.002   -0.018    0.032   -0.038    0.826    0.353 |\n",
      "|      Ctt |   -0.118   -0.101    0.591   -0.128   -0.138   -0.008    1.000    0.052   -0.023    0.214   -0.097   -0.546    0.196    0.217    0.262   -0.002   -0.240    0.070   -0.296    0.609   -0.037    0.089   -0.004   -0.001 |\n",
      "|  p3770_s |    0.176    0.242    0.213   -0.012    0.157   -0.002    0.052    1.000   -0.005    0.059    0.048    0.053    0.024    0.031    0.084    0.028   -0.071   -0.020    0.176   -0.016   -0.017    0.024   -0.001   -0.007 |\n",
      "|    phi_p |    0.000    0.026   -0.004    0.001   -0.002    0.002   -0.023   -0.005    1.000   -0.009    0.012    0.017    0.008   -0.015   -0.001    0.020   -0.029    0.005    0.008   -0.078    0.742   -0.254   -0.060   -0.021 |\n",
      "|  p4040_s |   -0.249   -0.091   -0.185    0.050   -0.179    0.005    0.214    0.059   -0.009    1.000   -0.246    0.048   -0.054    0.125   -0.044    0.021    0.120    0.229   -0.424    0.096   -0.015    0.038   -0.004    0.037 |\n",
      "|  p3770_p |    0.480    0.420    0.307   -0.063    0.340   -0.002   -0.097    0.048    0.012   -0.246    1.000    0.140    0.287   -0.104   -0.037    0.018   -0.145   -0.187    0.499   -0.111    0.007   -0.027    0.003   -0.033 |\n",
      "| DDstar_p |    0.364    0.630   -0.755    0.227    0.545    0.013   -0.546    0.053    0.017    0.048    0.140    1.000    0.157    0.073   -0.230    0.027    0.141   -0.014    0.561   -0.052    0.001    0.010    0.001    0.030 |\n",
      "|  psi2s_p |    0.259    0.436    0.291    0.014    0.267   -0.002    0.196    0.024    0.008   -0.054    0.287    0.157    1.000   -0.042    0.056   -0.006   -0.107   -0.071    0.329   -0.014    0.000   -0.006    0.001   -0.025 |\n",
      "|  p4160_s |    0.240   -0.006   -0.098    0.040   -0.066    0.004    0.217    0.031   -0.015    0.125   -0.104    0.073   -0.042    1.000   -0.016    0.047    0.080    0.350   -0.138    0.138   -0.031    0.066   -0.005    0.042 |\n",
      "|   Dbar_s |    0.021   -0.133    0.276   -0.081   -0.049   -0.008    0.262    0.084   -0.001   -0.044   -0.037   -0.230    0.056   -0.016    1.000   -0.021   -0.170   -0.069   -0.050    0.043    0.006   -0.017    0.002   -0.036 |\n",
      "|  bplus_0 |    0.030   -0.031   -0.019   -0.002    0.037    0.069   -0.002    0.028    0.020    0.021    0.018    0.027   -0.006    0.047   -0.021    1.000   -0.868    0.013    0.024   -0.039   -0.008   -0.038   -0.009    0.263 |\n",
      "|  bplus_1 |   -0.095   -0.065   -0.278   -0.093   -0.042   -0.054   -0.240   -0.071   -0.029    0.120   -0.145    0.141   -0.107    0.080   -0.170   -0.868    1.000    0.184   -0.099   -0.179   -0.005    0.057    0.006   -0.188 |\n",
      "|  p4415_s |   -0.053   -0.137   -0.113   -0.020   -0.182    0.006    0.070   -0.020    0.005    0.229   -0.187   -0.014   -0.071    0.350   -0.069    0.013    0.184    1.000   -0.147   -0.157    0.010   -0.019    0.000    0.024 |\n",
      "|  p4160_p |    0.518    0.641   -0.076    0.094    0.628    0.002   -0.296    0.176    0.008   -0.424    0.499    0.561    0.329   -0.138   -0.050    0.024   -0.099   -0.147    1.000   -0.004   -0.010    0.015    0.001   -0.012 |\n",
      "|  bplus_2 |    0.006    0.020    0.039    0.057    0.111   -0.018    0.609   -0.016   -0.078    0.096   -0.111   -0.052   -0.014    0.138    0.043   -0.039   -0.179   -0.157   -0.004    1.000   -0.131    0.282   -0.017    0.038 |\n",
      "|    phi_s |   -0.018    0.022    0.003   -0.003   -0.026    0.032   -0.037   -0.017    0.742   -0.015    0.007    0.001    0.000   -0.031    0.006   -0.008   -0.005    0.010   -0.010   -0.131    1.000   -0.167    0.004   -0.045 |\n",
      "|    rho_p |    0.029   -0.058   -0.016    0.004    0.053   -0.038    0.089    0.024   -0.254    0.038   -0.027    0.010   -0.006    0.066   -0.017   -0.038    0.057   -0.019    0.015    0.282   -0.167    1.000    0.058    0.197 |\n",
      "|  omega_s |   -0.001   -0.005    0.005    0.000   -0.002    0.826   -0.004   -0.001   -0.060   -0.004    0.003    0.001    0.001   -0.005    0.002   -0.009    0.006    0.000    0.001   -0.017    0.004    0.058    1.000    0.048 |\n",
      "|    rho_s |   -0.009   -0.025   -0.057   -0.013    0.012    0.353   -0.001   -0.007   -0.021    0.037   -0.033    0.030   -0.025    0.042   -0.036    0.263   -0.188    0.024   -0.012    0.038   -0.045    0.197    0.048    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.19381892433865677}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.044716514883899716}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.06242403708919}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.37243903642576304}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.19092841832304996}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3867286335410238}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.2665357796777583}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.28196039087032876}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2399267835373009}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.19109492997405253}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1455050955437709}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.277843906916213}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04091251837860721}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.18820159980892748}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.37618660037780716}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.02009261504882165}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03577765524595988}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.20766931988295756}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.15368510473930952}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08399779785673678}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.198876880849701}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.4873111568351556}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.5457151222934282}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3386459825164503})])\n",
      "Step: 3/11\n",
      "Current Ctt: 0.8451542547285166\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1013 (1013 total)    |\n",
      "| EDM = 2.3E-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: 297454.06270613667\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.63   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.50   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    0.4    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.09    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.54   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.7    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.54    |   0.27    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.58    |   0.24    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   1.10    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.81   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |    0.4    |    0.9    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.07    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.08    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.05    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.444   |   0.020   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.74   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.47    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.25   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.41   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   19.5    |    1.2    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.4    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    8.5    |    1.5    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |    0.8    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.497    0.074    0.082    0.459   -0.006    0.151   -0.010   -0.169    0.360    0.509    0.250    0.359    0.012    0.032   -0.230   -0.047    0.465    0.261   -0.034    0.056   -0.002   -0.027 |\n",
      "|   jpsi_p |    0.497    1.000    0.131    0.055    0.505   -0.014    0.280    0.021   -0.109    0.392    0.651    0.484   -0.004   -0.063   -0.041   -0.283   -0.198    0.616    0.123    0.019   -0.073   -0.006   -0.059 |\n",
      "|   Dbar_p |    0.074    0.131    1.000   -0.100   -0.100    0.006    0.113    0.005   -0.220    0.483   -0.484    0.176   -0.156    0.061    0.019    0.146    0.001    0.068   -0.309    0.005   -0.011    0.002    0.016 |\n",
      "| DDstar_s |    0.082    0.055   -0.100    1.000    0.119   -0.007    0.031   -0.001    0.038   -0.061    0.166    0.070    0.043   -0.023   -0.007   -0.202   -0.058    0.079    0.132   -0.003   -0.004    0.001   -0.034 |\n",
      "|  p4415_p |    0.459    0.505   -0.100    0.119    1.000   -0.006    0.188   -0.010   -0.163    0.261    0.622    0.309   -0.022   -0.019    0.029   -0.263   -0.242    0.619    0.306   -0.033    0.057   -0.001   -0.031 |\n",
      "|  omega_p |   -0.006   -0.014    0.006   -0.007   -0.006    1.000   -0.002    0.003    0.002   -0.001   -0.007   -0.005    0.001   -0.002    0.069   -0.053    0.007   -0.007   -0.030    0.031   -0.009    0.825    0.367 |\n",
      "|  p3770_s |    0.151    0.280    0.113    0.031    0.188   -0.002    1.000   -0.009    0.139   -0.049    0.233   -0.020    0.082    0.027    0.033   -0.084   -0.001    0.175    0.066   -0.025    0.040   -0.002   -0.007 |\n",
      "|    phi_p |   -0.010    0.021    0.005   -0.001   -0.010    0.003   -0.009    1.000    0.000    0.003    0.006    0.006   -0.010    0.002    0.021   -0.033    0.010   -0.006   -0.086    0.739   -0.257   -0.061    0.011 |\n",
      "|  p4040_s |   -0.169   -0.109   -0.220    0.038   -0.163    0.002    0.139    0.000    1.000   -0.157    0.071   -0.033   -0.012   -0.043    0.008    0.086    0.160   -0.367   -0.211    0.004   -0.011    0.000    0.010 |\n",
      "|  p3770_p |    0.360    0.392    0.483   -0.061    0.261   -0.001   -0.049    0.003   -0.157    1.000    0.122    0.239   -0.030   -0.014    0.032   -0.115   -0.120    0.390    0.050   -0.009    0.007   -0.001   -0.014 |\n",
      "| DDstar_p |    0.509    0.651   -0.484    0.166    0.622   -0.007    0.233    0.006    0.071    0.122    1.000    0.449    0.161   -0.065    0.005   -0.399   -0.165    0.606    0.370   -0.012    0.019    0.004   -0.060 |\n",
      "|  psi2s_p |    0.250    0.484    0.176    0.070    0.309   -0.005   -0.020    0.006   -0.033    0.239    0.449    1.000   -0.039   -0.010   -0.003   -0.150   -0.082    0.381   -0.052   -0.002   -0.012    0.001   -0.034 |\n",
      "|  p4160_s |    0.359   -0.004   -0.156    0.043   -0.022    0.001    0.082   -0.010   -0.012   -0.030    0.161   -0.039    1.000   -0.030    0.037    0.034    0.292   -0.038   -0.082   -0.018    0.030   -0.002    0.012 |\n",
      "|   Dbar_s |    0.012   -0.063    0.061   -0.023   -0.019   -0.002    0.027    0.002   -0.043   -0.014   -0.065   -0.010   -0.030    1.000   -0.008   -0.023   -0.029    0.001   -0.073    0.007   -0.018    0.001   -0.009 |\n",
      "|  bplus_0 |    0.032   -0.041    0.019   -0.007    0.029    0.069    0.033    0.021    0.008    0.032    0.005   -0.003    0.037   -0.008    1.000   -0.847    0.005    0.024   -0.148   -0.008   -0.015   -0.008    0.270 |\n",
      "|  bplus_1 |   -0.230   -0.283    0.146   -0.202   -0.263   -0.053   -0.084   -0.033    0.086   -0.115   -0.399   -0.150    0.034   -0.023   -0.847    1.000    0.218   -0.325   -0.190   -0.004    0.038    0.005   -0.182 |\n",
      "|  p4415_s |   -0.047   -0.198    0.001   -0.058   -0.242    0.007   -0.001    0.010    0.160   -0.120   -0.165   -0.082    0.292   -0.029    0.005    0.218    1.000   -0.165   -0.410    0.022   -0.045    0.002    0.023 |\n",
      "|  p4160_p |    0.465    0.616    0.068    0.079    0.619   -0.007    0.175   -0.006   -0.367    0.390    0.606    0.381   -0.038    0.001    0.024   -0.325   -0.165    1.000    0.386   -0.031    0.051   -0.001   -0.040 |\n",
      "|  bplus_2 |    0.261    0.123   -0.309    0.132    0.306   -0.030    0.066   -0.086   -0.211    0.050    0.370   -0.052   -0.082   -0.073   -0.148   -0.190   -0.410    0.386    1.000   -0.135    0.268   -0.012   -0.054 |\n",
      "|    phi_s |   -0.034    0.019    0.005   -0.003   -0.033    0.031   -0.025    0.739    0.004   -0.009   -0.012   -0.002   -0.018    0.007   -0.008   -0.004    0.022   -0.031   -0.135    1.000   -0.170    0.003   -0.023 |\n",
      "|    rho_p |    0.056   -0.073   -0.011   -0.004    0.057   -0.009    0.040   -0.257   -0.011    0.007    0.019   -0.012    0.030   -0.018   -0.015    0.038   -0.045    0.051    0.268   -0.170    1.000    0.056    0.176 |\n",
      "|  omega_s |   -0.002   -0.006    0.002    0.001   -0.001    0.825   -0.002   -0.061    0.000   -0.001    0.004    0.001   -0.002    0.001   -0.008    0.005    0.002   -0.001   -0.012    0.003    0.056    1.000    0.050 |\n",
      "|    rho_s |   -0.027   -0.059    0.016   -0.034   -0.031    0.367   -0.007    0.011    0.010   -0.014   -0.060   -0.034    0.012   -0.009    0.270   -0.182    0.023   -0.040   -0.054   -0.023    0.176    0.050    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.20319640801530103}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04108123143062814}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.5521140807019638}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.0902811474218177}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.19376602332286597}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3821944738036054}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2731252631001799}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.23849631641738167}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17516880274276714}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.13539726143118913}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.8746170838230709}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04013478920408886}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17664199884815424}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.051078091849442786}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.019686348362052186}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.0359253091056444}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.20494067921673487}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.14458676381232594}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.06144317934944721}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.196020194527863}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.5114575378554567}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.5410777281661754}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.33441898812800264})])\n",
      "Step: 4/11\n",
      "Current Ctt: 0.9759000729485332\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1150 (1150 total)    |\n",
      "| EDM = 0.000599 (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: 297465.9905098843\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.48   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.53   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   0.15    |   1.08    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.28   |    0.40   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.47   |    0.27   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.34    |   0.28    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.70    |   0.13    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.46    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.78    |   0.13    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.89    |   0.16    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.96   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |    1.6    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.05    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.16    |   0.14    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.30   |    0.41   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.468   |   0.006   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.930   |   0.012   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.32    |   0.16    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.15   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.16   |    0.05   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.9    |    0.8    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   0.014   |   0.246   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    7.4    |    1.0    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.20    |   0.29    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.723    0.690    0.754    0.700    0.016   -0.473    0.432    0.059    0.351    0.550    0.639    0.571    0.447    0.397    0.288    0.306   -0.106    0.733    0.206    0.033    0.001    0.001    0.044 |\n",
      "|   jpsi_p |    0.723    1.000    0.871    0.937    0.822    0.011   -0.439    0.572    0.080    0.503    0.622    0.786    0.751    0.333    0.611    0.362    0.396   -0.161    0.880    0.236    0.059   -0.040   -0.008    0.049 |\n",
      "|   Dbar_p |    0.690    0.871    1.000    0.970    0.820    0.016   -0.523    0.512    0.077    0.517    0.529    0.798    0.705    0.348    0.624    0.398    0.428   -0.151    0.862    0.255    0.050   -0.017   -0.003    0.058 |\n",
      "| DDstar_s |    0.754    0.937    0.970    1.000    0.867    0.018   -0.523    0.581    0.081    0.540    0.620    0.827    0.780    0.364    0.629    0.407    0.438   -0.162    0.921    0.254    0.052   -0.014   -0.001    0.059 |\n",
      "|  p4415_p |    0.700    0.822    0.820    0.867    1.000    0.017   -0.447    0.520    0.068    0.423    0.573    0.702    0.678    0.275    0.508    0.348    0.370   -0.197    0.844    0.261    0.038    0.000   -0.000    0.054 |\n",
      "|  omega_p |    0.016    0.011    0.016    0.018    0.017    1.000   -0.010    0.013   -0.046    0.011    0.011    0.011    0.015    0.008    0.008    0.003    0.013   -0.005    0.018    0.024    0.009    0.023    0.629    0.078 |\n",
      "|      Ctt |   -0.473   -0.439   -0.523   -0.523   -0.447   -0.010    1.000   -0.329   -0.037   -0.132   -0.385   -0.384   -0.319   -0.056   -0.482   -0.242   -0.258    0.229   -0.545    0.203   -0.024    0.011   -0.002   -0.027 |\n",
      "|  p3770_s |    0.432    0.572    0.512    0.581    0.520    0.013   -0.329    1.000    0.044    0.383    0.261    0.483    0.386    0.232    0.267    0.246    0.259   -0.085    0.547    0.131    0.019    0.009    0.001    0.037 |\n",
      "|    phi_p |    0.059    0.080    0.077    0.081    0.068   -0.046   -0.037    0.044    1.000    0.041    0.053    0.071    0.063    0.026    0.054    0.028    0.023   -0.011    0.074   -0.014    0.426   -0.203   -0.093   -0.038 |\n",
      "|  p4040_s |    0.351    0.503    0.517    0.540    0.423    0.011   -0.132    0.383    0.041    1.000    0.330    0.382    0.413    0.176    0.311    0.259    0.274    0.005    0.386    0.137    0.018    0.006   -0.001    0.039 |\n",
      "|  p3770_p |    0.550    0.622    0.529    0.620    0.573    0.011   -0.385    0.261    0.053    0.330    1.000    0.562    0.506    0.220    0.414    0.275    0.289   -0.139    0.632    0.156    0.032   -0.009   -0.002    0.037 |\n",
      "| DDstar_p |    0.639    0.786    0.798    0.827    0.702    0.011   -0.384    0.483    0.071    0.382    0.562    1.000    0.625    0.240    0.405    0.473    0.509   -0.191    0.783    0.199    0.047   -0.023   -0.009    0.066 |\n",
      "|  psi2s_p |    0.571    0.751    0.705    0.780    0.678    0.015   -0.319    0.386    0.063    0.413    0.506    0.625    1.000    0.254    0.435    0.311    0.336   -0.125    0.728    0.155    0.039   -0.010   -0.001    0.046 |\n",
      "|  p4160_s |    0.447    0.333    0.348    0.364    0.275    0.008   -0.056    0.232    0.026    0.176    0.220    0.240    0.254    1.000    0.188    0.196    0.203    0.154    0.302    0.127    0.006    0.014   -0.001    0.031 |\n",
      "|   Dbar_s |    0.397    0.611    0.624    0.629    0.508    0.008   -0.482    0.267    0.054    0.311    0.414    0.405    0.435    0.188    1.000    0.382    0.408   -0.077    0.546    0.255    0.029   -0.008   -0.009    0.057 |\n",
      "|  bplus_0 |    0.288    0.362    0.398    0.407    0.348    0.003   -0.242    0.246    0.028    0.259    0.275    0.473    0.311    0.196    0.382    1.000   -0.090    0.029    0.357   -0.029   -0.000    0.002   -0.023    0.108 |\n",
      "|  bplus_1 |    0.306    0.396    0.428    0.438    0.370    0.013   -0.258    0.259    0.023    0.274    0.289    0.509    0.336    0.203    0.408   -0.090    1.000    0.030    0.381   -0.044    0.004    0.037    0.003    0.050 |\n",
      "|  p4415_s |   -0.106   -0.161   -0.151   -0.162   -0.197   -0.005    0.229   -0.085   -0.011    0.005   -0.139   -0.191   -0.125    0.154   -0.077    0.029    0.030    1.000   -0.148   -0.140   -0.007   -0.007   -0.004   -0.003 |\n",
      "|  p4160_p |    0.733    0.880    0.862    0.921    0.844    0.018   -0.545    0.547    0.074    0.386    0.632    0.783    0.728    0.302    0.546    0.357    0.381   -0.148    1.000    0.252    0.045   -0.007    0.000    0.053 |\n",
      "|  bplus_2 |    0.206    0.236    0.255    0.254    0.261    0.024    0.203    0.131   -0.014    0.137    0.156    0.199    0.155    0.127    0.255   -0.029   -0.044   -0.140    0.252    1.000   -0.074    0.171    0.010    0.072 |\n",
      "|    phi_s |    0.033    0.059    0.050    0.052    0.038    0.009   -0.024    0.019    0.426    0.018    0.032    0.047    0.039    0.006    0.029   -0.000    0.004   -0.007    0.045   -0.074    1.000   -0.053    0.002   -0.043 |\n",
      "|    rho_p |    0.001   -0.040   -0.017   -0.014    0.000    0.023    0.011    0.009   -0.203    0.006   -0.009   -0.023   -0.010    0.014   -0.008    0.002    0.037   -0.007   -0.007    0.171   -0.053    1.000    0.253    0.236 |\n",
      "|  omega_s |    0.001   -0.008   -0.003   -0.001   -0.000    0.629   -0.002    0.001   -0.093   -0.001   -0.002   -0.009   -0.001   -0.001   -0.009   -0.023    0.003   -0.004    0.000    0.010    0.002    0.253    1.000   -0.156 |\n",
      "|    rho_s |    0.044    0.049    0.058    0.059    0.054    0.078   -0.027    0.037   -0.038    0.039    0.037    0.066    0.046    0.031    0.057    0.108    0.050   -0.003    0.053    0.072   -0.043    0.236   -0.156    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2563136005916751}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.06468456242018839}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.0845540498691717}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.39744383221019536}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.2712617139930886}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2752845160517321}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1328981593856231}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2508575271033746}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.13422135988071604}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1572259471722336}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12465836268003438}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.349680365070526}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04532464196539987}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.13823567123387148}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4120963495715207}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.005813212584894645}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.01162619111580454}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1557729908745693}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.21270924417506465}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.046298699603652516}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.7914403898162945}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.24629386475800885}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.0257113774058269}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.28538142922115356})])\n",
      "Step: 4/11\n",
      "Current Ctt: 0.9759000729485332\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1477 (1477 total)    |\n",
      "| EDM = 0.000217 (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: 297468.27737061726\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.36   |    0.29   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.49   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.85   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.60   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.32   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.34    |   0.24    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |    2.4    |    0.3    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.79    |   0.12    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.82    |   0.24    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.84   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |   -0.88   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.07    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.11    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.54    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.465   |   0.008   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |  -0.896   |   0.016   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.31    |   0.15    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -1.97   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.27   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   20.0    |    0.7    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |  -0.021   |   0.236   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    7.4    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |   1.19    |   0.26    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.783    0.235   -0.828    0.773    0.070    0.676    0.012    0.702    0.477   -0.680    0.756    0.751   -0.715   -0.687   -0.710    0.347    0.758   -0.135   -0.037    0.200    0.093   -0.111 |\n",
      "|   jpsi_p |    0.783    1.000    0.398   -0.941    0.852    0.074    0.802    0.016    0.811    0.528   -0.766    0.879    0.732   -0.831   -0.782   -0.803    0.348    0.865   -0.241   -0.029    0.198    0.101   -0.129 |\n",
      "|   Dbar_p |    0.235    0.398    1.000   -0.328    0.280    0.028    0.255    0.013    0.278    0.319   -0.110    0.324    0.240   -0.270   -0.181   -0.193    0.164    0.287    0.090   -0.014    0.081    0.032   -0.029 |\n",
      "| DDstar_s |   -0.828   -0.941   -0.328    1.000   -0.908   -0.085   -0.846   -0.016   -0.875   -0.535    0.782   -0.938   -0.794    0.907    0.830    0.856   -0.389   -0.908    0.237    0.040   -0.236   -0.114    0.136 |\n",
      "|  p4415_p |    0.773    0.852    0.280   -0.908    1.000    0.077    0.767    0.013    0.771    0.499   -0.707    0.842    0.698   -0.809   -0.746   -0.771    0.309    0.855   -0.183   -0.040    0.221    0.102   -0.121 |\n",
      "|  omega_p |    0.070    0.074    0.028   -0.085    0.077    1.000    0.072   -0.029    0.074    0.044   -0.065    0.079    0.068   -0.075   -0.070   -0.069    0.032    0.077   -0.001    0.006    0.009    0.558    0.077 |\n",
      "|  p3770_s |    0.676    0.802    0.255   -0.846    0.767    0.072    1.000    0.012    0.762    0.352   -0.677    0.753    0.677   -0.732   -0.688   -0.712    0.337    0.759   -0.181   -0.040    0.207    0.095   -0.112 |\n",
      "|    phi_p |    0.012    0.016    0.013   -0.016    0.013   -0.029    0.012    1.000    0.012    0.012   -0.017    0.013    0.010   -0.014   -0.016   -0.019    0.006    0.014   -0.032    0.379   -0.164   -0.071   -0.027 |\n",
      "|  p4040_s |    0.702    0.811    0.278   -0.875    0.771    0.074    0.762    0.012    1.000    0.469   -0.651    0.808    0.667   -0.790   -0.707   -0.730    0.366    0.733   -0.242   -0.040    0.213    0.099   -0.115 |\n",
      "|  p3770_p |    0.477    0.528    0.319   -0.535    0.499    0.044    0.352    0.012    0.469    1.000   -0.483    0.492    0.423   -0.429   -0.418   -0.435    0.188    0.520   -0.070   -0.021    0.122    0.057   -0.071 |\n",
      "| DDstar_p |   -0.680   -0.766   -0.110    0.782   -0.707   -0.065   -0.677   -0.017   -0.651   -0.483    1.000   -0.731   -0.581    0.720    0.569    0.588   -0.237   -0.755    0.206    0.027   -0.176   -0.084    0.095 |\n",
      "|  psi2s_p |    0.756    0.879    0.324   -0.938    0.842    0.079    0.753    0.013    0.808    0.492   -0.731    1.000    0.723   -0.825   -0.770   -0.793    0.357    0.848   -0.256   -0.040    0.222    0.105   -0.125 |\n",
      "|  p4160_s |    0.751    0.732    0.240   -0.794    0.698    0.068    0.677    0.010    0.667    0.423   -0.581    0.723    1.000   -0.718   -0.635   -0.657    0.407    0.703   -0.201   -0.039    0.197    0.089   -0.103 |\n",
      "|   Dbar_s |   -0.715   -0.831   -0.270    0.907   -0.809   -0.075   -0.732   -0.014   -0.790   -0.429    0.720   -0.825   -0.718    1.000    0.743    0.766   -0.363   -0.793    0.177    0.034   -0.208   -0.100    0.121 |\n",
      "|  bplus_0 |   -0.687   -0.782   -0.181    0.830   -0.746   -0.070   -0.688   -0.016   -0.707   -0.418    0.569   -0.770   -0.635    0.743    1.000    0.623   -0.271   -0.757    0.111    0.018   -0.183   -0.104    0.156 |\n",
      "|  bplus_1 |   -0.710   -0.803   -0.193    0.856   -0.771   -0.069   -0.712   -0.019   -0.730   -0.435    0.588   -0.793   -0.657    0.766    0.623    1.000   -0.279   -0.782    0.120    0.022   -0.176   -0.096    0.129 |\n",
      "|  p4415_s |    0.347    0.348    0.164   -0.389    0.309    0.032    0.337    0.006    0.366    0.188   -0.237    0.357    0.407   -0.363   -0.271   -0.279    1.000    0.370   -0.247   -0.015    0.085    0.042   -0.049 |\n",
      "|  p4160_p |    0.758    0.865    0.287   -0.908    0.855    0.077    0.759    0.014    0.733    0.520   -0.755    0.848    0.703   -0.793   -0.757   -0.782    0.370    1.000   -0.151   -0.038    0.217    0.102   -0.123 |\n",
      "|  bplus_2 |   -0.135   -0.241    0.090    0.237   -0.183   -0.001   -0.181   -0.032   -0.242   -0.070    0.206   -0.256   -0.201    0.177    0.111    0.120   -0.247   -0.151    1.000   -0.076    0.109   -0.021    0.076 |\n",
      "|    phi_s |   -0.037   -0.029   -0.014    0.040   -0.040    0.006   -0.040    0.379   -0.040   -0.021    0.027   -0.040   -0.039    0.034    0.018    0.022   -0.015   -0.038   -0.076    1.000   -0.042    0.001   -0.030 |\n",
      "|    rho_p |    0.200    0.198    0.081   -0.236    0.221    0.009    0.207   -0.164    0.213    0.122   -0.176    0.222    0.197   -0.208   -0.183   -0.176    0.085    0.217    0.109   -0.042    1.000    0.239    0.166 |\n",
      "|  omega_s |    0.093    0.101    0.032   -0.114    0.102    0.558    0.095   -0.071    0.099    0.057   -0.084    0.105    0.089   -0.100   -0.104   -0.096    0.042    0.102   -0.021    0.001    0.239    1.000   -0.175 |\n",
      "|    rho_s |   -0.111   -0.129   -0.029    0.136   -0.121    0.077   -0.112   -0.027   -0.115   -0.071    0.095   -0.125   -0.103    0.121    0.156    0.129   -0.049   -0.123    0.076   -0.030    0.166   -0.175    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2864972537053547}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.058335041762505924}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.20032692008418174}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5990294855458971}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.29609656355606173}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2404562989157517}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.33746192109377526}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.12321225905544475}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.2435692671170147}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.10511890176531113}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.26324160155428267}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.07039088110238634}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.19150406181877078}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.5398415444552368}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.007885416127223266}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.016257243020678325}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.15365905034940253}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.17490102588052947}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.03629403773410034}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.7334540519818162}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.23570279753004453}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.901558721931857}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.2649712646684871})])\n",
      "Step: 5/11\n",
      "Current Ctt: 1.0910894511799618\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1212 (1212 total)    |\n",
      "| EDM = 0.000518 (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: 297512.29330659437\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.48   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.51   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -1.1    |    0.8    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.58    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.49   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.5    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.48    |   0.20    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.50    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.75    |   0.17    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.10    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -3.05   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |    0.9    |    1.2    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.31    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.30    |   0.39    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.514   |   0.018   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |   -0.90   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.58    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.18   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.27   |    0.09   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   20.8    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.15   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    7.0    |    1.7    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.32    |   0.32    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.201    0.152    0.161    0.321    0.030   -0.256   -0.039   -0.013   -0.055    0.146    0.297    0.052    0.362    0.056   -0.187   -0.231    0.002    0.300    0.147   -0.026    0.038    0.040   -0.068 |\n",
      "|   jpsi_p |    0.201    1.000    0.703    0.527    0.468    0.032   -0.288    0.048    0.006    0.296    0.154    0.695    0.433    0.209    0.095   -0.423   -0.489    0.024    0.312    0.381   -0.003   -0.016    0.051   -0.152 |\n",
      "|   Dbar_p |    0.152    0.703    1.000    0.813    0.491    0.076   -0.563   -0.027   -0.020    0.386    0.181    0.830    0.489    0.274    0.037   -0.467   -0.575    0.108    0.236    0.461   -0.047    0.086    0.101   -0.168 |\n",
      "| DDstar_s |    0.161    0.527    0.813    1.000    0.541    0.093   -0.444    0.019   -0.024    0.473   -0.095    0.901    0.510    0.342   -0.007   -0.663   -0.791    0.064    0.159    0.529   -0.040    0.067    0.129   -0.241 |\n",
      "|  p4415_p |    0.321    0.468    0.491    0.541    1.000    0.068   -0.264    0.062   -0.024    0.200    0.060    0.666    0.374    0.164    0.013   -0.438   -0.535   -0.106    0.445    0.430   -0.045    0.079    0.092   -0.155 |\n",
      "|  omega_p |    0.030    0.032    0.076    0.093    0.068    1.000   -0.035    0.011   -0.118    0.049   -0.010    0.097    0.053    0.040   -0.001   -0.089   -0.065   -0.005    0.032    0.096   -0.017    0.198    0.839    0.001 |\n",
      "|      Ctt |   -0.256   -0.288   -0.563   -0.444   -0.264   -0.035    1.000   -0.010   -0.001    0.038   -0.276   -0.467   -0.149    0.065    0.014    0.249    0.286    0.097   -0.363    0.188   -0.001    0.021   -0.049    0.108 |\n",
      "|  p3770_s |   -0.039    0.048   -0.027    0.019    0.062    0.011   -0.010    1.000   -0.010    0.152   -0.272    0.086   -0.131    0.065    0.029   -0.041   -0.059    0.027   -0.010    0.022   -0.018    0.025    0.013   -0.016 |\n",
      "|    phi_p |   -0.013    0.006   -0.020   -0.024   -0.024   -0.118   -0.001   -0.010    1.000   -0.018    0.002   -0.020   -0.012   -0.022    0.002    0.013    0.006    0.003   -0.010   -0.077    0.563   -0.284   -0.166   -0.016 |\n",
      "|  p4040_s |   -0.055    0.296    0.386    0.473    0.200    0.049    0.038    0.152   -0.018    1.000   -0.086    0.480    0.309    0.233   -0.032   -0.300   -0.369    0.188   -0.254    0.304   -0.034    0.061    0.066   -0.107 |\n",
      "|  p3770_p |    0.146    0.154    0.181   -0.095    0.060   -0.010   -0.276   -0.272    0.002   -0.086    1.000    0.016   -0.091   -0.056    0.146    0.101    0.096   -0.037    0.219   -0.060   -0.008    0.008   -0.016    0.031 |\n",
      "| DDstar_p |    0.297    0.695    0.830    0.901    0.666    0.097   -0.467    0.086   -0.020    0.480    0.016    1.000    0.617    0.362   -0.033   -0.676   -0.808    0.038    0.348    0.531   -0.038    0.068    0.133   -0.247 |\n",
      "|  psi2s_p |    0.052    0.433    0.489    0.510    0.374    0.053   -0.149   -0.131   -0.012    0.309   -0.091    0.617    1.000    0.183    0.059   -0.397   -0.469    0.051    0.155    0.302   -0.024    0.036    0.074   -0.143 |\n",
      "|  p4160_s |    0.362    0.209    0.274    0.342    0.164    0.040    0.065    0.065   -0.022    0.233   -0.056    0.362    0.183    1.000   -0.019   -0.202   -0.265    0.314   -0.040    0.272   -0.040    0.072    0.052   -0.071 |\n",
      "|   Dbar_s |    0.056    0.095    0.037   -0.007    0.013   -0.001    0.014    0.029    0.002   -0.032    0.146   -0.033    0.059   -0.019    1.000    0.030    0.032   -0.002    0.072   -0.018   -0.001    0.004   -0.003    0.010 |\n",
      "|  bplus_0 |   -0.187   -0.423   -0.467   -0.663   -0.438   -0.089    0.249   -0.041    0.013   -0.300    0.101   -0.676   -0.397   -0.202    0.030    1.000    0.309    0.058   -0.213   -0.443    0.009   -0.036   -0.131    0.270 |\n",
      "|  bplus_1 |   -0.231   -0.489   -0.575   -0.791   -0.535   -0.065    0.286   -0.059    0.006   -0.369    0.096   -0.808   -0.469   -0.265    0.032    0.309    1.000    0.062   -0.262   -0.529    0.023   -0.022   -0.091    0.191 |\n",
      "|  p4415_s |    0.002    0.024    0.108    0.064   -0.106   -0.005    0.097    0.027    0.003    0.188   -0.037    0.038    0.051    0.314   -0.002    0.058    0.062    1.000   -0.075   -0.096    0.002   -0.005   -0.007    0.014 |\n",
      "|  p4160_p |    0.300    0.312    0.236    0.159    0.445    0.032   -0.363   -0.010   -0.010   -0.254    0.219    0.348    0.155   -0.040    0.072   -0.213   -0.262   -0.075    1.000    0.180   -0.022    0.034    0.043   -0.077 |\n",
      "|  bplus_2 |    0.147    0.381    0.461    0.529    0.430    0.096    0.188    0.022   -0.077    0.304   -0.060    0.531    0.302    0.272   -0.018   -0.443   -0.529   -0.096    0.180    1.000   -0.130    0.258    0.119   -0.105 |\n",
      "|    phi_s |   -0.026   -0.003   -0.047   -0.040   -0.045   -0.017   -0.001   -0.018    0.563   -0.034   -0.008   -0.038   -0.024   -0.040   -0.001    0.009    0.023    0.002   -0.022   -0.130    1.000   -0.144   -0.032   -0.051 |\n",
      "|    rho_p |    0.038   -0.016    0.086    0.067    0.079    0.198    0.021    0.025   -0.284    0.061    0.008    0.068    0.036    0.072    0.004   -0.036   -0.022   -0.005    0.034    0.258   -0.144    1.000    0.307    0.235 |\n",
      "|  omega_s |    0.040    0.051    0.101    0.129    0.092    0.839   -0.049    0.013   -0.166    0.066   -0.016    0.133    0.074    0.052   -0.003   -0.131   -0.091   -0.007    0.043    0.119   -0.032    0.307    1.000   -0.224 |\n",
      "|    rho_s |   -0.068   -0.152   -0.168   -0.241   -0.155    0.001    0.108   -0.016   -0.016   -0.107    0.031   -0.247   -0.143   -0.071    0.010    0.270    0.191    0.014   -0.077   -0.105   -0.051    0.235   -0.224    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.1744727549182905}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03702656144849126}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.815851964140085}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5816322998358264}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.18045731567262324}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.4169880995984361}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.20180480212754848}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25458626176741816}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.1705605148687117}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1939751993710367}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.11505705399024646}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.2135138835327868}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03941241466633816}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.18171558582380665}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.39148851617079383}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.018408573357097335}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.04230238923766749}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19473647224791235}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10488872701693008}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.09379078830404441}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9253460360421162}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.27758401142755806}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.7147721225267887}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.31534913235528406})])\n",
      "Step: 5/11\n",
      "Current Ctt: 1.0910894511799618\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1015 (1015 total)    |\n",
      "| EDM = 0.000103 (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: 297514.3215290939\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.4    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.50   |    0.07   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.31   |    0.54   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.25    |   0.13    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.5    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.5    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |    2.5    |    0.3    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.75    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.96    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.89   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |    0.9    |    2.9    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.07    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.19    |   0.20    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.12    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.510   |   0.025   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.87   |    0.12   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.56    |   0.28    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.12   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.40   |    0.13   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   20.9    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.19   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    6.9    |    1.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |    1.3    |    0.4    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.789   -0.240   -0.571    0.856    0.138    0.536    0.013    0.353    0.019    0.879    0.744    0.629   -0.400   -0.256   -0.816   -0.575    0.836    0.806   -0.020   -0.024    0.180   -0.360 |\n",
      "|   jpsi_p |    0.789    1.000    0.021   -0.532    0.830    0.111    0.585    0.036    0.378    0.158    0.862    0.814    0.429   -0.410   -0.267   -0.772   -0.579    0.849    0.732    0.009   -0.084    0.150   -0.352 |\n",
      "|   Dbar_p |   -0.240    0.021    1.000    0.083   -0.276   -0.043   -0.191   -0.017   -0.193    0.580   -0.343   -0.130   -0.178    0.243    0.162    0.359    0.301   -0.218   -0.237   -0.032    0.092   -0.066    0.179 |\n",
      "| DDstar_s |   -0.571   -0.532    0.083    1.000   -0.634   -0.116   -0.411   -0.012   -0.390    0.163   -0.692   -0.597   -0.383    0.352    0.239    0.715    0.488   -0.574   -0.672    0.006    0.044   -0.155    0.322 |\n",
      "|  p4415_p |    0.856    0.830   -0.276   -0.634    1.000    0.147    0.610    0.017    0.400   -0.028    0.940    0.819    0.472   -0.463   -0.279   -0.872   -0.680    0.909    0.837   -0.015   -0.036    0.192   -0.387 |\n",
      "|  omega_p |    0.138    0.111   -0.043   -0.116    0.147    1.000    0.102   -0.147    0.075   -0.015    0.153    0.131    0.085   -0.077   -0.122   -0.115   -0.113    0.142    0.174   -0.028    0.226    0.873   -0.093 |\n",
      "|  p3770_s |    0.536    0.585   -0.191   -0.411    0.610    0.102    1.000    0.007    0.434   -0.210    0.652    0.482    0.381   -0.283   -0.178   -0.593   -0.403    0.574    0.558   -0.020   -0.011    0.133   -0.261 |\n",
      "|    phi_p |    0.013    0.036   -0.017   -0.012    0.017   -0.147    0.007    1.000    0.011   -0.007    0.026    0.024    0.002   -0.009    0.010   -0.036   -0.009    0.017   -0.033    0.582   -0.316   -0.190   -0.016 |\n",
      "|  p4040_s |    0.353    0.378   -0.193   -0.390    0.400    0.075    0.434    0.011    1.000   -0.097    0.497    0.421    0.241   -0.302   -0.143   -0.437   -0.227    0.285    0.313   -0.002   -0.035    0.098   -0.203 |\n",
      "|  p3770_p |    0.019    0.158    0.580    0.163   -0.028   -0.015   -0.210   -0.007   -0.097    1.000   -0.094   -0.008   -0.038    0.138    0.093    0.125    0.083    0.037   -0.021   -0.027    0.058   -0.026    0.075 |\n",
      "| DDstar_p |    0.879    0.862   -0.343   -0.692    0.940    0.153    0.652    0.026    0.497   -0.094    1.000    0.878    0.535   -0.521   -0.310   -0.932   -0.681    0.916    0.860   -0.001   -0.064    0.202   -0.421 |\n",
      "|  psi2s_p |    0.744    0.814   -0.130   -0.597    0.819    0.131    0.482    0.024    0.421   -0.008    0.878    1.000    0.426   -0.410   -0.267   -0.794   -0.572    0.810    0.712   -0.004   -0.055    0.172   -0.361 |\n",
      "|  p4160_s |    0.629    0.429   -0.178   -0.383    0.472    0.085    0.381    0.002    0.241   -0.038    0.535    0.426    1.000   -0.295   -0.132   -0.475   -0.165    0.451    0.410   -0.021   -0.003    0.110   -0.208 |\n",
      "|   Dbar_s |   -0.400   -0.410    0.243    0.352   -0.463   -0.077   -0.283   -0.009   -0.302    0.138   -0.521   -0.410   -0.295    1.000    0.153    0.470    0.321   -0.422   -0.476    0.006    0.021   -0.102    0.208 |\n",
      "|  bplus_0 |   -0.256   -0.267    0.162    0.239   -0.279   -0.122   -0.178    0.010   -0.143    0.093   -0.310   -0.267   -0.132    0.153    1.000   -0.009    0.227   -0.269   -0.339   -0.019   -0.005   -0.170    0.318 |\n",
      "|  bplus_1 |   -0.816   -0.772    0.359    0.715   -0.872   -0.115   -0.593   -0.036   -0.437    0.125   -0.932   -0.794   -0.475    0.470   -0.009    1.000    0.680   -0.852   -0.817   -0.000    0.086   -0.152    0.344 |\n",
      "|  p4415_s |   -0.575   -0.579    0.301    0.488   -0.680   -0.113   -0.403   -0.009   -0.227    0.083   -0.681   -0.572   -0.165    0.321    0.227    0.680    1.000   -0.634   -0.729    0.013    0.020   -0.148    0.297 |\n",
      "|  p4160_p |    0.836    0.849   -0.218   -0.574    0.909    0.142    0.574    0.017    0.285    0.037    0.916    0.810    0.451   -0.422   -0.269   -0.852   -0.634    1.000    0.851   -0.017   -0.030    0.186   -0.376 |\n",
      "|  bplus_2 |    0.806    0.732   -0.237   -0.672    0.837    0.174    0.558   -0.033    0.313   -0.021    0.860    0.712    0.410   -0.476   -0.339   -0.817   -0.729    0.851    1.000   -0.079    0.094    0.221   -0.361 |\n",
      "|    phi_s |   -0.020    0.009   -0.032    0.006   -0.015   -0.028   -0.020    0.582   -0.002   -0.027   -0.001   -0.004   -0.021    0.006   -0.019   -0.000    0.013   -0.017   -0.079    1.000   -0.169   -0.042   -0.056 |\n",
      "|    rho_p |   -0.024   -0.084    0.092    0.044   -0.036    0.226   -0.011   -0.316   -0.035    0.058   -0.064   -0.055   -0.003    0.021   -0.005    0.086    0.020   -0.030    0.094   -0.169    1.000    0.309    0.249 |\n",
      "|  omega_s |    0.180    0.150   -0.066   -0.155    0.192    0.873    0.133   -0.190    0.098   -0.026    0.202    0.172    0.110   -0.102   -0.170   -0.152   -0.148    0.186    0.221   -0.042    0.309    1.000   -0.299 |\n",
      "|    rho_s |   -0.360   -0.352    0.179    0.322   -0.387   -0.093   -0.261   -0.016   -0.203    0.075   -0.421   -0.361   -0.208    0.208    0.318    0.344    0.297   -0.376   -0.361   -0.056    0.249   -0.299    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.3995046091458472}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.0671841984662791}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.5356642700757326}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.13115942036379472}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.4091831942247861}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.47682408344483695}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.33755673607870773}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.17889778921007604}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.19432767519016458}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.13830343030704695}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 2.8803856465756175}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.0713522898186234}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.20115305778657422}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.12027333279358249}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.025217827721295993}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.11770131756998259}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.2752639220826112}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.2584972601687714}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.13095991092032566}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9656248807357404}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.30063675259157874}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.946281191325316}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3526070558715461})])\n",
      "Step: 6/11\n",
      "Current Ctt: 1.1952286093343936\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.976E+05               |    Ncalls=1120 (1120 total)    |\n",
      "| EDM = 0.00274 (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: 297570.1874880278\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.75   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.469   |   0.025   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.12   |    0.31   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.41   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.08   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   -0.07   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.55    |   0.11    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.25    |   0.24    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.62    |   0.14    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.17    |   0.21    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.93   |    0.09   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -0.49   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.05    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.40    |   0.20    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.24    |   0.11    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.460   |   0.011   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.902   |   0.022   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.10    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.13   |    0.08   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.05   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.9    |    0.7    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |  -0.023   |   0.220   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    6.3    |    0.7    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.11    |   0.25    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.532   -0.386   -0.772    0.636    0.058   -0.526    0.513   -0.020    0.620   -0.150   -0.445    0.647    0.710    0.687   -0.717   -0.721    0.578    0.529   -0.374   -0.073    0.247    0.074   -0.135 |\n",
      "|   jpsi_p |    0.532    1.000   -0.202   -0.661    0.540    0.041   -0.338    0.480   -0.020    0.554   -0.121   -0.455    0.589    0.536    0.619   -0.627   -0.627    0.461    0.499   -0.361   -0.047    0.167    0.059   -0.118 |\n",
      "|   Dbar_p |   -0.386   -0.202    1.000    0.578   -0.453   -0.039    0.369   -0.336    0.022   -0.491    0.355    0.498   -0.421   -0.490   -0.552    0.564    0.566   -0.430   -0.302    0.318    0.050   -0.170   -0.055    0.104 |\n",
      "| DDstar_s |   -0.772   -0.661    0.578    1.000   -0.803   -0.074    0.629   -0.683    0.026   -0.849    0.278    0.512   -0.868   -0.833   -0.936    0.941    0.946   -0.731   -0.674    0.515    0.088   -0.312   -0.097    0.177 |\n",
      "|  p4415_p |    0.636    0.540   -0.453   -0.803    1.000    0.060   -0.502    0.549   -0.021    0.647   -0.197   -0.434    0.688    0.626    0.732   -0.750   -0.754    0.559    0.600   -0.368   -0.075    0.257    0.077   -0.140 |\n",
      "|  omega_p |    0.058    0.041   -0.039   -0.074    0.060    1.000   -0.049    0.052   -0.009    0.063   -0.020   -0.036    0.064    0.062    0.067   -0.069   -0.067    0.053    0.051   -0.023    0.006   -0.030    0.336   -0.027 |\n",
      "|      Ctt |   -0.526   -0.338    0.369    0.629   -0.502   -0.049    1.000   -0.456    0.021   -0.459    0.103    0.283   -0.502   -0.455   -0.631    0.584    0.589   -0.374   -0.509    0.546    0.065   -0.209   -0.063    0.110 |\n",
      "|  p3770_s |    0.513    0.480   -0.336   -0.683    0.549    0.052   -0.456    1.000   -0.018    0.611   -0.304   -0.380    0.536    0.574    0.602   -0.630   -0.634    0.499    0.462   -0.345   -0.067    0.222    0.065   -0.119 |\n",
      "|    phi_p |   -0.020   -0.020    0.022    0.026   -0.021   -0.009    0.021   -0.018    1.000   -0.022    0.010    0.006   -0.023   -0.022   -0.023    0.024    0.023   -0.019   -0.017    0.009    0.450   -0.116   -0.044   -0.003 |\n",
      "|  p4040_s |    0.620    0.554   -0.491   -0.849    0.647    0.063   -0.459    0.611   -0.022    1.000   -0.233   -0.422    0.735    0.674    0.792   -0.784   -0.789    0.628    0.471   -0.442   -0.077    0.266    0.081   -0.147 |\n",
      "|  p3770_p |   -0.150   -0.121    0.355    0.278   -0.197   -0.020    0.103   -0.304    0.010   -0.233    1.000    0.075   -0.259   -0.235   -0.276    0.274    0.274   -0.227   -0.096    0.154    0.023   -0.087   -0.028    0.048 |\n",
      "| DDstar_p |   -0.445   -0.455    0.498    0.512   -0.434   -0.036    0.283   -0.380    0.006   -0.422    0.075    1.000   -0.466   -0.405   -0.470    0.426    0.429   -0.317   -0.463    0.249    0.038   -0.147   -0.046    0.082 |\n",
      "|  psi2s_p |    0.647    0.589   -0.421   -0.868    0.688    0.064   -0.502    0.536   -0.023    0.735   -0.259   -0.466    1.000    0.705    0.788   -0.807   -0.811    0.624    0.588   -0.468   -0.079    0.272    0.083   -0.151 |\n",
      "|  p4160_s |    0.710    0.536   -0.490   -0.833    0.626    0.062   -0.455    0.574   -0.022    0.674   -0.235   -0.405    0.705    1.000    0.771   -0.766   -0.771    0.657    0.522   -0.415   -0.077    0.263    0.079   -0.144 |\n",
      "|   Dbar_s |    0.687    0.619   -0.552   -0.936    0.732    0.067   -0.631    0.602   -0.023    0.792   -0.276   -0.470    0.788    0.771    1.000   -0.861   -0.865    0.684    0.598   -0.440   -0.081    0.286    0.088   -0.162 |\n",
      "|  bplus_0 |   -0.717   -0.627    0.564    0.941   -0.750   -0.069    0.584   -0.630    0.024   -0.784    0.274    0.426   -0.807   -0.766   -0.861    1.000    0.857   -0.664   -0.631    0.445    0.076   -0.287   -0.095    0.190 |\n",
      "|  bplus_1 |   -0.721   -0.627    0.566    0.946   -0.754   -0.067    0.589   -0.634    0.023   -0.789    0.274    0.429   -0.811   -0.771   -0.865    0.857    1.000   -0.668   -0.635    0.441    0.077   -0.279   -0.091    0.175 |\n",
      "|  p4415_s |    0.578    0.461   -0.430   -0.731    0.559    0.053   -0.374    0.499   -0.019    0.628   -0.227   -0.317    0.624    0.657    0.684   -0.664   -0.668    1.000    0.517   -0.416   -0.064    0.224    0.069   -0.126 |\n",
      "|  p4160_p |    0.529    0.499   -0.302   -0.674    0.600    0.051   -0.509    0.462   -0.017    0.471   -0.096   -0.463    0.588    0.522    0.598   -0.631   -0.635    0.517    1.000   -0.304   -0.064    0.217    0.064   -0.118 |\n",
      "|  bplus_2 |   -0.374   -0.361    0.318    0.515   -0.368   -0.023    0.546   -0.345    0.009   -0.442    0.154    0.249   -0.468   -0.415   -0.440    0.445    0.441   -0.416   -0.304    1.000   -0.008   -0.050   -0.052    0.123 |\n",
      "|    phi_s |   -0.073   -0.047    0.050    0.088   -0.075    0.006    0.065   -0.067    0.450   -0.077    0.023    0.038   -0.079   -0.077   -0.081    0.076    0.077   -0.064   -0.064   -0.008    1.000   -0.043   -0.005   -0.011 |\n",
      "|    rho_p |    0.247    0.167   -0.170   -0.312    0.257   -0.030   -0.209    0.222   -0.116    0.266   -0.087   -0.147    0.272    0.263    0.286   -0.287   -0.279    0.224    0.217   -0.050   -0.043    1.000    0.266    0.088 |\n",
      "|  omega_s |    0.074    0.059   -0.055   -0.097    0.077    0.336   -0.063    0.065   -0.044    0.081   -0.028   -0.046    0.083    0.079    0.088   -0.095   -0.091    0.069    0.064   -0.052   -0.005    0.266    1.000   -0.193 |\n",
      "|    rho_s |   -0.135   -0.118    0.104    0.177   -0.140   -0.027    0.110   -0.119   -0.003   -0.147    0.048    0.082   -0.151   -0.144   -0.162    0.190    0.175   -0.126   -0.118    0.123   -0.011    0.088   -0.193    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.17064958638226546}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.02488736300891814}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.30869681234444313}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.40726210271818475}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.23322620276300077}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2056274041596735}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.10963856276000139}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.24396366197728692}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.13757095214658532}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.21115979064109158}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.09262694192316379}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.2076500006808244}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04596783419448336}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.19701617421770634}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.11369932056421767}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.011345956685171021}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.02218546170197011}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19400245866403176}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.08347868420352134}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.03990404298001182}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.6954578551995603}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.21962948623528744}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.7037712409266375}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.25259906297298773})])\n",
      "Step: 6/11\n",
      "Current Ctt: 1.1952286093343936\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1176 (1176 total)    |\n",
      "| EDM = 3.88E-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: 297411.6105963497\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -3.03   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.581   |   0.027   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    1.0    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.42    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.55   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.21    |   0.33    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.98    |   0.18    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.52    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.28    |   1.83    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.29    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -3.30   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -1.7    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.09    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.04    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.30   |    0.38   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.498   |   0.013   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.971   |   0.028   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.17    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.43   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.16   |    0.08   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |    16     |     7     |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.57   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |     4     |     4     |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.25    |   0.28    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.133   -0.389    0.185    0.180   -0.006    0.050    0.028   -0.025   -0.245    0.260    0.118    0.008    0.309   -0.040   -0.011   -0.044    0.033    0.190    0.014   -0.025    0.010    0.003   -0.014 |\n",
      "|   jpsi_p |    0.133    1.000   -0.233    0.305    0.124   -0.011    0.280    0.092   -0.075   -0.024    0.153    0.099    0.130   -0.008    0.168   -0.077   -0.053   -0.058    0.176    0.089   -0.071   -0.108   -0.013    0.008 |\n",
      "|   Dbar_p |   -0.389   -0.233    1.000    0.063   -0.224   -0.019   -0.412   -0.245   -0.059    0.179   -0.320   -0.429   -0.328   -0.006    0.328    0.079    0.090    0.119   -0.366    0.074   -0.061    0.043   -0.002    0.014 |\n",
      "| DDstar_s |    0.185    0.305    0.063    1.000    0.151    0.004   -0.078    0.046    0.013   -0.054    0.239    0.247    0.091   -0.027   -0.048    0.100    0.159   -0.041    0.289   -0.065    0.013    0.011   -0.008    0.043 |\n",
      "|  p4415_p |    0.180    0.124   -0.224    0.151    1.000   -0.010    0.062    0.034   -0.031   -0.221    0.146   -0.031    0.047   -0.147   -0.023   -0.056   -0.116   -0.191    0.349    0.166   -0.032    0.028    0.007   -0.029 |\n",
      "|  omega_p |   -0.006   -0.011   -0.019    0.004   -0.010    1.000   -0.012   -0.004    0.237   -0.006   -0.001    0.001    0.001   -0.012   -0.005   -0.009   -0.005   -0.000   -0.002   -0.058    0.236   -0.166    0.220    0.206 |\n",
      "|      Ctt |    0.050    0.280   -0.412   -0.078    0.062   -0.012    1.000    0.092   -0.023    0.231   -0.052    0.141    0.314    0.245   -0.228   -0.060   -0.104    0.139   -0.110    0.528   -0.026    0.070    0.006   -0.022 |\n",
      "|  p3770_s |    0.028    0.092   -0.245    0.046    0.034   -0.004    0.092    1.000   -0.015    0.113   -0.180    0.056   -0.076    0.049   -0.082    0.000   -0.017    0.023    0.010   -0.011   -0.015    0.011    0.002   -0.009 |\n",
      "|    phi_p |   -0.025   -0.075   -0.059    0.013   -0.031    0.237   -0.023   -0.015    1.000   -0.015   -0.011    0.003   -0.005   -0.034   -0.016   -0.033   -0.008   -0.001   -0.012   -0.160    0.994    0.097   -0.007    0.085 |\n",
      "|  p4040_s |   -0.245   -0.024    0.179   -0.054   -0.221   -0.006    0.231    0.113   -0.015    1.000   -0.129   -0.187    0.055   -0.025    0.044    0.025    0.022    0.156   -0.493    0.052   -0.016    0.026    0.001    0.001 |\n",
      "|  p3770_p |    0.260    0.153   -0.320    0.239    0.146   -0.001   -0.052   -0.180   -0.011   -0.129    1.000    0.345   -0.021   -0.051    0.117    0.077    0.092   -0.101    0.314   -0.099   -0.011   -0.008   -0.006    0.023 |\n",
      "| DDstar_p |    0.118    0.099   -0.429    0.247   -0.031    0.001    0.141    0.056    0.003   -0.187    0.345    1.000    0.000   -0.153   -0.215    0.279    0.440   -0.092    0.235   -0.265    0.004    0.023   -0.020    0.106 |\n",
      "|  psi2s_p |    0.008    0.130   -0.328    0.091    0.047    0.001    0.314   -0.076   -0.005    0.055   -0.021    0.000    1.000   -0.008   -0.008   -0.058   -0.070    0.003    0.047    0.010   -0.004   -0.022    0.001   -0.014 |\n",
      "|  p4160_s |    0.309   -0.008   -0.006   -0.027   -0.147   -0.012    0.245    0.049   -0.034   -0.025   -0.051   -0.153   -0.008    1.000   -0.014    0.018   -0.008    0.324   -0.179    0.096   -0.036    0.045    0.004   -0.010 |\n",
      "|   Dbar_s |   -0.040    0.168    0.328   -0.048   -0.023   -0.005   -0.228   -0.082   -0.016    0.044    0.117   -0.215   -0.008   -0.014    1.000    0.051    0.063    0.045   -0.006    0.033   -0.017    0.027   -0.002    0.013 |\n",
      "|  bplus_0 |   -0.011   -0.077    0.079    0.100   -0.056   -0.009   -0.060    0.000   -0.033    0.025    0.077    0.279   -0.058    0.018    0.051    1.000   -0.467    0.078   -0.013   -0.155   -0.034    0.059   -0.031    0.172 |\n",
      "|  bplus_1 |   -0.044   -0.053    0.090    0.159   -0.116   -0.005   -0.104   -0.017   -0.008    0.022    0.092    0.440   -0.070   -0.008    0.063   -0.467    1.000    0.115   -0.037   -0.310   -0.008    0.030    0.006   -0.009 |\n",
      "|  p4415_s |    0.033   -0.058    0.119   -0.041   -0.191   -0.000    0.139    0.023   -0.001    0.156   -0.101   -0.092    0.003    0.324    0.045    0.078    0.115    1.000   -0.090   -0.118   -0.001    0.005   -0.004    0.022 |\n",
      "|  p4160_p |    0.190    0.176   -0.366    0.289    0.349   -0.002   -0.110    0.010   -0.012   -0.493    0.314    0.235    0.047   -0.179   -0.006   -0.013   -0.037   -0.090    1.000    0.008   -0.012   -0.004    0.001   -0.006 |\n",
      "|  bplus_2 |    0.014    0.089    0.074   -0.065    0.166   -0.058    0.528   -0.011   -0.160    0.052   -0.099   -0.265    0.010    0.096    0.033   -0.155   -0.310   -0.118    0.008    1.000   -0.168    0.230    0.028   -0.089 |\n",
      "|    phi_s |   -0.025   -0.071   -0.061    0.013   -0.032    0.236   -0.026   -0.015    0.994   -0.016   -0.011    0.004   -0.004   -0.036   -0.017   -0.034   -0.008   -0.001   -0.012   -0.168    1.000    0.100   -0.003    0.080 |\n",
      "|    rho_p |    0.010   -0.108    0.043    0.011    0.028   -0.166    0.070    0.011    0.097    0.026   -0.008    0.023   -0.022    0.045    0.027    0.059    0.030    0.005   -0.004    0.230    0.100    1.000    0.045    0.226 |\n",
      "|  omega_s |    0.003   -0.013   -0.002   -0.008    0.007    0.220    0.006    0.002   -0.007    0.001   -0.006   -0.020    0.001    0.004   -0.002   -0.031    0.006   -0.004    0.001    0.028   -0.003    0.045    1.000   -0.221 |\n",
      "|    rho_s |   -0.014    0.008    0.014    0.043   -0.029    0.206   -0.022   -0.009    0.085    0.001    0.023    0.106   -0.014   -0.010    0.013    0.172   -0.009    0.022   -0.006   -0.089    0.080    0.226   -0.221    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.14804163249421554}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.026685961429175897}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.4597378450369298}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4208647898627953}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.185965641149634}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3324456728092664}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.18450855682864287}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2492609713809717}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 1.8327732960632073}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1713967089441626}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1111551710906582}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.44972006265331865}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03439811449617469}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16788386680868117}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.3834897497558554}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.013137909443109441}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.028435918119748216}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19149136167932002}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.11419893719135654}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08159068505189204}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 7.368820886093933}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.29608924542346493}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 3.5495486372408327}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.2828184090052011})])\n",
      "Step: 6/11\n",
      "Current Ctt: 1.1952286093343936\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1047 (1047 total)    |\n",
      "| EDM = 0.000244 (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: 297418.67049471976\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.9    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.55   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.6    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.11   |    0.22   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.5    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.23    |   0.32    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |    2.5    |    0.3    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.29    |   0.62    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   1.10    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -3.05   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |   0.12    |   3.94    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.07    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   1.86    |   0.21    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.07    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.488   |   0.016   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.90   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.11    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.20   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.40   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   15.8    |    2.2    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.67   |    0.29   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |     4     |     3     |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |   1.27    |   0.28    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.819   -0.129   -0.852    0.805    0.023    0.616    0.071    0.280    0.462   -0.897    0.775    0.734   -0.392   -0.706   -0.779    0.074    0.774    0.579    0.065   -0.116    0.061   -0.275 |\n",
      "|   jpsi_p |    0.819    1.000    0.053   -0.853    0.807    0.026    0.651    0.065    0.334    0.518   -0.909    0.828    0.604   -0.406   -0.718   -0.778    0.008    0.828    0.539    0.065   -0.167    0.054   -0.257 |\n",
      "|   Dbar_p |   -0.129    0.053    1.000    0.091   -0.141   -0.007   -0.138   -0.014   -0.020    0.276    0.194   -0.059   -0.119    0.121    0.214    0.220    0.069   -0.109    0.030   -0.020    0.086   -0.013    0.067 |\n",
      "| DDstar_s |   -0.852   -0.853    0.091    1.000   -0.850   -0.027   -0.675   -0.084   -0.403   -0.404    0.929   -0.867   -0.689    0.459    0.810    0.888   -0.047   -0.818   -0.614   -0.080    0.152   -0.068    0.309 |\n",
      "|  p4415_p |    0.805    0.807   -0.141   -0.850    1.000    0.023    0.623    0.072    0.265    0.437   -0.884    0.782    0.571   -0.403   -0.708   -0.781   -0.049    0.836    0.592    0.066   -0.114    0.061   -0.275 |\n",
      "|  omega_p |    0.023    0.026   -0.007   -0.027    0.023    1.000    0.018    0.080    0.011    0.010   -0.028    0.025    0.017   -0.012   -0.024   -0.026    0.002    0.022    0.001    0.076   -0.175    0.237    0.195 |\n",
      "|  p3770_s |    0.616    0.651   -0.138   -0.675    0.623    0.018    1.000    0.055    0.384    0.159   -0.712    0.568    0.515   -0.303   -0.554   -0.612    0.051    0.597    0.435    0.050   -0.088    0.048   -0.219 |\n",
      "|    phi_p |    0.071    0.065   -0.014   -0.084    0.072    0.080    0.055    1.000    0.035    0.032   -0.087    0.074    0.055   -0.038   -0.075   -0.078    0.005    0.071    0.022    0.949    0.018   -0.002    0.011 |\n",
      "|  p4040_s |    0.280    0.334   -0.020   -0.403    0.265    0.011    0.384    0.035    1.000    0.172   -0.380    0.372    0.149   -0.219   -0.283   -0.309    0.075    0.178    0.076    0.034   -0.063    0.025   -0.111 |\n",
      "|  p3770_p |    0.462    0.518    0.276   -0.404    0.437    0.010    0.159    0.032    0.172    1.000   -0.472    0.407    0.320   -0.149   -0.311   -0.356    0.005    0.473    0.365    0.027   -0.039    0.027   -0.127 |\n",
      "| DDstar_p |   -0.897   -0.909    0.194    0.929   -0.884   -0.028   -0.712   -0.087   -0.380   -0.472    1.000   -0.897   -0.688    0.476    0.791    0.865   -0.021   -0.886   -0.587   -0.083    0.151   -0.066    0.300 |\n",
      "|  psi2s_p |    0.775    0.828   -0.059   -0.867    0.782    0.025    0.568    0.074    0.372    0.407   -0.897    1.000    0.592   -0.396   -0.710   -0.775    0.031    0.783    0.493    0.070   -0.137    0.059   -0.269 |\n",
      "|  p4160_s |    0.734    0.604   -0.119   -0.689    0.571    0.017    0.515    0.055    0.149    0.320   -0.688    0.592    1.000   -0.334   -0.530   -0.586    0.216    0.570    0.365    0.050   -0.085    0.047   -0.212 |\n",
      "|   Dbar_s |   -0.392   -0.406    0.121    0.459   -0.403   -0.012   -0.303   -0.038   -0.219   -0.149    0.476   -0.396   -0.334    1.000    0.372    0.407   -0.033   -0.379   -0.316   -0.036    0.066   -0.031    0.141 |\n",
      "|  bplus_0 |   -0.706   -0.718    0.214    0.810   -0.708   -0.024   -0.554   -0.075   -0.283   -0.311    0.791   -0.710   -0.530    0.372    1.000    0.561    0.041   -0.703   -0.582   -0.075    0.170   -0.066    0.313 |\n",
      "|  bplus_1 |   -0.779   -0.778    0.220    0.888   -0.781   -0.026   -0.612   -0.078   -0.309   -0.356    0.865   -0.775   -0.586    0.407    0.561    1.000    0.049   -0.776   -0.603   -0.075    0.155   -0.055    0.256 |\n",
      "|  p4415_s |    0.074    0.008    0.069   -0.047   -0.049    0.002    0.051    0.005    0.075    0.005   -0.021    0.031    0.216   -0.033    0.041    0.049    1.000    0.027   -0.227    0.007   -0.018   -0.003    0.014 |\n",
      "|  p4160_p |    0.774    0.828   -0.109   -0.818    0.836    0.022    0.597    0.071    0.178    0.473   -0.886    0.783    0.570   -0.379   -0.703   -0.776    0.027    1.000    0.630    0.065   -0.114    0.059   -0.271 |\n",
      "|  bplus_2 |    0.579    0.539    0.030   -0.614    0.592    0.001    0.435    0.022    0.076    0.365   -0.587    0.493    0.365   -0.316   -0.582   -0.603   -0.227    0.630    1.000    0.000    0.098    0.061   -0.253 |\n",
      "|    phi_s |    0.065    0.065   -0.020   -0.080    0.066    0.076    0.050    0.949    0.034    0.027   -0.083    0.070    0.050   -0.036   -0.075   -0.075    0.007    0.065    0.000    1.000    0.029    0.008   -0.004 |\n",
      "|    rho_p |   -0.116   -0.167    0.086    0.152   -0.114   -0.175   -0.088    0.018   -0.063   -0.039    0.151   -0.137   -0.085    0.066    0.170    0.155   -0.018   -0.114    0.098    0.029    1.000    0.016    0.215 |\n",
      "|  omega_s |    0.061    0.054   -0.013   -0.068    0.061    0.237    0.048   -0.002    0.025    0.027   -0.066    0.059    0.047   -0.031   -0.066   -0.055   -0.003    0.059    0.061    0.008    0.016    1.000   -0.241 |\n",
      "|    rho_s |   -0.275   -0.257    0.067    0.309   -0.275    0.195   -0.219    0.011   -0.111   -0.127    0.300   -0.269   -0.212    0.141    0.313    0.256    0.014   -0.271   -0.253   -0.004    0.215   -0.241    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.33159005529772445}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.06373463248974565}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.34149913010450916}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.22252751179581648}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.3822600913096923}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.31609838966425174}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.3241302708544189}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.6172865019963285}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.16619744032013212}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12259581772464379}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 3.9385176084843216}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.06986656371927946}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.2126031836491824}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.06673808578034102}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.01558148915869273}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03747296438882808}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18086671852889147}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.21421359964253517}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.0672782050661942}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 2.1692819461442703}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.29048525250809965}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 3.4856157956953027}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.28310136917180595})])\n",
      "Step: 7/11\n",
      "Current Ctt: 1.2909944487358056\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |    Ncalls=1646 (1646 total)    |\n",
      "| EDM = 0.00144 (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      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297324.5340565852\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.21   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.471   |   0.030   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    0.8    |    2.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.45   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.22   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.47    |   0.19    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.16    |   0.21    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.60    |   0.31    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.24    |   0.16    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.88    |   0.14    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.56   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -1.2    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.07    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.31    |   0.13    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.16   |    0.36   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.607   |   0.012   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -1.166   |   0.023   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.29    |   0.14    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -1.81   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.35   |    0.09   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   17.8    |    0.8    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.63   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    6.8    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   0.99    |   0.21    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000   -0.629   -0.820    0.555    0.590    0.013    0.697    0.685   -0.007    0.449   -0.503   -0.757    0.586    0.553   -0.813   -0.744   -0.747   -0.181    0.630   -0.701   -0.004    0.013    0.029   -0.049 |\n",
      "|   jpsi_p |   -0.629    1.000    0.778   -0.692   -0.515   -0.018   -0.676   -0.650   -0.002   -0.469    0.540    0.690   -0.581   -0.433    0.793    0.699    0.703    0.167   -0.541    0.672    0.006   -0.045   -0.034    0.063 |\n",
      "|   Dbar_p |   -0.820    0.778    1.000   -0.748   -0.672   -0.016   -0.904   -0.853    0.008   -0.592    0.659    0.912   -0.756   -0.537    0.987    0.906    0.908    0.234   -0.737    0.870    0.002   -0.009   -0.035    0.057 |\n",
      "| DDstar_s |    0.555   -0.692   -0.748    1.000    0.435    0.009    0.659    0.579   -0.012    0.390   -0.537   -0.658    0.472    0.373   -0.728   -0.676   -0.677   -0.163    0.442   -0.638   -0.001   -0.002    0.024   -0.036 |\n",
      "|  p4415_p |    0.590   -0.515   -0.672    0.435    1.000    0.011    0.617    0.580   -0.005    0.358   -0.428   -0.596    0.494    0.325   -0.671   -0.603   -0.605   -0.218    0.581   -0.560   -0.006    0.018    0.024   -0.042 |\n",
      "|  omega_p |    0.013   -0.018   -0.016    0.009    0.011    1.000    0.013    0.014    0.005    0.010   -0.011   -0.013    0.012    0.009   -0.015   -0.013   -0.012   -0.004    0.012   -0.007    0.015   -0.011    0.552    0.126 |\n",
      "|      Ctt |    0.697   -0.676   -0.904    0.659    0.617    0.013    1.000    0.744   -0.008    0.590   -0.630   -0.842    0.703    0.536   -0.900   -0.821   -0.825   -0.147    0.607   -0.715    0.002   -0.000    0.031   -0.049 |\n",
      "|  p3770_s |    0.685   -0.650   -0.853    0.579    0.580    0.014    0.744    1.000   -0.007    0.536   -0.631   -0.780    0.567    0.463   -0.844   -0.763   -0.765   -0.200    0.633   -0.739   -0.006    0.016    0.029   -0.052 |\n",
      "|    phi_p |   -0.007   -0.002    0.008   -0.012   -0.005    0.005   -0.008   -0.007    1.000   -0.004    0.005    0.008   -0.007   -0.004    0.009    0.009    0.009    0.001   -0.006    0.013    0.536   -0.030   -0.035    0.028 |\n",
      "|  p4040_s |    0.449   -0.469   -0.592    0.390    0.358    0.010    0.590    0.536   -0.004    1.000   -0.400   -0.505    0.425    0.279   -0.592   -0.518   -0.519   -0.080    0.297   -0.515   -0.006    0.017    0.020   -0.037 |\n",
      "|  p3770_p |   -0.503    0.540    0.659   -0.537   -0.428   -0.011   -0.630   -0.631    0.005   -0.400    1.000    0.578   -0.501   -0.363    0.674    0.612    0.613    0.127   -0.432    0.583    0.001   -0.010   -0.025    0.038 |\n",
      "| DDstar_p |   -0.757    0.690    0.912   -0.658   -0.596   -0.013   -0.842   -0.780    0.008   -0.505    0.578    1.000   -0.675   -0.457    0.916    0.787    0.787    0.250   -0.694    0.789   -0.000   -0.004   -0.031    0.047 |\n",
      "|  psi2s_p |    0.586   -0.581   -0.756    0.472    0.494    0.012    0.703    0.567   -0.007    0.425   -0.501   -0.675    1.000    0.370   -0.744   -0.676   -0.676   -0.182    0.555   -0.674   -0.005    0.011    0.025   -0.042 |\n",
      "|  p4160_s |    0.553   -0.433   -0.537    0.373    0.325    0.009    0.536    0.463   -0.004    0.279   -0.363   -0.457    0.370    1.000   -0.538   -0.465   -0.466    0.019    0.357   -0.451   -0.006    0.018    0.019   -0.035 |\n",
      "|   Dbar_s |   -0.813    0.793    0.987   -0.728   -0.671   -0.015   -0.900   -0.844    0.009   -0.592    0.674    0.916   -0.744   -0.538    1.000    0.907    0.909    0.234   -0.729    0.869    0.002   -0.007   -0.035    0.056 |\n",
      "|  bplus_0 |   -0.744    0.699    0.906   -0.676   -0.603   -0.013   -0.821   -0.763    0.009   -0.518    0.612    0.787   -0.676   -0.465    0.907    1.000    0.775    0.248   -0.675    0.756   -0.005    0.022   -0.034    0.061 |\n",
      "|  bplus_1 |   -0.747    0.703    0.908   -0.677   -0.605   -0.012   -0.825   -0.765    0.009   -0.519    0.613    0.787   -0.676   -0.466    0.909    0.775    1.000    0.252   -0.678    0.758   -0.004    0.019   -0.031    0.048 |\n",
      "|  p4415_s |   -0.181    0.167    0.234   -0.163   -0.218   -0.004   -0.147   -0.200    0.001   -0.080    0.127    0.250   -0.182    0.019    0.234    0.248    0.252    1.000   -0.162    0.161    0.001   -0.007   -0.009    0.017 |\n",
      "|  p4160_p |    0.630   -0.541   -0.737    0.442    0.581    0.012    0.607    0.633   -0.006    0.297   -0.432   -0.694    0.555    0.357   -0.729   -0.675   -0.678   -0.162    1.000   -0.620   -0.004    0.013    0.026   -0.045 |\n",
      "|  bplus_2 |   -0.701    0.672    0.870   -0.638   -0.560   -0.007   -0.715   -0.739    0.013   -0.515    0.583    0.789   -0.674   -0.451    0.869    0.756    0.758    0.161   -0.620    1.000   -0.020    0.074   -0.028    0.024 |\n",
      "|    phi_s |   -0.004    0.006    0.002   -0.001   -0.006    0.015    0.002   -0.006    0.536   -0.006    0.001   -0.000   -0.005   -0.006    0.002   -0.005   -0.004    0.001   -0.004   -0.020    1.000    0.022    0.008   -0.012 |\n",
      "|    rho_p |    0.013   -0.045   -0.009   -0.002    0.018   -0.011   -0.000    0.016   -0.030    0.017   -0.010   -0.004    0.011    0.018   -0.007    0.022    0.019   -0.007    0.013    0.074    0.022    1.000    0.044    0.086 |\n",
      "|  omega_s |    0.029   -0.034   -0.035    0.024    0.024    0.552    0.031    0.029   -0.035    0.020   -0.025   -0.031    0.025    0.019   -0.035   -0.034   -0.031   -0.009    0.026   -0.028    0.008    0.044    1.000   -0.219 |\n",
      "|    rho_s |   -0.049    0.063    0.057   -0.036   -0.042    0.126   -0.049   -0.052    0.028   -0.037    0.038    0.047   -0.042   -0.035    0.056    0.061    0.048    0.017   -0.045    0.024   -0.012    0.086   -0.219    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.25413815204323664}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.030146333135334213}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 2.4797553533363854}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.44946348844906137}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.164868058299394}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.19360536688209118}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.20893667987762599}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.30839271779820554}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.16483134592178494}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.14063993618530696}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.11439697894756184}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.3248023566787901}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03509404199862409}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.13040299468130456}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.36345941985291186}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.011798537232704964}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.023059089639136943}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.13762448993373544}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.09668276707163326}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08982883560993249}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.7534672258491355}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.27983244947534835}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.8826275344643997}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.20859020268382145})])\n",
      "Step: 7/11\n",
      "Current Ctt: 1.2909944487358056\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1089 (1089 total)    |\n",
      "| EDM = 0.00287 (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: 297493.97059337836\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -3.08   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.598   |   0.030   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.9    |    2.0    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.16    |   0.52    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.34   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.74    |   0.22    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.29    |   0.14    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.36    |   0.23    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.64    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.91    |   0.15    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -3.08   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -1.5    |    1.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.34    |   0.15    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.14    |   0.45    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.469   |   0.008   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.868   |   0.017   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.34    |   0.17    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.19   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.28   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.4    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.90   |    0.29   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    9.0    |    1.0    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.24    |   0.26    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.225   -0.228   -0.310    0.224    0.009   -0.002    0.080    0.006   -0.167    0.118    0.271   -0.045    0.269    0.171    0.172    0.188    0.001    0.223   -0.015   -0.002    0.028   -0.004    0.024 |\n",
      "|   jpsi_p |    0.225    1.000   -0.059   -0.291    0.249   -0.001    0.136    0.160    0.025   -0.052    0.261    0.271    0.200   -0.013    0.063    0.153    0.194   -0.103    0.397   -0.014    0.036   -0.048   -0.009    0.084 |\n",
      "|   Dbar_p |   -0.228   -0.059    1.000    0.929   -0.428   -0.008   -0.144   -0.138   -0.032    0.071    0.444   -0.915    0.255   -0.052   -0.939   -0.403   -0.480    0.259   -0.526    0.172   -0.051    0.027    0.009   -0.131 |\n",
      "| DDstar_s |   -0.310   -0.291    0.929    1.000   -0.505   -0.014   -0.091   -0.180   -0.038    0.081    0.284   -0.956    0.145   -0.048   -0.930   -0.487   -0.571    0.274   -0.665    0.161   -0.052    0.011    0.009   -0.140 |\n",
      "|  p4415_p |    0.224    0.249   -0.428   -0.505    1.000    0.011    0.036    0.113    0.013   -0.191   -0.014    0.461   -0.040   -0.085    0.395    0.237    0.266   -0.233    0.520    0.032    0.010    0.026   -0.005    0.049 |\n",
      "|  omega_p |    0.009   -0.001   -0.008   -0.014    0.011    1.000    0.006    0.006    0.009    0.001    0.002    0.016    0.000    0.006    0.011    0.028    0.012   -0.002    0.013    0.020    0.014    0.163    0.644    0.349 |\n",
      "|      Ctt |   -0.002    0.136   -0.144   -0.091    0.036    0.006    1.000   -0.014    0.006    0.248   -0.180    0.117    0.111    0.218    0.066    0.014    0.007    0.157   -0.115    0.469    0.001    0.025   -0.001    0.001 |\n",
      "|  p3770_s |    0.080    0.160   -0.138   -0.180    0.113    0.006   -0.014    1.000    0.002    0.097   -0.155    0.161   -0.128    0.034    0.083    0.114    0.122   -0.027    0.140   -0.041   -0.005    0.022   -0.002    0.011 |\n",
      "|    phi_p |    0.006    0.025   -0.032   -0.038    0.013    0.009    0.006    0.002    1.000   -0.004   -0.006    0.038   -0.004   -0.006    0.032    0.013    0.011   -0.009    0.025   -0.053    0.623   -0.155   -0.040    0.130 |\n",
      "|  p4040_s |   -0.167   -0.052    0.071    0.081   -0.191    0.001    0.248    0.097   -0.004    1.000   -0.053   -0.104    0.062   -0.182   -0.044    0.003   -0.002    0.082   -0.315    0.004   -0.006    0.008    0.000   -0.008 |\n",
      "|  p3770_p |    0.118    0.261    0.444    0.284   -0.014    0.002   -0.180   -0.155   -0.006   -0.053    1.000   -0.261    0.175   -0.032   -0.455   -0.062   -0.091    0.030    0.063    0.037   -0.019    0.021    0.002   -0.040 |\n",
      "| DDstar_p |    0.271    0.271   -0.915   -0.956    0.461    0.016    0.117    0.161    0.038   -0.104   -0.261    1.000   -0.175    0.014    0.892    0.538    0.628   -0.288    0.644   -0.170    0.051   -0.005   -0.010    0.148 |\n",
      "|  psi2s_p |   -0.045    0.200    0.255    0.145   -0.040    0.000    0.111   -0.128   -0.004    0.062    0.175   -0.175    1.000   -0.063   -0.302   -0.051   -0.058    0.044   -0.002   -0.020   -0.012    0.010    0.001   -0.021 |\n",
      "|  p4160_s |    0.269   -0.013   -0.052   -0.048   -0.085    0.006    0.218    0.034   -0.006   -0.182   -0.032    0.014   -0.063    1.000    0.039    0.077    0.071    0.241   -0.062    0.060   -0.016    0.036   -0.002   -0.009 |\n",
      "|   Dbar_s |    0.171    0.063   -0.939   -0.930    0.395    0.011    0.066    0.083    0.032   -0.044   -0.455    0.892   -0.302    0.039    1.000    0.445    0.525   -0.246    0.491   -0.140    0.048   -0.016   -0.010    0.134 |\n",
      "|  bplus_0 |    0.172    0.153   -0.403   -0.487    0.237    0.028    0.014    0.114    0.013    0.003   -0.062    0.538   -0.051    0.077    0.445    1.000    0.016   -0.047    0.329   -0.217    0.006    0.075   -0.013    0.127 |\n",
      "|  bplus_1 |    0.188    0.194   -0.480   -0.571    0.266    0.012    0.007    0.122    0.011   -0.002   -0.091    0.628   -0.058    0.071    0.525    0.016    1.000   -0.061    0.376   -0.242    0.015    0.037   -0.005    0.060 |\n",
      "|  p4415_s |    0.001   -0.103    0.259    0.274   -0.233   -0.002    0.157   -0.027   -0.009    0.082    0.030   -0.288    0.044    0.241   -0.246   -0.047   -0.061    1.000   -0.191   -0.050   -0.014    0.007    0.001   -0.026 |\n",
      "|  p4160_p |    0.223    0.397   -0.526   -0.665    0.520    0.013   -0.115    0.140    0.025   -0.315    0.063    0.644   -0.002   -0.062    0.491    0.329    0.376   -0.191    1.000   -0.068    0.027    0.009   -0.006    0.083 |\n",
      "|  bplus_2 |   -0.015   -0.014    0.172    0.161    0.032    0.020    0.469   -0.041   -0.053    0.004    0.037   -0.170   -0.020    0.060   -0.140   -0.217   -0.242   -0.050   -0.068    1.000   -0.104    0.203   -0.001   -0.153 |\n",
      "|    phi_s |   -0.002    0.036   -0.051   -0.052    0.010    0.014    0.001   -0.005    0.623   -0.006   -0.019    0.051   -0.012   -0.016    0.048    0.006    0.015   -0.014    0.027   -0.104    1.000   -0.092    0.000    0.049 |\n",
      "|    rho_p |    0.028   -0.048    0.027    0.011    0.026    0.163    0.025    0.022   -0.155    0.008    0.021   -0.005    0.010    0.036   -0.016    0.075    0.037    0.007    0.009    0.203   -0.092    1.000    0.010    0.024 |\n",
      "|  omega_s |   -0.004   -0.009    0.009    0.009   -0.005    0.644   -0.001   -0.002   -0.040    0.000    0.002   -0.010    0.001   -0.002   -0.010   -0.013   -0.005    0.001   -0.006   -0.001    0.000    0.010    1.000   -0.015 |\n",
      "|    rho_s |    0.024    0.084   -0.131   -0.140    0.049    0.349    0.001    0.011    0.130   -0.008   -0.040    0.148   -0.021   -0.009    0.134    0.127    0.060   -0.026    0.083   -0.153    0.049    0.024   -0.015    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.18420223251006806}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03011706870786446}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 2.015566800061664}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5154734249264106}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.16883398307884234}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2154017243437818}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.13523645186624034}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.23274870472162457}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.1812233507684291}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.15360101743574495}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12772588835465593}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.5154777929209993}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.032221304729694644}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.14573697003459385}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.44952802781218987}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.008247807358770842}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.01656260270683596}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1743975870736063}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.11814770361460591}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.05504886066699266}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9592249267277904}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.2904586973562382}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.9692668094013612}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.25719982520174545})])\n",
      "Step: 7/11\n",
      "Current Ctt: 1.2909944487358056\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1137 (1137 total)    |\n",
      "| EDM = 0.00263 (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      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297393.1205949178\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.8    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.56   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    1.8    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.15    |   0.48    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.48   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.70    |   0.27    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.45    |   0.17    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   1.87    |   0.29    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.76    |   0.14    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.72    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -3.09   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -3.8    |    2.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.05    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.56    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.30   |    0.58   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.467   |   0.009   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.902   |   0.018   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.29    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.21   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.22   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   21.6    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   0.17    |   0.42    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    7.4    |    1.2    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    0.8    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.723   -0.067    0.789    0.718    0.015   -0.228    0.450    0.038   -0.149    0.584   -0.789    0.567    0.466   -0.568   -0.009   -0.017   -0.165    0.754   -0.028    0.013    0.011    0.012   -0.008 |\n",
      "|   jpsi_p |    0.723    1.000    0.167    0.895    0.783    0.025   -0.180    0.532    0.056   -0.053    0.662   -0.895    0.725    0.295   -0.584    0.002    0.025   -0.239    0.862   -0.021    0.041   -0.039    0.014   -0.017 |\n",
      "|   Dbar_p |   -0.067    0.167    1.000    0.067   -0.020    0.017   -0.327   -0.108    0.004    0.018    0.203    0.016    0.023   -0.058    0.160    0.223    0.269    0.058    0.034    0.045   -0.021    0.001   -0.013    0.075 |\n",
      "| DDstar_s |    0.789    0.895    0.067    1.000    0.851    0.021   -0.259    0.575    0.052   -0.030    0.635   -0.957    0.766    0.356   -0.783   -0.032   -0.037   -0.244    0.910   -0.036    0.030   -0.000    0.019   -0.021 |\n",
      "|  p4415_p |    0.718    0.783   -0.020    0.851    1.000    0.016   -0.194    0.500    0.042   -0.140    0.593   -0.842    0.649    0.247   -0.634   -0.013   -0.022   -0.300    0.847    0.020    0.014    0.014    0.012   -0.005 |\n",
      "|  omega_p |    0.015    0.025    0.017    0.021    0.016    1.000   -0.013    0.010    0.015    0.001    0.019   -0.026    0.018    0.006   -0.014    0.044   -0.010    0.002    0.020   -0.032    0.020   -0.229    0.629    0.226 |\n",
      "|      Ctt |   -0.228   -0.180   -0.327   -0.259   -0.194   -0.013    1.000   -0.143   -0.016    0.297   -0.329    0.231   -0.084    0.141    0.182   -0.097   -0.136    0.215   -0.329    0.538   -0.025    0.044   -0.010    0.017 |\n",
      "|  p3770_s |    0.450    0.532   -0.108    0.575    0.500    0.010   -0.143    1.000    0.027    0.076    0.262   -0.577    0.353    0.225   -0.414    0.002   -0.004   -0.130    0.528   -0.062    0.007    0.009    0.008   -0.006 |\n",
      "|    phi_p |    0.038    0.056    0.004    0.052    0.042    0.015   -0.016    0.027    1.000   -0.005    0.038   -0.054    0.042    0.011   -0.038   -0.002   -0.012   -0.011    0.049   -0.048    0.422   -0.247   -0.058   -0.111 |\n",
      "|  p4040_s |   -0.149   -0.053    0.018   -0.030   -0.140    0.001    0.297    0.076   -0.005    1.000   -0.101    0.061   -0.004   -0.093   -0.007    0.046    0.054    0.146   -0.221    0.017   -0.009    0.005   -0.004    0.018 |\n",
      "|  p3770_p |    0.584    0.662    0.203    0.635    0.593    0.019   -0.329    0.262    0.038   -0.101    1.000   -0.651    0.479    0.195   -0.310    0.071    0.078   -0.209    0.684   -0.069    0.014   -0.007    0.008    0.007 |\n",
      "| DDstar_p |   -0.789   -0.895    0.016   -0.957   -0.842   -0.026    0.231   -0.577   -0.054    0.061   -0.651    1.000   -0.754   -0.334    0.796   -0.024   -0.039    0.262   -0.920    0.068   -0.032    0.012   -0.018    0.007 |\n",
      "|  psi2s_p |    0.567    0.725    0.023    0.766    0.649    0.018   -0.084    0.353    0.042   -0.004    0.479   -0.754    1.000    0.229   -0.485    0.003    0.015   -0.184    0.712   -0.069    0.023   -0.009    0.013   -0.010 |\n",
      "|  p4160_s |    0.466    0.295   -0.058    0.356    0.247    0.006    0.141    0.225    0.011   -0.093    0.195   -0.334    0.229    1.000   -0.289    0.045    0.038    0.189    0.261    0.050   -0.012    0.024   -0.001    0.021 |\n",
      "|   Dbar_s |   -0.568   -0.584    0.160   -0.783   -0.634   -0.014    0.182   -0.414   -0.038   -0.007   -0.310    0.796   -0.485   -0.289    1.000    0.049    0.051    0.196   -0.650    0.040   -0.029    0.010   -0.016    0.025 |\n",
      "|  bplus_0 |   -0.009    0.002    0.223   -0.032   -0.013    0.044   -0.097    0.002   -0.002    0.046    0.071   -0.024    0.003    0.045    0.049    1.000   -0.482    0.106   -0.004   -0.160   -0.027   -0.064   -0.022    0.145 |\n",
      "|  bplus_1 |   -0.017    0.025    0.269   -0.037   -0.022   -0.010   -0.136   -0.004   -0.012    0.054    0.078   -0.039    0.015    0.038    0.051   -0.482    1.000    0.137   -0.007   -0.231   -0.012    0.048   -0.002    0.008 |\n",
      "|  p4415_s |   -0.165   -0.239    0.058   -0.244   -0.300    0.002    0.215   -0.130   -0.011    0.146   -0.209    0.262   -0.184    0.189    0.196    0.106    0.137    1.000   -0.264   -0.116   -0.005   -0.019   -0.006    0.021 |\n",
      "|  p4160_p |    0.754    0.862    0.034    0.910    0.847    0.020   -0.329    0.528    0.049   -0.221    0.684   -0.920    0.712    0.261   -0.650   -0.004   -0.007   -0.264    1.000   -0.040    0.024    0.000    0.016   -0.011 |\n",
      "|  bplus_2 |   -0.028   -0.021    0.045   -0.036    0.020   -0.032    0.538   -0.062   -0.048    0.017   -0.069    0.068   -0.069    0.050    0.040   -0.160   -0.231   -0.116   -0.040    1.000   -0.122    0.207   -0.034    0.100 |\n",
      "|    phi_s |    0.013    0.041   -0.021    0.030    0.014    0.020   -0.025    0.007    0.422   -0.009    0.014   -0.032    0.023   -0.012   -0.029   -0.027   -0.012   -0.005    0.024   -0.122    1.000   -0.082    0.021   -0.101 |\n",
      "|    rho_p |    0.011   -0.039    0.001   -0.000    0.014   -0.229    0.044    0.009   -0.247    0.005   -0.007    0.012   -0.009    0.024    0.010   -0.064    0.048   -0.019    0.000    0.207   -0.082    1.000    0.078    0.148 |\n",
      "|  omega_s |    0.012    0.014   -0.013    0.019    0.012    0.629   -0.010    0.008   -0.058   -0.004    0.008   -0.018    0.013   -0.001   -0.016   -0.022   -0.002   -0.006    0.016   -0.034    0.021    0.078    1.000   -0.120 |\n",
      "|    rho_s |   -0.008   -0.017    0.075   -0.021   -0.005    0.226    0.017   -0.006   -0.111    0.018    0.007    0.007   -0.010    0.021    0.025    0.145    0.008    0.021   -0.011    0.100   -0.101    0.148   -0.120    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.3864378747315369}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.06403155386515325}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.3736840086097195}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.47959836953839374}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.30469206312711816}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2672674010129663}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1670220064857686}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2934749577200997}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.14310608152405502}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.168560927942067}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1896039512564145}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 2.289960610476901}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04958906902344662}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.165020245916077}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.5812630923620415}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.009100708792099566}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.018215546818721506}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18765163490474635}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.2322216393651424}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.06406110380002072}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.8509514048716351}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.4182847833248893}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1878315528890937}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.33871905253066736})])\n",
      "Step: 7/11\n",
      "Current Ctt: 1.2909944487358056\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1092 (1092 total)    |\n",
      "| EDM = 2.06E-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: 297364.1706780725\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.6    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.46   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.24   |    0.63   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   0.30    |   0.42    |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.21   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.4    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.67    |   0.21    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.66    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.20    |   0.39    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.53    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.96   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -0.21   |    0.76   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.16    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.30   |    0.41   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.409   |   0.016   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |   -0.78   |    0.03   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.17    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -1.98   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.25   |    0.08   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   18.4    |    1.6    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.25   |    0.50   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |     8     |     4     |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    0.8    |    0.4    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.263    0.010    0.149    0.277    0.005   -0.185    0.037   -0.001   -0.266    0.282    0.346    0.005    0.355   -0.073    0.025    0.029    0.042    0.310   -0.011   -0.011    0.029    0.001    0.018 |\n",
      "|   jpsi_p |    0.263    1.000   -0.355    0.143    0.349   -0.024   -0.055    0.206   -0.001   -0.152    0.551    0.493    0.409   -0.030   -0.019   -0.037    0.160   -0.074    0.551   -0.051    0.000   -0.058   -0.034    0.017 |\n",
      "|   Dbar_p |    0.010   -0.355    1.000    0.030    0.054   -0.008    0.171   -0.013   -0.003    0.106   -0.531    0.468   -0.227    0.115    0.186   -0.026   -0.110   -0.029   -0.099    0.049    0.008   -0.035   -0.001   -0.032 |\n",
      "| DDstar_s |    0.149    0.143    0.030    1.000    0.216    0.012    0.024    0.074    0.001    0.056   -0.020    0.102    0.163    0.105    0.101    0.011   -0.315   -0.017    0.131    0.173    0.001    0.009    0.023   -0.056 |\n",
      "|  p4415_p |    0.277    0.349    0.054    0.216    1.000    0.009   -0.065    0.103   -0.001   -0.262    0.267    0.442    0.147   -0.076   -0.022    0.023   -0.016   -0.176    0.523    0.125   -0.015    0.048    0.004    0.023 |\n",
      "|  omega_p |    0.005   -0.024   -0.008    0.012    0.009    1.000    0.014    0.002   -0.014    0.003   -0.002   -0.003   -0.002    0.008   -0.005   -0.053    0.044   -0.003    0.001    0.048    0.030    0.125    0.860    0.102 |\n",
      "|      Ctt |   -0.185   -0.055    0.171    0.024   -0.065    0.014    1.000   -0.097   -0.013    0.415   -0.357   -0.077    0.055    0.272   -0.152   -0.014   -0.165    0.204   -0.383    0.702   -0.034    0.114    0.011    0.035 |\n",
      "|  p3770_s |    0.037    0.206   -0.013    0.074    0.103    0.002   -0.097    1.000   -0.001    0.093   -0.062    0.231   -0.101    0.021   -0.070    0.026    0.068    0.018    0.136   -0.074   -0.009    0.018   -0.002    0.020 |\n",
      "|    phi_p |   -0.001   -0.001   -0.003    0.001   -0.001   -0.014   -0.013   -0.001    1.000   -0.005    0.008    0.014    0.003   -0.008   -0.001    0.013   -0.007   -0.000    0.007   -0.033    0.868   -0.057   -0.063    0.013 |\n",
      "|  p4040_s |   -0.266   -0.152    0.106    0.056   -0.262    0.003    0.415    0.093   -0.005    1.000   -0.246   -0.101   -0.015   -0.063    0.025    0.003    0.007    0.174   -0.492    0.108   -0.010    0.030    0.001    0.016 |\n",
      "|  p3770_p |    0.282    0.551   -0.531   -0.020    0.267   -0.002   -0.357   -0.062    0.008   -0.246    1.000    0.226    0.267   -0.079   -0.058    0.035    0.174   -0.090    0.521   -0.178    0.000   -0.005   -0.013    0.034 |\n",
      "| DDstar_p |    0.346    0.493    0.468    0.102    0.442   -0.003   -0.077    0.231    0.014   -0.101    0.226    1.000    0.292    0.077    0.204   -0.008    0.154   -0.081    0.574   -0.108    0.013   -0.023   -0.011    0.020 |\n",
      "|  psi2s_p |    0.005    0.409   -0.227    0.163    0.147   -0.002    0.055   -0.101    0.003   -0.015    0.267    0.292    1.000   -0.071   -0.103   -0.005    0.116   -0.002    0.260   -0.072   -0.002   -0.000   -0.008    0.019 |\n",
      "|  p4160_s |    0.355   -0.030    0.115    0.105   -0.076    0.008    0.272    0.021   -0.008   -0.063   -0.079    0.077   -0.071    1.000   -0.015    0.031    0.007    0.333   -0.100    0.154   -0.023    0.064    0.003    0.035 |\n",
      "|   Dbar_s |   -0.073   -0.019    0.186    0.101   -0.022   -0.005   -0.152   -0.070   -0.001    0.025   -0.058    0.204   -0.103   -0.015    1.000   -0.001    0.118    0.020   -0.017   -0.046   -0.002   -0.000   -0.010    0.024 |\n",
      "|  bplus_0 |    0.025   -0.037   -0.026    0.011    0.023   -0.053   -0.014    0.026    0.013    0.003    0.035   -0.008   -0.005    0.031   -0.001    1.000   -0.828    0.006    0.018   -0.015   -0.015   -0.085   -0.126    0.288 |\n",
      "|  bplus_1 |    0.029    0.160   -0.110   -0.315   -0.016    0.044   -0.165    0.068   -0.007    0.007    0.174    0.154    0.116    0.007    0.118   -0.828    1.000    0.133    0.079   -0.298    0.014    0.078    0.095   -0.186 |\n",
      "|  p4415_s |    0.042   -0.074   -0.029   -0.017   -0.176   -0.003    0.204    0.018   -0.000    0.174   -0.090   -0.081   -0.002    0.333    0.020    0.006    0.133    1.000   -0.129   -0.098   -0.001   -0.001   -0.008    0.023 |\n",
      "|  p4160_p |    0.310    0.551   -0.099    0.131    0.523    0.001   -0.383    0.136    0.007   -0.492    0.521    0.574    0.260   -0.100   -0.017    0.018    0.079   -0.129    1.000   -0.100    0.001   -0.003   -0.005    0.015 |\n",
      "|  bplus_2 |   -0.011   -0.051    0.049    0.173    0.125    0.048    0.702   -0.074   -0.033    0.108   -0.178   -0.108   -0.072    0.154   -0.046   -0.015   -0.298   -0.098   -0.100    1.000   -0.082    0.276    0.050    0.053 |\n",
      "|    phi_s |   -0.011    0.000    0.008    0.001   -0.015    0.030   -0.034   -0.009    0.868   -0.010    0.000    0.013   -0.002   -0.023   -0.002   -0.015    0.014   -0.001    0.001   -0.082    1.000   -0.016   -0.000   -0.011 |\n",
      "|    rho_p |    0.029   -0.058   -0.035    0.009    0.048    0.125    0.114    0.018   -0.057    0.030   -0.005   -0.023   -0.000    0.064   -0.000   -0.085    0.078   -0.001   -0.003    0.276   -0.016    1.000    0.256    0.189 |\n",
      "|  omega_s |    0.001   -0.034   -0.001    0.023    0.004    0.860    0.011   -0.002   -0.063    0.001   -0.013   -0.011   -0.008    0.003   -0.010   -0.126    0.095   -0.008   -0.005    0.050   -0.000    0.256    1.000   -0.136 |\n",
      "|    rho_s |    0.018    0.017   -0.032   -0.056    0.023    0.102    0.035    0.020    0.013    0.016    0.034    0.020    0.019    0.035    0.024    0.288   -0.186    0.023    0.015    0.053   -0.011    0.189   -0.136    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.36356489990901686}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.042517067417832344}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.6310659708507202}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4223128676695816}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.20778208066997106}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.4874820079327282}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.2149889664393232}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.26394108697338536}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.38784624536914736}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1916163781305515}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.15720876432287234}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.7569381705577642}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03758319529273546}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17368940418477363}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4106842457448191}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.016015779946143116}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03411954657006122}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1975376820200126}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.14837016673307968}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07716919221654628}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.6232101866447692}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.49939574587859603}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 3.8469068326677696}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.35213076773741725})])\n",
      "Step: 7/11\n",
      "Current Ctt: 1.2909944487358056\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1118 (1118 total)    |\n",
      "| EDM = 0.000258 (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: 297367.1211034582\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.6    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.43   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.10   |    1.93   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.41   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.15   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.4    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.63    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.21    |   0.30    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.44    |   0.20    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.84   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |   -1.9    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.08    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.12    |   0.12    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.408   |   0.013   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.75   |    0.03   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.14    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -1.85   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.35   |    0.05   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   18.4    |    1.3    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.30   |    0.46   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    8.4    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |    0.8    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.187    0.102   -0.065    0.180    0.006    0.101    0.003   -0.237    0.257   -0.044    0.041    0.288   -0.341    0.038    0.030    0.028    0.161   -0.020   -0.011    0.035    0.002    0.013 |\n",
      "|   jpsi_p |    0.187    1.000   -0.294   -0.687    0.197   -0.034    0.270    0.016   -0.478    0.644   -0.574    0.103   -0.316   -0.171    0.535    0.605   -0.363    0.698   -0.454   -0.005   -0.093   -0.122    0.278 |\n",
      "|   Dbar_p |    0.102   -0.294    1.000    0.830   -0.001    0.033    0.058   -0.018    0.314   -0.116    0.574    0.414    0.276   -0.462   -0.623   -0.700    0.302   -0.390    0.292    0.010    0.060    0.135   -0.341 |\n",
      "| DDstar_s |   -0.065   -0.687    0.830    1.000   -0.119    0.032   -0.146   -0.033    0.525   -0.536    0.811    0.179    0.384   -0.145   -0.803   -0.890    0.425   -0.719    0.492    0.011    0.058    0.160   -0.421 |\n",
      "|  p4415_p |    0.180    0.197   -0.001   -0.119    1.000    0.005    0.100    0.003   -0.238    0.203   -0.010    0.063   -0.105   -0.160    0.059    0.054   -0.168    0.329    0.057   -0.013    0.041   -0.004    0.032 |\n",
      "|  omega_p |    0.006   -0.034    0.033    0.032    0.005    1.000    0.002   -0.002    0.015   -0.013    0.031    0.010    0.016   -0.011   -0.030   -0.025    0.010   -0.017    0.043    0.030    0.044    0.762    0.111 |\n",
      "|  p3770_s |    0.101    0.270    0.058   -0.146    0.100    0.002    1.000    0.007   -0.047    0.093   -0.155   -0.036   -0.050   -0.341    0.133    0.134   -0.075    0.219   -0.161   -0.009    0.017   -0.016    0.056 |\n",
      "|    phi_p |    0.003    0.016   -0.018   -0.033    0.003   -0.002    0.007    1.000   -0.020    0.023   -0.029   -0.004   -0.015   -0.005    0.030    0.027   -0.014    0.026   -0.029    0.796   -0.046   -0.057    0.028 |\n",
      "|  p4040_s |   -0.237   -0.478    0.314    0.525   -0.238    0.015   -0.047   -0.020    1.000   -0.445    0.560    0.017    0.050    0.200   -0.411   -0.455    0.299   -0.634    0.208    0.004    0.028    0.081   -0.217 |\n",
      "|  p3770_p |    0.257    0.644   -0.116   -0.536    0.203   -0.013    0.093    0.023   -0.445    1.000   -0.578    0.124   -0.242   -0.347    0.474    0.511   -0.308    0.642   -0.362   -0.008   -0.022   -0.086    0.233 |\n",
      "| DDstar_p |   -0.044   -0.574    0.574    0.811   -0.010    0.031   -0.155   -0.029    0.560   -0.578    1.000    0.169    0.423    0.163   -0.751   -0.832    0.415   -0.634    0.549    0.009    0.061    0.148   -0.388 |\n",
      "|  psi2s_p |    0.041    0.103    0.414    0.179    0.063    0.010   -0.036   -0.004    0.017    0.124    0.169    1.000   -0.029   -0.406   -0.145   -0.162    0.022    0.055   -0.131    0.003    0.009    0.036   -0.093 |\n",
      "|  p4160_s |    0.288   -0.316    0.276    0.384   -0.105    0.016   -0.050   -0.015    0.050   -0.242    0.423   -0.029    1.000    0.018   -0.296   -0.341    0.395   -0.321    0.211   -0.008    0.055    0.065   -0.158 |\n",
      "|   Dbar_s |   -0.341   -0.171   -0.462   -0.145   -0.160   -0.011   -0.341   -0.005    0.200   -0.347    0.163   -0.406    0.018    1.000    0.102    0.118    0.090   -0.256    0.275   -0.014    0.007   -0.035    0.082 |\n",
      "|  bplus_0 |    0.038    0.535   -0.623   -0.803    0.059   -0.030    0.133    0.030   -0.411    0.474   -0.751   -0.145   -0.296    0.102    1.000    0.598   -0.291    0.558   -0.506   -0.018   -0.049   -0.161    0.434 |\n",
      "|  bplus_1 |    0.030    0.605   -0.700   -0.890    0.054   -0.025    0.134    0.027   -0.455    0.511   -0.832   -0.162   -0.341    0.118    0.598    1.000   -0.324    0.611   -0.527   -0.013   -0.028   -0.136    0.374 |\n",
      "|  p4415_s |    0.028   -0.363    0.302    0.425   -0.168    0.010   -0.075   -0.014    0.299   -0.308    0.415    0.022    0.395    0.090   -0.291   -0.324    1.000   -0.346    0.053    0.006    0.008    0.059   -0.162 |\n",
      "|  p4160_p |    0.161    0.698   -0.390   -0.719    0.329   -0.017    0.219    0.026   -0.634    0.642   -0.634    0.055   -0.321   -0.256    0.558    0.611   -0.346    1.000   -0.329   -0.011   -0.020   -0.105    0.288 |\n",
      "|  bplus_2 |   -0.020   -0.454    0.292    0.492    0.057    0.043   -0.161   -0.029    0.208   -0.362    0.549   -0.131    0.211    0.275   -0.506   -0.527    0.053   -0.329    1.000   -0.052    0.238    0.112   -0.204 |\n",
      "|    phi_s |   -0.011   -0.005    0.010    0.011   -0.013    0.030   -0.009    0.796    0.004   -0.008    0.009    0.003   -0.008   -0.014   -0.018   -0.013    0.006   -0.011   -0.052    1.000    0.004    0.006   -0.013 |\n",
      "|    rho_p |    0.035   -0.093    0.060    0.058    0.041    0.044    0.017   -0.046    0.028   -0.022    0.061    0.009    0.055    0.007   -0.049   -0.028    0.008   -0.020    0.238    0.004    1.000    0.206    0.130 |\n",
      "|  omega_s |    0.002   -0.122    0.135    0.160   -0.004    0.762   -0.016   -0.057    0.081   -0.086    0.148    0.036    0.065   -0.035   -0.161   -0.136    0.059   -0.105    0.112    0.006    0.206    1.000   -0.207 |\n",
      "|    rho_s |    0.013    0.278   -0.341   -0.421    0.032    0.111    0.056    0.028   -0.217    0.233   -0.388   -0.093   -0.158    0.082    0.434    0.374   -0.162    0.288   -0.204   -0.013    0.130   -0.207    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.3903410697417289}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04232463719124979}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.9275084623931091}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.41103264150030816}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.18082818799507194}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.35863777405177055}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25544126924367005}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.3049078741533453}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1965482330081311}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.15922769044119356}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.612341983314008}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03561821137608856}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1673011363969904}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.12161246252703903}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.01258868184221451}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03245323331856853}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19743679237719647}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.16091518666055737}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.05485169891568353}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.2856889264229672}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.4617763706149516}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.3951997108153908}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3473176580597601})])\n",
      "Step: 8/11\n",
      "Current Ctt: 1.3801311186847085\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.977E+05               |    Ncalls=1155 (1155 total)    |\n",
      "| EDM = 0.00255 (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      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297742.913650034\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.66   |    0.29   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.49   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.6    |    0.8    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.56   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.19   |    0.27   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.3    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.13    |   0.18    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   1.93    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.58    |   0.25    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.77    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.79   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -0.4    |    0.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.05    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.24    |   0.44    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.461   |   0.012   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.922   |   0.029   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.23    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.03   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.13   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   18.9    |    1.2    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.55   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    5.9    |    1.3    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.23    |   0.30    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.455   -0.310   -0.609    0.557    0.037   -0.271    0.264   -0.008    0.092   -0.030   -0.565    0.334    0.538    0.410   -0.349   -0.428    0.094    0.511    0.193   -0.011   -0.013    0.068   -0.155 |\n",
      "|   jpsi_p |    0.455    1.000    0.004   -0.569    0.524    0.019   -0.080    0.330    0.012    0.183    0.093   -0.543    0.522    0.272    0.322   -0.318   -0.361    0.016    0.571    0.204    0.018   -0.077    0.035   -0.106 |\n",
      "|   Dbar_p |   -0.310    0.004    1.000    0.579   -0.440   -0.031    0.098   -0.163    0.001   -0.278    0.579    0.695   -0.129   -0.359   -0.687    0.430    0.492   -0.017   -0.272   -0.143   -0.019    0.086   -0.064    0.160 |\n",
      "| DDstar_s |   -0.609   -0.569    0.579    1.000   -0.765   -0.058    0.310   -0.375    0.002   -0.428    0.360    0.788   -0.582   -0.548   -0.850    0.629    0.750   -0.099   -0.629   -0.326   -0.007    0.069   -0.111    0.259 |\n",
      "|  p4415_p |    0.557    0.524   -0.440   -0.765    1.000    0.046   -0.239    0.325   -0.008    0.188   -0.169   -0.689    0.462    0.340    0.593   -0.466   -0.564   -0.042    0.673    0.320   -0.009   -0.020    0.087   -0.198 |\n",
      "|  omega_p |    0.037    0.019   -0.031   -0.058    0.046    1.000   -0.015    0.023   -0.019    0.023   -0.022   -0.039    0.032    0.032    0.043   -0.054   -0.034    0.001    0.037    0.042    0.012   -0.015    0.677   -0.018 |\n",
      "|      Ctt |   -0.271   -0.080    0.098    0.310   -0.239   -0.015    1.000   -0.185   -0.006    0.151   -0.066    0.236   -0.083    0.028   -0.347    0.122    0.148    0.161   -0.388    0.435   -0.020    0.080   -0.027    0.062 |\n",
      "|  p3770_s |    0.264    0.330   -0.163   -0.375    0.325    0.023   -0.185    1.000   -0.007    0.234   -0.212   -0.349    0.112    0.214    0.197   -0.194   -0.244    0.038    0.307    0.061   -0.011   -0.002    0.042   -0.094 |\n",
      "|    phi_p |   -0.008    0.012    0.001    0.002   -0.008   -0.019   -0.006   -0.007    1.000   -0.005    0.005   -0.007   -0.000   -0.012   -0.003    0.006   -0.009    0.002   -0.001   -0.066    0.746   -0.202   -0.099    0.076 |\n",
      "|  p4040_s |    0.092    0.183   -0.278   -0.428    0.188    0.023    0.151    0.234   -0.005    1.000   -0.278   -0.293    0.245    0.166    0.383   -0.244   -0.293    0.166   -0.062    0.170   -0.004   -0.012    0.045   -0.103 |\n",
      "|  p3770_p |   -0.030    0.093    0.579    0.360   -0.169   -0.022   -0.066   -0.212    0.005   -0.278    1.000    0.260   -0.082   -0.235   -0.463    0.301    0.337   -0.099    0.040   -0.158   -0.008    0.043   -0.047    0.110 |\n",
      "| DDstar_p |   -0.565   -0.543    0.695    0.788   -0.689   -0.039    0.236   -0.349   -0.007   -0.293    0.260    1.000   -0.470   -0.426   -0.773    0.416    0.493   -0.016   -0.654   -0.188   -0.014    0.057   -0.073    0.168 |\n",
      "|  psi2s_p |    0.334    0.522   -0.129   -0.582    0.462    0.032   -0.083    0.112   -0.000    0.245   -0.082   -0.470    1.000    0.255    0.323   -0.327   -0.388    0.053    0.448    0.134    0.001   -0.033    0.059   -0.137 |\n",
      "|  p4160_s |    0.538    0.272   -0.359   -0.548    0.340    0.032    0.028    0.214   -0.012    0.166   -0.235   -0.426    0.255    1.000    0.445   -0.311   -0.383    0.309    0.255    0.246   -0.015    0.003    0.062   -0.138 |\n",
      "|   Dbar_s |    0.410    0.322   -0.687   -0.850    0.593    0.043   -0.347    0.197   -0.003    0.383   -0.463   -0.773    0.323    0.445    1.000   -0.500   -0.590    0.082    0.431    0.259    0.008   -0.062    0.084   -0.200 |\n",
      "|  bplus_0 |   -0.349   -0.318    0.430    0.629   -0.466   -0.054    0.122   -0.194    0.006   -0.244    0.301    0.416   -0.327   -0.311   -0.500    1.000    0.176    0.007   -0.359   -0.315   -0.015    0.075   -0.114    0.277 |\n",
      "|  bplus_1 |   -0.428   -0.361    0.492    0.750   -0.564   -0.034    0.148   -0.244   -0.009   -0.293    0.337    0.493   -0.388   -0.383   -0.590    0.176    1.000    0.004   -0.438   -0.406   -0.013    0.077   -0.065    0.165 |\n",
      "|  p4415_s |    0.094    0.016   -0.017   -0.099   -0.042    0.001    0.161    0.038    0.002    0.166   -0.099   -0.016    0.053    0.309    0.082    0.007    0.004    1.000   -0.004   -0.056    0.001   -0.005    0.001   -0.003 |\n",
      "|  p4160_p |    0.511    0.571   -0.272   -0.629    0.673    0.037   -0.388    0.307   -0.001   -0.062    0.040   -0.654    0.448    0.255    0.431   -0.359   -0.438   -0.004    1.000    0.187   -0.002   -0.026    0.068   -0.155 |\n",
      "|  bplus_2 |    0.193    0.204   -0.143   -0.326    0.320    0.042    0.435    0.061   -0.066    0.170   -0.158   -0.188    0.134    0.246    0.259   -0.315   -0.406   -0.056    0.187    1.000   -0.105    0.220    0.081   -0.149 |\n",
      "|    phi_s |   -0.011    0.018   -0.019   -0.007   -0.009    0.012   -0.020   -0.011    0.746   -0.004   -0.008   -0.014    0.001   -0.015    0.008   -0.015   -0.013    0.001   -0.002   -0.105    1.000   -0.141   -0.031    0.014 |\n",
      "|    rho_p |   -0.013   -0.077    0.086    0.069   -0.020   -0.015    0.080   -0.002   -0.202   -0.012    0.043    0.057   -0.033    0.003   -0.062    0.075    0.077   -0.005   -0.026    0.220   -0.141    1.000    0.111    0.143 |\n",
      "|  omega_s |    0.068    0.035   -0.064   -0.111    0.087    0.677   -0.027    0.042   -0.099    0.045   -0.047   -0.073    0.059    0.062    0.084   -0.114   -0.065    0.001    0.068    0.081   -0.031    0.111    1.000   -0.377 |\n",
      "|    rho_s |   -0.155   -0.106    0.160    0.259   -0.198   -0.018    0.062   -0.094    0.076   -0.103    0.110    0.168   -0.137   -0.138   -0.200    0.277    0.165   -0.003   -0.155   -0.149    0.014    0.143   -0.377    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2944322007564817}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04081884365403843}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.7607565703119716}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5626955368211186}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.2688601546448819}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.32392172348393755}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.18264463451657864}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.26029978492755956}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.24897116848447176}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18817286639927855}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.17705456375473494}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.7186437234817515}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04231553870896665}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1882744446660255}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.43507203665122396}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.012163707631472676}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.029411534326438393}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1819240859141379}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.15443583122072324}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07185441351761723}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.1635849800040532}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.304363187581028}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.3414114444915395}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.30135510244600383})])\n",
      "Step: 8/11\n",
      "Current Ctt: 1.3801311186847085\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1118 (1118 total)    |\n",
      "| EDM = 1.42E-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: 297459.0873037706\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.64   |    0.27   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.54   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.21   |    1.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.46   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.5    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.8    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.25    |   0.21    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.20    |   0.30    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.20    |   0.28    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.94    |   0.20    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -3.19   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |    0.4    |    1.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.40    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.30    |   0.40    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.495   |   0.019   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |   -0.95   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.21    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.28   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.21   |    0.11   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   18.8    |    1.3    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.25   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |     8     |     4     |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    1.5    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.519   -0.411   -0.311    0.632   -0.008   -0.136    0.290    0.013    0.072    0.011   -0.666    0.378    0.489   -0.255   -0.217   -0.493   -0.139    0.651    0.354    0.007   -0.019    0.013   -0.130 |\n",
      "|   jpsi_p |    0.519    1.000   -0.128   -0.239    0.548   -0.018    0.077    0.319    0.010    0.137    0.198   -0.552    0.562    0.218   -0.220   -0.202   -0.382   -0.160    0.640    0.337    0.015   -0.076   -0.002   -0.111 |\n",
      "|   Dbar_p |   -0.411   -0.128    1.000    0.375   -0.611    0.018   -0.156   -0.417   -0.012   -0.408    0.668    0.846   -0.242   -0.425    0.460    0.350    0.703    0.198   -0.398   -0.510   -0.024    0.075   -0.016    0.196 |\n",
      "| DDstar_s |   -0.311   -0.239    0.375    1.000   -0.405    0.009   -0.057   -0.254   -0.009   -0.231    0.226    0.473   -0.291   -0.253    0.260    0.221    0.476    0.118   -0.307   -0.355   -0.010    0.031   -0.012    0.129 |\n",
      "|  p4415_p |    0.632    0.548   -0.611   -0.405    1.000   -0.010    0.043    0.414    0.015    0.197   -0.174   -0.821    0.482    0.307   -0.367   -0.286   -0.634   -0.293    0.741    0.524    0.009   -0.018    0.017   -0.164 |\n",
      "|  omega_p |   -0.008   -0.018    0.018    0.009   -0.010    1.000    0.001   -0.007   -0.029   -0.004    0.010    0.013   -0.006   -0.004    0.007    0.027    0.001    0.006   -0.008   -0.005    0.023    0.136    0.903    0.429 |\n",
      "|      Ctt |   -0.136    0.077   -0.156   -0.057    0.043    0.001    1.000    0.009   -0.009    0.386   -0.318   -0.073    0.076    0.301    0.066   -0.042   -0.144    0.161   -0.211    0.616   -0.034    0.112   -0.001   -0.002 |\n",
      "|  p3770_s |    0.290    0.319   -0.417   -0.254    0.414   -0.007    0.009    1.000    0.008    0.312   -0.305   -0.522    0.185    0.268   -0.206   -0.172   -0.383   -0.080    0.343    0.266    0.005   -0.015    0.010   -0.103 |\n",
      "|    phi_p |    0.013    0.010   -0.012   -0.009    0.015   -0.029   -0.009    0.008    1.000    0.004   -0.002   -0.022    0.014    0.004   -0.009   -0.005   -0.018   -0.003    0.017   -0.010    0.781   -0.054   -0.062   -0.015 |\n",
      "|  p4040_s |    0.072    0.137   -0.408   -0.231    0.197   -0.004    0.386    0.312    0.004    1.000   -0.292   -0.392    0.198    0.246   -0.214   -0.129   -0.283    0.086   -0.056    0.283    0.000    0.004    0.007   -0.070 |\n",
      "|  p3770_p |    0.011    0.198    0.668    0.226   -0.174    0.010   -0.318   -0.305   -0.002   -0.292    1.000    0.365   -0.027   -0.239    0.247    0.196    0.348    0.028    0.074   -0.308   -0.012    0.034   -0.009    0.097 |\n",
      "| DDstar_p |   -0.666   -0.552    0.846    0.473   -0.821    0.013   -0.073   -0.522   -0.022   -0.392    0.365    1.000   -0.556   -0.469    0.511    0.371    0.775    0.242   -0.725   -0.567   -0.027    0.067   -0.023    0.211 |\n",
      "|  psi2s_p |    0.378    0.562   -0.242   -0.291    0.482   -0.006    0.076    0.185    0.014    0.198   -0.027   -0.556    1.000    0.203   -0.189   -0.183   -0.374   -0.109    0.514    0.262    0.012   -0.032    0.010   -0.103 |\n",
      "|  p4160_s |    0.489    0.218   -0.425   -0.253    0.307   -0.004    0.301    0.268    0.004    0.246   -0.239   -0.469    0.203    1.000   -0.225   -0.137   -0.338    0.187    0.206    0.344   -0.006    0.021    0.008   -0.080 |\n",
      "|   Dbar_s |   -0.255   -0.220    0.460    0.260   -0.367    0.007    0.066   -0.206   -0.009   -0.214    0.247    0.511   -0.189   -0.225    1.000    0.168    0.349    0.091   -0.296   -0.265   -0.011    0.028   -0.009    0.095 |\n",
      "|  bplus_0 |   -0.217   -0.202    0.350    0.221   -0.286    0.027   -0.042   -0.172   -0.005   -0.129    0.196    0.371   -0.183   -0.137    0.168    1.000   -0.210    0.125   -0.242   -0.241   -0.021    0.026   -0.015    0.227 |\n",
      "|  bplus_1 |   -0.493   -0.382    0.703    0.476   -0.634    0.001   -0.144   -0.383   -0.018   -0.283    0.348    0.775   -0.374   -0.338    0.349   -0.210    1.000    0.270   -0.544   -0.574   -0.014    0.063   -0.013    0.097 |\n",
      "|  p4415_s |   -0.139   -0.160    0.198    0.118   -0.293    0.006    0.161   -0.080   -0.003    0.086    0.028    0.242   -0.109    0.187    0.091    0.125    0.270    1.000   -0.238   -0.252   -0.002    0.004   -0.005    0.067 |\n",
      "|  p4160_p |    0.651    0.640   -0.398   -0.307    0.741   -0.008   -0.211    0.343    0.017   -0.056    0.074   -0.725    0.514    0.206   -0.296   -0.242   -0.544   -0.238    1.000    0.381    0.013   -0.033    0.015   -0.145 |\n",
      "|  bplus_2 |    0.354    0.337   -0.510   -0.355    0.524   -0.005    0.616    0.266   -0.010    0.283   -0.308   -0.567    0.262    0.344   -0.265   -0.241   -0.574   -0.252    0.381    1.000   -0.058    0.187    0.007   -0.101 |\n",
      "|    phi_s |    0.007    0.015   -0.024   -0.010    0.009    0.023   -0.034    0.005    0.781    0.000   -0.012   -0.027    0.012   -0.006   -0.011   -0.021   -0.014   -0.002    0.013   -0.058    1.000   -0.005    0.008   -0.006 |\n",
      "|    rho_p |   -0.019   -0.076    0.075    0.031   -0.018    0.136    0.112   -0.015   -0.054    0.004    0.034    0.067   -0.032    0.021    0.028    0.026    0.063    0.004   -0.033    0.187   -0.005    1.000    0.146    0.328 |\n",
      "|  omega_s |    0.013   -0.002   -0.016   -0.012    0.017    0.903   -0.001    0.010   -0.062    0.007   -0.009   -0.023    0.010    0.008   -0.009   -0.015   -0.013   -0.005    0.015    0.007    0.008    0.146    1.000    0.214 |\n",
      "|    rho_s |   -0.130   -0.111    0.196    0.129   -0.164    0.429   -0.002   -0.103   -0.015   -0.070    0.097    0.211   -0.103   -0.080    0.095    0.227    0.097    0.067   -0.145   -0.101   -0.006    0.328    0.214    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.27204720039515595}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.044471392326163706}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.0597818012828104}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4591641461492597}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.3169399411806042}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.502875461059729}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.20682255477930012}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.29687847130765377}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2782932150905366}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.19680160383150047}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1773749471195425}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.5798339248112092}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.0441293378850931}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.19194637100756662}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.40328496082187903}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.018919603928359674}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.05538320039986866}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.20053207098661585}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.16754996406281109}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.10837916393289526}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.250464451161573}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.25766279213016263}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 3.945852264606978}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3287884879892642})])\n",
      "Step: 8/11\n",
      "Current Ctt: 1.3801311186847085\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1025 (1025 total)    |\n",
      "| EDM = 0.000373 (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: 297459.7454270879\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.59   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.540   |   0.031   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.05   |    0.41   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.60   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.53   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.8    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.22    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.20    |   0.24    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.86    |   0.21    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -3.13   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |    0.5    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.34    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.07    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.494   |   0.019   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.94   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.17    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.24   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.29   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   18.8    |    1.1    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.29   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    8.4    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |   1.52    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.153    0.147   -0.174    0.282   -0.006    0.022   -0.000    0.049    0.038   -0.317    0.118    0.422   -0.017   -0.179   -0.196    0.122    0.141    0.270   -0.012    0.033    0.006   -0.068 |\n",
      "|   jpsi_p |    0.153    1.000    0.284    0.324    0.006   -0.002    0.022   -0.005   -0.225    0.432   -0.022    0.043   -0.193    0.082    0.227    0.251   -0.140    0.449   -0.211    0.008   -0.067   -0.022    0.090 |\n",
      "|   Dbar_p |    0.147    0.284    1.000   -0.243    0.108    0.000    0.082    0.005    0.057    0.252    0.157    0.313    0.064   -0.021   -0.117   -0.130    0.054    0.098    0.120   -0.003    0.022    0.009   -0.048 |\n",
      "| DDstar_s |   -0.174    0.324   -0.243    1.000   -0.504    0.034   -0.310    0.002   -0.659    0.610    0.653   -0.551   -0.595    0.370    0.875    0.919   -0.277    0.374   -0.660   -0.010    0.041   -0.042    0.335 |\n",
      "|  p4415_p |    0.282    0.006    0.108   -0.504    1.000   -0.017    0.207   -0.000    0.271   -0.224   -0.579    0.353    0.273   -0.187   -0.473   -0.504    0.027    0.129    0.458   -0.006    0.014    0.021   -0.180 |\n",
      "|  omega_p |   -0.006   -0.002    0.000    0.034   -0.017    1.000   -0.010   -0.009   -0.022    0.022    0.022   -0.019   -0.019    0.012    0.036    0.030   -0.008    0.013   -0.022    0.022    0.079    0.814    0.353 |\n",
      "|  p3770_s |    0.022    0.022    0.082   -0.310    0.207   -0.010    1.000   -0.001    0.333   -0.322   -0.347    0.103    0.242   -0.080   -0.275   -0.294    0.133   -0.101    0.233   -0.007    0.013    0.012   -0.107 |\n",
      "|    phi_p |   -0.000   -0.005    0.005    0.002   -0.000   -0.009   -0.001    1.000   -0.001    0.003   -0.005    0.001   -0.002    0.001    0.001   -0.000    0.001    0.003   -0.011    0.727   -0.045   -0.051    0.002 |\n",
      "|  p4040_s |    0.049   -0.225    0.057   -0.659    0.271   -0.022    0.333   -0.001    1.000   -0.407   -0.552    0.381    0.371   -0.277   -0.566   -0.595    0.259   -0.454    0.334    0.006   -0.026    0.028   -0.220 |\n",
      "|  p3770_p |    0.038    0.432    0.252    0.610   -0.224    0.022   -0.322    0.003   -0.407    1.000    0.413   -0.283   -0.354    0.254    0.552    0.570   -0.187    0.421   -0.348   -0.013    0.043   -0.027    0.208 |\n",
      "| DDstar_p |   -0.317   -0.022    0.157    0.653   -0.579    0.022   -0.347   -0.005   -0.552    0.413    1.000   -0.560   -0.517    0.332    0.679    0.712   -0.190   -0.008   -0.526   -0.014    0.033   -0.036    0.258 |\n",
      "|  psi2s_p |    0.118    0.043    0.313   -0.551    0.353   -0.019    0.103    0.001    0.381   -0.283   -0.560    1.000    0.305   -0.188   -0.496   -0.518    0.155   -0.050    0.303    0.006   -0.027    0.023   -0.191 |\n",
      "|  p4160_s |    0.422   -0.193    0.064   -0.595    0.273   -0.019    0.242   -0.002    0.371   -0.354   -0.517    0.305    1.000   -0.239   -0.505   -0.535    0.369   -0.235    0.351   -0.002   -0.004    0.024   -0.197 |\n",
      "|   Dbar_s |   -0.017    0.082   -0.021    0.370   -0.187    0.012   -0.080    0.001   -0.277    0.254    0.332   -0.188   -0.239    1.000    0.314    0.331   -0.132    0.168   -0.303   -0.001    0.005   -0.014    0.119 |\n",
      "|  bplus_0 |   -0.179    0.227   -0.117    0.875   -0.473    0.036   -0.275    0.001   -0.566    0.552    0.679   -0.496   -0.505    0.314    1.000    0.703   -0.190    0.274   -0.660   -0.016    0.050   -0.043    0.342 |\n",
      "|  bplus_1 |   -0.196    0.251   -0.130    0.919   -0.504    0.030   -0.294   -0.000   -0.595    0.570    0.712   -0.518   -0.535    0.331    0.703    1.000   -0.197    0.278   -0.685   -0.012    0.055   -0.039    0.304 |\n",
      "|  p4415_s |    0.122   -0.140    0.054   -0.277    0.027   -0.008    0.133    0.001    0.259   -0.187   -0.190    0.155    0.369   -0.132   -0.190   -0.197    1.000   -0.095   -0.047    0.009   -0.035    0.011   -0.080 |\n",
      "|  p4160_p |    0.141    0.449    0.098    0.374    0.129    0.013   -0.101    0.003   -0.454    0.421   -0.008   -0.050   -0.235    0.168    0.274    0.278   -0.095    1.000   -0.026   -0.015    0.051   -0.015    0.107 |\n",
      "|  bplus_2 |    0.270   -0.211    0.120   -0.660    0.458   -0.022    0.233   -0.011    0.334   -0.348   -0.526    0.303    0.351   -0.303   -0.660   -0.685   -0.047   -0.026    1.000   -0.050    0.156    0.022   -0.228 |\n",
      "|    phi_s |   -0.012    0.008   -0.003   -0.010   -0.006    0.022   -0.007    0.727    0.006   -0.013   -0.014    0.006   -0.002   -0.001   -0.016   -0.012    0.009   -0.015   -0.050    1.000    0.009    0.006   -0.006 |\n",
      "|    rho_p |    0.033   -0.067    0.022    0.041    0.014    0.079    0.013   -0.045   -0.026    0.043    0.033   -0.027   -0.004    0.005    0.050    0.055   -0.035    0.051    0.156    0.009    1.000    0.091    0.273 |\n",
      "|  omega_s |    0.006   -0.022    0.009   -0.042    0.021    0.814    0.012   -0.051    0.028   -0.027   -0.036    0.023    0.024   -0.014   -0.043   -0.039    0.011   -0.015    0.022    0.006    0.091    1.000    0.054 |\n",
      "|    rho_s |   -0.068    0.090   -0.048    0.335   -0.180    0.353   -0.107    0.002   -0.220    0.208    0.258   -0.191   -0.197    0.119    0.342    0.304   -0.080    0.107   -0.228   -0.006    0.273    0.054    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.20249249807014635}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.031333510049597724}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.405435455492857}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5997327317203879}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.21247478624903882}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.34419809967596704}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25435450227517087}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2438696300416736}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.20533180109942378}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1568908418394961}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.587667154439504}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.040471996396218124}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.18733835546289823}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.07006234701442604}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.018658575777977582}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.044671232971096764}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18250894191248607}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10312125510996073}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.0714582145667475}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.0968532884894646}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.24220534385896153}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.4200148691792895}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.30516763159204463})])\n",
      "Step: 9/11\n",
      "Current Ctt: 1.4638501094227998\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |    Ncalls=1231 (1231 total)    |\n",
      "| EDM = 3.65E-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: 297332.3541190791\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.86   |    0.29   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.54   |    0.07   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.8    |    2.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.59   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.42   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.3    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.63    |   0.20    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.43    |   0.30    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.22    |   0.72    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.00    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -3.11   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |    1.4    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.07    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.13    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   -0.14   |    0.37   |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.467   |   0.013   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |   -0.91   |    0.03   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.28    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.17   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.23   |    0.08   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   18.6    |    2.6    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.4    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    7.9    |    1.5    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    1.2    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.742   -0.711   -0.448    0.583    0.042    0.100    0.403    0.044   -0.415    0.765   -0.027    0.648    0.208   -0.793   -0.054   -0.143   -0.050    0.687    0.063    0.035    0.058    0.043   -0.047 |\n",
      "|   jpsi_p |    0.742    1.000   -0.872   -0.498    0.628    0.027    0.205    0.489    0.039   -0.357    0.875    0.004    0.804   -0.013   -0.892   -0.062   -0.119   -0.125    0.804    0.067    0.033    0.010    0.025   -0.038 |\n",
      "|   Dbar_p |   -0.711   -0.872    1.000    0.753   -0.588   -0.055   -0.056   -0.446   -0.060    0.308   -0.863    0.244   -0.810   -0.020    0.886    0.109    0.233    0.076   -0.730   -0.127   -0.050   -0.062   -0.059    0.075 |\n",
      "| DDstar_s |   -0.448   -0.498    0.753    1.000   -0.352   -0.062   -0.133   -0.308   -0.042    0.121   -0.500    0.551   -0.576   -0.110    0.683    0.285    0.501    0.012   -0.345   -0.279   -0.037   -0.041   -0.087    0.157 |\n",
      "|  p4415_p |    0.583    0.628   -0.588   -0.352    1.000    0.042    0.114    0.346    0.035   -0.382    0.624   -0.090    0.560   -0.070   -0.643   -0.074   -0.176   -0.205    0.676    0.169    0.025    0.070    0.044   -0.050 |\n",
      "|  omega_p |    0.042    0.027   -0.055   -0.062    0.042    1.000    0.022    0.029    0.078   -0.009    0.037   -0.051    0.045    0.017   -0.051   -0.056   -0.018   -0.009    0.034    0.074    0.093    0.153    0.781    0.004 |\n",
      "|      Ctt |    0.100    0.205   -0.056   -0.133    0.114    0.022    1.000    0.109    0.009    0.201    0.065    0.072    0.243    0.249   -0.243   -0.071   -0.130    0.139   -0.003    0.549   -0.000    0.090    0.022   -0.014 |\n",
      "|  p3770_s |    0.403    0.489   -0.446   -0.308    0.346    0.029    0.109    1.000    0.028   -0.090    0.391   -0.014    0.375    0.038   -0.540   -0.032   -0.094   -0.035    0.415    0.014    0.021    0.041    0.030   -0.033 |\n",
      "|    phi_p |    0.044    0.039   -0.060   -0.042    0.035    0.078    0.009    0.028    1.000   -0.024    0.056   -0.008    0.051   -0.005   -0.065   -0.008   -0.017   -0.006    0.048   -0.018    0.957    0.025   -0.028    0.034 |\n",
      "|  p4040_s |   -0.415   -0.357    0.308    0.121   -0.382   -0.009    0.201   -0.090   -0.024    1.000   -0.405   -0.195   -0.272   -0.043    0.376   -0.012   -0.014    0.190   -0.570    0.081   -0.022    0.003   -0.005    0.001 |\n",
      "|  p3770_p |    0.765    0.875   -0.863   -0.500    0.624    0.037    0.065    0.391    0.056   -0.405    1.000    0.083    0.766   -0.035   -0.896   -0.004   -0.064   -0.144    0.831   -0.017    0.046    0.044    0.032   -0.025 |\n",
      "| DDstar_p |   -0.027    0.004    0.244    0.551   -0.090   -0.051    0.072   -0.014   -0.008   -0.195    0.083    1.000   -0.121   -0.214    0.023    0.383    0.637   -0.087    0.125   -0.409   -0.010   -0.016   -0.090    0.193 |\n",
      "|  psi2s_p |    0.648    0.804   -0.810   -0.576    0.560    0.045    0.243    0.375    0.051   -0.272    0.766   -0.121    1.000   -0.001   -0.861   -0.103   -0.200   -0.084    0.693    0.077    0.044    0.039    0.048   -0.067 |\n",
      "|  p4160_s |    0.208   -0.013   -0.020   -0.110   -0.070    0.017    0.249    0.038   -0.005   -0.043   -0.035   -0.214   -0.001    1.000   -0.022   -0.041   -0.106    0.337   -0.104    0.172   -0.011    0.056    0.022   -0.025 |\n",
      "|   Dbar_s |   -0.793   -0.892    0.886    0.683   -0.643   -0.051   -0.243   -0.540   -0.065    0.376   -0.896    0.023   -0.861   -0.022    1.000    0.100    0.207    0.123   -0.808   -0.075   -0.057   -0.045   -0.054    0.070 |\n",
      "|  bplus_0 |   -0.054   -0.062    0.109    0.285   -0.074   -0.056   -0.071   -0.032   -0.008   -0.012   -0.004    0.383   -0.103   -0.041    0.100    1.000   -0.248    0.048   -0.005   -0.256   -0.017   -0.008   -0.107    0.239 |\n",
      "|  bplus_1 |   -0.143   -0.119    0.233    0.501   -0.176   -0.018   -0.130   -0.094   -0.017   -0.014   -0.064    0.637   -0.200   -0.106    0.207   -0.248    1.000    0.077   -0.058   -0.430   -0.013    0.013   -0.027    0.073 |\n",
      "|  p4415_s |   -0.050   -0.125    0.076    0.012   -0.205   -0.009    0.139   -0.035   -0.006    0.190   -0.144   -0.087   -0.084    0.337    0.123    0.048    0.077    1.000   -0.157   -0.095   -0.005   -0.010   -0.012    0.019 |\n",
      "|  p4160_p |    0.687    0.804   -0.730   -0.345    0.676    0.034   -0.003    0.415    0.048   -0.570    0.831    0.125    0.693   -0.104   -0.808   -0.005   -0.058   -0.157    1.000   -0.004    0.039    0.043    0.029   -0.021 |\n",
      "|  bplus_2 |    0.063    0.067   -0.127   -0.279    0.169    0.074    0.549    0.014   -0.018    0.081   -0.017   -0.409    0.077    0.172   -0.075   -0.256   -0.430   -0.095   -0.004    1.000   -0.043    0.256    0.091   -0.088 |\n",
      "|    phi_s |    0.035    0.033   -0.050   -0.037    0.025    0.093   -0.000    0.021    0.957   -0.022    0.046   -0.010    0.044   -0.011   -0.057   -0.017   -0.013   -0.005    0.039   -0.043    1.000    0.039   -0.002    0.021 |\n",
      "|    rho_p |    0.058    0.010   -0.062   -0.041    0.070    0.153    0.090    0.041    0.025    0.003    0.044   -0.016    0.039    0.056   -0.045   -0.008    0.013   -0.010    0.043    0.256    0.039    1.000    0.244    0.205 |\n",
      "|  omega_s |    0.043    0.025   -0.059   -0.087    0.044    0.781    0.022    0.030   -0.028   -0.005    0.032   -0.090    0.048    0.022   -0.054   -0.107   -0.027   -0.012    0.029    0.091   -0.002    0.244    1.000   -0.281 |\n",
      "|    rho_s |   -0.047   -0.038    0.075    0.157   -0.050    0.004   -0.014   -0.033    0.034    0.001   -0.025    0.193   -0.067   -0.025    0.070    0.239    0.073    0.019   -0.021   -0.088    0.021    0.205   -0.281    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2935039080582442}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.07233732251108815}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 2.3933863188301636}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5938608190052963}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.22257796393653684}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.34952672473201885}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1992057407860104}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.29813761843028486}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.7159322052609145}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1902640225249443}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.3032701369921478}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.6158333704332519}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.06546162847813974}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16802447936032872}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.36535406785410873}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.013408468332938073}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03339049779555836}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19121065603043474}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.20194823878822765}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08242639419834985}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 2.5579406556080713}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.32625228401532613}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.4611128832126639}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.317936246387851})])\n",
      "Step: 9/11\n",
      "Current Ctt: 1.4638501094227998\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |     Ncalls=990 (990 total)     |\n",
      "| EDM = 0.00193 (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: 297334.3246009751\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.82   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.519   |   0.031   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   0.05    |   0.50    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.27   |    0.54   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.34   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.32    |   0.29    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.39    |   0.27    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.23    |   0.44    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.95    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -3.02   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |   0.005   |   0.776   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.05    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.06    |   0.21    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.37    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.467   |   0.016   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.89   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.27    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.06   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.32   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   18.7    |    1.6    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.39   |    0.30   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    7.8    |    1.3    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |   1.17    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.371   -0.300   -0.666    0.592    0.060    0.336    0.017    0.321   -0.214   -0.626    0.494    0.657   -0.291   -0.569   -0.605    0.301    0.301    0.482    0.020    0.010    0.117   -0.258 |\n",
      "|   jpsi_p |    0.371    1.000    0.069   -0.287    0.364    0.003    0.277   -0.013    0.121    0.117   -0.472    0.382    0.194   -0.177   -0.265   -0.267    0.032    0.454    0.134    0.002   -0.084    0.028   -0.106 |\n",
      "|   Dbar_p |   -0.300    0.069    1.000    0.518   -0.411   -0.037   -0.227   -0.006   -0.386    0.598    0.695   -0.253   -0.425    0.305    0.488    0.506   -0.186   -0.081   -0.344   -0.021    0.042   -0.088    0.210 |\n",
      "| DDstar_s |   -0.666   -0.287    0.518    1.000   -0.750   -0.082   -0.490   -0.024   -0.618    0.542    0.700   -0.732   -0.729    0.501    0.883    0.929   -0.362   -0.298   -0.632   -0.041    0.034   -0.174    0.396 |\n",
      "|  p4415_p |    0.592    0.364   -0.411   -0.750    1.000    0.067    0.399    0.020    0.372   -0.313   -0.691    0.581    0.510   -0.359   -0.653   -0.692    0.175    0.477    0.552    0.026    0.004    0.133   -0.294 |\n",
      "|  omega_p |    0.060    0.003   -0.037   -0.082    0.067    1.000    0.044    0.044    0.049   -0.042   -0.061    0.060    0.062   -0.040   -0.076   -0.070    0.024    0.032    0.087    0.061    0.088    0.710    0.020 |\n",
      "|  p3770_s |    0.336    0.277   -0.227   -0.490    0.399    0.044    1.000    0.012    0.408   -0.388   -0.446    0.289    0.383   -0.200   -0.409   -0.436    0.206    0.179    0.321    0.013    0.010    0.086   -0.188 |\n",
      "|    phi_p |    0.017   -0.013   -0.006   -0.024    0.020    0.044    0.012    1.000    0.014   -0.010   -0.025    0.017    0.017   -0.012   -0.020   -0.023    0.008    0.012    0.010    0.889    0.000   -0.031    0.018 |\n",
      "|  p4040_s |    0.321    0.121   -0.386   -0.618    0.372    0.049    0.408    0.014    1.000   -0.366   -0.458    0.455    0.330   -0.340   -0.514   -0.540    0.254   -0.048    0.253    0.025   -0.026    0.104   -0.235 |\n",
      "|  p3770_p |   -0.214    0.117    0.598    0.542   -0.313   -0.042   -0.388   -0.010   -0.366    1.000    0.339   -0.322   -0.384    0.284    0.496    0.512   -0.221    0.069   -0.296   -0.025    0.035   -0.094    0.216 |\n",
      "| DDstar_p |   -0.626   -0.472    0.695    0.700   -0.691   -0.061   -0.446   -0.025   -0.458    0.339    1.000   -0.620   -0.567    0.394    0.616    0.647   -0.229   -0.493   -0.453   -0.036    0.023   -0.123    0.276 |\n",
      "|  psi2s_p |    0.494    0.382   -0.253   -0.732    0.581    0.060    0.289    0.017    0.455   -0.322   -0.620    1.000    0.489   -0.339   -0.625   -0.656    0.247    0.338    0.378    0.028   -0.024    0.124   -0.282 |\n",
      "|  p4160_s |    0.657    0.194   -0.425   -0.729    0.510    0.062    0.383    0.017    0.330   -0.384   -0.567    0.489    1.000   -0.363   -0.610   -0.645    0.426    0.200    0.421    0.024   -0.004    0.125   -0.278 |\n",
      "|   Dbar_s |   -0.291   -0.177    0.305    0.501   -0.359   -0.040   -0.200   -0.012   -0.340    0.284    0.394   -0.339   -0.363    1.000    0.414    0.437   -0.203   -0.110   -0.368   -0.018    0.006   -0.082    0.184 |\n",
      "|  bplus_0 |   -0.569   -0.265    0.488    0.883   -0.653   -0.076   -0.409   -0.020   -0.514    0.496    0.616   -0.625   -0.610    0.414    1.000    0.702   -0.263   -0.272   -0.632   -0.041    0.045   -0.169    0.397 |\n",
      "|  bplus_1 |   -0.605   -0.267    0.506    0.929   -0.692   -0.070   -0.436   -0.023   -0.540    0.512    0.647   -0.656   -0.645    0.437    0.702    1.000   -0.274   -0.293   -0.649   -0.039    0.050   -0.150    0.353 |\n",
      "|  p4415_s |    0.301    0.032   -0.186   -0.362    0.175    0.024    0.206    0.008    0.254   -0.221   -0.229    0.247    0.426   -0.203   -0.263   -0.274    1.000    0.107    0.007    0.016   -0.030    0.054   -0.125 |\n",
      "|  p4160_p |    0.301    0.454   -0.081   -0.298    0.477    0.032    0.179    0.012   -0.048    0.069   -0.493    0.338    0.200   -0.110   -0.272   -0.293    0.107    1.000    0.364    0.008    0.025    0.057   -0.122 |\n",
      "|  bplus_2 |    0.482    0.134   -0.344   -0.632    0.552    0.087    0.321    0.010    0.253   -0.296   -0.453    0.378    0.421   -0.368   -0.632   -0.649    0.007    0.364    1.000   -0.011    0.173    0.144   -0.266 |\n",
      "|    phi_s |    0.020    0.002   -0.021   -0.041    0.026    0.061    0.013    0.889    0.025   -0.025   -0.036    0.028    0.024   -0.018   -0.041   -0.039    0.016    0.008   -0.011    1.000    0.024    0.007   -0.008 |\n",
      "|    rho_p |    0.010   -0.084    0.042    0.034    0.004    0.088    0.010    0.000   -0.026    0.035    0.023   -0.024   -0.004    0.006    0.045    0.050   -0.030    0.025    0.173    0.024    1.000    0.186    0.194 |\n",
      "|  omega_s |    0.117    0.028   -0.088   -0.174    0.133    0.710    0.086   -0.031    0.104   -0.094   -0.123    0.124    0.125   -0.082   -0.169   -0.150    0.054    0.057    0.144    0.007    0.186    1.000   -0.303 |\n",
      "|    rho_s |   -0.258   -0.106    0.210    0.396   -0.294    0.020   -0.188    0.018   -0.235    0.216    0.276   -0.282   -0.278    0.184    0.397    0.353   -0.125   -0.122   -0.266   -0.008    0.194   -0.303    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2414076699657477}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03146536074400208}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.49694918030396407}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5413711883137897}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.2496601393634963}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.29216667105917393}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2731999859301095}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.43527380448334085}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18983027276132702}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1412300657815675}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.7763178082925606}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.04766362286934811}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.21333238776080587}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.373886038211776}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.015881046409125243}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03825904681796288}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18405753473380948}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.1110946306582159}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.0623234445680001}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.6201397120050078}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.3028715295991429}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.253973428490279}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.31336806293510205})])\n",
      "Step: 9/11\n",
      "Current Ctt: 1.4638501094227998\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1195 (1195 total)    |\n",
      "| EDM = 0.000801 (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: 297380.38763449667\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.50   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.500   |   0.027   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    1.0    |    0.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.26   |    0.47   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.68   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.6    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.05    |   0.20    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.39    |   0.23    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.31    |   0.38    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   0.82    |   0.21    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.60   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |    0.6    |    1.0    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.30    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.30    |   0.45    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.488   |   0.014   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -0.932   |   0.031   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.35    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.03   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.29   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   18.3    |    1.4    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   0.04    |   0.21    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    7.7    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.63    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.111    0.129    0.046    0.142    0.003   -0.056    0.064   -0.003   -0.118    0.153   -0.032   -0.031    0.239    0.056    0.001   -0.003    0.006    0.178    0.008   -0.010    0.023    0.001    0.004 |\n",
      "|   jpsi_p |    0.111    1.000    0.197    0.256    0.005   -0.033    0.229    0.146   -0.009   -0.125    0.228    0.028    0.063   -0.114    0.013    0.137    0.155   -0.083    0.282   -0.059    0.001   -0.098   -0.043    0.016 |\n",
      "|   Dbar_p |    0.129    0.197    1.000    0.867   -0.463   -0.043    0.712    0.267    0.023   -0.619    0.626    0.891   -0.230   -0.512    0.698    0.721    0.751   -0.294    0.393   -0.419    0.018   -0.094   -0.084    0.173 |\n",
      "| DDstar_s |    0.046    0.256    0.867    1.000   -0.541   -0.051    0.689    0.180    0.027   -0.680    0.681    0.885   -0.357   -0.586    0.743    0.861    0.895   -0.297    0.393   -0.427    0.018   -0.104   -0.101    0.211 |\n",
      "|  p4415_p |    0.142    0.005   -0.463   -0.541    1.000    0.033   -0.355   -0.024   -0.016    0.333   -0.318   -0.604    0.260    0.336   -0.401   -0.482   -0.507    0.032    0.048    0.303   -0.018    0.086    0.059   -0.111 |\n",
      "|  omega_p |    0.003   -0.033   -0.043   -0.051    0.033    1.000   -0.035   -0.005   -0.003    0.036   -0.036   -0.052    0.020    0.032   -0.039   -0.049   -0.044    0.012   -0.014    0.039    0.030    0.111    0.800    0.168 |\n",
      "|      Ctt |   -0.056    0.229    0.712    0.689   -0.355   -0.035    1.000    0.073    0.022   -0.343    0.383    0.680   -0.175   -0.290    0.581    0.567    0.587   -0.120    0.099    0.009    0.014   -0.059   -0.070    0.148 |\n",
      "|  p3770_s |    0.064    0.146    0.267    0.180   -0.024   -0.005    0.073    1.000    0.001   -0.032   -0.013    0.117   -0.210   -0.066    0.155    0.139    0.140   -0.050    0.155   -0.113   -0.007    0.005   -0.014    0.035 |\n",
      "|    phi_p |   -0.003   -0.009    0.023    0.027   -0.016   -0.003    0.022    0.001    1.000   -0.018    0.017    0.020   -0.013   -0.017    0.016    0.021    0.018   -0.005    0.008   -0.028    0.849   -0.075   -0.063   -0.034 |\n",
      "|  p4040_s |   -0.118   -0.125   -0.619   -0.680    0.333    0.036   -0.343   -0.032   -0.018    1.000   -0.499   -0.666    0.279    0.376   -0.497   -0.565   -0.590    0.312   -0.488    0.304   -0.015    0.082    0.068   -0.135 |\n",
      "|  p3770_p |    0.153    0.228    0.626    0.681   -0.318   -0.036    0.383   -0.013    0.017   -0.499    1.000    0.589   -0.227   -0.406    0.395    0.578    0.598   -0.249    0.402   -0.307    0.011   -0.073   -0.069    0.137 |\n",
      "| DDstar_p |   -0.032    0.028    0.891    0.885   -0.604   -0.052    0.680    0.117    0.020   -0.666    0.589    1.000   -0.429   -0.574    0.679    0.797    0.831   -0.283    0.224   -0.419    0.014   -0.106   -0.097    0.193 |\n",
      "|  psi2s_p |   -0.031    0.063   -0.230   -0.357    0.260    0.020   -0.175   -0.210   -0.013    0.279   -0.227   -0.429    1.000    0.195   -0.287   -0.342   -0.352    0.126   -0.046    0.095   -0.011    0.040    0.039   -0.085 |\n",
      "|  p4160_s |    0.239   -0.114   -0.512   -0.586    0.336    0.032   -0.290   -0.066   -0.017    0.376   -0.406   -0.574    0.195    1.000   -0.413   -0.482   -0.508    0.390   -0.275    0.303   -0.018    0.085    0.059   -0.112 |\n",
      "|   Dbar_s |    0.056    0.013    0.698    0.743   -0.401   -0.039    0.581    0.155    0.016   -0.497    0.395    0.679   -0.287   -0.413    1.000    0.582    0.610   -0.246    0.256   -0.352    0.015   -0.089   -0.071    0.138 |\n",
      "|  bplus_0 |    0.001    0.137    0.721    0.861   -0.482   -0.049    0.567    0.139    0.021   -0.565    0.578    0.797   -0.342   -0.482    0.582    1.000    0.660   -0.202    0.271   -0.454    0.008   -0.089   -0.101    0.226 |\n",
      "|  bplus_1 |   -0.003    0.155    0.751    0.895   -0.507   -0.044    0.587    0.140    0.018   -0.590    0.598    0.831   -0.352   -0.508    0.610    0.660    1.000   -0.208    0.278   -0.467    0.009   -0.073   -0.088    0.194 |\n",
      "|  p4415_s |    0.006   -0.083   -0.294   -0.297    0.032    0.012   -0.120   -0.050   -0.005    0.312   -0.249   -0.283    0.126    0.390   -0.246   -0.202   -0.208    1.000   -0.181    0.000    0.000    0.010    0.025   -0.057 |\n",
      "|  p4160_p |    0.178    0.282    0.393    0.393    0.048   -0.014    0.099    0.155    0.008   -0.488    0.402    0.224   -0.046   -0.275    0.256    0.271    0.278   -0.181    1.000   -0.119   -0.000   -0.016   -0.031    0.069 |\n",
      "|  bplus_2 |    0.008   -0.059   -0.419   -0.427    0.303    0.039    0.009   -0.113   -0.028    0.304   -0.307   -0.419    0.095    0.303   -0.352   -0.454   -0.467    0.000   -0.119    1.000   -0.060    0.225    0.055   -0.036 |\n",
      "|    phi_s |   -0.010    0.001    0.018    0.018   -0.018    0.030    0.014   -0.007    0.849   -0.015    0.011    0.014   -0.011   -0.018    0.015    0.008    0.009    0.000   -0.000   -0.060    1.000   -0.021   -0.012   -0.022 |\n",
      "|    rho_p |    0.023   -0.098   -0.094   -0.104    0.086    0.111   -0.059    0.005   -0.075    0.082   -0.073   -0.106    0.040    0.085   -0.089   -0.089   -0.073    0.010   -0.016    0.225   -0.021    1.000    0.251    0.292 |\n",
      "|  omega_s |    0.001   -0.043   -0.084   -0.101    0.059    0.800   -0.070   -0.014   -0.063    0.068   -0.069   -0.097    0.039    0.059   -0.071   -0.101   -0.088    0.025   -0.031    0.055   -0.012    0.251    1.000   -0.049 |\n",
      "|    rho_s |    0.004    0.016    0.173    0.211   -0.111    0.168    0.148    0.035   -0.034   -0.135    0.137    0.193   -0.085   -0.112    0.138    0.226    0.194   -0.057    0.069   -0.036   -0.022    0.292   -0.049    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.20006230792151491}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.026845447459209915}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.7172588686950649}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.46583291059805393}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.17875052400323654}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.38136777355300255}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.20225516707573665}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2256846626346518}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.37613582898212794}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.20566281355698296}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.14934513192689547}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.0126406562945722}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03343550831921416}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17664867666440354}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.44989620261875757}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.013936335796579158}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.030749783834763678}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.17980566476681048}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.09830011877338274}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.06211813277690448}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.3994676701738946}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.20669139922927293}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.378348595045951}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3053583202193819})])\n",
      "Step: 9/11\n",
      "Current Ctt: 1.4638501094227998\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |    Ncalls=1028 (1028 total)    |\n",
      "| EDM = 0.00528 (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: 297380.40225403453\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.50   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |  -1.500   |   0.028   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |    0.9    |    0.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.27   |    0.48   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.68   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |    0.6    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.38    |   0.23    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |    0.3    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.82    |   0.23    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.60   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |    0.4    |    1.0    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.30    |   0.20    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.12    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.487   |   0.016   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.93   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.35    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.02   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.30   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   18.4    |    1.4    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   0.03    |   0.21    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    7.8    |    1.5    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |   1.62    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.180    0.125    0.006    0.177    0.006    0.067   -0.003   -0.067    0.125   -0.082    0.023    0.260    0.023   -0.027   -0.034    0.032    0.175    0.077   -0.011    0.035    0.006   -0.001 |\n",
      "|   jpsi_p |    0.180    1.000    0.163    0.234    0.040   -0.034    0.195   -0.006   -0.144    0.235   -0.079    0.080   -0.126   -0.011    0.114    0.133   -0.110    0.383   -0.162    0.004   -0.101   -0.043    0.010 |\n",
      "|   Dbar_p |    0.125    0.163    1.000    0.824   -0.521   -0.049    0.274    0.022   -0.703    0.732    0.866   -0.300   -0.612    0.252    0.712    0.743   -0.312    0.460   -0.712    0.014   -0.096   -0.092    0.191 |\n",
      "| DDstar_s |    0.006    0.234    0.824    1.000   -0.618   -0.062    0.158    0.027   -0.767    0.792    0.846   -0.457   -0.694    0.287    0.882    0.917   -0.305    0.444   -0.723    0.014   -0.107   -0.117    0.245 |\n",
      "|  p4415_p |    0.177    0.040   -0.521   -0.618    1.000    0.044   -0.014   -0.018    0.442   -0.434   -0.679    0.360    0.447   -0.175   -0.555   -0.584    0.062    0.005    0.507   -0.017    0.097    0.077   -0.147 |\n",
      "|  omega_p |    0.006   -0.034   -0.049   -0.062    0.044    1.000   -0.005   -0.013    0.048   -0.049   -0.060    0.030    0.045   -0.018   -0.060   -0.054    0.014   -0.019    0.061    0.026    0.133    0.825    0.171 |\n",
      "|  p3770_s |    0.067    0.195    0.274    0.158   -0.014   -0.005    1.000    0.000   -0.029    0.025    0.088   -0.182   -0.063    0.064    0.129    0.128   -0.036    0.165   -0.114   -0.009    0.011   -0.014    0.038 |\n",
      "|    phi_p |   -0.003   -0.006    0.022    0.027   -0.018   -0.013    0.000    1.000   -0.021    0.021    0.017   -0.015   -0.021    0.006    0.021    0.018   -0.005    0.011   -0.042    0.851   -0.096   -0.070   -0.042 |\n",
      "|  p4040_s |   -0.067   -0.144   -0.703   -0.767    0.442    0.048   -0.029   -0.021    1.000   -0.625   -0.734    0.365    0.493   -0.224   -0.652   -0.680    0.319   -0.500    0.506   -0.014    0.089    0.089   -0.180 |\n",
      "|  p3770_p |    0.125    0.235    0.732    0.792   -0.434   -0.049    0.025    0.021   -0.625    1.000    0.665   -0.322   -0.538    0.190    0.677    0.702   -0.281    0.465   -0.560    0.010   -0.087   -0.091    0.184 |\n",
      "| DDstar_p |   -0.082   -0.079    0.866    0.846   -0.679   -0.060    0.088    0.017   -0.734    0.665    1.000   -0.526   -0.663    0.247    0.778    0.813   -0.288    0.228   -0.701    0.010   -0.110   -0.107    0.212 |\n",
      "|  psi2s_p |    0.023    0.080   -0.300   -0.457    0.360    0.030   -0.182   -0.015    0.365   -0.322   -0.526    1.000    0.292   -0.140   -0.428   -0.442    0.141   -0.052    0.246   -0.010    0.050    0.057   -0.122 |\n",
      "|  p4160_s |    0.260   -0.126   -0.612   -0.694    0.447    0.045   -0.063   -0.021    0.493   -0.538   -0.663    0.292    1.000   -0.196   -0.585   -0.614    0.398   -0.308    0.493   -0.018    0.096    0.081   -0.158 |\n",
      "|   Dbar_s |    0.023   -0.011    0.252    0.287   -0.175   -0.018    0.064    0.006   -0.224    0.190    0.247   -0.140   -0.196    1.000    0.229    0.241   -0.106    0.128   -0.237    0.005   -0.038   -0.031    0.061 |\n",
      "|  bplus_0 |   -0.027    0.114    0.712    0.882   -0.555   -0.060    0.129    0.021   -0.652    0.677    0.778   -0.428   -0.585    0.229    1.000    0.695   -0.217    0.324   -0.703    0.005   -0.097   -0.117    0.256 |\n",
      "|  bplus_1 |   -0.034    0.133    0.743    0.917   -0.584   -0.054    0.128    0.018   -0.680    0.702    0.813   -0.442   -0.614    0.241    0.695    1.000   -0.222    0.331   -0.723    0.007   -0.080   -0.103    0.225 |\n",
      "|  p4415_s |    0.032   -0.110   -0.312   -0.305    0.062    0.014   -0.036   -0.005    0.319   -0.281   -0.288    0.141    0.398   -0.106   -0.217   -0.222    1.000   -0.184    0.052    0.002    0.006    0.029   -0.071 |\n",
      "|  p4160_p |    0.175    0.383    0.460    0.444    0.005   -0.019    0.165    0.011   -0.500    0.465    0.228   -0.052   -0.308    0.128    0.324    0.331   -0.184    1.000   -0.180   -0.001   -0.015   -0.041    0.096 |\n",
      "|  bplus_2 |    0.077   -0.162   -0.712   -0.723    0.507    0.061   -0.114   -0.042    0.506   -0.560   -0.701    0.246    0.493   -0.237   -0.703   -0.723    0.052   -0.180    1.000   -0.061    0.232    0.098   -0.132 |\n",
      "|    phi_s |   -0.011    0.004    0.014    0.014   -0.017    0.026   -0.009    0.851   -0.014    0.010    0.010   -0.010   -0.018    0.005    0.005    0.007    0.002   -0.001   -0.061    1.000   -0.037   -0.014   -0.030 |\n",
      "|    rho_p |    0.035   -0.101   -0.096   -0.107    0.097    0.133    0.011   -0.096    0.089   -0.087   -0.110    0.050    0.096   -0.038   -0.097   -0.080    0.006   -0.015    0.232   -0.037    1.000    0.265    0.295 |\n",
      "|  omega_s |    0.006   -0.043   -0.092   -0.117    0.077    0.825   -0.014   -0.070    0.089   -0.091   -0.107    0.057    0.081   -0.031   -0.117   -0.103    0.029   -0.041    0.098   -0.014    0.265    1.000   -0.037 |\n",
      "|    rho_s |   -0.001    0.010    0.191    0.245   -0.147    0.171    0.038   -0.042   -0.180    0.184    0.212   -0.122   -0.158    0.061    0.256    0.225   -0.071    0.096   -0.132   -0.030    0.295   -0.037    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.20541895105272756}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.027893975516524616}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.6762433248391466}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.48088587136538186}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.19849669491611577}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.41144619894142576}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2305470556209026}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.37623146069422964}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.2335843871097344}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.17943304094640222}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.022839430411239}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03628426731243106}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.19922946675635478}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.11913330085392068}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.015778285665105196}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03589764893598546}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18225751843064142}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10416718215659104}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07404797638850402}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.42469198546919}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.21245943690871227}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.475819141456256}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3135102483163359})])\n",
      "Step: 9/11\n",
      "Current Ctt: 1.4638501094227998\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1216 (1216 total)    |\n",
      "| EDM = 5.95E-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: 297456.0322010645\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.29   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.47   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.6    |    2.8    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.33   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.20   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.31    |   0.28    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.49    |   0.16    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.95    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.52    |   0.25    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.09    |   0.16    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.92   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -1.0    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.35    |   0.16    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.11    |   0.48    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.544   |   0.009   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |  -1.047   |   0.018   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.34    |   0.17    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.01   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.14   |    0.07   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.3    |    1.1    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.38   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |    6.3    |    1.1    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |   1.60    |   0.26    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.444    0.427    0.298    0.156    0.009    0.017    0.188    0.001   -0.261    0.487    0.276    0.288    0.145   -0.456    0.102    0.094    0.009    0.425   -0.001   -0.020    0.062    0.008   -0.003 |\n",
      "|   jpsi_p |    0.444    1.000    0.769    0.563    0.037    0.002    0.377    0.396    0.012   -0.231    0.731    0.519    0.599   -0.184   -0.744    0.168    0.180   -0.012    0.467   -0.006   -0.004    0.024   -0.006    0.016 |\n",
      "|   Dbar_p |    0.427    0.769    1.000    0.902   -0.131    0.012    0.358    0.399    0.010   -0.319    0.881    0.850    0.662   -0.247   -0.957    0.265    0.264    0.036    0.360    0.001   -0.022    0.100    0.008    0.010 |\n",
      "| DDstar_s |    0.298    0.563    0.902    1.000   -0.257    0.008    0.370    0.309    0.005   -0.346    0.765    0.836    0.513   -0.268   -0.923    0.255    0.259    0.031    0.173   -0.010   -0.020    0.085    0.005    0.014 |\n",
      "|  p4415_p |    0.156    0.037   -0.131   -0.257    1.000    0.004   -0.047    0.016   -0.006   -0.055   -0.038   -0.170   -0.026   -0.052    0.114   -0.063   -0.077   -0.148    0.302    0.117   -0.014    0.026    0.006   -0.012 |\n",
      "|  omega_p |    0.009    0.002    0.012    0.008    0.004    1.000    0.005    0.008    0.003   -0.002    0.011    0.013    0.009   -0.001   -0.013   -0.008    0.008   -0.003    0.009    0.018    0.024   -0.032    0.615    0.026 |\n",
      "|      Ctt |    0.017    0.377    0.358    0.370   -0.047    0.005    1.000    0.125    0.006    0.112    0.272    0.291    0.363    0.106   -0.419    0.053    0.038    0.185   -0.055    0.472   -0.012    0.070    0.004   -0.002 |\n",
      "|  p3770_s |    0.188    0.396    0.399    0.309    0.016    0.008    0.125    1.000   -0.000   -0.028    0.276    0.294    0.179   -0.067   -0.429    0.129    0.123    0.023    0.219   -0.029   -0.021    0.063    0.006   -0.000 |\n",
      "|    phi_p |    0.001    0.012    0.010    0.005   -0.006    0.003    0.006   -0.000    1.000   -0.007    0.010    0.002    0.006   -0.009   -0.010   -0.002   -0.010    0.002    0.004   -0.044    0.744   -0.156   -0.071    0.029 |\n",
      "|  p4040_s |   -0.261   -0.231   -0.319   -0.346   -0.055   -0.002    0.112   -0.028   -0.007    1.000   -0.304   -0.231   -0.201    0.128    0.317   -0.050   -0.052    0.136   -0.421    0.034   -0.004   -0.006   -0.001   -0.003 |\n",
      "|  p3770_p |    0.487    0.731    0.881    0.765   -0.038    0.011    0.272    0.276    0.010   -0.304    1.000    0.668    0.598   -0.229   -0.867    0.256    0.252   -0.013    0.455   -0.028   -0.019    0.086    0.006    0.010 |\n",
      "| DDstar_p |    0.276    0.519    0.850    0.836   -0.170    0.013    0.291    0.294    0.002   -0.231    0.668    1.000    0.520   -0.178   -0.829    0.063    0.044    0.072    0.150    0.028   -0.021    0.074    0.015   -0.014 |\n",
      "|  psi2s_p |    0.288    0.599    0.662    0.513   -0.026    0.009    0.363    0.179    0.006   -0.201    0.598    0.520    1.000   -0.188   -0.674    0.161    0.163    0.019    0.328   -0.056   -0.016    0.063    0.006    0.005 |\n",
      "|  p4160_s |    0.145   -0.184   -0.247   -0.268   -0.052   -0.001    0.106   -0.067   -0.009    0.128   -0.229   -0.178   -0.188    1.000    0.241   -0.014   -0.020    0.267   -0.180    0.072   -0.011    0.014    0.000   -0.003 |\n",
      "|   Dbar_s |   -0.456   -0.744   -0.957   -0.923    0.114   -0.013   -0.419   -0.429   -0.010    0.317   -0.867   -0.829   -0.674    0.241    1.000   -0.228   -0.224   -0.021   -0.377    0.022    0.019   -0.091   -0.010   -0.006 |\n",
      "|  bplus_0 |    0.102    0.168    0.265    0.255   -0.063   -0.008    0.053    0.129   -0.002   -0.050    0.256    0.063    0.161   -0.014   -0.228    1.000   -0.321    0.107    0.069   -0.169   -0.020    0.065   -0.024    0.089 |\n",
      "|  bplus_1 |    0.094    0.180    0.264    0.259   -0.077    0.008    0.038    0.123   -0.010   -0.052    0.252    0.044    0.163   -0.020   -0.224   -0.321    1.000    0.119    0.060   -0.221   -0.020    0.070    0.011    0.002 |\n",
      "|  p4415_s |    0.009   -0.012    0.036    0.031   -0.148   -0.003    0.185    0.023    0.002    0.136   -0.013    0.072    0.019    0.267   -0.021    0.107    0.119    1.000   -0.040   -0.109    0.002   -0.002   -0.005    0.013 |\n",
      "|  p4160_p |    0.425    0.467    0.360    0.173    0.302    0.009   -0.055    0.219    0.004   -0.421    0.455    0.150    0.328   -0.180   -0.377    0.069    0.060   -0.040    1.000    0.014   -0.015    0.051    0.007   -0.005 |\n",
      "|  bplus_2 |   -0.001   -0.006    0.001   -0.010    0.117    0.018    0.472   -0.029   -0.044    0.034   -0.028    0.028   -0.056    0.072    0.022   -0.169   -0.221   -0.109    0.014    1.000   -0.090    0.227    0.030   -0.035 |\n",
      "|    phi_s |   -0.020   -0.004   -0.022   -0.020   -0.014    0.024   -0.012   -0.021    0.744   -0.004   -0.019   -0.021   -0.016   -0.011    0.019   -0.020   -0.020    0.002   -0.015   -0.090    1.000   -0.096   -0.018   -0.004 |\n",
      "|    rho_p |    0.062    0.024    0.100    0.085    0.026   -0.032    0.070    0.063   -0.156   -0.006    0.086    0.074    0.063    0.014   -0.091    0.065    0.070   -0.002    0.051    0.227   -0.096    1.000    0.142    0.198 |\n",
      "|  omega_s |    0.008   -0.006    0.008    0.005    0.006    0.615    0.004    0.006   -0.071   -0.001    0.006    0.015    0.006    0.000   -0.010   -0.024    0.011   -0.005    0.007    0.030   -0.018    0.142    1.000   -0.286 |\n",
      "|    rho_s |   -0.003    0.016    0.010    0.014   -0.012    0.026   -0.002   -0.000    0.029   -0.003    0.010   -0.014    0.005   -0.003   -0.006    0.089    0.002    0.013   -0.005   -0.035   -0.004    0.198   -0.286    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.18330576482980598}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04286032517875604}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 2.8087960448864786}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.3258271694546498}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.1597803061743126}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2839161012809397}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.15715614754737128}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2558555093274615}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.25358206535076055}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.16132643560761567}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.19798845489802885}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.5239864616478789}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.042381269629536256}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.15559313952689302}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4754290464007058}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.00949348509911685}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.018445510174864843}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1732520985231396}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10593298777246662}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.06806458180161101}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.1127621182856853}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.21533830953090805}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.0725799196185335}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.2637765587897327})])\n",
      "Step: 9/11\n",
      "Current Ctt: 1.4638501094227998\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1036 (1036 total)    |\n",
      "| EDM = 2.45E-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: 297457.6423036284\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.29   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.47   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   0.11    |   0.60    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.40   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.27   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.31    |   0.33    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.92    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |    0.5    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   0.97    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.82   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |   -0.8    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.06    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.24    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.30    |   0.41    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.538   |   0.024   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -1.01   |    0.05   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.32    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -1.98   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.28   |    0.08   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   19.3    |    1.4    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.41   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    6.3    |    1.3    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |   1.60    |   0.29    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.364    0.352   -0.085    0.275    0.003    0.026   -0.015   -0.244    0.413   -0.150    0.087    0.324    0.190    0.045    0.047    0.029    0.375    0.113   -0.032    0.073    0.002    0.008 |\n",
      "|   jpsi_p |    0.364    1.000    0.607   -0.097    0.243   -0.015    0.223    0.013   -0.212    0.596   -0.286    0.364   -0.112    0.056    0.009    0.178   -0.065    0.530   -0.184    0.014   -0.043   -0.028    0.036 |\n",
      "|   Dbar_p |    0.352    0.607    1.000    0.242    0.234    0.011    0.215   -0.000   -0.113    0.616    0.315    0.507   -0.034    0.089    0.031   -0.061   -0.017    0.414    0.033   -0.015    0.037    0.012   -0.015 |\n",
      "| DDstar_s |   -0.085   -0.097    0.242    1.000   -0.143   -0.001   -0.045   -0.004   -0.033    0.030    0.247   -0.039   -0.041    0.051    0.002   -0.003    0.023   -0.141   -0.009   -0.003    0.002    0.000   -0.001 |\n",
      "|  p4415_p |    0.275    0.243    0.234   -0.143    1.000    0.005    0.060   -0.020   -0.265    0.272   -0.069    0.076   -0.155    0.123    0.032   -0.002   -0.216    0.433    0.171   -0.036    0.076    0.007    0.000 |\n",
      "|  omega_p |    0.003   -0.015    0.011   -0.001    0.005    1.000    0.002   -0.005   -0.000   -0.001    0.016    0.001    0.001    0.003   -0.046    0.031   -0.006    0.002    0.032    0.021   -0.016    0.696   -0.030 |\n",
      "|  p3770_s |    0.026    0.223    0.215   -0.045    0.060    0.002    1.000   -0.013    0.112   -0.032   -0.089   -0.110    0.035    0.138    0.042    0.068    0.052    0.090   -0.043   -0.024    0.050    0.000    0.010 |\n",
      "|    phi_p |   -0.015    0.013   -0.000   -0.004   -0.020   -0.005   -0.013    1.000   -0.006    0.001   -0.011    0.001   -0.015    0.008    0.013   -0.016    0.010   -0.010   -0.095    0.832   -0.217   -0.095    0.044 |\n",
      "|  p4040_s |   -0.244   -0.212   -0.113   -0.033   -0.265   -0.000    0.112   -0.006    1.000   -0.176    0.136   -0.112   -0.002   -0.073   -0.000    0.025    0.174   -0.497   -0.186   -0.004   -0.008    0.001    0.000 |\n",
      "|  p3770_p |    0.413    0.596    0.616    0.030    0.272   -0.001   -0.032    0.001   -0.176    1.000   -0.233    0.334   -0.043    0.071    0.073    0.132   -0.045    0.527   -0.058   -0.013    0.048   -0.008    0.027 |\n",
      "| DDstar_p |   -0.150   -0.286    0.315    0.247   -0.069    0.016   -0.089   -0.011    0.136   -0.233    1.000    0.005    0.056   -0.047   -0.077   -0.457   -0.018   -0.301    0.363   -0.009   -0.033    0.032   -0.086 |\n",
      "|  psi2s_p |    0.087    0.364    0.507   -0.039    0.076    0.001   -0.110    0.001   -0.112    0.334    0.005    1.000   -0.125    0.121    0.009    0.082    0.003    0.239   -0.208   -0.004    0.001   -0.003    0.009 |\n",
      "|  p4160_s |    0.324   -0.112   -0.034   -0.041   -0.155    0.001    0.035   -0.015   -0.002   -0.043    0.056   -0.125    1.000   -0.025    0.029    0.042    0.322   -0.135   -0.090   -0.020    0.034    0.002    0.006 |\n",
      "|   Dbar_s |    0.190    0.056    0.089    0.051    0.123    0.003    0.138    0.008   -0.073    0.071   -0.047    0.121   -0.025    1.000   -0.017   -0.050   -0.083    0.195   -0.115    0.012   -0.034    0.003   -0.012 |\n",
      "|  bplus_0 |    0.045    0.009    0.031    0.002    0.032   -0.046    0.042    0.013   -0.000    0.073   -0.077    0.009    0.029   -0.017    1.000   -0.778    0.017    0.051   -0.084   -0.005    0.022   -0.090    0.202 |\n",
      "|  bplus_1 |    0.047    0.178   -0.061   -0.003   -0.002    0.031    0.068   -0.016    0.025    0.132   -0.457    0.082    0.042   -0.050   -0.778    1.000    0.151    0.080   -0.302   -0.005    0.031    0.059   -0.105 |\n",
      "|  p4415_s |    0.029   -0.065   -0.017    0.023   -0.216   -0.006    0.052    0.010    0.174   -0.045   -0.018    0.003    0.322   -0.083    0.017    0.151    1.000   -0.070   -0.374    0.016   -0.033   -0.011    0.023 |\n",
      "|  p4160_p |    0.375    0.530    0.414   -0.141    0.433    0.002    0.090   -0.010   -0.497    0.527   -0.301    0.239   -0.135    0.195    0.051    0.080   -0.070    1.000    0.131   -0.027    0.074   -0.002    0.017 |\n",
      "|  bplus_2 |    0.113   -0.184    0.033   -0.009    0.171    0.032   -0.043   -0.095   -0.186   -0.058    0.363   -0.208   -0.090   -0.115   -0.084   -0.302   -0.374    0.131    1.000   -0.133    0.250    0.062   -0.078 |\n",
      "|    phi_s |   -0.032    0.014   -0.015   -0.003   -0.036    0.021   -0.024    0.832   -0.004   -0.013   -0.009   -0.004   -0.020    0.012   -0.005   -0.005    0.016   -0.027   -0.133    1.000   -0.167   -0.042    0.009 |\n",
      "|    rho_p |    0.073   -0.043    0.037    0.002    0.076   -0.016    0.050   -0.217   -0.008    0.048   -0.033    0.001    0.034   -0.034    0.022    0.031   -0.033    0.074    0.250   -0.167    1.000    0.143    0.197 |\n",
      "|  omega_s |    0.002   -0.028    0.012    0.000    0.007    0.696    0.000   -0.095    0.001   -0.008    0.032   -0.003    0.002    0.003   -0.090    0.059   -0.011   -0.002    0.062   -0.042    0.143    1.000   -0.335 |\n",
      "|    rho_s |    0.008    0.036   -0.015   -0.001    0.000   -0.030    0.010    0.044    0.000    0.027   -0.086    0.009    0.006   -0.012    0.202   -0.105    0.023    0.017   -0.078    0.009    0.197   -0.335    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.20783705782462825}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03914885006621249}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.5968894194436953}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.40191882888843516}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.17205180448512203}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3344058812521564}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2581099892648362}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.32490173870384575}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1694407030888253}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.14549783902451585}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.5773062577403518}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.037776228222930364}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16515957083991317}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4080290031732443}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.024298156830146134}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.0516886347436164}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19498630445327036}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.12333552949244364}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07596024028647197}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.4157518710444368}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.24039228513019273}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.2787331950604233}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.29250329774243766})])\n",
      "Step: 10/11\n",
      "Current Ctt: 1.5430334996209192\n",
      "Ctt floating: True\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |    Ncalls=1136 (1136 total)    |\n",
      "| EDM = 0.000568 (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: 297275.01375575917\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.76   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.53   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   -0.10   |    0.80   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.30   |    0.40   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.46   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.63    |   0.19    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | Ctt      |   0.15    |   0.21    |            |            |  -2.5   |   2.5   |       |\n",
      "| 7 | p3770_s  |   2.48    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 8 | phi_p    |   0.20    |   0.53    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | p4040_s  |   1.24    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 10| p3770_p  |   -2.99   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| DDstar_p |   -0.17   |    0.70   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| psi2s_p  |   2.07    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 13| p4160_s  |   2.06    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 14| Dbar_s   |   0.30    |   0.07    |            |            |  -0.3   |   0.3   |       |\n",
      "| 15| bplus_0  |   0.483   |   0.020   |            |            |   -2    |    2    |       |\n",
      "| 16| bplus_1  |   -0.92   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 17| p4415_s  |   1.13    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 18| p4160_p  |   -2.17   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 19| bplus_2  |   -0.31   |    0.09   |            |            |   -2    |    2    |       |\n",
      "| 20| phi_s    |   19.0    |    2.1    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 21| rho_p    |   -0.5    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| omega_s  |     9     |     4     |            |            | 4.19232 | 9.40768 |       |\n",
      "| 23| rho_s    |    0.8    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p      Ctt  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.393    0.165   -0.099    0.295    0.015   -0.208    0.069   -0.002   -0.293    0.407   -0.327    0.123    0.253   -0.034    0.041    0.097    0.019    0.404   -0.076   -0.011    0.041   -0.000    0.019 |\n",
      "|   jpsi_p |    0.393    1.000    0.491   -0.032    0.274    0.015    0.075    0.153   -0.017   -0.118    0.548   -0.205    0.434   -0.044   -0.025   -0.006    0.117   -0.043    0.473    0.020   -0.017   -0.023   -0.000    0.028 |\n",
      "|   Dbar_p |    0.165    0.491    1.000    0.150   -0.039    0.018   -0.042    0.001    0.006   -0.120    0.655    0.619    0.397   -0.101   -0.073    0.058    0.095    0.074    0.145   -0.001   -0.007    0.066   -0.000    0.021 |\n",
      "| DDstar_s |   -0.099   -0.032    0.150    1.000   -0.167    0.016   -0.028   -0.063   -0.003   -0.044    0.101    0.164   -0.072   -0.084   -0.031    0.018    0.213    0.047   -0.089   -0.123   -0.003    0.017   -0.000    0.038 |\n",
      "|  p4415_p |    0.295    0.274   -0.039   -0.167    1.000    0.010   -0.011    0.077   -0.004   -0.221    0.189   -0.378    0.090   -0.098   -0.016    0.027    0.021   -0.198    0.467    0.095   -0.014    0.057   -0.000    0.010 |\n",
      "|  omega_p |    0.015    0.015    0.018    0.016    0.010    1.000    0.006    0.007    0.152    0.003    0.020   -0.006    0.014    0.008    0.002    0.123   -0.095    0.008    0.012   -0.009    0.131   -0.018    0.062    0.594 |\n",
      "|      Ctt |   -0.208    0.075   -0.042   -0.028   -0.011    0.006    1.000   -0.107   -0.010    0.394   -0.245    0.051    0.044    0.302   -0.058    0.008   -0.142    0.178   -0.333    0.715   -0.028    0.130   -0.001   -0.001 |\n",
      "|  p3770_s |    0.069    0.153    0.001   -0.063    0.077    0.007   -0.107    1.000   -0.004    0.112   -0.093   -0.191   -0.122    0.031   -0.027    0.025    0.068    0.028    0.096   -0.086   -0.009    0.023   -0.000    0.010 |\n",
      "|    phi_p |   -0.002   -0.017    0.006   -0.003   -0.004    0.152   -0.010   -0.004    1.000   -0.003    0.004   -0.009   -0.001   -0.007   -0.001    0.001    0.002    0.002    0.002   -0.029    0.929   -0.015   -0.001    0.038 |\n",
      "|  p4040_s |   -0.293   -0.118   -0.120   -0.044   -0.221    0.003    0.394    0.112   -0.003    1.000   -0.218    0.025   -0.015    0.014    0.014    0.002    0.019    0.184   -0.490    0.086   -0.005    0.025   -0.000    0.006 |\n",
      "|  p3770_p |    0.407    0.548    0.655    0.101    0.189    0.020   -0.245   -0.093    0.004   -0.218    1.000    0.084    0.323   -0.105   -0.037    0.060    0.123   -0.047    0.452   -0.121   -0.004    0.031   -0.000    0.026 |\n",
      "| DDstar_p |   -0.327   -0.205    0.619    0.164   -0.378   -0.006    0.051   -0.191   -0.009    0.025    0.084    1.000   -0.070   -0.078   -0.067    0.018   -0.067    0.112   -0.426    0.089   -0.013    0.031   -0.000   -0.010 |\n",
      "|  psi2s_p |    0.123    0.434    0.397   -0.072    0.090    0.014    0.044   -0.122   -0.001   -0.015    0.323   -0.070    1.000   -0.086   -0.053    0.014    0.132    0.034    0.228   -0.094   -0.006    0.018   -0.000    0.021 |\n",
      "|  p4160_s |    0.253   -0.044   -0.101   -0.084   -0.098    0.008    0.302    0.031   -0.007    0.014   -0.105   -0.078   -0.086    1.000   -0.004    0.028    0.040    0.348   -0.178    0.105   -0.016    0.061   -0.001    0.013 |\n",
      "|   Dbar_s |   -0.034   -0.025   -0.073   -0.031   -0.016    0.002   -0.058   -0.027   -0.001    0.014   -0.037   -0.067   -0.053   -0.004    1.000    0.001    0.036    0.009   -0.020   -0.021   -0.001    0.001   -0.000    0.007 |\n",
      "|  bplus_0 |    0.041   -0.006    0.058    0.018    0.027    0.123    0.008    0.025    0.001    0.002    0.060    0.018    0.014    0.028    0.001    1.000   -0.880    0.009    0.029   -0.040   -0.013    0.037   -0.001    0.251 |\n",
      "|  bplus_1 |    0.097    0.117    0.095    0.213    0.021   -0.095   -0.142    0.068    0.002    0.019    0.123   -0.067    0.132    0.040    0.036   -0.880    1.000    0.134    0.062   -0.237    0.012   -0.012    0.001   -0.192 |\n",
      "|  p4415_s |    0.019   -0.043    0.074    0.047   -0.198    0.008    0.178    0.028    0.002    0.184   -0.047    0.112    0.034    0.348    0.009    0.009    0.134    1.000   -0.133   -0.150    0.004   -0.010    0.000    0.019 |\n",
      "|  p4160_p |    0.404    0.473    0.145   -0.089    0.467    0.012   -0.333    0.096    0.002   -0.490    0.452   -0.426    0.228   -0.178   -0.020    0.029    0.062   -0.133    1.000   -0.077   -0.004    0.018   -0.000    0.013 |\n",
      "|  bplus_2 |   -0.076    0.020   -0.001   -0.123    0.095   -0.009    0.715   -0.086   -0.029    0.086   -0.121    0.089   -0.094    0.105   -0.021   -0.040   -0.237   -0.150   -0.077    1.000   -0.067    0.274   -0.002   -0.042 |\n",
      "|    phi_s |   -0.011   -0.017   -0.007   -0.003   -0.014    0.131   -0.028   -0.009    0.929   -0.005   -0.004   -0.013   -0.006   -0.016   -0.001   -0.013    0.012    0.004   -0.004   -0.067    1.000   -0.005    0.001    0.020 |\n",
      "|    rho_p |    0.041   -0.023    0.066    0.017    0.057   -0.018    0.130    0.023   -0.015    0.025    0.031    0.031    0.018    0.061    0.001    0.037   -0.012   -0.010    0.018    0.274   -0.005    1.000    0.001    0.171 |\n",
      "|  omega_s |   -0.000   -0.000   -0.000   -0.000   -0.000    0.062   -0.001   -0.000   -0.001   -0.000   -0.000   -0.000   -0.000   -0.001   -0.000   -0.001    0.001    0.000   -0.000   -0.002    0.001    0.001    1.000   -0.004 |\n",
      "|    rho_s |    0.019    0.028    0.021    0.038    0.010    0.594   -0.001    0.010    0.038    0.006    0.026   -0.010    0.021    0.013    0.007    0.251   -0.192    0.019    0.013   -0.042    0.020    0.171   -0.004    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.17292263601722757}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04140506666249788}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.8049255640152935}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.3977951920129183}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.2085214200064296}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.19403012426989585}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.20938491869415543}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2566029862059618}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.5319953859875173}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.18228771679551448}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.16793717500411387}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.7005005273908056}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03837469115739811}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17383964114111372}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.07083950532041916}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.020036672404199818}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.040350358925426044}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.20102264104317275}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.14321309133832316}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08934045485315767}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 2.078704820669831}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.46544720556721275}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 3.5710782149569265}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.32393016672393987})])\n",
      "Step: 10/11\n",
      "Current Ctt: 1.5430334996209192\n",
      "Ctt floating: False\n",
      "Toy 1/1 - Fit -1/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.973E+05               |      Ncalls=82 (82 total)      |\n",
      "| EDM = 4.98E-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: 297277.40780522936\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | p4040_p  |   -2.76   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | jpsi_p   |   -1.54   |    0.03   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 2 | Dbar_p   |   0.03    |   0.58    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | DDstar_s |   -0.26   |    0.50   |            |            |  -0.3   |   0.3   |       |\n",
      "| 4 | p4415_p  |   -2.51   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | omega_p  |   0.29    |   0.22    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 6 | p3770_s  |   2.52    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 7 | phi_p    |   0.18    |   0.39    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 8 | p4040_s  |   1.18    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 9 | p3770_p  |   -2.96   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 10| DDstar_p |  -0.026   |   0.640   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| psi2s_p  |   2.07    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 12| p4160_s  |   2.00    |   0.20    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 13| Dbar_s   |   0.26    |   0.09    |            |            |  -0.3   |   0.3   |       |\n",
      "| 14| bplus_0  |   0.495   |   0.016   |            |            |   -2    |    2    |       |\n",
      "| 15| bplus_1  |   -0.94   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 16| p4415_s  |   1.07    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 17| p4160_p  |   -2.14   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 18| bplus_2  |   -0.37   |    0.08   |            |            |   -2    |    2    |       |\n",
      "| 19| phi_s    |   19.3    |    1.6    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 20| rho_p    |   -0.4    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 21| omega_s  |    6.9    |    1.0    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| rho_s    |   1.05    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |  p4040_p   jpsi_p   Dbar_p DDstar_s  p4415_p  omega_p  p3770_s    phi_p  p4040_s  p3770_p DDstar_p  psi2s_p  p4160_s   Dbar_s  bplus_0  bplus_1  p4415_s  p4160_p  bplus_2    phi_s    rho_p  omega_s    rho_s |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|  p4040_p |    1.000    0.322   -0.061   -0.414    0.422   -0.008    0.153    0.007    0.128   -0.029   -0.426    0.294    0.496    0.201   -0.313   -0.358    0.135    0.232    0.355   -0.001    0.025    0.039   -0.144 |\n",
      "|   jpsi_p |    0.322    1.000    0.210   -0.139    0.244   -0.008    0.194   -0.018    0.019    0.222   -0.417    0.303    0.054    0.145   -0.111   -0.108   -0.051    0.415    0.065   -0.006   -0.078   -0.005   -0.026 |\n",
      "|   Dbar_p |   -0.061    0.210    1.000    0.435   -0.289    0.016   -0.033    0.002   -0.345    0.603    0.611   -0.061   -0.335   -0.424    0.375    0.404   -0.089    0.095   -0.345   -0.008    0.040   -0.035    0.148 |\n",
      "| DDstar_s |   -0.414   -0.139    0.435    1.000   -0.662    0.029   -0.248   -0.013   -0.615    0.593    0.446   -0.597   -0.660   -0.730    0.812    0.896   -0.214   -0.062   -0.737   -0.020    0.039   -0.089    0.346 |\n",
      "|  p4415_p |    0.422    0.244   -0.289   -0.662    1.000   -0.016    0.212    0.010    0.296   -0.288   -0.493    0.430    0.386    0.448   -0.518   -0.580    0.030    0.338    0.536    0.006    0.008    0.061   -0.227 |\n",
      "|  omega_p |   -0.008   -0.008    0.016    0.029   -0.016    1.000   -0.005    0.075   -0.017    0.020    0.008   -0.015   -0.017   -0.018    0.032    0.025   -0.005    0.002   -0.018    0.074   -0.034    0.507    0.155 |\n",
      "|  p3770_s |    0.153    0.194   -0.033   -0.248    0.212   -0.005    1.000    0.003    0.260   -0.247   -0.229    0.062    0.200    0.077   -0.178   -0.206    0.079    0.078    0.179   -0.003    0.020    0.024   -0.086 |\n",
      "|    phi_p |    0.007   -0.018    0.002   -0.013    0.010    0.075    0.003    1.000    0.007   -0.005   -0.014    0.007    0.007    0.008   -0.008   -0.011    0.002    0.005    0.007    0.872    0.008   -0.022    0.018 |\n",
      "|  p4040_s |    0.128    0.019   -0.345   -0.615    0.296   -0.017    0.260    0.007    1.000   -0.407   -0.303    0.352    0.316    0.504   -0.459   -0.505    0.206   -0.247    0.333    0.012   -0.027    0.051   -0.199 |\n",
      "|  p3770_p |   -0.029    0.222    0.603    0.593   -0.288    0.020   -0.247   -0.005   -0.407    1.000    0.204   -0.237   -0.390   -0.461    0.502    0.540   -0.164    0.226   -0.402   -0.016    0.042   -0.053    0.205 |\n",
      "| DDstar_p |   -0.426   -0.417    0.611    0.446   -0.493    0.008   -0.229   -0.014   -0.303    0.204    1.000   -0.400   -0.347   -0.427    0.334    0.370   -0.051   -0.386   -0.342   -0.014    0.011   -0.038    0.143 |\n",
      "|  psi2s_p |    0.294    0.303   -0.061   -0.597    0.430   -0.015    0.062    0.007    0.352   -0.237   -0.400    1.000    0.331    0.362   -0.461   -0.505    0.111    0.195    0.337    0.010   -0.028    0.051   -0.198 |\n",
      "|  p4160_s |    0.496    0.054   -0.335   -0.660    0.386   -0.017    0.200    0.007    0.316   -0.390   -0.347    0.331    1.000    0.487   -0.491   -0.548    0.345   -0.019    0.425    0.007   -0.004    0.057   -0.217 |\n",
      "|   Dbar_s |    0.201    0.145   -0.424   -0.730    0.448   -0.018    0.077    0.008    0.504   -0.461   -0.427    0.362    0.487    1.000   -0.536   -0.597    0.206   -0.044    0.612    0.009   -0.002    0.060   -0.228 |\n",
      "|  bplus_0 |   -0.313   -0.111    0.375    0.812   -0.518    0.032   -0.178   -0.008   -0.459    0.502    0.334   -0.461   -0.491   -0.536    1.000    0.546   -0.109   -0.057   -0.669   -0.022    0.051   -0.088    0.347 |\n",
      "|  bplus_1 |   -0.358   -0.108    0.404    0.896   -0.580    0.025   -0.206   -0.011   -0.505    0.540    0.370   -0.505   -0.548   -0.597    0.546    1.000   -0.115   -0.076   -0.711   -0.019    0.056   -0.071    0.287 |\n",
      "|  p4415_s |    0.135   -0.051   -0.089   -0.214    0.030   -0.005    0.079    0.002    0.206   -0.164   -0.051    0.111    0.345    0.206   -0.109   -0.115    1.000   -0.037   -0.060    0.008   -0.034    0.011   -0.050 |\n",
      "|  p4160_p |    0.232    0.415    0.095   -0.062    0.338    0.002    0.078    0.005   -0.247    0.226   -0.386    0.195   -0.019   -0.044   -0.057   -0.076   -0.037    1.000    0.194   -0.005    0.038    0.010   -0.031 |\n",
      "|  bplus_2 |    0.355    0.065   -0.345   -0.737    0.536   -0.018    0.179    0.007    0.333   -0.402   -0.342    0.337    0.425    0.612   -0.669   -0.711   -0.060    0.194    1.000   -0.021    0.148    0.086   -0.287 |\n",
      "|    phi_s |   -0.001   -0.006   -0.008   -0.020    0.006    0.074   -0.003    0.872    0.012   -0.016   -0.014    0.010    0.007    0.009   -0.022   -0.019    0.008   -0.005   -0.021    1.000    0.027    0.008   -0.008 |\n",
      "|    rho_p |    0.025   -0.078    0.040    0.039    0.008   -0.034    0.020    0.008   -0.027    0.042    0.011   -0.028   -0.004   -0.002    0.051    0.056   -0.034    0.038    0.148    0.027    1.000    0.142    0.111 |\n",
      "|  omega_s |    0.039   -0.005   -0.035   -0.089    0.061    0.507    0.024   -0.022    0.051   -0.053   -0.038    0.051    0.057    0.060   -0.088   -0.071    0.011    0.010    0.086    0.008    0.142    1.000   -0.306 |\n",
      "|    rho_s |   -0.144   -0.026    0.148    0.346   -0.227    0.155   -0.086    0.018   -0.199    0.205    0.143   -0.198   -0.217   -0.228    0.347    0.287   -0.050   -0.031   -0.287   -0.008    0.111   -0.306    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.17163247366575218}), (<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.0322966593674634}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.5762026311077086}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5044118668403514}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.2569739887007987}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2200526122140789}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.24851926956553827}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.3941810820202938}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.19420530052153623}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.15134406112282184}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.6395490902505365}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.042158680133700166}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.20149802744713308}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.09010418570550338}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.016153038164091305}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.04080269131279546}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.18709105587293023}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.11526026041847004}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08096324575283409}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.5508629864386716}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.33493509677477684}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.0149838379011404}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.30767042918188275})])\n"
     ]
    }
   ],
   "source": [
    "# zfit.run.numeric_checks = False   \n",
    "\n",
    "load = False\n",
    "\n",
    "bo = True\n",
    "\n",
    "bo_set = 1\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 = 1\n",
    "nevents = int(pdg[\"number_of_decays\"]*cut_BR)\n",
    "# nevents = pdg[\"number_of_decays\"]\n",
    "event_stack = 1000000\n",
    "# nevents *= 41\n",
    "# zfit.settings.set_verbosity(10)\n",
    "\n",
    "mi = 0.0\n",
    "ma = 1e-2\n",
    "ste = 11\n",
    "\n",
    "# mi = 0.0\n",
    "# ma = 1e-3\n",
    "# ste = 11\n",
    "\n",
    "BR_steps = np.linspace(mi, ma, ste)\n",
    "\n",
    "Ctt_steps = np.sqrt(BR_steps/4.2*1000)\n",
    "\n",
    "print(Ctt_steps)\n",
    "\n",
    "total_samp = []\n",
    "\n",
    "start = time.time()\n",
    "\n",
    "Nll_list = []\n",
    "\n",
    "sampler = total_f.create_sampler(n=nevents)\n",
    "sampler.set_data_range(obs_fit)\n",
    "\n",
    "__ = -1\n",
    "\n",
    "#-----------------------------------------------------\n",
    "\n",
    "if not load:\n",
    "    for Ctt_step in Ctt_steps:\n",
    "        __ += 1\n",
    "        \n",
    "        while (len(Nll_list)-2*__)/bo_set < 2*nr_of_toys:\n",
    "            newset = True\n",
    "        \n",
    "            while newset:\n",
    "                \n",
    "                for floaty in [True, False]:\n",
    "                    Ctt.floating = floaty\n",
    "\n",
    "                    print('Step: {0}/{1}'.format(int(__), ste))\n",
    "                    print('Current Ctt: {0}'.format(Ctt_step))\n",
    "                    print('Ctt floating: {0}'.format(floaty))\n",
    "                    \n",
    "                    reset_param_values(variation = 0.0)\n",
    "                    \n",
    "                    if floaty:\n",
    "                        toy_nr = int((len(Nll_list)-2*__*nr_of_toys*bo_set)/bo_set)\n",
    "                        fit_nr = int((len(Nll_list)-2*__*nr_of_toys*bo_set)%bo_set)\n",
    "                        print('Toy {0}/{1} - Fit {2}/{3}'.format(toy_nr, nr_of_toys, fit_nr, bo_set))\n",
    "                        Ctt.set_value(Ctt_step)\n",
    "                        \n",
    "                    else:\n",
    "                        Ctt.set_value(0.0)\n",
    "                        toy_nr = int((len(Nll_list)-2.5*__*nr_of_toys*bo_set)/bo_set)\n",
    "                        fit_nr = int((len(Nll_list)-2.5*__*nr_of_toys*bo_set)%bo_set)\n",
    "                        print('Toy {0}/{1} - Fit {2}/{3}'.format(toy_nr, nr_of_toys, fit_nr, bo_set))\n",
    "                        \n",
    "                    if newset:\n",
    "                        sampler.resample(n=nevents)\n",
    "                        data = sampler\n",
    "                        calls = 0\n",
    "                        c = 1\n",
    "                        newset = False\n",
    "\n",
    "                    ### Fit data\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",
    "                        save_pulls()\n",
    "                        \n",
    "                        if floaty:\n",
    "                            Nll_list.append(result.fmin)\n",
    "                            Ctt_list.append(params[Ctt]['value'])\n",
    "                            Ctt_error_list.append(params[Ctt]['minuit_hesse']['error'])\n",
    "                            \n",
    "                        else:\n",
    "                            Nll_list.append(result.fmin)\n",
    "                            Ctt_list.append(0.0)\n",
    "                            Ctt_error_list.append(0.0)\n",
    "                            newset = False\n",
    "\n",
    "                    else:\n",
    "                        if floaty:\n",
    "                            newset = True\n",
    "                            break\n",
    "\n",
    "                        else:\n",
    "                            del Nll_list[-1]\n",
    "                            del Ctt_list[-1]\n",
    "                            del Ctt_error_list[-1]\n",
    "                            for param in total_f_fit.get_dependents():\n",
    "                                if param.floating:\n",
    "                                    del pull_dic[param.name][-1]\n",
    "                            newset = True\n",
    "                            break\n",
    "\n",
    "        print('Time taken: {}'.format(display_time(int(time.time()-start))))\n",
    "        print('Estimated time left: {}'.format(display_time(int((time.time()-start)/(__+1)*(nr_of_toys-__-1)))))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "if load:\n",
    "    Nll_list = []\n",
    "    CLs_values = []\n",
    "\n",
    "    _dir = 'data/CLs/finished/f1d1'\n",
    "    \n",
    "    jobs = os.listdir(_dir)\n",
    "    \n",
    "    for s in range(ste):\n",
    "        CLs_values.append([])\n",
    "        \n",
    "    for s in range(2*ste):\n",
    "        Nll_list.append([])\n",
    "    \n",
    "    for job in jobs:\n",
    "        if not os.path.exists(\"{}/{}/data/CLs/{}-{}_{}s--CLs_Nll_list.pkl\".format(_dir, job, mi,ma,ste)):\n",
    "            print(job)\n",
    "            continue\n",
    "        \n",
    "        with open(r\"{}/{}/data/CLs/{}-{}_{}s--CLs_Nll_list.pkl\".format(_dir, job, mi,ma,ste), \"rb\") as input_file:\n",
    "            _Nll_list = pkl.load(input_file)\n",
    "        \n",
    "#         print(_Nll_list)\n",
    "        \n",
    "        if bo:     \n",
    "            for s in range(2*ste):\n",
    "                if _Nll_list[s]: \n",
    "                    Nll_list[s].append(np.min(_Nll_list[s]))\n",
    "                    print(np.min(_Nll_list[s]))\n",
    "                else:\n",
    "                    print('empty in {}'.format(s))\n",
    "        else:\n",
    "            for s in range(2*ste):\n",
    "                Nll_list[s].extend(_Nll_list[s])\n",
    "        \n",
    "#         with open(r\"{}/{}/data/CLs/{}-{}_{}s--CLs_list.pkl\".format(_dir, job, mi,ma,ste), \"rb\") as input_file:\n",
    "#             _CLs_values = pkl.load(input_file)\n",
    "        \n",
    "#         for s in range(ste):\n",
    "#             CLs_values[s].extend(_CLs_values[s])\n",
    "            \n",
    "        print(np.shape(Nll_list))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[-0.47378465137444437], [-0.407154610438738], [-1.253133681777399], [-1.5649896193062887], [-2.286860732943751], [-2.0282224995316938], [-7.059898370062001], [-2.950425385730341], [-0.6581233172910288], [-1.6101025638636202], [-2.394049470196478]]\n"
     ]
    }
   ],
   "source": [
    "dirName = 'data/CLs'\n",
    "\n",
    "# if bo and not load:\n",
    "#     for s in range(2*ste):\n",
    "#         Nll_list[s] = [np.min(Nll_list[s])]\n",
    "\n",
    "if bo and load: \n",
    "    CLs_values= []\n",
    "    for i in range(int(len(Nll_list)/2)):\n",
    "        CLs_values.append([])\n",
    "        for j in range(len(Nll_list[2*i])):\n",
    "            CLs_values[i].append(Nll_list[2*i][j]-Nll_list[2*i+1][j])\n",
    "\n",
    "\n",
    "if not load:\n",
    "        \n",
    "    if not os.path.exists(dirName):\n",
    "        os.mkdir(dirName)\n",
    "        print(\"Directory \" , dirName ,  \" Created \")\n",
    "\n",
    "    with open(\"{}/{}-{}_{}s{}b{}t--CLs_Nll_list.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys), \"wb\") as f:\n",
    "        pkl.dump(Nll_list, f, pkl.HIGHEST_PROTOCOL)\n",
    "    \n",
    "    with open(\"{}/{}-{}_{}s{}b{}t--Ctt_list.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys), \"wb\") as f:\n",
    "        pkl.dump(Ctt_list, f, pkl.HIGHEST_PROTOCOL)\n",
    "    \n",
    "    with open(\"{}/{}-{}_{}s{}b{}t--Ctt_error_list.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys), \"wb\") as f:\n",
    "        pkl.dump(Ctt_error_list, f, pkl.HIGHEST_PROTOCOL)\n",
    " \n",
    "    with open(\"{}/{}-{}_{}s{}b{}t--pull_dic.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys), \"wb\") as f:\n",
    "        pkl.dump(pull_dic, f, pkl.HIGHEST_PROTOCOL)\n",
    "        \n",
    "    variab = {'mi': mi,\n",
    "             'ma': ma,\n",
    "             'ste': ste,\n",
    "             'bo_set': bo_set,\n",
    "             'nr_of_toys': nr_of_toys}\n",
    "    \n",
    "    with open(\"{}/variab.pkl\".format(dirName), \"wb\") as f:\n",
    "        pkl.dump(variab, f, pkl.HIGHEST_PROTOCOL)\n",
    "    \n",
    "    CLs_values = []\n",
    "    \n",
    "    toy_size = bo_set\n",
    "\n",
    "#     print(Nll_list)\n",
    "    \n",
    "    for step in range(ste):\n",
    "        CLs_values.append([])\n",
    "        step_start = step*nr_of_toys*bo_set*2\n",
    "        step_start1 = (step+1)*nr_of_toys*bo_set*2\n",
    "        for toy in range(nr_of_toys):\n",
    "            toy_start = toy*bo_set*2\n",
    "            toy_start1 = (toy+1)*bo_set*2\n",
    "            float_min = np.min(Nll_list[step_start+toy_start: step_start1+toy_start1:2][:nr_of_toys])\n",
    "            fix_min = np.min(Nll_list[step_start+toy_start+1: step_start1+toy_start1+1:2][:nr_of_toys])\n",
    "            CLs_values[step].append(float_min-fix_min)\n",
    "        \n",
    "    \n",
    "    print(CLs_values)\n",
    "    \n",
    "    with open(\"{}/{}-{}_{}s--CLs_list.pkl\".format(dirName, mi,ma,ste), \"wb\") as f:\n",
    "        pkl.dump(CLs_values, f, pkl.HIGHEST_PROTOCOL)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "# # print(CLs_values)\n",
    "# for Nll_l in Nll_list:\n",
    "#     if Nll_l:\n",
    "#         print(np.min(Nll_l))\n",
    "#         print(Nll_l)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAeLElEQVR4nO3df5RVdb3/8ec7fhfkL7hWDDakmKLomANMKyDCX6iI5oIENEEFvi6lC9hyiXIXKtcfmBWQYX0JDewCo5LmYIrdRBNUcKA7/A5ExRgJVCSuqIDk+/5xPoPD/GAO7DPz4Zx5PdZiNWfvz+zz2mCv2bPP3p9t7o6IiGS/L8QOICIimaFCFxHJESp0EZEcoUIXEckRKnQRkRyhQhcRyREqdGmUzOwOM/uv2DlEMkmFLg3GzIaY2TIz22Vm/zCzZ82sR1hXrWDN7EUzGx4nbWaYWXMzm2dmm8zMzax3HeNfNLPd4e9ol5mtr2Xcb8P2TqqX4JKVVOjSIMzsJmAKcA9wPHAC8CBwacxcDWQxcBWwNc3xo9y9dfjzzaorww/BEzMZUHKDCl3qnZkdBUwEbnT3J9z9I3f/1N3nu/vNZtYXuA24IhyVrjCzu4GewC/Dsl/WsN0FZjaqyrIVZnZ5+HqqmW02s/81s+Vm1rOWfL3NrLzKsk1mdm74+gtmNs7M3jCz7Wb2mJkdm86+u/ted5/i7ouBf6XzPQdjZk2BB4BRdY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YWVPgKEC33YmINKB0Cr0U6GRmHc2sOTAIKKkypgSoeGT6AGChu1c7QhcRkfpT5ymXcE58FPAc0AR42N3XmNlEYJm7lwAPAb8zs42kjswH1WfoyLL6lNFhamz73Nj2F7TPOcF0IC0ikht0p6iISI5QoYuI5AgVehrM7H4z+5uZrTSzJ83s6Errbg1THqw3swti5swkMxtoZmvM7DMzK6yyLif3Geqe5iIXmNnDZvauma2utOxYM/tvM3s9/O8xMTNmmpl1MLMXzGxd+O96dFieU/utQk/PfwOnu/sZwAbgVoAwBcIg4DSgL/BgmCohF6wGLgdeqrwwl/c5zWkucsFMUv92lY0Dnnf3TsDz4XUu2Qf82N1PBYqAG8O/bU7ttwo9De7+J3ffF14uIXUtPqSmPCh29z3u/hawkdRUCVnP3de5e0138ubsPpPeNBdZz91fovp9IpWn75gFXNagoeqZu//D3f8avv4QWEfqDvec2m8V+qG7Fng2fF3TtAjtGzxRw8rlfc7lfavL8e7+D0iVH/BvkfPUmzAb7FnAUnJsv9O59b9RMLM/A1+pYdV4d38qjBlP6le3ilmc0pry4EiVzj7X9G01LMuafa5DLu+bAGbWGvg9MMbd/zfX5hBUoQfufu7B1pvZUKAfcE6lu2DTmRbhiFXXPtciq/e5Drm8b3XZZmZfdfd/mNlXgXdjB8o0M2tGqsxnu/sTYXFO7bdOuaTBzPoCtwD93f3jSqtKgEHhAR8dgU7AazEyNqBc3ud0prnIVZWn7xgK1PYbWlYK03k/BKxz959XWpVT+607RdMQpjRoAWwPi5a4+/Vh3XhS59X3kfo17tmat5JdzOz7wANAO+CfQJm7XxDW5eQ+A5jZRcAUPp/m4u7IkTLOzOYCvUlNH7sNuB34A/AYcALwd2Cgu+fMBHtm1gNYBKwCPguLbyN1Hj1n9luFLiKSI3TKRUQkR6jQRURyhApdRCRHqNBFRHKECl1EJEeo0EVEcoQKXUQkR/wfgd9qyJHbCzQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "l = []\n",
    "\n",
    "if not os.path.exists('data/CLs/plots'):\n",
    "    os.mkdir('data/CLs/plots')\n",
    "    print(\"Directory \" , 'data/CLs/plots' ,  \" Created \")\n",
    "\n",
    "for step in range(1,ste):\n",
    "    plt.clf()\n",
    "    plt.title('Ctt value: {:.2f}'.format(Ctt_steps[step]))\n",
    "    plt.hist(CLs_values[0], bins = 100, range = (-25, 25), label = 'Ctt fixed to 0')\n",
    "    plt.hist(CLs_values[step], bins = 100, range = (-25, 25), label = 'Ctt floating')\n",
    "    plt.axvline(x=np.mean(CLs_values[0]),color='red', linewidth=1.0, linestyle = 'dotted')\n",
    "    plt.legend()\n",
    "    plt.savefig('data/CLs/plots/CLs-BR({:.1E}).png'.format(BR_steps[step]))\n",
    "    \n",
    "    l.append(len(np.where(np.array(CLs_values[step]) < np.mean(CLs_values[0]))[0]))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "BR: 0.0000\n",
      "0.0\n",
      "\n",
      "BR: 0.0010\n",
      "2.0\n",
      "\n",
      "BR: 0.0020\n",
      "2.0\n",
      "\n",
      "BR: 0.0030\n",
      "2.0\n",
      "\n",
      "BR: 0.0040\n",
      "2.0\n",
      "\n",
      "BR: 0.0050\n",
      "2.0\n",
      "\n",
      "BR: 0.0060\n",
      "2.0\n",
      "\n",
      "BR: 0.0070\n",
      "2.0\n",
      "\n",
      "BR: 0.0080\n",
      "2.0\n",
      "\n",
      "BR: 0.0090\n",
      "2.0\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# for s in range(len(l)):\n",
    "#     print('BR: {:.4f}'.format(BR_steps[s]))\n",
    "#     print(2*l[s]/len(CLs_values[s]))\n",
    "#     print()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [],
   "source": [
    "# for i in range(len(Nll_list)):\n",
    "#     print(np.mean(np.array(Nll_list[i])))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-2.7631033913526744\n",
      "-1.5375416477854982\n",
      "0.034148287413779954\n",
      "-0.26446933046547777\n",
      "-2.5119898148738833\n",
      "0.29288635409648656\n",
      "2.5194494719737506\n",
      "0.18338408685286733\n",
      "1.1820129533485564\n",
      "-2.960493359604472\n",
      "-0.025902955744452782\n",
      "2.073569264340094\n",
      "1.998716148235733\n",
      "0.2592958764681583\n",
      "0.4945267599330436\n",
      "-0.9401917602399106\n",
      "1.065039693319634\n",
      "-2.1389789108890653\n",
      "-0.36912034751275713\n",
      "19.25970024750627\n",
      "-0.44560242368819214\n",
      "6.91419527265671\n",
      "1.0470111758739422\n"
     ]
    }
   ],
   "source": [
    "# for param in total_f_fit.get_dependents():\n",
    "#     if param.floating:\n",
    "#         print(params[param]['value'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1 h, 36 min\n"
     ]
    }
   ],
   "source": [
    "print(display_time(int(time.time()-start)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "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
}