Newer
Older
Master_thesis / .ipynb_checkpoints / raremodel-nb-checkpoint.ipynb
@Sascha Liechti Sascha Liechti on 1 Oct 2019 431 KB ...
{
 "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_const1 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(0.0)\n",
    "\n",
    "Dbar_s.set_value(0.3)\n",
    "\n",
    "DDstar_s.set_value(0.3)\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": "iVBORw0KGgoAAAANSUhEUgAA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P/lJAHw+H+eccw5z587lySefHND3P//zP3nzzTcBM5DjlltuoaKigqqqKhYtWsQLL7wAwE9+8pPIPW1tbdx///1Dslafz8dll11GeXk5ixcvpra2Nma/F198kVNOOYXy8nJ++tOfRtpXrVrFrl27hmQtisFjWOHegoGWkq6PjoACQ/a1lMLuu6By341qlCiNUT7++GMCgQDr16/nsssu63OtpaWF9957j9NPPx2A73//+9TX17N582Y2b97Mc889R2dnJzB8ovTII4+Qn59PTU0N3/jGN7j55psH9AmFQtxwww288MILbN26lSeeeIKtW7cCcP3113PHHXcMyVoUgydkJLCULDdZugMKDMt9F9736hVLI21rUiQnJVESQlwghNghhKgRQtwS47pTCPGkdf19IURZ1LVvW+07hBDnJxtTCDHNGmOXNaYj0RxCiAIhxGtCiC4hxL1x1v+sEGJzan+S0UdtbS2VlZVcddVVVFdXs3LlSrq7uwHTkqisrGTZsmX8+c9/BqChoYErr7yS9evXM3fuXHbv3t1nvKeffpoLLrgAgO7ubh566CF+9atf4XQ6ARg/fjyf//znueWWW+jp6WHu3LlcccUV3HLLLezevZu5c+fyrW9965g+0zPPPMNVV10FwMqVK3nllVfoXwV57dq1lJeXM336dBwOB6tWreKZZ54BYPny5bz88ssEgyqSKh0Eg5alFGNPyW4zv0fpzugQktb81pZeOPou3etSJCZpSLgwv3X3AecCdcAHQohnpZRbo7pdA7RKKcuFEKuA24HLhBAzgVXALGAi8LIQIpy9Md6YtwN3SylXCyEesMb+dbw5AC/wfaDK+td//Z8Bugb1V0nA/zy3ha2HOoZqOABmTszhh5+albDPjh07eOSRR1i6dClf+cpXuP/++7nxxhu59tprefXVVykvL49YRMXFxTz88MPceeedPP/88wPGevvtt1m5ciUANTU1TJkyhZycnAH9fvrTn3Lvvfeyfv16wBTHzZs3R973Z/ny5RELK5o777yTc845p0/bwYMHmTx5MgA2m43c3Fyam5spLCyM2QegtLSU999/HwBN0ygvL2fDhg0sWLAg/h9OMSyERUmLFeigjw5LKWSEgzH6uu9UoMPoJhVLaRFQI6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mEs3ssIB4B91s/NLbQvhuCd0uuAdeB5wkrvg/dgmgW8BYRZ6eHWepb1eZ9qZf3c6qNMYIa/9+0r9Ml4Lo++a3H9YO3zfusn7fPj4bX4fphphgzDMIyAYS7fGYZhGAHDBCXDMAwjYJigZBiGYQQME5QMwzCMgGGCkmEYhhEwTFAyDMMwAoYJSoZhGEbA+P8z9lQSUWvHZgAAAABJRU5ErkJggg==\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 (D-contribs = 0.3)')\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",
    "mi = 0.0\n",
    "ma = 1e-2\n",
    "ste = 11\n",
    "\n",
    "for param in total_f_fit.get_dependents():\n",
    "    if param.floating:\n",
    "        pull_dic[param.name] = []\n",
    "        for step in range(2*ste):\n",
    "            pull_dic[param.name].append([])\n",
    "            \n",
    "\n",
    "\n",
    "def save_pulls(step):\n",
    "    for param in total_f_fit.get_dependents():\n",
    "        if param.floating:\n",
    "            pull_dic[param.name][step].append((params[param]['value'] - param_values_dic[param.name])/params[param]['minuit_hesse']['error'])\n",
    "\n",
    "\n",
    "\n",
    "# for key in pull_dic.keys():\n",
    "#     print(np.shape(pull_dic[key]))\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.975E+05               |    Ncalls=1132 (1132 total)    |\n",
      "| EDM = 0.000572 (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: 297523.5053385047\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |  -1.494   |   0.027   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.05    |   0.18    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.00   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -3.02   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.48   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -0.875   |   0.022   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.22    |   0.19    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.26    |   0.09    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |    0.4    |    7.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |  -0.007   |   0.239   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   0.34    |   0.17    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.76    |   0.16    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.30    |   0.15    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.56    |   0.11    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.64   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.70   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   20.0    |    0.5    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.480   |   0.011   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   -0.79   |    0.11   |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.02    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.23    |   0.14    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    4.7    |    0.6    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.081   |   0.030   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.49   |    0.04   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.175    0.439   -0.613   -0.400    0.818   -0.059   -0.793    0.845    0.845   -0.138   -0.708   -0.362    0.035   -0.739    0.625    0.170    0.814    0.687   -0.755   -0.575   -0.048   -0.672    0.603 |\n",
      "|    rho_s |    0.175    1.000    0.098   -0.144   -0.021    0.192    0.057   -0.186    0.197    0.197   -0.066   -0.164   -0.091    0.038   -0.172    0.143    0.024    0.197    0.158   -0.175   -0.132   -0.206   -0.157    0.132 |\n",
      "|  p4160_p |    0.439    0.098    1.000   -0.422   -0.226    0.488   -0.033   -0.494    0.505    0.505   -0.039   -0.481   -0.229    0.025   -0.402    0.400    0.097    0.488    0.329   -0.468   -0.323   -0.028   -0.409    0.402 |\n",
      "|  p4040_p |   -0.613   -0.144   -0.422    1.000    0.335   -0.706    0.049    0.680   -0.728   -0.728    0.278    0.584    0.321   -0.034    0.644   -0.510   -0.146   -0.703   -0.582    0.674    0.512    0.039    0.555   -0.517 |\n",
      "|    rho_p |   -0.400   -0.021   -0.226    0.335    1.000   -0.433   -0.041    0.430   -0.455   -0.455    0.144    0.380    0.209   -0.084    0.399   -0.333   -0.089   -0.431   -0.370    0.406    0.303    0.118    0.367   -0.268 |\n",
      "|  bplus_1 |    0.818    0.192    0.488   -0.706   -0.433    1.000   -0.064   -0.922    0.975    0.975   -0.273   -0.807   -0.430    0.047   -0.847    0.712    0.188    0.936    0.757   -0.862   -0.649   -0.053   -0.774    0.696 |\n",
      "|  omega_p |   -0.059    0.057   -0.033    0.049   -0.041   -0.064    1.000    0.063   -0.067   -0.067    0.023    0.056    0.031   -0.003    0.058   -0.049   -0.006   -0.064   -0.054    0.059    0.045    0.263    0.054   -0.042 |\n",
      "|   Dbar_s |   -0.793   -0.186   -0.494    0.680    0.430   -0.922    0.063    1.000   -0.955   -0.955    0.267    0.799    0.406   -0.045    0.830   -0.691   -0.186   -0.919   -0.760    0.846    0.649    0.052    0.751   -0.677 |\n",
      "| DDstar_p |    0.845    0.197    0.505   -0.728   -0.455    0.975   -0.067   -0.955    1.000    0.996   -0.282   -0.834   -0.447    0.048   -0.875    0.729    0.197    0.972    0.778   -0.890   -0.675   -0.055   -0.798    0.732 |\n",
      "| DDstar_s |    0.845    0.197    0.505   -0.728   -0.455    0.975   -0.067   -0.955    0.996    1.000   -0.283   -0.834   -0.447    0.048   -0.875    0.729    0.197    0.971    0.778   -0.890   -0.675   -0.055   -0.797    0.732 |\n",
      "|   Dbar_p |   -0.138   -0.066   -0.039    0.278    0.144   -0.273    0.023    0.267   -0.282   -0.283    1.000    0.230    0.254   -0.006    0.267   -0.087   -0.059   -0.271   -0.174    0.255    0.185    0.018    0.338   -0.212 |\n",
      "|  p4040_s |   -0.708   -0.164   -0.481    0.584    0.380   -0.807    0.056    0.799   -0.834   -0.834    0.230    1.000    0.403   -0.040    0.713   -0.610   -0.165   -0.805   -0.603    0.707    0.574    0.045    0.671   -0.618 |\n",
      "|  p3770_s |   -0.362   -0.091   -0.229    0.321    0.209   -0.430    0.031    0.406   -0.447   -0.447    0.254    0.403    1.000   -0.020    0.392   -0.400   -0.093   -0.428   -0.394    0.402    0.305    0.024    0.289   -0.316 |\n",
      "|    phi_p |    0.035    0.038    0.025   -0.034   -0.084    0.047   -0.003   -0.045    0.048    0.048   -0.006   -0.040   -0.020    1.000   -0.042    0.035    0.317    0.047    0.038   -0.042   -0.033   -0.029   -0.039    0.041 |\n",
      "|  p4415_p |   -0.739   -0.172   -0.402    0.644    0.399   -0.847    0.058    0.830   -0.875   -0.875    0.267    0.713    0.392   -0.042    1.000   -0.634   -0.173   -0.844   -0.662    0.772    0.566    0.048    0.689   -0.632 |\n",
      "|  p3770_p |    0.625    0.143    0.400   -0.510   -0.333    0.712   -0.049   -0.691    0.729    0.729   -0.087   -0.610   -0.400    0.035   -0.634    1.000    0.143    0.709    0.535   -0.649   -0.502   -0.041   -0.595    0.536 |\n",
      "|    phi_s |    0.170    0.024    0.097   -0.146   -0.089    0.188   -0.006   -0.186    0.197    0.197   -0.059   -0.165   -0.093    0.317   -0.173    0.143    1.000    0.186    0.162   -0.177   -0.132   -0.006   -0.161    0.116 |\n",
      "|  bplus_0 |    0.814    0.197    0.488   -0.703   -0.431    0.936   -0.064   -0.919    0.972    0.971   -0.271   -0.805   -0.428    0.047   -0.844    0.709    0.186    1.000    0.756   -0.858   -0.648   -0.054   -0.772    0.690 |\n",
      "|      Ctt |    0.687    0.158    0.329   -0.582   -0.370    0.757   -0.054   -0.760    0.778    0.778   -0.174   -0.603   -0.394    0.038   -0.662    0.535    0.162    0.756    1.000   -0.665   -0.483   -0.043   -0.613    0.665 |\n",
      "|  p4160_s |   -0.755   -0.175   -0.468    0.674    0.406   -0.862    0.059    0.846   -0.890   -0.890    0.255    0.707    0.402   -0.042    0.772   -0.649   -0.177   -0.858   -0.665    1.000    0.637    0.048    0.699   -0.645 |\n",
      "|  p4415_s |   -0.575   -0.132   -0.323    0.512    0.303   -0.649    0.045    0.649   -0.675   -0.675    0.185    0.574    0.305   -0.033    0.566   -0.502   -0.132   -0.648   -0.483    0.637    1.000    0.037    0.540   -0.531 |\n",
      "|  omega_s |   -0.048   -0.206   -0.028    0.039    0.118   -0.053    0.263    0.052   -0.055   -0.055    0.018    0.045    0.024   -0.029    0.048   -0.041   -0.006   -0.054   -0.043    0.048    0.037    1.000    0.043   -0.040 |\n",
      "|  psi2s_p |   -0.672   -0.157   -0.409    0.555    0.367   -0.774    0.054    0.751   -0.798   -0.797    0.338    0.671    0.289   -0.039    0.689   -0.595   -0.161   -0.772   -0.613    0.699    0.540    0.043    1.000   -0.598 |\n",
      "|  bplus_2 |    0.603    0.132    0.402   -0.517   -0.268    0.696   -0.042   -0.677    0.732    0.732   -0.212   -0.618   -0.316    0.041   -0.632    0.536    0.116    0.690    0.665   -0.645   -0.531   -0.040   -0.598    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.02665746884160125}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.18050974279627674}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.061134095843033975}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.17780552872854272}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.22080669741642778}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.02167946771081375}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.1872385004972985}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.09373933353359451}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 7.271627947684793}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.23863324817379866}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.165987498313096}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.16072590908652606}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.14580443153792344}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.11328072590681248}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.19284212546473833}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.10326538656542716}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.5492386422264417}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.011055337039524993}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.10738468926454803}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.18220642472877913}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.14315591188209909}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.6277487030664988}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.029598785883712786}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.03505952778284427})])\n",
      "Step: 0/11\n",
      "Current Ctt: 0.0\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1054 (1054 total)    |\n",
      "| EDM = 8.6E-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: 297526.60290280666\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |  -1.498   |   0.027   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.03    |   0.29    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.01   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.9    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.5    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -0.880   |   0.024   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.22    |   0.32    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   -0.28   |    0.58   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -6.3    |    1.1    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.30    |   0.38    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |  -0.026   |   0.455   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.78    |   0.20    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |    2.4    |    0.5    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.56    |   0.20    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.58   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.81   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   20.0    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.475   |   0.012   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   2.13    |   0.14    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   1.20    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    4.8    |    1.1    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.09    |   0.05    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.39   |    0.09   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.121   -0.170   -0.246   -0.022    0.289   -0.028    0.329    0.375    0.239   -0.117    0.181   -0.229    0.018   -0.171    0.105    0.006    0.270   -0.119    0.148   -0.066   -0.191    0.261 |\n",
      "|    rho_s |    0.121    1.000   -0.266   -0.267    0.124    0.254   -0.035    0.303    0.203    0.195    0.196    0.216   -0.268    0.068   -0.201   -0.113   -0.019    0.303   -0.052    0.184   -0.408   -0.245    0.245 |\n",
      "|  p4160_p |   -0.170   -0.266    1.000    0.755   -0.102   -0.775    0.055   -0.868   -0.502   -0.610   -0.661   -0.707    0.768   -0.035    0.679    0.430    0.024   -0.746    0.135   -0.497    0.118    0.736   -0.713 |\n",
      "|  p4040_p |   -0.246   -0.267    0.755    1.000   -0.103   -0.768    0.055   -0.884   -0.547   -0.603   -0.627   -0.665    0.781   -0.038    0.621    0.398    0.022   -0.742    0.301   -0.465    0.119    0.705   -0.759 |\n",
      "|    rho_p |   -0.022    0.124   -0.102   -0.103    1.000    0.149   -0.085    0.136    0.094    0.098    0.065    0.093   -0.106   -0.168   -0.065   -0.041   -0.097    0.141    0.002    0.060    0.161   -0.108    0.229 |\n",
      "|  bplus_1 |    0.289    0.254   -0.775   -0.768    0.149    1.000   -0.051    0.882    0.599    0.561    0.537    0.646   -0.767    0.028   -0.571   -0.316   -0.040    0.619   -0.120    0.558   -0.107   -0.704    0.737 |\n",
      "|  omega_p |   -0.028   -0.035    0.055    0.055   -0.085   -0.051    1.000   -0.062   -0.041   -0.040   -0.043   -0.044    0.055   -0.010    0.042    0.024    0.017   -0.057    0.011   -0.037    0.534    0.051   -0.048 |\n",
      "|   Dbar_s |    0.329    0.303   -0.868   -0.884    0.136    0.882   -0.062    1.000    0.675    0.708    0.661    0.697   -0.887    0.040   -0.669   -0.379   -0.034    0.855   -0.192    0.568   -0.134   -0.826    0.886 |\n",
      "| DDstar_p |    0.375    0.203   -0.502   -0.547    0.094    0.599   -0.041    0.675    1.000    0.491    0.596    0.470   -0.567    0.031   -0.375   -0.210   -0.022    0.581   -0.102    0.368   -0.089   -0.501    0.596 |\n",
      "| DDstar_s |    0.239    0.195   -0.610   -0.603    0.098    0.561   -0.040    0.708    0.491    1.000    0.458    0.520   -0.615    0.026   -0.430   -0.294   -0.026    0.547   -0.084    0.415   -0.086   -0.549    0.638 |\n",
      "|   Dbar_p |   -0.117    0.196   -0.661   -0.627    0.065    0.537   -0.043    0.661    0.596    0.458    1.000    0.489   -0.642    0.021   -0.476   -0.561   -0.017    0.517   -0.097    0.370   -0.091   -0.664    0.577 |\n",
      "|  p4040_s |    0.181    0.216   -0.707   -0.665    0.093    0.646   -0.044    0.697    0.470    0.520    0.489    1.000   -0.568    0.027   -0.553   -0.297   -0.025    0.622   -0.316    0.426   -0.095   -0.567    0.551 |\n",
      "|  p3770_s |   -0.229   -0.268    0.768    0.781   -0.106   -0.767    0.055   -0.887   -0.567   -0.615   -0.642   -0.568    1.000   -0.037    0.601    0.262    0.023   -0.741    0.183   -0.489    0.119    0.683   -0.774 |\n",
      "|    phi_p |    0.018    0.068   -0.035   -0.038   -0.168    0.028   -0.010    0.040    0.031    0.026    0.021    0.027   -0.037    1.000   -0.030   -0.011    0.636    0.032   -0.013    0.026   -0.095   -0.034    0.015 |\n",
      "|  p4415_p |   -0.171   -0.201    0.679    0.621   -0.065   -0.571    0.042   -0.669   -0.375   -0.430   -0.476   -0.553    0.601   -0.030    1.000    0.317    0.010   -0.550    0.087   -0.468    0.091    0.540   -0.560 |\n",
      "|  p3770_p |    0.105   -0.113    0.430    0.398   -0.041   -0.316    0.024   -0.379   -0.210   -0.294   -0.561   -0.297    0.262   -0.011    0.317    1.000    0.009   -0.299    0.076   -0.237    0.050    0.365   -0.304 |\n",
      "|    phi_s |    0.006   -0.019    0.024    0.022   -0.097   -0.040    0.017   -0.034   -0.022   -0.026   -0.017   -0.025    0.023    0.636    0.010    0.009    1.000   -0.042   -0.009   -0.014   -0.013    0.025   -0.078 |\n",
      "|  bplus_0 |    0.270    0.303   -0.746   -0.742    0.141    0.619   -0.057    0.855    0.581    0.547    0.517    0.622   -0.741    0.032   -0.550   -0.299   -0.042    1.000   -0.114    0.534   -0.126   -0.686    0.703 |\n",
      "|  p4160_s |   -0.119   -0.052    0.135    0.301    0.002   -0.120    0.011   -0.192   -0.102   -0.084   -0.097   -0.316    0.183   -0.013    0.087    0.076   -0.009   -0.114    1.000    0.088    0.026    0.096   -0.186 |\n",
      "|  p4415_s |    0.148    0.184   -0.497   -0.465    0.060    0.558   -0.037    0.568    0.368    0.415    0.370    0.426   -0.489    0.026   -0.468   -0.237   -0.014    0.534    0.088    1.000   -0.082   -0.467    0.399 |\n",
      "|  omega_s |   -0.066   -0.408    0.118    0.119    0.161   -0.107    0.534   -0.134   -0.089   -0.086   -0.091   -0.095    0.119   -0.095    0.091    0.050   -0.013   -0.126    0.026   -0.082    1.000    0.109   -0.095 |\n",
      "|  psi2s_p |   -0.191   -0.245    0.736    0.705   -0.108   -0.704    0.051   -0.826   -0.501   -0.549   -0.664   -0.567    0.683   -0.034    0.540    0.365    0.025   -0.686    0.096   -0.467    0.109    1.000   -0.766 |\n",
      "|  bplus_2 |    0.261    0.245   -0.713   -0.759    0.229    0.737   -0.048    0.886    0.596    0.638    0.577    0.551   -0.774    0.015   -0.560   -0.304   -0.078    0.703   -0.186    0.399   -0.095   -0.766    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.02704796647504848}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.29492844006802316}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.17190274767899538}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.41466387701487606}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.32269683102876856}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.02422723373646607}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3193186965006696}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.5775215414918989}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.051710242499055}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.3815404872006971}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.4546523159765079}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.19859569652151027}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.4601942469805349}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.20076323352538195}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.20373547774487544}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12111656933870174}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9522779116246785}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.011835609005568237}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.13920742693502108}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19695936143909543}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1011548898938646}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.05215232627571975}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.09384669293516534})])\n",
      "\n",
      "Time taken: 3 min, 18 s\n",
      "Estimated time left: 36 min, 28 s\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=1106 (1106 total)    |\n",
      "| EDM = 0.000463 (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: 297495.12736631924\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.54   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |    0.7    |    0.4    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.09   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.5    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   0.14    |   0.44    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -0.878   |   0.024   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |    0.6    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   -0.30   |    0.41   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -0.5    |    2.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.18    |   0.49    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |    0.3    |    1.2    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.59    |   0.19    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.51    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.79    |   0.16    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.73   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.86   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.8    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.457   |   0.011   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   0.83    |   0.21    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.39    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.46    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    8.5    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.15   |    0.07   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000   -0.063    0.679    0.368   -0.041   -0.179   -0.006    0.402    0.723   -0.687    0.493    0.195    0.235    0.040    0.639    0.121    0.037   -0.143   -0.216    0.225   -0.100    0.001    0.427    0.184 |\n",
      "|    rho_s |   -0.063    1.000   -0.041   -0.017    0.189   -0.026    0.266    0.012   -0.031    0.057   -0.029    0.012    0.002   -0.105   -0.022    0.002   -0.096    0.168    0.057    0.022    0.018    0.002   -0.024    0.096 |\n",
      "|  p4160_p |    0.679   -0.041    1.000    0.442    0.014   -0.192   -0.001    0.338    0.720   -0.677    0.515   -0.086    0.175    0.025    0.719    0.187    0.010   -0.112   -0.493    0.144   -0.172    0.007    0.343    0.147 |\n",
      "|  p4040_p |    0.368   -0.017    0.442    1.000    0.026   -0.117   -0.003    0.073    0.333   -0.320    0.173   -0.105    0.086    0.007    0.410    0.230   -0.007   -0.059   -0.271    0.401   -0.049    0.002    0.116    0.085 |\n",
      "|    rho_p |   -0.041    0.189    0.014    0.026    1.000    0.051   -0.130    0.007    0.005   -0.018    0.006    0.023    0.020   -0.249    0.033   -0.012   -0.104   -0.077    0.056    0.041   -0.032    0.070    0.002    0.224 |\n",
      "|  bplus_1 |   -0.179   -0.026   -0.192   -0.117    0.051    1.000   -0.016   -0.005   -0.153    0.270   -0.156   -0.028   -0.020   -0.019   -0.181    0.048   -0.005   -0.590    0.018   -0.036    0.159    0.001   -0.091   -0.302 |\n",
      "|  omega_p |   -0.006    0.266   -0.001   -0.003   -0.130   -0.016    1.000    0.006    0.004    0.003    0.000    0.002   -0.000   -0.040   -0.000    0.002    0.015    0.042   -0.001    0.001    0.007    0.798   -0.001   -0.013 |\n",
      "|   Dbar_s |    0.402    0.012    0.338    0.073    0.007   -0.005    0.006    1.000    0.553   -0.581    0.578    0.190   -0.048    0.014    0.377   -0.073    0.000    0.002   -0.444    0.153    0.021    0.001    0.097    0.126 |\n",
      "| DDstar_p |    0.723   -0.031    0.720    0.333    0.005   -0.153    0.004    0.553    1.000   -0.943    0.917    0.312    0.117    0.032    0.750   -0.129    0.017   -0.097   -0.516    0.313   -0.065    0.009    0.328    0.191 |\n",
      "| DDstar_s |   -0.687    0.057   -0.677   -0.320   -0.018    0.270    0.003   -0.581   -0.943    1.000   -0.909   -0.354   -0.104   -0.029   -0.748    0.195   -0.017    0.167    0.508   -0.337    0.063   -0.011   -0.331   -0.237 |\n",
      "|   Dbar_p |    0.493   -0.029    0.515    0.173    0.006   -0.156    0.000    0.578    0.917   -0.909    1.000    0.338   -0.033    0.024    0.616   -0.346    0.013   -0.098   -0.534    0.293   -0.026    0.006    0.133    0.202 |\n",
      "|  p4040_s |    0.195    0.012   -0.086   -0.105    0.023   -0.028    0.002    0.190    0.312   -0.354    0.338    1.000    0.126    0.002    0.145   -0.190   -0.011   -0.008    0.091    0.104    0.189   -0.001    0.107    0.124 |\n",
      "|  p3770_s |    0.235    0.002    0.175    0.086    0.020   -0.020   -0.000   -0.048    0.117   -0.104   -0.033    0.126    1.000    0.001    0.157   -0.064   -0.012    0.008   -0.062    0.063   -0.000   -0.001   -0.042   -0.017 |\n",
      "|    phi_p |    0.040   -0.105    0.025    0.007   -0.249   -0.019   -0.040    0.014    0.032   -0.029    0.024    0.002    0.001    1.000    0.018    0.005    0.525   -0.005   -0.026   -0.003    0.003   -0.086    0.015   -0.058 |\n",
      "|  p4415_p |    0.639   -0.022    0.719    0.410    0.033   -0.181   -0.000    0.377    0.750   -0.748    0.616    0.145    0.157    0.018    1.000    0.024   -0.003   -0.099   -0.348    0.235   -0.193    0.005    0.314    0.228 |\n",
      "|  p3770_p |    0.121    0.002    0.187    0.230   -0.012    0.048    0.002   -0.073   -0.129    0.195   -0.346   -0.190   -0.064    0.005    0.024    1.000    0.002    0.046    0.001   -0.075   -0.100   -0.001    0.114   -0.099 |\n",
      "|    phi_s |    0.037   -0.096    0.010   -0.007   -0.104   -0.005    0.015    0.000    0.017   -0.017    0.013   -0.011   -0.012    0.525   -0.003    0.002    1.000   -0.023   -0.039   -0.023    0.009    0.014    0.008   -0.122 |\n",
      "|  bplus_0 |   -0.143    0.168   -0.112   -0.059   -0.077   -0.590    0.042    0.002   -0.097    0.167   -0.098   -0.008    0.008   -0.005   -0.099    0.046   -0.023    1.000    0.019    0.003    0.093   -0.014   -0.064   -0.138 |\n",
      "|      Ctt |   -0.216    0.057   -0.493   -0.271    0.056    0.018   -0.001   -0.444   -0.516    0.508   -0.534    0.091   -0.062   -0.026   -0.348    0.001   -0.039    0.019    1.000    0.027    0.154   -0.010    0.036    0.403 |\n",
      "|  p4160_s |    0.225    0.022    0.144    0.401    0.041   -0.036    0.001    0.153    0.313   -0.337    0.293    0.104    0.063   -0.003    0.235   -0.075   -0.023    0.003    0.027    1.000    0.289   -0.003    0.069    0.168 |\n",
      "|  p4415_s |   -0.100    0.018   -0.172   -0.049   -0.032    0.159    0.007    0.021   -0.065    0.063   -0.026    0.189   -0.000    0.003   -0.193   -0.100    0.009    0.093    0.154    0.289    1.000   -0.000   -0.014   -0.182 |\n",
      "|  omega_s |    0.001    0.002    0.007    0.002    0.070    0.001    0.798    0.001    0.009   -0.011    0.006   -0.001   -0.001   -0.086    0.005   -0.001    0.014   -0.014   -0.010   -0.003   -0.000    1.000    0.003   -0.021 |\n",
      "|  psi2s_p |    0.427   -0.024    0.343    0.116    0.002   -0.091   -0.001    0.097    0.328   -0.331    0.133    0.107   -0.042    0.015    0.314    0.114    0.008   -0.064    0.036    0.069   -0.014    0.003    1.000    0.051 |\n",
      "|  bplus_2 |    0.184    0.096    0.147    0.085    0.224   -0.302   -0.013    0.126    0.191   -0.237    0.202    0.124   -0.017   -0.058    0.228   -0.099   -0.122   -0.138    0.403    0.168   -0.182   -0.021    0.051    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04441839199267639}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3604625655243686}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.15767247415691443}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.33705142490447826}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.43986105363025185}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.023563020399403833}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3830407968413878}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.41171469823215157}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 2.2651160453695782}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4854150076643613}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.2000445510653424}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1883569427984237}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2524974065965022}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.15599529439166293}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.23204524313003194}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.13048561570107875}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9263377662833907}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.011460720481993647}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.2057987487166828}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17226233748648623}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19455038596921093}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.4368251296563344}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03785383967546352}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07326328450355712})])\n",
      "Step: 1/11\n",
      "Current Ctt: 0.4879500364742666\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.975E+05               |    Ncalls=1034 (1034 total)    |\n",
      "| EDM = 4.32E-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: 297499.95457663346\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.51   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |    0.7    |    0.4    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.94   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.5    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   0.04    |   0.50    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.84   |    0.05   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |    0.6    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.44    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -1.4    |    1.0    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.46   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   -0.9    |    0.8    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.46    |   0.20    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.48    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.80    |   0.16    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.66   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.74   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.9    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.453   |   0.019   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   2.28    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   1.45    |   0.21    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    8.5    |    1.6    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.07    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.30   |    0.09   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.019    0.220   -0.030   -0.011    0.044   -0.006    0.464    0.167   -0.020    0.615   -0.003    0.043    0.011    0.148    0.476   -0.007   -0.008   -0.035    0.063   -0.018    0.291    0.164 |\n",
      "|    rho_s |    0.019    1.000    0.043    0.004    0.150   -0.006    0.311    0.014   -0.121   -0.070    0.024   -0.035    0.028   -0.081   -0.007    0.097   -0.092    0.249   -0.004    0.028    0.044   -0.017   -0.010 |\n",
      "|  p4160_p |    0.220    0.043    1.000    0.204    0.009    0.108    0.006    0.378   -0.264   -0.366   -0.129   -0.533    0.066   -0.001    0.313    0.313   -0.012    0.013   -0.133   -0.174   -0.006    0.023    0.012 |\n",
      "|  p4040_p |   -0.030    0.004    0.204    1.000    0.019   -0.025   -0.004    0.194   -0.088   -0.169   -0.196   -0.272    0.001   -0.008    0.200    0.086   -0.015    0.008    0.377   -0.044   -0.005   -0.151    0.035 |\n",
      "|    rho_p |   -0.011    0.150    0.009    0.019    1.000    0.018   -0.119    0.017    0.119    0.081    0.132    0.042    0.002   -0.274    0.070    0.021   -0.132   -0.114    0.054   -0.032    0.054    0.028    0.263 |\n",
      "|  bplus_1 |    0.044   -0.006    0.108   -0.025    0.018    1.000   -0.007    0.017   -0.705   -0.442   -0.267   -0.206    0.098    0.000   -0.193    0.234    0.030   -0.598   -0.141    0.186    0.002   -0.110   -0.550 |\n",
      "|  omega_p |   -0.006    0.311    0.006   -0.004   -0.119   -0.007    1.000    0.007   -0.039   -0.026   -0.007   -0.012    0.003   -0.047   -0.012    0.019    0.015    0.072   -0.009    0.012    0.834   -0.009   -0.037 |\n",
      "|   Dbar_s |    0.464    0.014    0.378    0.194    0.017    0.017    0.007    1.000    0.021    0.136    0.265   -0.120    0.213    0.004    0.193    0.454   -0.011    0.027   -0.024   -0.026    0.002    0.356   -0.022 |\n",
      "| DDstar_p |    0.167   -0.121   -0.264   -0.088    0.119   -0.705   -0.039    0.021    1.000    0.647    0.663    0.430   -0.154   -0.026    0.263   -0.171   -0.053    0.009    0.256   -0.020   -0.000    0.292    0.729 |\n",
      "| DDstar_s |   -0.020   -0.070   -0.366   -0.169    0.081   -0.442   -0.026    0.136    0.647    1.000    0.503    0.289   -0.182   -0.022    0.012   -0.133   -0.039    0.009    0.130    0.035   -0.002    0.098    0.481 |\n",
      "|   Dbar_p |    0.615    0.024   -0.129   -0.196    0.132   -0.267   -0.007    0.265    0.663    0.503    1.000    0.313   -0.138   -0.026    0.176    0.338   -0.077    0.057    0.137    0.163   -0.007    0.380    0.580 |\n",
      "|  p4040_s |   -0.003   -0.035   -0.533   -0.272    0.042   -0.206   -0.012   -0.120    0.430    0.289    0.313    1.000    0.062   -0.013   -0.100   -0.142   -0.022    0.016   -0.028    0.200   -0.000    0.093    0.137 |\n",
      "|  p3770_s |    0.043    0.028    0.066    0.001    0.002    0.098    0.003    0.213   -0.154   -0.182   -0.138    0.062    1.000   -0.004    0.017   -0.156   -0.010    0.023   -0.003    0.021   -0.004   -0.251   -0.128 |\n",
      "|    phi_p |    0.011   -0.081   -0.001   -0.008   -0.274    0.000   -0.047    0.004   -0.026   -0.022   -0.026   -0.013   -0.004    1.000   -0.019   -0.000    0.541    0.011   -0.019    0.009   -0.097   -0.004   -0.077 |\n",
      "|  p4415_p |    0.148   -0.007    0.313    0.200    0.070   -0.193   -0.012    0.193    0.263    0.012    0.176   -0.100    0.017   -0.019    1.000    0.096   -0.043    0.028    0.054   -0.245   -0.006    0.079    0.260 |\n",
      "|  p3770_p |    0.476    0.097    0.313    0.086    0.021    0.234    0.019    0.454   -0.171   -0.133    0.338   -0.142   -0.156   -0.000    0.096    1.000   -0.027    0.056   -0.049    0.052   -0.008    0.154   -0.003 |\n",
      "|    phi_s |   -0.007   -0.092   -0.012   -0.015   -0.132    0.030    0.015   -0.011   -0.053   -0.039   -0.077   -0.022   -0.010    0.541   -0.043   -0.027    1.000   -0.030   -0.036    0.013    0.011   -0.019   -0.143 |\n",
      "|  bplus_0 |   -0.008    0.249    0.013    0.008   -0.114   -0.598    0.072    0.027    0.009    0.009    0.057    0.016    0.023    0.011    0.028    0.056   -0.030    1.000    0.035    0.013   -0.010    0.005   -0.024 |\n",
      "|  p4160_s |   -0.035   -0.004   -0.133    0.377    0.054   -0.141   -0.009   -0.024    0.256    0.130    0.137   -0.028   -0.003   -0.019    0.054   -0.049   -0.036    0.035    1.000    0.283   -0.004   -0.048    0.134 |\n",
      "|  p4415_s |    0.063    0.028   -0.174   -0.044   -0.032    0.186    0.012   -0.026   -0.020    0.035    0.163    0.200    0.021    0.009   -0.245    0.052    0.013    0.013    0.283    1.000    0.002    0.062   -0.248 |\n",
      "|  omega_s |   -0.018    0.044   -0.006   -0.005    0.054    0.002    0.834    0.002   -0.000   -0.002   -0.007   -0.000   -0.004   -0.097   -0.006   -0.008    0.011   -0.010   -0.004    0.002    1.000   -0.004   -0.016 |\n",
      "|  psi2s_p |    0.291   -0.017    0.023   -0.151    0.028   -0.110   -0.009    0.356    0.292    0.098    0.380    0.093   -0.251   -0.004    0.079    0.154   -0.019    0.005   -0.048    0.062   -0.004    1.000    0.089 |\n",
      "|  bplus_2 |    0.164   -0.010    0.012    0.035    0.263   -0.550   -0.037   -0.022    0.729    0.481    0.580    0.137   -0.128   -0.077    0.260   -0.003   -0.143   -0.024    0.134   -0.248   -0.016    0.089    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03772667424058973}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3759225510078985}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.11365631939238652}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.40643948348756154}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.5031465942924238}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.053215605821335776}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.43716691200107327}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4413423411416325}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.9613097660357908}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.45679659950732154}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.7652422097509715}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1982919085111997}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25164347393694286}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.1614794027193689}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.15797151703548584}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.15205478197140665}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9618104675626675}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.01881494494716951}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17117902446880517}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.21032371502931146}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.5794617586808832}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.0366989999911187}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08651973051266493})])\n",
      "\n",
      "Time taken: 6 min, 34 s\n",
      "Estimated time left: 32 min, 52 s\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.974E+05               |     Ncalls=100 (100 total)     |\n",
      "| EDM = 1.81E-05 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297354.02549322904\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |  -1.518   |   0.026   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.25    |   0.26    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.12   |    0.09   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.59   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.68   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -0.985   |   0.012   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.13    |   0.23    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   -0.15   |    0.08   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   0.07    |   0.42    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.24   |    0.07   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   0.05    |   0.63    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   1.12    |   0.14    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.63    |   0.21    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |    0.3    |    2.2    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.58   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -3.04   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |    19     |     7     |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.483   |   0.006   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   1.05    |   0.12    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.41    |   0.14    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.55    |   0.16    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    6.9    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.122   |   0.029   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.08   |    0.05   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.008    0.235    0.132   -0.057    0.000   -0.057    0.200   -0.314   -0.028   -0.305    0.017    0.098   -0.137    0.141    0.213   -0.134   -0.021    0.101   -0.011   -0.021    0.000    0.152    0.008 |\n",
      "|    rho_s |    0.008    1.000   -0.008   -0.011    0.132   -0.003    0.133    0.019   -0.007    0.048   -0.012   -0.003   -0.009    0.187   -0.010    0.006    0.182    0.083    0.004   -0.006    0.013   -0.329   -0.004   -0.061 |\n",
      "|  p4160_p |    0.235   -0.008    1.000    0.188    0.014   -0.029    0.006   -0.044   -0.341    0.060   -0.138   -0.314    0.043    0.008    0.324    0.247    0.007   -0.022   -0.202   -0.095   -0.040    0.001    0.090    0.049 |\n",
      "|  p4040_p |    0.132   -0.011    0.188    1.000    0.020   -0.017    0.002   -0.110   -0.218   -0.003   -0.113   -0.098   -0.002   -0.000    0.196    0.182   -0.002   -0.010   -0.116    0.290    0.027    0.002   -0.020    0.023 |\n",
      "|    rho_p |   -0.057    0.132    0.014    0.020    1.000    0.062   -0.082    0.032    0.005    0.007   -0.021    0.017    0.021   -0.073    0.027    0.010   -0.069    0.075    0.010    0.028   -0.008    0.060    0.002    0.216 |\n",
      "|  bplus_1 |    0.000   -0.003   -0.029   -0.017    0.062    1.000   -0.002    0.159    0.011    0.334   -0.085    0.028    0.011   -0.015   -0.020    0.080   -0.016   -0.280   -0.045    0.028    0.098    0.004   -0.005   -0.191 |\n",
      "|  omega_p |   -0.057    0.133    0.006    0.002   -0.082   -0.002    1.000    0.010   -0.021   -0.006   -0.024    0.003    0.002    0.366    0.007    0.004    0.367   -0.000    0.011    0.004   -0.001    0.422   -0.006    0.024 |\n",
      "|   Dbar_s |    0.200    0.019   -0.044   -0.110    0.032    0.159    0.010    1.000   -0.068   -0.377   -0.212    0.022   -0.115    0.027   -0.034    0.109    0.026    0.152   -0.290   -0.029    0.066   -0.009   -0.025    0.139 |\n",
      "| DDstar_p |   -0.314   -0.007   -0.341   -0.218    0.005    0.011   -0.021   -0.068    1.000   -0.010   -0.413   -0.111   -0.126   -0.048   -0.297   -0.082   -0.048    0.010    0.023   -0.094    0.017    0.002   -0.191    0.001 |\n",
      "| DDstar_s |   -0.028    0.048    0.060   -0.003    0.007    0.334   -0.006   -0.377   -0.010    1.000    0.126   -0.162   -0.009   -0.003   -0.112    0.070   -0.003    0.306    0.151   -0.146   -0.104   -0.015   -0.110   -0.056 |\n",
      "|   Dbar_p |   -0.305   -0.012   -0.138   -0.113   -0.021   -0.085   -0.024   -0.212   -0.413    0.126    1.000    0.044   -0.075   -0.057   -0.019   -0.375   -0.056   -0.085    0.001    0.050   -0.009    0.006   -0.194   -0.033 |\n",
      "|  p4040_s |    0.017   -0.003   -0.314   -0.098    0.017    0.028    0.003    0.022   -0.111   -0.162    0.044    1.000    0.117    0.004   -0.073   -0.018    0.004    0.030    0.217   -0.025    0.128    0.000    0.031   -0.001 |\n",
      "|  p3770_s |    0.098   -0.009    0.043   -0.002    0.021    0.011    0.002   -0.115   -0.126   -0.009   -0.075    0.117    1.000    0.000    0.061   -0.173   -0.001    0.018   -0.015    0.039    0.019    0.002   -0.122   -0.011 |\n",
      "|    phi_p |   -0.137    0.187    0.008   -0.000   -0.073   -0.015    0.366    0.027   -0.048   -0.003   -0.057    0.004    0.000    1.000    0.011    0.010    0.995    0.003    0.032    0.006    0.001   -0.106   -0.019    0.031 |\n",
      "|  p4415_p |    0.141   -0.010    0.324    0.196    0.027   -0.020    0.007   -0.034   -0.297   -0.112   -0.019   -0.073    0.061    0.011    1.000    0.112    0.009   -0.011    0.019   -0.030   -0.166    0.002    0.061    0.073 |\n",
      "|  p3770_p |    0.213    0.006    0.247    0.182    0.010    0.080    0.004    0.109   -0.082    0.070   -0.375   -0.018   -0.173    0.010    0.112    1.000    0.009    0.085   -0.135   -0.024   -0.050   -0.004    0.027    0.004 |\n",
      "|    phi_s |   -0.134    0.182    0.007   -0.002   -0.069   -0.016    0.367    0.026   -0.048   -0.003   -0.056    0.004   -0.001    0.995    0.009    0.009    1.000    0.001    0.032    0.005    0.002   -0.101   -0.019    0.023 |\n",
      "|  bplus_0 |   -0.021    0.083   -0.022   -0.010    0.075   -0.280   -0.000    0.152    0.010    0.306   -0.085    0.030    0.018    0.003   -0.011    0.085    0.001    1.000   -0.048    0.034    0.091   -0.021   -0.006   -0.146 |\n",
      "|      Ctt |    0.101    0.004   -0.202   -0.116    0.010   -0.045    0.011   -0.290    0.023    0.151    0.001    0.217   -0.015    0.032    0.019   -0.135    0.032   -0.048    1.000    0.182    0.144   -0.006    0.155    0.408 |\n",
      "|  p4160_s |   -0.011   -0.006   -0.095    0.290    0.028    0.028    0.004   -0.029   -0.094   -0.146    0.050   -0.025    0.039    0.006   -0.030   -0.024    0.005    0.034    0.182    1.000    0.263    0.000   -0.034    0.039 |\n",
      "|  p4415_s |   -0.021    0.013   -0.040    0.027   -0.008    0.098   -0.001    0.066    0.017   -0.104   -0.009    0.128    0.019    0.001   -0.166   -0.050    0.002    0.091    0.144    0.263    1.000   -0.004    0.019   -0.122 |\n",
      "|  omega_s |    0.000   -0.329    0.001    0.002    0.060    0.004    0.422   -0.009    0.002   -0.015    0.006    0.000    0.002   -0.106    0.002   -0.004   -0.101   -0.021   -0.006    0.000   -0.004    1.000    0.002    0.011 |\n",
      "|  psi2s_p |    0.152   -0.004    0.090   -0.020    0.002   -0.005   -0.006   -0.025   -0.191   -0.110   -0.194    0.031   -0.122   -0.019    0.061    0.027   -0.019   -0.006    0.155   -0.034    0.019    0.002    1.000   -0.055 |\n",
      "|  bplus_2 |    0.008   -0.061    0.049    0.023    0.216   -0.191    0.024    0.139    0.001   -0.056   -0.033   -0.001   -0.011    0.031    0.073    0.004    0.023   -0.146    0.408    0.039   -0.122    0.011   -0.055    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.02561072348946203}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.2558272802576479}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.08563041747738387}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.14363131424273012}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.27994781191594065}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.012473230109842026}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.23409043110307293}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.07984590802809192}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.42126440237204843}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.07011919326467199}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.632455926634151}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.139933378390394}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.21199611543831276}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 2.15404224612451}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.13004252693543017}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.09643505392893958}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 6.6035680949490825}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.006167898067401811}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.12011593794976316}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1361613880881416}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.16126193950962187}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.9205536652924917}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.02939610036290663}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.05027214946282765})])\n",
      "Step: 2/11\n",
      "Current Ctt: 0.6900655593423543\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.974E+05               |     Ncalls=977 (977 total)     |\n",
      "| EDM = 0.000153 (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: 297362.6026377614\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.55   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.22    |   0.30    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.08   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.66   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.9    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.90   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.33    |   0.31    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.11    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -0.30   |    0.55   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.38   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   -0.6    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.94    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.55    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.64    |   0.24    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.69   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -3.00   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   20.6    |    1.2    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.468   |   0.019   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   2.17    |   0.16    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   1.52    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    7.5    |    1.4    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.07    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.35   |    0.06   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.063    0.444    0.244   -0.015    0.209   -0.018    0.100   -0.415   -0.103    0.444   -0.108    0.105    0.018    0.284    0.515    0.017   -0.018   -0.058   -0.016   -0.033    0.289   -0.036 |\n",
      "|    rho_s |    0.063    1.000   -0.007   -0.010    0.037   -0.189    0.032   -0.006   -0.032    0.023   -0.005    0.014   -0.004    0.188   -0.006    0.010    0.094    0.232   -0.003    0.036   -0.332    0.025   -0.187 |\n",
      "|  p4160_p |    0.444   -0.007    1.000    0.290    0.057    0.034    0.002    0.111   -0.594   -0.120   -0.025   -0.433    0.053   -0.006    0.528    0.354   -0.023    0.022   -0.074   -0.153   -0.005    0.172    0.199 |\n",
      "|  p4040_p |    0.244   -0.010    0.290    1.000    0.058    0.051    0.003    0.112   -0.425   -0.118   -0.075   -0.218    0.018   -0.013    0.323    0.241   -0.029    0.027    0.376    0.018   -0.003   -0.021    0.085 |\n",
      "|    rho_p |   -0.015    0.037    0.057    0.058    1.000   -0.031    0.009   -0.011    0.009    0.017    0.117   -0.007    0.028   -0.201    0.062    0.083   -0.176    0.115    0.038   -0.024   -0.003    0.009    0.265 |\n",
      "|  bplus_1 |    0.209   -0.189    0.034    0.051   -0.031    1.000    0.041   -0.046   -0.145    0.152    0.178    0.096    0.044   -0.026    0.075    0.153   -0.004   -0.863    0.078    0.175    0.087    0.166   -0.141 |\n",
      "|  omega_p |   -0.018    0.032    0.002    0.003    0.009    0.041    1.000    0.003    0.002   -0.006    0.002   -0.001    0.002   -0.032    0.003   -0.002    0.005   -0.044    0.002   -0.006    0.745   -0.003    0.039 |\n",
      "|   Dbar_s |    0.100   -0.006    0.111    0.112   -0.011   -0.046    0.003    1.000    0.134    0.055    0.164   -0.065    0.069    0.003    0.056    0.158    0.003    0.004   -0.013   -0.032    0.004    0.134   -0.026 |\n",
      "| DDstar_p |   -0.415   -0.032   -0.594   -0.425    0.009   -0.145    0.002    0.134    1.000    0.080    0.403    0.122   -0.235   -0.020   -0.462   -0.216   -0.020    0.002   -0.046    0.117    0.009   -0.250    0.188 |\n",
      "| DDstar_s |   -0.103    0.023   -0.120   -0.118    0.017    0.152   -0.006    0.055    0.080    1.000    0.012   -0.027   -0.060   -0.002   -0.157   -0.003   -0.001    0.005   -0.066    0.048   -0.011   -0.120   -0.118 |\n",
      "|   Dbar_p |    0.444   -0.005   -0.025   -0.075    0.117    0.178    0.002    0.164    0.403    0.012    1.000    0.044   -0.110   -0.019   -0.056    0.504   -0.045    0.050   -0.045    0.167   -0.010    0.201    0.184 |\n",
      "|  p4040_s |   -0.108    0.014   -0.433   -0.218   -0.007    0.096   -0.001   -0.065    0.122   -0.027    0.044    1.000    0.148    0.000   -0.248   -0.065    0.003    0.008   -0.140    0.196   -0.002   -0.008   -0.268 |\n",
      "|  p3770_s |    0.105   -0.004    0.053    0.018    0.028    0.044    0.002    0.069   -0.235   -0.060   -0.110    0.148    1.000   -0.009    0.090   -0.212   -0.017    0.019    0.054    0.028   -0.001   -0.166   -0.046 |\n",
      "|    phi_p |    0.018    0.188   -0.006   -0.013   -0.201   -0.026   -0.032    0.003   -0.020   -0.002   -0.019    0.000   -0.009    1.000   -0.012   -0.007    0.743    0.013   -0.014    0.012   -0.107    0.003   -0.109 |\n",
      "|  p4415_p |    0.284   -0.006    0.528    0.323    0.062    0.075    0.003    0.056   -0.462   -0.157   -0.056   -0.248    0.090   -0.012    1.000    0.246   -0.028    0.030   -0.039   -0.264   -0.004    0.087    0.057 |\n",
      "|  p3770_p |    0.515    0.010    0.354    0.241    0.083    0.153   -0.002    0.158   -0.216   -0.003    0.504   -0.065   -0.212   -0.007    0.246    1.000   -0.029    0.054    0.005    0.009   -0.015    0.186    0.118 |\n",
      "|    phi_s |    0.017    0.094   -0.023   -0.029   -0.176   -0.004    0.005    0.003   -0.020   -0.001   -0.045    0.003   -0.017    0.743   -0.028   -0.029    1.000   -0.022   -0.021    0.019   -0.033    0.001   -0.160 |\n",
      "|  bplus_0 |   -0.018    0.232    0.022    0.027    0.115   -0.863   -0.044    0.004    0.002    0.005    0.050    0.008    0.019    0.013    0.030    0.054   -0.022    1.000    0.029    0.005   -0.106   -0.003   -0.079 |\n",
      "|  p4160_s |   -0.058   -0.003   -0.074    0.376    0.038    0.078    0.002   -0.013   -0.046   -0.066   -0.045   -0.140    0.054   -0.014   -0.039    0.005   -0.021    0.029    1.000    0.320   -0.001   -0.109   -0.126 |\n",
      "|  p4415_s |   -0.016    0.036   -0.153    0.018   -0.024    0.175   -0.006   -0.032    0.117    0.048    0.167    0.196    0.028    0.012   -0.264    0.009    0.019    0.005    0.320    1.000   -0.010    0.051   -0.358 |\n",
      "|  omega_s |   -0.033   -0.332   -0.005   -0.003   -0.003    0.087    0.745    0.004    0.009   -0.011   -0.010   -0.002   -0.001   -0.107   -0.004   -0.015   -0.033   -0.106   -0.001   -0.010    1.000   -0.010    0.051 |\n",
      "|  psi2s_p |    0.289    0.025    0.172   -0.021    0.009    0.166   -0.003    0.134   -0.250   -0.120    0.201   -0.008   -0.166    0.003    0.087    0.186    0.001   -0.003   -0.109    0.051   -0.010    1.000   -0.202 |\n",
      "|  bplus_2 |   -0.036   -0.187    0.199    0.085    0.265   -0.141    0.039   -0.026    0.188   -0.118    0.184   -0.268   -0.046   -0.109    0.057    0.118   -0.160   -0.079   -0.126   -0.358    0.051   -0.202    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03820081954583321}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3013484730553757}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.12881350848112394}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.20852847965730725}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.33627454583427197}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.038799172839063534}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3128051751160976}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.11102895880034766}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.5512031995715012}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.37542497982712275}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.5453489736133346}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.16882036928850136}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.24896465432694237}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2397099693939877}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.1622977997351207}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.14006266021570668}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.1888064317286489}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.018847150569016424}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16144892272754796}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.20195965076014988}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.4161643161113422}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03532529466600742}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.061644764029540555})])\n",
      "\n",
      "Time taken: 9 min, 6 s\n",
      "Estimated time left: 27 min, 20 s\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.971E+05               |    Ncalls=1096 (1096 total)    |\n",
      "| EDM = 0.00804 (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: 297103.47424277046\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.47   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   0.73    |   0.32    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.02   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.9    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -1.4    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -0.932   |   0.029   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |    0.7    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.09    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -0.9    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.40   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   -0.5    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   1.07    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |    2.4    |    0.3    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.65    |   0.22    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.3    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.76   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   18.7    |    1.1    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.481   |   0.012   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   0.57    |   0.17    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   1.97    |   0.19    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.08    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    8.4    |    1.6    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.07    |   0.06    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.24   |    0.07   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.051    0.832    0.798   -0.220   -0.550   -0.005   -0.318   -0.735   -0.889   -0.387   -0.039    0.666    0.065    0.779    0.375    0.063   -0.464    0.075    0.441   -0.191    0.027    0.781    0.057 |\n",
      "|    rho_s |    0.051    1.000    0.009   -0.002   -0.227   -0.051    0.231   -0.007   -0.035   -0.019   -0.044   -0.010   -0.004    0.240   -0.010   -0.001    0.149    0.020   -0.072   -0.031    0.009    0.050    0.015   -0.278 |\n",
      "|  p4160_p |    0.832    0.009    1.000    0.788   -0.204   -0.582   -0.003   -0.324   -0.778   -0.897   -0.532   -0.220    0.654    0.057    0.838    0.355    0.050   -0.474   -0.081    0.410   -0.217    0.031    0.743    0.051 |\n",
      "|  p4040_p |    0.798   -0.002    0.788    1.000   -0.194   -0.575   -0.004   -0.320   -0.735   -0.891   -0.554   -0.118    0.649    0.052    0.783    0.305    0.043   -0.464    0.018    0.587   -0.137    0.030    0.707    0.058 |\n",
      "|    rho_p |   -0.220   -0.227   -0.204   -0.194    1.000    0.181    0.154    0.091    0.166    0.246    0.212    0.020   -0.155   -0.152   -0.191   -0.019   -0.142    0.248    0.039   -0.093    0.059   -0.026   -0.192    0.176 |\n",
      "|  bplus_1 |   -0.550   -0.051   -0.582   -0.575    0.181    1.000    0.000    0.255    0.399    0.682    0.532    0.034   -0.455   -0.054   -0.595   -0.046   -0.052    0.076   -0.124   -0.350    0.217   -0.025   -0.532   -0.222 |\n",
      "|  omega_p |   -0.005    0.231   -0.003   -0.004    0.154    0.000    1.000    0.002   -0.003    0.004    0.008    0.001   -0.003   -0.003   -0.005    0.004    0.025    0.020   -0.002   -0.003    0.004    0.840   -0.003   -0.011 |\n",
      "|   Dbar_s |   -0.318   -0.007   -0.324   -0.320    0.091    0.255    0.002    1.000    0.320    0.401    0.292   -0.015   -0.249   -0.024   -0.326   -0.045   -0.023    0.210    0.017   -0.209    0.069   -0.014   -0.292   -0.030 |\n",
      "| DDstar_p |   -0.735   -0.035   -0.778   -0.735    0.166    0.399   -0.003    0.320    1.000    0.800    0.699    0.091   -0.622   -0.056   -0.710   -0.255   -0.054    0.334   -0.113   -0.393    0.220   -0.028   -0.664    0.040 |\n",
      "| DDstar_s |   -0.889   -0.019   -0.897   -0.891    0.246    0.682    0.004    0.401    0.800    1.000    0.652    0.029   -0.735   -0.067   -0.873   -0.256   -0.063    0.559   -0.072   -0.539    0.202   -0.038   -0.843   -0.057 |\n",
      "|   Dbar_p |   -0.387   -0.044   -0.532   -0.554    0.212    0.532    0.008    0.292    0.699    0.652    1.000    0.023   -0.459   -0.049   -0.568    0.193   -0.060    0.449   -0.220   -0.391    0.175   -0.028   -0.445   -0.004 |\n",
      "|  p4040_s |   -0.039   -0.010   -0.220   -0.118    0.020    0.034    0.001   -0.015    0.091    0.029    0.023    1.000    0.063   -0.005   -0.120   -0.136   -0.006    0.031    0.323   -0.128    0.124   -0.002    0.028    0.029 |\n",
      "|  p3770_s |    0.666   -0.004    0.654    0.649   -0.155   -0.455   -0.003   -0.249   -0.622   -0.735   -0.459    0.063    1.000    0.041    0.636    0.078    0.032   -0.364   -0.023    0.399   -0.134    0.024    0.501    0.011 |\n",
      "|    phi_p |    0.065    0.240    0.057    0.052   -0.152   -0.054   -0.003   -0.024   -0.056   -0.067   -0.049   -0.005    0.041    1.000    0.050    0.016    0.703   -0.046   -0.010    0.022   -0.012   -0.044    0.054   -0.074 |\n",
      "|  p4415_p |    0.779   -0.010    0.838    0.783   -0.191   -0.595   -0.005   -0.326   -0.710   -0.873   -0.568   -0.120    0.636    0.050    1.000    0.259    0.041   -0.481    0.063    0.413   -0.254    0.030    0.713    0.124 |\n",
      "|  p3770_p |    0.375   -0.001    0.355    0.305   -0.019   -0.046    0.004   -0.045   -0.255   -0.256    0.193   -0.136    0.078    0.016    0.259    1.000    0.005   -0.022   -0.245    0.071   -0.109    0.005    0.246   -0.037 |\n",
      "|    phi_s |    0.063    0.149    0.050    0.043   -0.142   -0.052    0.025   -0.023   -0.054   -0.063   -0.060   -0.006    0.032    0.703    0.041    0.005    1.000   -0.056   -0.022    0.011   -0.011    0.011    0.048   -0.121 |\n",
      "|  bplus_0 |   -0.464    0.020   -0.474   -0.464    0.248    0.076    0.020    0.210    0.334    0.559    0.449    0.031   -0.364   -0.046   -0.481   -0.022   -0.056    1.000   -0.092   -0.273    0.178   -0.030   -0.439   -0.166 |\n",
      "|      Ctt |    0.075   -0.072   -0.081    0.018    0.039   -0.124   -0.002    0.017   -0.113   -0.072   -0.220    0.323   -0.023   -0.010    0.063   -0.245   -0.022   -0.092    1.000    0.256    0.170   -0.003    0.120    0.589 |\n",
      "|  p4160_s |    0.441   -0.031    0.410    0.587   -0.093   -0.350   -0.003   -0.209   -0.393   -0.539   -0.391   -0.128    0.399    0.022    0.413    0.071    0.011   -0.273    0.256    1.000    0.159    0.016    0.409    0.116 |\n",
      "|  p4415_s |   -0.191    0.009   -0.217   -0.137    0.059    0.217    0.004    0.069    0.220    0.202    0.175    0.124   -0.134   -0.012   -0.254   -0.109   -0.011    0.178    0.170    0.159    1.000   -0.008   -0.151   -0.123 |\n",
      "|  omega_s |    0.027    0.050    0.031    0.030   -0.026   -0.025    0.840   -0.014   -0.028   -0.038   -0.028   -0.002    0.024   -0.044    0.030    0.005    0.011   -0.030   -0.003    0.016   -0.008    1.000    0.029   -0.017 |\n",
      "|  psi2s_p |    0.781    0.015    0.743    0.707   -0.192   -0.532   -0.003   -0.292   -0.664   -0.843   -0.445    0.028    0.501    0.054    0.713    0.246    0.048   -0.439    0.120    0.409   -0.151    0.029    1.000    0.030 |\n",
      "|  bplus_2 |    0.057   -0.278    0.051    0.058    0.176   -0.222   -0.011   -0.030    0.040   -0.057   -0.004    0.029    0.011   -0.074    0.124   -0.037   -0.121   -0.166    0.589    0.116   -0.123   -0.017    0.030    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.06392028253262794}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3153470326184793}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.24828996197303432}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.3376966631697771}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.5381211010473872}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.02910409475948106}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.33827242670332014}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.08894383532024774}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.6194878768986665}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.40245298627981474}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.6355445574518503}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.16987541309949766}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.3397386411857868}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2192486105322886}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.38364840258291255}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1324411715255691}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.1147427245914656}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.012498403892764243}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1660124956381961}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.19210521803179748}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19273096888963415}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.6036848723812742}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.057760683276259606}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07218526624929611})])\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.971E+05               |    Ncalls=1104 (1104 total)    |\n",
      "| EDM = 0.000621 (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: 297056.46473696467\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.53   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.15    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.19   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.53   |    0.17   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.14   |    0.31   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -1.079   |   0.030   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |    0.4    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.14    |   0.51    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   0.10    |   0.82    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.38   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |    1.8    |    2.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   1.09    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   3.07    |   0.24    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.42    |   0.30    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.01   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.97   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.8    |    1.2    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.531   |   0.014   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   0.89    |   0.19    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.19    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.04    |   0.18    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    6.7    |    1.5    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.08   |    0.07   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.193    0.472    0.184    0.123    0.672   -0.018    0.874    0.595   -0.283   -0.872   -0.345   -0.039    0.022   -0.184    0.861   -0.032    0.635   -0.472   -0.371   -0.072   -0.056    0.544    0.095 |\n",
      "|    rho_s |    0.193    1.000    0.075    0.019    0.267    0.168    0.020    0.222    0.191   -0.045   -0.230   -0.075   -0.025   -0.035   -0.075    0.211   -0.064    0.237   -0.129   -0.080    0.006   -0.218    0.118    0.058 |\n",
      "|  p4160_p |    0.472    0.075    1.000    0.322    0.083    0.248    0.003    0.371    0.055   -0.130   -0.350   -0.462    0.031    0.008    0.220    0.450   -0.024    0.244   -0.404   -0.252   -0.015   -0.011    0.296    0.063 |\n",
      "|  p4040_p |    0.184    0.019    0.322    1.000    0.041    0.057    0.005    0.107   -0.111   -0.057   -0.067   -0.182    0.019   -0.002    0.179    0.177   -0.017    0.061   -0.184    0.239    0.034    0.001    0.052    0.019 |\n",
      "|    rho_p |    0.123    0.267    0.083    0.041    1.000    0.171    0.089    0.181    0.150   -0.058   -0.184   -0.055    0.001   -0.172   -0.023    0.171   -0.117    0.141   -0.068   -0.048   -0.010    0.241    0.090    0.252 |\n",
      "|  bplus_1 |    0.672    0.168    0.248    0.057    0.171    1.000    0.002    0.766    0.654   -0.149   -0.792   -0.265   -0.085    0.010   -0.293    0.733   -0.044    0.327   -0.512   -0.287    0.042   -0.024    0.412   -0.081 |\n",
      "|  omega_p |   -0.018    0.020    0.003    0.005    0.089    0.002    1.000   -0.008   -0.011   -0.004    0.010    0.003    0.005   -0.030    0.011   -0.009    0.011   -0.018    0.009    0.005   -0.004    0.785   -0.006    0.032 |\n",
      "|   Dbar_s |    0.874    0.222    0.371    0.107    0.181    0.766   -0.008    1.000    0.863   -0.295   -0.958   -0.404   -0.107    0.024   -0.321    0.934   -0.045    0.733   -0.564   -0.428   -0.059   -0.047    0.533    0.086 |\n",
      "| DDstar_p |    0.595    0.191    0.055   -0.111    0.150    0.654   -0.011    0.863    1.000   -0.220   -0.812   -0.371   -0.207    0.014   -0.453    0.732   -0.042    0.624   -0.463   -0.402   -0.035   -0.044    0.291    0.077 |\n",
      "| DDstar_s |   -0.283   -0.045   -0.130   -0.057   -0.058   -0.149   -0.004   -0.295   -0.220    1.000    0.323    0.068    0.024   -0.006    0.049   -0.272    0.015   -0.148    0.216    0.082   -0.020    0.004   -0.210   -0.066 |\n",
      "|   Dbar_p |   -0.872   -0.230   -0.350   -0.067   -0.184   -0.792    0.010   -0.958   -0.812    0.323    1.000    0.394    0.143   -0.024    0.335   -0.923    0.046   -0.756    0.614    0.429    0.055    0.050   -0.493   -0.096 |\n",
      "|  p4040_s |   -0.345   -0.075   -0.462   -0.182   -0.055   -0.265    0.003   -0.404   -0.371    0.068    0.394    1.000    0.169   -0.011   -0.015   -0.393    0.011   -0.253    0.461    0.202    0.120    0.017   -0.181   -0.023 |\n",
      "|  p3770_s |   -0.039   -0.025    0.031    0.019    0.001   -0.085    0.005   -0.107   -0.207    0.024    0.143    0.169    1.000   -0.007    0.105   -0.179   -0.007   -0.074    0.038    0.099    0.024    0.009   -0.182   -0.036 |\n",
      "|    phi_p |    0.022   -0.035    0.008   -0.002   -0.172    0.010   -0.030    0.024    0.014   -0.006   -0.024   -0.011   -0.007    1.000   -0.012    0.023    0.787    0.016   -0.013   -0.014   -0.001   -0.093    0.012   -0.037 |\n",
      "|  p4415_p |   -0.184   -0.075    0.220    0.179   -0.023   -0.293    0.011   -0.321   -0.453    0.049    0.335   -0.015    0.105   -0.012    1.000   -0.240    0.001   -0.272    0.150   -0.006   -0.108    0.025   -0.107    0.101 |\n",
      "|  p3770_p |    0.861    0.211    0.450    0.177    0.171    0.733   -0.009    0.934    0.732   -0.272   -0.923   -0.393   -0.179    0.023   -0.240    1.000   -0.043    0.703   -0.604   -0.408   -0.079   -0.046    0.505    0.072 |\n",
      "|    phi_s |   -0.032   -0.064   -0.024   -0.017   -0.117   -0.044    0.011   -0.045   -0.042    0.015    0.046    0.011   -0.007    0.787    0.001   -0.043    1.000   -0.042    0.019    0.006    0.001   -0.024   -0.025   -0.093 |\n",
      "|  bplus_0 |    0.635    0.237    0.244    0.061    0.141    0.327   -0.018    0.733    0.624   -0.148   -0.756   -0.253   -0.074    0.016   -0.272    0.703   -0.042    1.000   -0.484   -0.270    0.037   -0.060    0.389   -0.036 |\n",
      "|      Ctt |   -0.472   -0.129   -0.404   -0.184   -0.068   -0.512    0.009   -0.564   -0.463    0.216    0.614    0.461    0.038   -0.013    0.150   -0.604    0.019   -0.484    1.000    0.436    0.210    0.033   -0.195    0.388 |\n",
      "|  p4160_s |   -0.371   -0.080   -0.252    0.239   -0.048   -0.287    0.005   -0.428   -0.402    0.082    0.429    0.202    0.099   -0.014   -0.006   -0.408    0.006   -0.270    0.436    1.000    0.246    0.020   -0.244    0.003 |\n",
      "|  p4415_s |   -0.072    0.006   -0.015    0.034   -0.010    0.042   -0.004   -0.059   -0.035   -0.020    0.055    0.120    0.024   -0.001   -0.108   -0.079    0.001    0.037    0.210    0.246    1.000   -0.005   -0.041   -0.092 |\n",
      "|  omega_s |   -0.056   -0.218   -0.011    0.001    0.241   -0.024    0.785   -0.047   -0.044    0.004    0.050    0.017    0.009   -0.093    0.025   -0.046   -0.024   -0.060    0.033    0.020   -0.005    1.000   -0.027    0.036 |\n",
      "|  psi2s_p |    0.544    0.118    0.296    0.052    0.090    0.412   -0.006    0.533    0.291   -0.210   -0.493   -0.181   -0.182    0.012   -0.107    0.505   -0.025    0.389   -0.195   -0.244   -0.041   -0.027    1.000   -0.002 |\n",
      "|  bplus_2 |    0.095    0.058    0.063    0.019    0.252   -0.081    0.032    0.086    0.077   -0.066   -0.096   -0.023   -0.036   -0.037    0.101    0.072   -0.093   -0.036    0.388    0.003   -0.092    0.036   -0.002    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.061280891018625105}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.31454576730901546}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.11878706376497505}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.16985855041526055}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.30644115593166443}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.029836894295678595}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.38511916356210474}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.5119245402666803}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.8212513820521412}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.37800016530526226}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 2.3558205440813444}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17057139855814873}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.23835927537097312}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.301116651477884}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.2165701897728738}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.25826090955133774}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.2490093118696706}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.013760012548490685}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.18938698196381787}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16980352114831754}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.17708880972456487}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.5334784821448664}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.037656251720526335}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07103733889377062})])\n",
      "Step: 3/11\n",
      "Current Ctt: 0.8451542547285166\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.971E+05               |    Ncalls=1015 (1015 total)    |\n",
      "| EDM = 8.63E-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: 297062.04588106315\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.52   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |    1.1    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.08   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.50   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.24   |    0.35   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.98   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |    0.4    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.09    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -0.4    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.08   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |    0.5    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.88    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   3.06    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |    0.4    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.09   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.82   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.9    |    1.6    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.514   |   0.022   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   1.99    |   0.16    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   0.95    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    6.7    |    1.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.05    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.35   |    0.07   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.005    0.521    0.354   -0.084    0.084   -0.032   -0.027   -0.399   -0.030    0.508   -0.228    0.256    0.012    0.257    0.530    0.017   -0.019   -0.112   -0.128   -0.040    0.352   -0.179 |\n",
      "|    rho_s |    0.005    1.000    0.009    0.010    0.180   -0.162   -0.067   -0.022   -0.064    0.013   -0.033    0.012    0.010   -0.018    0.009    0.006   -0.047    0.232    0.021    0.015   -0.285   -0.002   -0.012 |\n",
      "|  p4160_p |    0.521    0.009    1.000    0.340    0.055   -0.022    0.010    0.102   -0.299   -0.035    0.469   -0.511    0.135   -0.008    0.425    0.526   -0.023    0.029   -0.154   -0.060    0.010    0.265    0.156 |\n",
      "|  p4040_p |    0.354    0.010    0.340    1.000    0.056    0.000    0.010    0.108   -0.150   -0.028    0.415   -0.274    0.094   -0.013    0.224    0.421   -0.027    0.031    0.322    0.040    0.010    0.109    0.069 |\n",
      "|    rho_p |   -0.084    0.180    0.055    0.056    1.000    0.071    0.174   -0.026   -0.024   -0.002    0.000   -0.017    0.037   -0.251    0.069    0.015   -0.190   -0.047    0.024   -0.034    0.302   -0.019    0.282 |\n",
      "|  bplus_1 |    0.084   -0.162   -0.022    0.000    0.071    1.000    0.073   -0.070   -0.301    0.074   -0.122    0.107    0.030   -0.029   -0.041    0.007   -0.012   -0.873    0.094    0.154    0.107    0.062   -0.158 |\n",
      "|  omega_p |   -0.032   -0.067    0.010    0.010    0.174    0.073    1.000    0.002    0.013   -0.005    0.017   -0.007    0.006   -0.069    0.013    0.002   -0.017   -0.084   -0.000   -0.012    0.858   -0.002    0.070 |\n",
      "|   Dbar_s |   -0.027   -0.022    0.102    0.108   -0.026   -0.070    0.002    1.000   -0.020    0.025    0.067   -0.059    0.086    0.004    0.078   -0.013    0.009   -0.015   -0.014   -0.056    0.004    0.056   -0.066 |\n",
      "| DDstar_p |   -0.399   -0.064   -0.299   -0.150   -0.024   -0.301    0.013   -0.020    1.000    0.085    0.284    0.054   -0.087   -0.009   -0.128   -0.234   -0.001   -0.041    0.009    0.011    0.023   -0.089    0.161 |\n",
      "| DDstar_s |   -0.030    0.013   -0.035   -0.028   -0.002    0.074   -0.005    0.025    0.085    1.000    0.124   -0.043   -0.005    0.001   -0.068    0.056    0.001    0.008   -0.040    0.001   -0.007   -0.027   -0.087 |\n",
      "|   Dbar_p |    0.508   -0.033    0.469    0.415    0.000   -0.122    0.017    0.067    0.284    0.124    1.000   -0.208    0.299    0.006    0.249    0.588    0.001    0.012   -0.060   -0.088    0.020    0.504   -0.093 |\n",
      "|  p4040_s |   -0.228    0.012   -0.511   -0.274   -0.017    0.107   -0.007   -0.059    0.054   -0.043   -0.208    1.000    0.094   -0.001   -0.309   -0.214    0.003    0.005   -0.043    0.135   -0.009   -0.113   -0.258 |\n",
      "|  p3770_s |    0.256    0.010    0.135    0.094    0.037    0.030    0.006    0.086   -0.087   -0.005    0.299    0.094    1.000   -0.010    0.076   -0.005   -0.020    0.032    0.037    0.022    0.006   -0.062   -0.050 |\n",
      "|    phi_p |    0.012   -0.018   -0.008   -0.013   -0.251   -0.029   -0.069    0.004   -0.009    0.001    0.006   -0.001   -0.010    1.000   -0.017    0.004    0.858    0.025   -0.011    0.006   -0.137    0.002   -0.093 |\n",
      "|  p4415_p |    0.257    0.009    0.425    0.224    0.069   -0.041    0.013    0.078   -0.128   -0.068    0.249   -0.309    0.076   -0.017    1.000    0.290   -0.032    0.023   -0.233   -0.223    0.014    0.085    0.207 |\n",
      "|  p3770_p |    0.530    0.006    0.526    0.421    0.015    0.007    0.002   -0.013   -0.234    0.056    0.588   -0.214   -0.005    0.004    0.290    1.000   -0.006    0.042   -0.048   -0.103   -0.001    0.336   -0.039 |\n",
      "|    phi_s |    0.017   -0.047   -0.023   -0.027   -0.190   -0.012   -0.017    0.009   -0.001    0.001    0.001    0.003   -0.020    0.858   -0.032   -0.006    1.000    0.001   -0.016    0.012   -0.065    0.002   -0.131 |\n",
      "|  bplus_0 |   -0.019    0.232    0.029    0.031   -0.047   -0.873   -0.084   -0.015   -0.041    0.008    0.012    0.005    0.032    0.025    0.023    0.042    0.001    1.000    0.028    0.011   -0.128   -0.002   -0.117 |\n",
      "|  p4160_s |   -0.112    0.021   -0.154    0.322    0.024    0.094   -0.000   -0.014    0.009   -0.040   -0.060   -0.043    0.037   -0.011   -0.233   -0.048   -0.016    0.028    1.000    0.301   -0.002   -0.127   -0.155 |\n",
      "|  p4415_s |   -0.128    0.015   -0.060    0.040   -0.034    0.154   -0.012   -0.056    0.011    0.001   -0.088    0.135    0.022    0.006   -0.223   -0.103    0.012    0.011    0.301    1.000   -0.015   -0.049   -0.359 |\n",
      "|  omega_s |   -0.040   -0.285    0.010    0.010    0.302    0.107    0.858    0.004    0.023   -0.007    0.020   -0.009    0.006   -0.137    0.014   -0.001   -0.065   -0.128   -0.002   -0.015    1.000   -0.004    0.090 |\n",
      "|  psi2s_p |    0.352   -0.002    0.265    0.109   -0.019    0.062   -0.002    0.056   -0.089   -0.027    0.504   -0.113   -0.062    0.002    0.085    0.336    0.002   -0.002   -0.127   -0.049   -0.004    1.000   -0.272 |\n",
      "|  bplus_2 |   -0.179   -0.012    0.156    0.069    0.282   -0.158    0.070   -0.066    0.161   -0.087   -0.093   -0.258   -0.050   -0.093    0.207   -0.039   -0.131   -0.117   -0.155   -0.359    0.090   -0.272    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.036562893368484506}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.331941157723508}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.1372512704798199}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.22891092842716043}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.35211239140390793}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.04455302138342021}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.49022683071988205}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.09290163368275439}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.46006996019846946}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.08017724049871756}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.5410963784531813}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17205292492905183}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2605533758647143}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.3804140412628354}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.23349990504551843}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12857676153451258}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.5597536397796379}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.02201974728272904}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16461395336932172}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1957101845199422}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.9361157516973555}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03788242185907276}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.06854001188389147})])\n",
      "\n",
      "Time taken: 14 min, 54 s\n",
      "Estimated time left: 29 min, 48 s\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.972E+05               |    Ncalls=1116 (1116 total)    |\n",
      "| EDM = 0.000364 (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: 297180.915770768\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.54   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.00    |   0.29    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.19   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -3.0    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.8    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -0.922   |   0.031   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   -0.19   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   -0.07   |    0.42   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -0.7    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.30    |   0.42    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   -0.4    |    4.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.85    |   0.21    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |    2.4    |    0.4    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.24    |   0.26    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.9    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -3.05   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.6    |    1.2    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.492   |   0.014   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   0.95    |   0.22    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   1.96    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   0.80    |   0.22    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    6.8    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.09    |   0.07    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.20   |    0.08   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000   -0.116    0.822    0.775   -0.166   -0.557    0.025   -0.887   -0.376   -0.429   -0.905   -0.527    0.677    0.032    0.599    0.846    0.049   -0.470    0.635    0.078   -0.394    0.040    0.825   -0.053 |\n",
      "|    rho_s |   -0.116    1.000   -0.139   -0.144    0.074    0.074    0.008    0.167    0.156    0.078    0.159    0.098   -0.123    0.054   -0.118   -0.134    0.007    0.207   -0.139   -0.030    0.100   -0.417   -0.140   -0.124 |\n",
      "|  p4160_p |    0.822   -0.139    1.000    0.716   -0.119   -0.549    0.028   -0.856   -0.348   -0.411   -0.844   -0.668    0.618    0.034    0.656    0.832    0.040   -0.444    0.465    0.009   -0.429    0.051    0.762   -0.041 |\n",
      "|  p4040_p |    0.775   -0.144    0.716    1.000   -0.104   -0.540    0.028   -0.848   -0.431   -0.412   -0.823   -0.562    0.612    0.032    0.585    0.791    0.033   -0.433    0.550    0.269   -0.313    0.053    0.723   -0.029 |\n",
      "|    rho_p |   -0.166    0.074   -0.119   -0.104    1.000    0.117   -0.113    0.156    0.111    0.077    0.141    0.097   -0.091   -0.034   -0.059   -0.131   -0.013    0.138   -0.041    0.039    0.043    0.145   -0.133    0.259 |\n",
      "|  bplus_1 |   -0.557    0.074   -0.549   -0.540    0.117    1.000   -0.016    0.672    0.598    0.313    0.629    0.404   -0.458   -0.028   -0.419   -0.542   -0.033   -0.009   -0.498   -0.038    0.368   -0.023   -0.565   -0.142 |\n",
      "|  omega_p |    0.025    0.008    0.028    0.028   -0.113   -0.016    1.000   -0.032   -0.022   -0.015   -0.032   -0.019    0.024    0.038    0.022    0.028    0.044   -0.025    0.022    0.005   -0.016    0.384    0.028    0.011 |\n",
      "|   Dbar_s |   -0.887    0.167   -0.856   -0.848    0.156    0.672   -0.032    1.000    0.568    0.552    0.944    0.572   -0.736   -0.040   -0.656   -0.874   -0.051    0.550   -0.678   -0.117    0.430   -0.061   -0.888    0.058 |\n",
      "| DDstar_p |   -0.376    0.156   -0.348   -0.431    0.111    0.598   -0.022    0.568    1.000    0.405    0.605    0.268   -0.370   -0.016   -0.348   -0.394   -0.026    0.480   -0.402   -0.103    0.231   -0.054   -0.466   -0.072 |\n",
      "| DDstar_s |   -0.429    0.078   -0.411   -0.412    0.077    0.313   -0.015    0.552    0.405    1.000    0.535    0.310   -0.372   -0.020   -0.292   -0.462   -0.025    0.257   -0.388   -0.031    0.212   -0.029   -0.447    0.060 |\n",
      "|   Dbar_p |   -0.905    0.159   -0.844   -0.823    0.141    0.629   -0.032    0.944    0.605    0.535    1.000    0.555   -0.709   -0.040   -0.635   -0.893   -0.048    0.513   -0.613   -0.101    0.405   -0.059   -0.878    0.054 |\n",
      "|  p4040_s |   -0.527    0.098   -0.668   -0.562    0.097    0.404   -0.019    0.572    0.268    0.310    0.555    1.000   -0.338   -0.023   -0.469   -0.554   -0.031    0.332   -0.185   -0.180    0.359   -0.036   -0.470    0.042 |\n",
      "|  p3770_s |    0.677   -0.123    0.618    0.612   -0.091   -0.458    0.024   -0.736   -0.370   -0.372   -0.709   -0.338    1.000    0.028    0.479    0.584    0.029   -0.366    0.482    0.102   -0.284    0.045    0.588   -0.053 |\n",
      "|    phi_p |    0.032    0.054    0.034    0.032   -0.034   -0.028    0.038   -0.040   -0.016   -0.020   -0.040   -0.023    0.028    1.000    0.023    0.036    0.767   -0.017    0.024    0.001   -0.014   -0.036    0.035   -0.021 |\n",
      "|  p4415_p |    0.599   -0.118    0.656    0.585   -0.059   -0.419    0.022   -0.656   -0.348   -0.292   -0.635   -0.469    0.479    0.023    1.000    0.601    0.019   -0.331    0.487    0.054   -0.391    0.044    0.570    0.052 |\n",
      "|  p3770_p |    0.846   -0.134    0.832    0.791   -0.131   -0.542    0.028   -0.874   -0.394   -0.462   -0.893   -0.554    0.584    0.036    0.601    1.000    0.044   -0.438    0.502    0.079   -0.405    0.049    0.781   -0.091 |\n",
      "|    phi_s |    0.049    0.007    0.040    0.033   -0.013   -0.033    0.044   -0.051   -0.026   -0.025   -0.048   -0.031    0.029    0.767    0.019    0.044    1.000   -0.036    0.016   -0.013   -0.013    0.007    0.044   -0.083 |\n",
      "|  bplus_0 |   -0.470    0.207   -0.444   -0.433    0.138   -0.009   -0.025    0.550    0.480    0.257    0.513    0.332   -0.366   -0.017   -0.331   -0.438   -0.036    1.000   -0.394   -0.011    0.292   -0.069   -0.465   -0.087 |\n",
      "|      Ctt |    0.635   -0.139    0.465    0.550   -0.041   -0.498    0.022   -0.678   -0.402   -0.388   -0.613   -0.185    0.482    0.024    0.487    0.502    0.016   -0.394    1.000    0.266   -0.201    0.048    0.659    0.421 |\n",
      "|  p4160_s |    0.078   -0.030    0.009    0.269    0.039   -0.038    0.005   -0.117   -0.103   -0.031   -0.101   -0.180    0.102    0.001    0.054    0.079   -0.013   -0.011    0.266    1.000    0.245    0.011    0.074    0.087 |\n",
      "|  p4415_s |   -0.394    0.100   -0.429   -0.313    0.043    0.368   -0.016    0.430    0.231    0.212    0.405    0.359   -0.284   -0.014   -0.391   -0.405   -0.013    0.292   -0.201    0.245    1.000   -0.036   -0.356   -0.151 |\n",
      "|  omega_s |    0.040   -0.417    0.051    0.053    0.145   -0.023    0.384   -0.061   -0.054   -0.029   -0.059   -0.036    0.045   -0.036    0.044    0.049    0.007   -0.069    0.048    0.011   -0.036    1.000    0.051    0.047 |\n",
      "|  psi2s_p |    0.825   -0.140    0.762    0.723   -0.133   -0.565    0.028   -0.888   -0.466   -0.447   -0.878   -0.470    0.588    0.035    0.570    0.781    0.044   -0.465    0.659    0.074   -0.356    0.051    1.000   -0.063 |\n",
      "|  bplus_2 |   -0.053   -0.124   -0.041   -0.029    0.259   -0.142    0.011    0.058   -0.072    0.060    0.054    0.042   -0.053   -0.021    0.052   -0.091   -0.083   -0.087    0.421    0.087   -0.151    0.047   -0.063    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.06372140983255115}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.28626426273746436}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.22036399270141116}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.37167089738170245}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.3717573532820304}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.030976180536348097}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.23191802727941857}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4172578565304308}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.5154005397602863}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4154255232893645}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 4.62662495826725}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.20896727596197295}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.36781715661494374}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2585776408909113}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.3319577932880833}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.25175721433564435}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.212189983069246}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.014099859642668244}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.22046422086593376}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16843403017657088}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.2165851750697591}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.9476924420067472}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.06991308207337354}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07573633507840372})])\n",
      "Step: 4/11\n",
      "Current Ctt: 0.9759000729485332\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.972E+05               |    Ncalls=1060 (1060 total)    |\n",
      "| EDM = 8.03E-05 (Goal: 5E-06)  |            up = 0.5            |\n",
      "------------------------------------------------------------------\n",
      "|  Valid Min.   | Valid Param.  | Above EDM | Reached call limit |\n",
      "------------------------------------------------------------------\n",
      "|     True      |     True      |   False   |       False        |\n",
      "------------------------------------------------------------------\n",
      "| Hesse failed  |   Has cov.    | Accurate  | Pos. def. | Forced |\n",
      "------------------------------------------------------------------\n",
      "|     False     |     True      |   True    |   True    | False  |\n",
      "------------------------------------------------------------------\n",
      "Function minimum: 297187.3203920056\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.50   |    0.07   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.04    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.99   |    0.29   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -3.1    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.9    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.83   |    0.08   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   -0.18   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.07    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |    0.7    |    2.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.30    |   0.41    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |  -0.031   |   0.687   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.68    |   0.20    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |    2.4    |    0.3    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.25    |   0.29    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.9    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.82   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.7    |    1.3    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.477   |   0.021   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   1.76    |   0.22    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   0.83    |   0.30    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    6.8    |    1.0    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.07    |   0.06    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.45   |    0.10   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000   -0.204    0.858    0.801   -0.207   -0.768    0.036   -0.298    0.887    0.317   -0.418   -0.483    0.621    0.025    0.781    0.326    0.017   -0.128    0.512   -0.642    0.066    0.815    0.674 |\n",
      "|    rho_s |   -0.204    1.000   -0.244   -0.235    0.072    0.130    0.013    0.087   -0.255   -0.110    0.183    0.152   -0.178    0.063   -0.227   -0.039    0.019    0.257   -0.163    0.210   -0.451   -0.208   -0.319 |\n",
      "|  p4160_p |    0.858   -0.244    1.000    0.772   -0.157   -0.817    0.040   -0.279    0.907    0.334   -0.564   -0.577    0.583    0.027    0.847    0.244    0.006   -0.107    0.520   -0.708    0.081    0.779    0.799 |\n",
      "|  p4040_p |    0.801   -0.235    0.772    1.000   -0.151   -0.780    0.039   -0.281    0.891    0.346   -0.603   -0.524    0.593    0.026    0.794    0.195    0.005   -0.099    0.670   -0.599    0.079    0.719    0.713 |\n",
      "|    rho_p |   -0.207    0.072   -0.157   -0.151    1.000    0.160   -0.125    0.050   -0.204   -0.090    0.189    0.067   -0.100   -0.027   -0.151    0.017   -0.013    0.125   -0.089    0.111    0.087   -0.170   -0.008 |\n",
      "|  bplus_1 |   -0.768    0.130   -0.817   -0.780    0.160    1.000   -0.029    0.288   -0.887   -0.385    0.682    0.482   -0.575   -0.033   -0.758   -0.104   -0.012   -0.306   -0.522    0.685   -0.037   -0.720   -0.705 |\n",
      "|  omega_p |    0.036    0.013    0.040    0.039   -0.125   -0.029    1.000   -0.014    0.043    0.018   -0.028   -0.023    0.029    0.046    0.038    0.007    0.051   -0.025    0.027   -0.032    0.402    0.037    0.043 |\n",
      "|   Dbar_s |   -0.298    0.087   -0.279   -0.281    0.050    0.288   -0.014    1.000   -0.349   -0.140    0.284    0.113   -0.183   -0.010   -0.291   -0.005   -0.001    0.037   -0.220    0.224   -0.029   -0.263   -0.311 |\n",
      "| DDstar_p |    0.887   -0.255    0.907    0.891   -0.204   -0.887    0.043   -0.349    1.000    0.382   -0.728   -0.505    0.662    0.033    0.871    0.134    0.018   -0.129    0.618   -0.723    0.086    0.844    0.785 |\n",
      "| DDstar_s |    0.317   -0.110    0.334    0.346   -0.090   -0.385    0.018   -0.140    0.382    1.000   -0.255   -0.187    0.245    0.012    0.340    0.006    0.007   -0.058    0.249   -0.293    0.037    0.321    0.338 |\n",
      "|   Dbar_p |   -0.418    0.183   -0.564   -0.603    0.189    0.682   -0.028    0.284   -0.728   -0.255    1.000    0.322   -0.410   -0.019   -0.595    0.331   -0.021    0.127   -0.467    0.548   -0.062   -0.450   -0.581 |\n",
      "|  p4040_s |   -0.483    0.152   -0.577   -0.524    0.067    0.482   -0.023    0.113   -0.505   -0.187    0.322    1.000   -0.224   -0.013   -0.522   -0.171    0.005    0.060   -0.537    0.449   -0.049   -0.383   -0.564 |\n",
      "|  p3770_s |    0.621   -0.178    0.583    0.593   -0.100   -0.575    0.029   -0.183    0.662    0.245   -0.410   -0.224    1.000    0.018    0.583   -0.036   -0.002   -0.061    0.431   -0.448    0.059    0.467    0.527 |\n",
      "|    phi_p |    0.025    0.063    0.027    0.026   -0.027   -0.033    0.046   -0.010    0.033    0.012   -0.019   -0.013    0.018    1.000    0.026    0.005    0.805    0.005    0.016   -0.019   -0.036    0.028    0.007 |\n",
      "|  p4415_p |    0.781   -0.227    0.847    0.794   -0.151   -0.758    0.038   -0.291    0.871    0.340   -0.595   -0.522    0.583    0.026    1.000    0.171    0.006   -0.097    0.554   -0.682    0.076    0.724    0.685 |\n",
      "|  p3770_p |    0.326   -0.039    0.244    0.195    0.017   -0.104    0.007   -0.005    0.134    0.006    0.331   -0.171   -0.036    0.005    0.171    1.000   -0.013    0.028    0.088   -0.118    0.010    0.209    0.160 |\n",
      "|    phi_s |    0.017    0.019    0.006    0.005   -0.013   -0.012    0.051   -0.001    0.018    0.007   -0.021    0.005   -0.002    0.805    0.006   -0.013    1.000   -0.019   -0.002    0.001    0.003    0.013   -0.040 |\n",
      "|  bplus_0 |   -0.128    0.257   -0.107   -0.099    0.125   -0.306   -0.025    0.037   -0.129   -0.058    0.127    0.060   -0.061    0.005   -0.097    0.028   -0.019    1.000   -0.049    0.090   -0.096   -0.106   -0.211 |\n",
      "|  p4160_s |    0.512   -0.163    0.520    0.670   -0.089   -0.522    0.027   -0.220    0.618    0.249   -0.467   -0.537    0.431    0.016    0.554    0.088   -0.002   -0.049    1.000   -0.279    0.055    0.463    0.445 |\n",
      "|  p4415_s |   -0.642    0.210   -0.708   -0.599    0.111    0.685   -0.032    0.224   -0.723   -0.293    0.548    0.449   -0.448   -0.019   -0.682   -0.118    0.001    0.090   -0.279    1.000   -0.070   -0.576   -0.734 |\n",
      "|  omega_s |    0.066   -0.451    0.081    0.079    0.087   -0.037    0.402   -0.029    0.086    0.037   -0.062   -0.049    0.059   -0.036    0.076    0.010    0.003   -0.096    0.055   -0.070    1.000    0.070    0.110 |\n",
      "|  psi2s_p |    0.815   -0.208    0.779    0.719   -0.170   -0.720    0.037   -0.263    0.844    0.321   -0.450   -0.383    0.467    0.028    0.724    0.209    0.013   -0.106    0.463   -0.576    0.070    1.000    0.594 |\n",
      "|  bplus_2 |    0.674   -0.319    0.799    0.713   -0.008   -0.705    0.043   -0.311    0.785    0.338   -0.581   -0.564    0.527    0.007    0.685    0.160   -0.040   -0.211    0.445   -0.734    0.110    0.594    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.07101538522719064}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.309882081426758}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.2884031666963205}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.550045671322255}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.38246551541389673}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.07999913036579931}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.24069993985428484}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.07483429659224233}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 2.2760800059821853}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4079696994032441}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.6872398972602709}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.20371407209994596}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.34299572469727213}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2891801390193569}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.501431197984888}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.1394308474034025}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.3468233188757157}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.02129224510892902}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.21874876871126903}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.30129335364964094}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.9990250168057759}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.06473128751163415}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.09761900683638203})])\n",
      "\n",
      "Time taken: 19 min, 3 s\n",
      "Estimated time left: 26 min, 40 s\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.97E+05                |    Ncalls=1196 (1196 total)    |\n",
      "| EDM = 6.58E-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: 296959.3369213137\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.50   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.59    |   0.29    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.94   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.3    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.61   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.94   |    0.03   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.25    |   0.30    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   -0.30   |    0.50   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -0.30   |    2.52   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.19    |   0.47    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   0.21    |   1.47    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.57    |   0.20    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.41    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |    0.5    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.41   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.90   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   17.7    |    1.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.487   |   0.015   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   1.21    |   0.20    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.36    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.27    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    7.3    |    1.3    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.22   |    0.09   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000   -0.013    0.640    0.359   -0.093   -0.204   -0.004    0.294    0.556   -0.506    0.271    0.150    0.256    0.026    0.551    0.126    0.030   -0.146   -0.105    0.196   -0.104   -0.002    0.418    0.165 |\n",
      "|    rho_s |   -0.013    1.000   -0.041   -0.027    0.150   -0.049   -0.023   -0.016   -0.045    0.077   -0.047   -0.028   -0.009    0.099   -0.057    0.032    0.066    0.175   -0.004   -0.031    0.029   -0.355   -0.012   -0.120 |\n",
      "|  p4160_p |    0.640   -0.041    1.000    0.449   -0.038   -0.243    0.013    0.296    0.637   -0.569    0.400   -0.091    0.164    0.021    0.690    0.107    0.019   -0.127   -0.455    0.173   -0.164    0.017    0.299    0.158 |\n",
      "|  p4040_p |    0.359   -0.027    0.449    1.000   -0.000   -0.122    0.010    0.036    0.254   -0.229    0.079   -0.135    0.066    0.002    0.373    0.223   -0.001   -0.055   -0.265    0.386   -0.050    0.012    0.102    0.075 |\n",
      "|    rho_p |   -0.093    0.150   -0.038   -0.000    1.000    0.025    0.030   -0.005   -0.047    0.057   -0.042    0.023    0.021   -0.165   -0.004    0.009   -0.139    0.060    0.121    0.047    0.003    0.083   -0.014    0.250 |\n",
      "|  bplus_1 |   -0.204   -0.049   -0.243   -0.122    0.025    1.000    0.013   -0.113   -0.292    0.426   -0.291   -0.118   -0.009   -0.022   -0.291    0.167   -0.015   -0.585    0.065   -0.114    0.144    0.028   -0.076   -0.345 |\n",
      "|  omega_p |   -0.004   -0.023    0.013    0.010    0.030    0.013    1.000    0.006    0.013   -0.019    0.010    0.009    0.006    0.018    0.018   -0.006    0.037   -0.033    0.003    0.012   -0.007    0.717    0.005    0.042 |\n",
      "|   Dbar_s |    0.294   -0.016    0.296    0.036   -0.005   -0.113    0.006    1.000    0.584   -0.595    0.589    0.236   -0.073    0.009    0.367   -0.258    0.006   -0.054   -0.425    0.190    0.016    0.006    0.012    0.161 |\n",
      "| DDstar_p |    0.556   -0.045    0.637    0.254   -0.047   -0.292    0.013    0.584    1.000   -0.917    0.919    0.391    0.065    0.027    0.718   -0.391    0.027   -0.156   -0.474    0.369   -0.051    0.019    0.185    0.258 |\n",
      "| DDstar_s |   -0.506    0.077   -0.569   -0.229    0.057    0.426   -0.019   -0.595   -0.917    1.000   -0.881   -0.434   -0.054   -0.024   -0.706    0.448   -0.024    0.226    0.440   -0.385    0.042   -0.031   -0.190   -0.331 |\n",
      "|   Dbar_p |    0.271   -0.047    0.400    0.079   -0.042   -0.291    0.010    0.589    0.919   -0.881    1.000    0.413   -0.084    0.017    0.574   -0.603    0.018   -0.153   -0.472    0.342   -0.012    0.017   -0.032    0.271 |\n",
      "|  p4040_s |    0.150   -0.028   -0.091   -0.135    0.023   -0.118    0.009    0.236    0.391   -0.434    0.413    1.000    0.104   -0.004    0.165   -0.301   -0.009   -0.047    0.080    0.141    0.181    0.011    0.047    0.184 |\n",
      "|  p3770_s |    0.256   -0.009    0.164    0.066    0.021   -0.009    0.006   -0.073    0.065   -0.054   -0.084    0.104    1.000   -0.005    0.122   -0.003   -0.010    0.014   -0.028    0.043    0.008    0.005   -0.032   -0.020 |\n",
      "|    phi_p |    0.026    0.099    0.021    0.002   -0.165   -0.022    0.018    0.009    0.027   -0.024    0.017   -0.004   -0.005    1.000    0.009   -0.000    0.909   -0.003   -0.033   -0.011    0.001   -0.076    0.009   -0.083 |\n",
      "|  p4415_p |    0.551   -0.057    0.690    0.373   -0.004   -0.291    0.018    0.367    0.718   -0.706    0.574    0.165    0.122    0.009    1.000   -0.127    0.003   -0.140   -0.319    0.241   -0.167    0.024    0.227    0.303 |\n",
      "|  p3770_p |    0.126    0.032    0.107    0.223    0.009    0.167   -0.006   -0.258   -0.391    0.448   -0.603   -0.301   -0.003   -0.000   -0.127    1.000   -0.002    0.100    0.103   -0.166   -0.088   -0.013    0.151   -0.199 |\n",
      "|    phi_s |    0.030    0.066    0.019   -0.001   -0.139   -0.015    0.037    0.006    0.027   -0.024    0.018   -0.009   -0.010    0.909    0.003   -0.002    1.000   -0.013   -0.044   -0.020    0.001   -0.040    0.007   -0.112 |\n",
      "|  bplus_0 |   -0.146    0.175   -0.127   -0.055    0.060   -0.585   -0.033   -0.054   -0.156    0.226   -0.153   -0.047    0.014   -0.003   -0.140    0.100   -0.013    1.000    0.060   -0.028    0.077   -0.071   -0.049   -0.150 |\n",
      "|      Ctt |   -0.105   -0.004   -0.455   -0.265    0.121    0.065    0.003   -0.425   -0.474    0.440   -0.472    0.080   -0.028   -0.033   -0.319    0.103   -0.044    0.060    1.000    0.009    0.185   -0.002    0.136    0.394 |\n",
      "|  p4160_s |    0.196   -0.031    0.173    0.386    0.047   -0.114    0.012    0.190    0.369   -0.385    0.342    0.141    0.043   -0.011    0.241   -0.166   -0.020   -0.028    0.009    1.000    0.289    0.012    0.027    0.220 |\n",
      "|  p4415_s |   -0.104    0.029   -0.164   -0.050    0.003    0.144   -0.007    0.016   -0.051    0.042   -0.012    0.181    0.008    0.001   -0.167   -0.088    0.001    0.077    0.185    0.289    1.000   -0.012   -0.017   -0.149 |\n",
      "|  omega_s |   -0.002   -0.355    0.017    0.012    0.083    0.028    0.717    0.006    0.019   -0.031    0.017    0.011    0.005   -0.076    0.024   -0.013   -0.040   -0.071   -0.002    0.012   -0.012    1.000    0.005    0.052 |\n",
      "|  psi2s_p |    0.418   -0.012    0.299    0.102   -0.014   -0.076    0.005    0.012    0.185   -0.190   -0.032    0.047   -0.032    0.009    0.227    0.151    0.007   -0.049    0.136    0.027   -0.017    0.005    1.000    0.044 |\n",
      "|  bplus_2 |    0.165   -0.120    0.158    0.075    0.250   -0.345    0.042    0.161    0.258   -0.331    0.271    0.184   -0.020   -0.083    0.303   -0.199   -0.112   -0.150    0.394    0.220   -0.149    0.052    0.044    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04184298912460305}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.28932781706772515}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.15720020431109338}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.35162985099902344}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.25279143853880104}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03227927257945207}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.2962341102421533}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.502162514817949}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 2.5177755171147846}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.47095511064931567}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.4660364150776335}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1960216842688318}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2621381767777382}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.46764509396672604}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.26469020671709864}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.15944525824462064}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.9009061284750102}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.014792002441646801}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.2042749478064787}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17818246165544105}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.1952041222720029}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.2909843203277918}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03811572185864609}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.0862791657364742})])\n",
      "Step: 5/11\n",
      "Current Ctt: 1.0910894511799618\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.97E+05                |    Ncalls=1049 (1049 total)    |\n",
      "| EDM = 8.2E-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: 296968.7291744274\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.46   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.63    |   0.30    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.71   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.2    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.69   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.88   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.25    |   0.30    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.07    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -1.4    |    1.0    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.54   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   -0.06   |    0.50   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.32    |   0.20    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.42    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |    0.5    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.37   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.63   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   17.9    |    2.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.480   |   0.020   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   2.16    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   1.21    |   0.20    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    7.3    |    1.3    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.06    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.48   |    0.08   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.086    0.441    0.132   -0.004    0.294   -0.025    0.071   -0.304   -0.387    0.446   -0.261    0.169    0.002    0.045    0.517    0.002    0.002   -0.111    0.001   -0.044    0.218   -0.231 |\n",
      "|    rho_s |    0.086    1.000    0.023   -0.023    0.144    0.034   -0.033    0.019   -0.187   -0.139   -0.063   -0.063    0.002    0.131   -0.077    0.088    0.094    0.238   -0.045    0.060   -0.376   -0.024   -0.236 |\n",
      "|  p4160_p |    0.441    0.023    1.000    0.223    0.102    0.149   -0.001    0.139   -0.247   -0.377    0.184   -0.523    0.005   -0.021    0.305    0.419   -0.033    0.045   -0.025   -0.100   -0.015    0.082    0.104 |\n",
      "|  p4040_p |    0.132   -0.023    0.223    1.000    0.066   -0.040    0.006    0.096   -0.002   -0.094    0.079   -0.294   -0.110   -0.025    0.237    0.174   -0.033    0.020    0.455   -0.012    0.005   -0.098    0.226 |\n",
      "|    rho_p |   -0.004    0.144    0.102    0.066    1.000    0.099    0.010   -0.003   -0.142   -0.103    0.013   -0.066    0.059   -0.176    0.026    0.108   -0.156    0.087    0.025   -0.015    0.035   -0.019    0.105 |\n",
      "|  bplus_1 |    0.294    0.034    0.149   -0.040    0.099    1.000    0.001    0.073   -0.801   -0.593   -0.217   -0.262    0.062   -0.013   -0.267    0.392   -0.010   -0.466   -0.146    0.231   -0.007   -0.082   -0.555 |\n",
      "|  omega_p |   -0.025   -0.033   -0.001    0.006    0.010    0.001    1.000   -0.003    0.034    0.023    0.018    0.012    0.002    0.018    0.017   -0.014    0.037   -0.048    0.010   -0.012    0.723    0.005    0.055 |\n",
      "|   Dbar_s |    0.071    0.019    0.139    0.096   -0.003    0.073   -0.003    1.000   -0.129   -0.073    0.008   -0.095    0.082    0.006    0.015    0.098    0.007    0.005   -0.018   -0.027   -0.007    0.042   -0.119 |\n",
      "| DDstar_p |   -0.304   -0.187   -0.247   -0.002   -0.142   -0.801    0.034   -0.129    1.000    0.749    0.368    0.414   -0.039   -0.001    0.320   -0.471    0.004   -0.099    0.208   -0.158    0.077    0.197    0.660 |\n",
      "| DDstar_s |   -0.387   -0.139   -0.377   -0.094   -0.103   -0.593    0.023   -0.073    0.749    1.000    0.416    0.309   -0.110   -0.006    0.098   -0.380   -0.001   -0.073    0.112   -0.081    0.056    0.045    0.495 |\n",
      "|   Dbar_p |    0.446   -0.063    0.184    0.079    0.013   -0.217    0.018    0.008    0.368    0.416    1.000    0.061    0.141   -0.008    0.200    0.314   -0.016    0.011    0.041   -0.010    0.025    0.435    0.231 |\n",
      "|  p4040_s |   -0.261   -0.063   -0.523   -0.294   -0.066   -0.262    0.012   -0.095    0.414    0.309    0.061    1.000    0.143   -0.002   -0.090   -0.296    0.002   -0.033   -0.108    0.114    0.029    0.018    0.055 |\n",
      "|  p3770_s |    0.169    0.002    0.005   -0.110    0.059    0.062    0.002    0.082   -0.039   -0.110    0.141    0.143    1.000   -0.021    0.010   -0.091   -0.029    0.040    0.001    0.072   -0.003   -0.222   -0.024 |\n",
      "|    phi_p |    0.002    0.131   -0.021   -0.025   -0.176   -0.013    0.018    0.006   -0.001   -0.006   -0.008   -0.002   -0.021    1.000   -0.027   -0.007    0.917    0.008   -0.022    0.016   -0.081   -0.006   -0.089 |\n",
      "|  p4415_p |    0.045   -0.077    0.305    0.237    0.026   -0.267    0.017    0.015    0.320    0.098    0.200   -0.090    0.010   -0.027    1.000   -0.002   -0.035   -0.005    0.079   -0.254    0.028    0.057    0.360 |\n",
      "|  p3770_p |    0.517    0.088    0.419    0.174    0.108    0.392   -0.014    0.098   -0.471   -0.380    0.314   -0.296   -0.091   -0.007   -0.002    1.000   -0.017    0.087   -0.071    0.039   -0.040    0.103   -0.241 |\n",
      "|    phi_s |    0.002    0.094   -0.033   -0.033   -0.156   -0.010    0.037    0.007    0.004   -0.001   -0.016    0.002   -0.029    0.917   -0.035   -0.017    1.000   -0.007   -0.028    0.020   -0.045   -0.007   -0.105 |\n",
      "|  bplus_0 |    0.002    0.238    0.045    0.020    0.087   -0.466   -0.048    0.005   -0.099   -0.073    0.011   -0.033    0.040    0.008   -0.005    0.087   -0.007    1.000    0.015    0.022   -0.105   -0.015   -0.198 |\n",
      "|  p4160_s |   -0.111   -0.045   -0.025    0.455    0.025   -0.146    0.010   -0.018    0.208    0.112    0.041   -0.108    0.001   -0.022    0.079   -0.071   -0.028    0.015    1.000    0.235    0.017   -0.088    0.150 |\n",
      "|  p4415_s |    0.001    0.060   -0.100   -0.012   -0.015    0.231   -0.012   -0.027   -0.158   -0.081   -0.010    0.114    0.072    0.016   -0.254    0.039    0.020    0.022    0.235    1.000   -0.021    0.011   -0.411 |\n",
      "|  omega_s |   -0.044   -0.376   -0.015    0.005    0.035   -0.007    0.723   -0.007    0.077    0.056    0.025    0.029   -0.003   -0.081    0.028   -0.040   -0.045   -0.105    0.017   -0.021    1.000    0.010    0.095 |\n",
      "|  psi2s_p |    0.218   -0.024    0.082   -0.098   -0.019   -0.082    0.005    0.042    0.197    0.045    0.435    0.018   -0.222   -0.006    0.057    0.103   -0.007   -0.015   -0.088    0.011    0.010    1.000   -0.016 |\n",
      "|  bplus_2 |   -0.231   -0.236    0.104    0.226    0.105   -0.555    0.055   -0.119    0.660    0.495    0.231    0.055   -0.024   -0.089    0.360   -0.241   -0.105   -0.198    0.150   -0.411    0.095   -0.016    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03629123205332219}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.30118447397518067}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.11746256211456929}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.565315136723898}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.2578333849098109}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.06299979083463492}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.30093532140458246}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.06941149544506003}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.9932965573618386}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.536045263720389}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.5021372286276393}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.19608145912904512}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.24909485637497797}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.49128732836878264}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.19484945899059936}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.16097962381360298}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 2.007842145348045}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.020447457748468123}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17066057080641128}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.2033584833388411}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.3364502629121944}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03582569201439867}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08441834596442221})])\n",
      "\n",
      "Time taken: 23 min, 37 s\n",
      "Estimated time left: 23 min, 37 s\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.969E+05               |    Ncalls=1059 (1059 total)    |\n",
      "| EDM = 0.000305 (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: 296939.8181073398\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.52   |    0.05   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   0.95    |   0.25    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.19   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.51   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.7    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -1.041   |   0.013   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.72    |   0.21    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   -0.30   |    0.41   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -1.0    |    3.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.08    |   0.48    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |    0.3    |    0.8    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.93    |   0.15    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.68    |   0.24    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.22    |   0.29    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.43   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.96   |    0.10   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   18.2    |    1.1    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.525   |   0.007   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   1.57    |   0.12    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.22    |   0.14    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.30    |   0.16    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    8.7    |    1.0    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.09    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.08   |    0.05   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.054    0.770    0.551   -0.037    0.246    0.016    0.240    0.872   -0.873    0.746    0.367    0.439    0.019    0.673    0.424    0.027    0.216   -0.246    0.238   -0.121    0.005    0.586    0.084 |\n",
      "|    rho_s |    0.054    1.000    0.028    0.015    0.097   -0.000    0.315    0.021    0.044   -0.040    0.042    0.016    0.009    0.027    0.023    0.015   -0.003    0.062   -0.021    0.007    0.006   -0.080    0.027   -0.073 |\n",
      "|  p4160_p |    0.770    0.028    1.000    0.565    0.006    0.230    0.019    0.144    0.839   -0.836    0.719    0.188    0.397    0.029    0.714    0.448    0.025    0.212   -0.399    0.192   -0.093    0.008    0.546    0.123 |\n",
      "|  p4040_p |    0.551    0.015    0.565    1.000    0.012    0.159    0.014    0.039    0.593   -0.593    0.475    0.168    0.259    0.021    0.519    0.370    0.015    0.148   -0.310    0.391   -0.045    0.005    0.345    0.089 |\n",
      "|    rho_p |   -0.037    0.097    0.006    0.012    1.000    0.053    0.071    0.020    0.001    0.000   -0.001    0.018    0.018   -0.013    0.017   -0.001    0.020    0.066    0.011    0.026   -0.001    0.012    0.000    0.195 |\n",
      "|  bplus_1 |    0.246   -0.000    0.230    0.159    0.053    1.000    0.008    0.248    0.344   -0.300    0.316    0.198    0.155    0.011    0.229    0.136    0.002   -0.255   -0.152    0.164    0.085    0.001    0.201   -0.136 |\n",
      "|  omega_p |    0.016    0.315    0.019    0.014    0.071    0.008    1.000    0.009    0.024   -0.023    0.020    0.011    0.011    0.033    0.018    0.010    0.035    0.018   -0.007    0.008   -0.001    0.639    0.014    0.008 |\n",
      "|   Dbar_s |    0.240    0.021    0.144    0.039    0.020    0.248    0.009    1.000    0.189   -0.223    0.222    0.065    0.005    0.008    0.111    0.157    0.003    0.236   -0.252    0.020   -0.002   -0.001    0.091    0.135 |\n",
      "| DDstar_p |    0.872    0.044    0.839    0.593    0.001    0.344    0.024    0.189    1.000   -0.982    0.927    0.413    0.451    0.033    0.738    0.422    0.032    0.317   -0.364    0.274   -0.127    0.009    0.624    0.114 |\n",
      "| DDstar_s |   -0.873   -0.040   -0.836   -0.593    0.000   -0.300   -0.023   -0.223   -0.982    1.000   -0.935   -0.434   -0.452   -0.034   -0.749   -0.407   -0.032   -0.275    0.379   -0.292    0.112   -0.010   -0.633   -0.116 |\n",
      "|   Dbar_p |    0.746    0.042    0.719    0.475   -0.001    0.316    0.020    0.222    0.927   -0.935    1.000    0.396    0.340    0.028    0.657    0.268    0.027    0.291   -0.391    0.264   -0.095    0.007    0.500    0.138 |\n",
      "|  p4040_s |    0.367    0.016    0.188    0.168    0.018    0.198    0.011    0.065    0.413   -0.434    0.396    1.000    0.277    0.015    0.248    0.171    0.009    0.188    0.030    0.097    0.042    0.002    0.262    0.044 |\n",
      "|  p3770_s |    0.439    0.009    0.397    0.259    0.018    0.155    0.011    0.005    0.451   -0.452    0.340    0.277    1.000    0.017    0.361    0.073    0.009    0.149   -0.171    0.155   -0.041    0.003    0.181    0.043 |\n",
      "|    phi_p |    0.019    0.027    0.029    0.021   -0.013    0.011    0.033    0.008    0.033   -0.034    0.028    0.015    0.017    1.000    0.026    0.015    0.779    0.011   -0.009    0.011   -0.004   -0.030    0.020    0.014 |\n",
      "|  p4415_p |    0.673    0.023    0.714    0.519    0.017    0.229    0.018    0.111    0.738   -0.749    0.657    0.248    0.361    0.026    1.000    0.368    0.020    0.213   -0.265    0.150   -0.158    0.006    0.474    0.140 |\n",
      "|  p3770_p |    0.424    0.015    0.448    0.370   -0.001    0.136    0.010    0.157    0.422   -0.407    0.268    0.171    0.073    0.015    0.368    1.000    0.012    0.132   -0.227    0.116   -0.096    0.003    0.282    0.039 |\n",
      "|    phi_s |    0.027   -0.003    0.025    0.015    0.020    0.002    0.035    0.003    0.032   -0.032    0.027    0.009    0.009    0.779    0.020    0.012    1.000   -0.000   -0.011    0.003   -0.004   -0.000    0.018   -0.036 |\n",
      "|  bplus_0 |    0.216    0.062    0.212    0.148    0.066   -0.255    0.018    0.236    0.317   -0.275    0.291    0.188    0.149    0.011    0.213    0.132   -0.000    1.000   -0.142    0.160    0.083   -0.006    0.183   -0.102 |\n",
      "|      Ctt |   -0.246   -0.021   -0.399   -0.310    0.011   -0.152   -0.007   -0.252   -0.364    0.379   -0.391    0.030   -0.171   -0.009   -0.265   -0.227   -0.011   -0.142    1.000    0.058    0.205   -0.003   -0.082    0.332 |\n",
      "|  p4160_s |    0.238    0.007    0.192    0.391    0.026    0.164    0.008    0.020    0.274   -0.292    0.264    0.097    0.155    0.011    0.150    0.116    0.003    0.160    0.058    1.000    0.183    0.000    0.144    0.065 |\n",
      "|  p4415_s |   -0.121    0.006   -0.093   -0.045   -0.001    0.085   -0.001   -0.002   -0.127    0.112   -0.095    0.042   -0.041   -0.004   -0.158   -0.096   -0.004    0.083    0.205    0.183    1.000   -0.002   -0.075   -0.121 |\n",
      "|  omega_s |    0.005   -0.080    0.008    0.005    0.012    0.001    0.639   -0.001    0.009   -0.010    0.007    0.002    0.003   -0.030    0.006    0.003   -0.000   -0.006   -0.003    0.000   -0.002    1.000    0.005   -0.008 |\n",
      "|  psi2s_p |    0.586    0.027    0.546    0.345    0.000    0.201    0.014    0.091    0.624   -0.633    0.500    0.262    0.181    0.020    0.474    0.282    0.018    0.183   -0.082    0.144   -0.075    0.005    1.000    0.026 |\n",
      "|  bplus_2 |    0.084   -0.073    0.123    0.089    0.195   -0.136    0.008    0.135    0.114   -0.116    0.138    0.044    0.043    0.014    0.140    0.039   -0.036   -0.102    0.332    0.065   -0.121   -0.008    0.026    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04528409765540298}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.24839905215830838}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.15213495204092675}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.20318874621917904}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.3531546251763724}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.012848584613857295}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.213514048083689}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.405398004255336}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 3.6760215619230254}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.47668538890089185}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.8045030715428441}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1496708661215665}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.23560670912498383}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.2887618628871187}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.21299975174791586}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.098494067267626}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.1499512693813152}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.006530544304049535}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.11757922489754025}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.14033759532498702}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.16126637569069968}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.0349058263880915}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.035866975018942426}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.05287302214910361})])\n",
      "Step: 6/11\n",
      "Current Ctt: 1.1952286093343936\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.97E+05                |    Ncalls=1046 (1046 total)    |\n",
      "| EDM = 2.36E-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: 296958.8313506647\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.48   |    0.03   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.02    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.89   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.3    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -1.0    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.92   |    0.05   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |    0.7    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.04    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -1.3    |    0.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.42   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   0.006   |   0.408   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.55    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.77    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.22    |   1.31    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.42   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.61   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |    18     |     6     |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.506   |   0.022   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   1.90    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   1.19    |   0.21    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |     9     |     4     |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.06    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.51   |    0.08   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.062    0.328    0.113   -0.039    0.209   -0.015    0.023   -0.245   -0.307    0.548   -0.200    0.164   -0.080    0.052    0.448   -0.077   -0.018   -0.128   -0.025   -0.012    0.195   -0.172 |\n",
      "|    rho_s |    0.062    1.000   -0.033   -0.044    0.062   -0.064    0.419    0.006   -0.095   -0.043   -0.023   -0.010   -0.016    0.107   -0.058    0.029    0.098    0.197   -0.030    0.051    0.099   -0.003   -0.226 |\n",
      "|  p4160_p |    0.328   -0.033    1.000    0.152    0.068   -0.005   -0.000    0.064   -0.084   -0.238    0.277   -0.487   -0.012   -0.023    0.336    0.321   -0.028    0.026   -0.087   -0.097   -0.005    0.056    0.257 |\n",
      "|  p4040_p |    0.113   -0.044    0.152    1.000    0.049   -0.080   -0.006    0.050    0.081   -0.078    0.152   -0.201   -0.069   -0.021    0.213    0.162   -0.026    0.018    0.427    0.025   -0.004   -0.102    0.246 |\n",
      "|    rho_p |   -0.039    0.062    0.068    0.049    1.000    0.039    0.198   -0.006   -0.136   -0.062    0.032   -0.041    0.055    0.099    0.024    0.084    0.102    0.133    0.013   -0.012    0.054   -0.021    0.106 |\n",
      "|  bplus_1 |    0.209   -0.064   -0.005   -0.080    0.039    1.000   -0.011    0.016   -0.685   -0.307   -0.033   -0.104    0.061   -0.003   -0.189    0.282   -0.002   -0.614   -0.088    0.217   -0.000   -0.019   -0.381 |\n",
      "|  omega_p |   -0.015    0.419   -0.000   -0.006    0.198   -0.011    1.000    0.001   -0.037   -0.020    0.006   -0.008    0.001    0.203   -0.011    0.017    0.204    0.062   -0.006    0.010    0.793   -0.008   -0.039 |\n",
      "|   Dbar_s |    0.023    0.006    0.064    0.050   -0.006    0.016    0.001    1.000   -0.056   -0.013    0.019   -0.039    0.047    0.003    0.015    0.036    0.003   -0.001   -0.013   -0.020    0.001    0.027   -0.054 |\n",
      "| DDstar_p |   -0.245   -0.095   -0.084    0.081   -0.136   -0.685   -0.037   -0.056    1.000    0.471    0.164    0.274   -0.047    0.010    0.272   -0.406    0.011   -0.085    0.204   -0.141    0.001    0.145    0.526 |\n",
      "| DDstar_s |   -0.307   -0.043   -0.238   -0.078   -0.062   -0.307   -0.020   -0.013    0.471    1.000    0.209    0.126   -0.109   -0.003   -0.023   -0.235   -0.002   -0.040    0.061   -0.030   -0.001   -0.051    0.241 |\n",
      "|   Dbar_p |    0.548   -0.023    0.277    0.152    0.032   -0.033    0.006    0.019    0.164    0.209    1.000   -0.050    0.183    0.011    0.157    0.453    0.007    0.029   -0.004    0.007    0.001    0.396    0.055 |\n",
      "|  p4040_s |   -0.200   -0.010   -0.487   -0.201   -0.041   -0.104   -0.008   -0.039    0.274    0.126   -0.050    1.000    0.151    0.002   -0.141   -0.219    0.003   -0.014   -0.048    0.143    0.001   -0.012   -0.102 |\n",
      "|  p3770_s |    0.164   -0.016   -0.012   -0.069    0.055    0.061    0.001    0.047   -0.047   -0.109    0.183    0.151    1.000   -0.020    0.015   -0.108   -0.024    0.041    0.032    0.069   -0.004   -0.255   -0.006 |\n",
      "|    phi_p |   -0.080    0.107   -0.023   -0.021    0.099   -0.003    0.203    0.003    0.010   -0.003    0.011    0.002   -0.020    1.000   -0.017   -0.014    0.987   -0.007   -0.010    0.008    0.010   -0.016   -0.040 |\n",
      "|  p4415_p |    0.052   -0.058    0.336    0.213    0.024   -0.189   -0.011    0.015    0.272   -0.023    0.157   -0.141    0.015   -0.017    1.000    0.036   -0.021    0.004   -0.004   -0.220   -0.004    0.014    0.283 |\n",
      "|  p3770_p |    0.448    0.029    0.321    0.162    0.084    0.282    0.017    0.036   -0.406   -0.235    0.453   -0.219   -0.108   -0.014    0.036    1.000   -0.018    0.070   -0.083    0.010   -0.002    0.124   -0.142 |\n",
      "|    phi_s |   -0.077    0.098   -0.028   -0.026    0.102   -0.002    0.204    0.003    0.011   -0.002    0.007    0.003   -0.024    0.987   -0.021   -0.018    1.000   -0.011   -0.012    0.011    0.018   -0.016   -0.052 |\n",
      "|  bplus_0 |   -0.018    0.197    0.026    0.018    0.133   -0.614    0.062   -0.001   -0.085   -0.040    0.029   -0.014    0.041   -0.007    0.004    0.070   -0.011    1.000    0.016    0.017    0.000   -0.013   -0.214 |\n",
      "|  p4160_s |   -0.128   -0.030   -0.087    0.427    0.013   -0.088   -0.006   -0.013    0.204    0.061   -0.004   -0.048    0.032   -0.010   -0.004   -0.083   -0.012    0.016    1.000    0.276   -0.002   -0.096    0.037 |\n",
      "|  p4415_s |   -0.025    0.051   -0.097    0.025   -0.012    0.217    0.010   -0.020   -0.141   -0.030    0.007    0.143    0.069    0.008   -0.220    0.010    0.011    0.017    0.276    1.000    0.002    0.019   -0.422 |\n",
      "|  omega_s |   -0.012    0.099   -0.005   -0.004    0.054   -0.000    0.793    0.001    0.001   -0.001    0.001    0.001   -0.004    0.010   -0.004   -0.002    0.018    0.000   -0.002    0.002    1.000   -0.002   -0.010 |\n",
      "|  psi2s_p |    0.195   -0.003    0.056   -0.102   -0.021   -0.019   -0.008    0.027    0.145   -0.051    0.396   -0.012   -0.255   -0.016    0.014    0.124   -0.016   -0.013   -0.096    0.019   -0.002    1.000   -0.098 |\n",
      "|  bplus_2 |   -0.172   -0.226    0.257    0.246    0.106   -0.381   -0.039   -0.054    0.526    0.241    0.055   -0.102   -0.006   -0.040    0.283   -0.142   -0.052   -0.214    0.037   -0.422   -0.010   -0.098    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03315706549706743}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.31330479345684153}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.12092643103182432}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.32832185000645664}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.407141830712376}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.05421153784750177}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.34159772012698086}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.038389979321935164}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.6945135580421073}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4182160577884089}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.40848863457479156}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1786062640526911}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.24505042877326755}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 1.3130255378990543}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.1880989189545128}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.13487049340479773}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 6.1350787988866875}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.021731377480066483}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17023952031780798}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.20503674148275525}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 3.8069189487520543}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03470652403318297}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07692341255505597})])\n",
      "\n",
      "Time taken: 28 min, 23 s\n",
      "Estimated time left: 20 min, 16 s\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.97E+05                |    Ncalls=1113 (1113 total)    |\n",
      "| EDM = 0.000354 (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: 296974.24162189604\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.50   |    0.06   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.69    |   0.28    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.11   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.8    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.25   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -0.920   |   0.026   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   -0.18   |    0.34   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   -0.25   |    0.55   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -0.6    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.30    |   0.07    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   -0.7    |    0.9    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.98    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |    3.1    |    0.4    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.73    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.53   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.94   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   20.0    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.501   |   0.013   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   1.29    |   0.19    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.14    |   0.16    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.63    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    4.2    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.08    |   0.07    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.24   |    0.07   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000   -0.137    0.825    0.791   -0.075   -0.576    0.027   -0.911   -0.593    0.176   -0.856   -0.313    0.722    0.044    0.734    0.867    0.034   -0.525    0.537    0.082   -0.258    0.013    0.830   -0.181 |\n",
      "|    rho_s |   -0.137    1.000   -0.134   -0.134    0.352    0.109   -0.069    0.163    0.149   -0.031    0.121    0.063   -0.120   -0.032   -0.117   -0.134   -0.055    0.186   -0.094   -0.007    0.060   -0.115   -0.138    0.048 |\n",
      "|  p4160_p |    0.825   -0.134    1.000    0.754   -0.035   -0.570    0.026   -0.866   -0.530    0.167   -0.749   -0.490    0.668    0.034    0.774    0.833    0.016   -0.506    0.385    0.039   -0.265    0.016    0.766   -0.157 |\n",
      "|  p4040_p |    0.791   -0.134    0.754    1.000   -0.027   -0.571    0.026   -0.865   -0.581    0.169   -0.721   -0.362    0.663    0.030    0.713    0.805    0.010   -0.505    0.458    0.261   -0.201    0.017    0.738   -0.160 |\n",
      "|    rho_p |   -0.075    0.352   -0.035   -0.027    1.000    0.071   -0.226    0.053    0.038   -0.011    0.021    0.033   -0.023   -0.216   -0.012   -0.040   -0.123    0.063    0.010    0.039    0.007    0.103   -0.045    0.251 |\n",
      "|  bplus_1 |   -0.576    0.109   -0.570   -0.571    0.071    1.000   -0.021    0.690    0.644   -0.131    0.512    0.267   -0.505   -0.036   -0.509   -0.560   -0.027    0.135   -0.458   -0.040    0.289   -0.009   -0.584   -0.003 |\n",
      "|  omega_p |    0.027   -0.069    0.026    0.026   -0.226   -0.021    1.000   -0.031   -0.025    0.006   -0.025   -0.012    0.023    0.019    0.023    0.027    0.025   -0.026    0.016    0.001   -0.010    0.146    0.027   -0.013 |\n",
      "|   Dbar_s |   -0.911    0.163   -0.866   -0.865    0.053    0.690   -0.031    1.000    0.749   -0.215    0.855    0.327   -0.783   -0.041   -0.787   -0.898   -0.024    0.616   -0.571   -0.124    0.275   -0.019   -0.899    0.205 |\n",
      "| DDstar_p |   -0.593    0.149   -0.530   -0.581    0.038    0.644   -0.025    0.749    1.000   -0.185    0.751    0.195   -0.522   -0.022   -0.502   -0.606   -0.011    0.570   -0.388   -0.107    0.170   -0.018   -0.632    0.095 |\n",
      "| DDstar_s |    0.176   -0.031    0.167    0.169   -0.011   -0.131    0.006   -0.215   -0.185    1.000   -0.180   -0.076    0.158    0.008    0.143    0.185    0.005   -0.117    0.130    0.016   -0.057    0.004    0.178   -0.050 |\n",
      "|   Dbar_p |   -0.856    0.121   -0.749   -0.721    0.021    0.512   -0.025    0.855    0.751   -0.180    1.000    0.279   -0.647   -0.034   -0.661   -0.856   -0.012    0.452   -0.368   -0.071    0.201   -0.016   -0.783    0.147 |\n",
      "|  p4040_s |   -0.313    0.063   -0.490   -0.362    0.033    0.267   -0.012    0.327    0.195   -0.076    0.279    1.000   -0.177   -0.017   -0.368   -0.331   -0.016    0.243    0.053   -0.132    0.216   -0.006   -0.270    0.076 |\n",
      "|  p3770_s |    0.722   -0.120    0.668    0.663   -0.023   -0.505    0.023   -0.783   -0.522    0.158   -0.647   -0.177    1.000    0.027    0.619    0.639    0.008   -0.443    0.439    0.115   -0.193    0.015    0.628   -0.164 |\n",
      "|    phi_p |    0.044   -0.032    0.034    0.030   -0.216   -0.036    0.019   -0.041   -0.022    0.008   -0.034   -0.017    0.027    1.000    0.026    0.038    0.555   -0.030    0.019   -0.006   -0.008   -0.035    0.036   -0.065 |\n",
      "|  p4415_p |    0.734   -0.117    0.774    0.713   -0.012   -0.509    0.023   -0.787   -0.502    0.143   -0.661   -0.368    0.619    0.026    1.000    0.737    0.004   -0.446    0.458    0.040   -0.310    0.016    0.692   -0.092 |\n",
      "|  p3770_p |    0.867   -0.134    0.833    0.805   -0.040   -0.560    0.027   -0.898   -0.606    0.185   -0.856   -0.331    0.639    0.038    0.737    1.000    0.019   -0.494    0.414    0.086   -0.264    0.016    0.802   -0.196 |\n",
      "|    phi_s |    0.034   -0.055    0.016    0.010   -0.123   -0.027    0.025   -0.024   -0.011    0.005   -0.012   -0.016    0.008    0.555    0.004    0.019    1.000   -0.031    0.001   -0.021   -0.003   -0.010    0.020   -0.120 |\n",
      "|  bplus_0 |   -0.525    0.186   -0.506   -0.505    0.063    0.135   -0.026    0.616    0.570   -0.117    0.452    0.243   -0.443   -0.030   -0.446   -0.494   -0.031    1.000   -0.396   -0.020    0.256   -0.019   -0.523    0.010 |\n",
      "|      Ctt |    0.537   -0.094    0.385    0.458    0.010   -0.458    0.016   -0.571   -0.388    0.130   -0.368    0.053    0.439    0.019    0.458    0.414    0.001   -0.396    1.000    0.273   -0.026    0.013    0.580    0.320 |\n",
      "|  p4160_s |    0.082   -0.007    0.039    0.261    0.039   -0.040    0.001   -0.124   -0.107    0.016   -0.071   -0.132    0.115   -0.006    0.040    0.086   -0.021   -0.020    0.273    1.000    0.259    0.004    0.079    0.054 |\n",
      "|  p4415_s |   -0.258    0.060   -0.265   -0.201    0.007    0.289   -0.010    0.275    0.170   -0.057    0.201    0.216   -0.193   -0.008   -0.310   -0.264   -0.003    0.256   -0.026    0.259    1.000   -0.008   -0.229   -0.077 |\n",
      "|  omega_s |    0.013   -0.115    0.016    0.017    0.103   -0.009    0.146   -0.019   -0.018    0.004   -0.016   -0.006    0.015   -0.035    0.016    0.016   -0.010   -0.019    0.013    0.004   -0.008    1.000    0.016    0.012 |\n",
      "|  psi2s_p |    0.830   -0.138    0.766    0.738   -0.045   -0.584    0.027   -0.899   -0.632    0.178   -0.783   -0.270    0.628    0.036    0.692    0.802    0.020   -0.523    0.580    0.079   -0.229    0.016    1.000   -0.195 |\n",
      "|  bplus_2 |   -0.181    0.048   -0.157   -0.160    0.251   -0.003   -0.013    0.205    0.095   -0.050    0.147    0.076   -0.164   -0.065   -0.092   -0.196   -0.120    0.010    0.320    0.054   -0.077    0.012   -0.195    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.06497862860056536}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.2830967115533096}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.19931582387852664}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.3321637810259612}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.20350255453254817}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.026000195146002936}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.34193977890940097}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.550682431109885}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.5961168903760656}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.07115401068442817}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.9158093954146471}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17208496068564316}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.3777162713860669}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.17928892661644502}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.2060974694884956}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.21672550280819514}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9366237137129829}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.012738301866036528}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1856277337205383}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.15977732517271104}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19131653349589617}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.88228152945298}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.06802193245227173}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.06985599165995982})])\n",
      "Step: 7/11\n",
      "Current Ctt: 1.2909944487358056\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.97E+05                |    Ncalls=1047 (1047 total)    |\n",
      "| EDM = 3.43E-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: 296985.65627854504\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.47   |    0.03   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.66    |   0.30    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.87   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.70   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.36   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.85   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   -0.16   |    0.36   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.04    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -1.8    |    1.0    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.44   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   0.18    |   0.43    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.71    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   3.13    |   0.26    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.75    |   0.19    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.46   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.74   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   20.2    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.489   |   0.022   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   1.90    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   1.55    |   0.22    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    4.2    |    0.9    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.06    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.56   |    0.08   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000   -0.031    0.353    0.176   -0.095   -0.061    0.009   -0.015    0.126   -0.091    0.590   -0.136    0.170    0.024    0.203    0.335    0.034   -0.060   -0.042   -0.104   -0.006    0.272   -0.003 |\n",
      "|    rho_s |   -0.031    1.000   -0.066   -0.092    0.358    0.063   -0.046    0.014   -0.206   -0.144    0.048   -0.021   -0.011   -0.015   -0.117    0.095   -0.054    0.231   -0.058    0.079   -0.129   -0.079   -0.163 |\n",
      "|  p4160_p |    0.353   -0.066    1.000    0.160    0.022   -0.308    0.005    0.014    0.343    0.088    0.273   -0.358    0.037   -0.007    0.493    0.153   -0.029   -0.019    0.060   -0.207    0.008    0.217    0.430 |\n",
      "|  p4040_p |    0.176   -0.092    0.160    1.000    0.004   -0.393    0.009   -0.012    0.510    0.265    0.085   -0.102    0.066   -0.010    0.409   -0.038   -0.030   -0.031    0.475   -0.079    0.010    0.127    0.394 |\n",
      "|    rho_p |   -0.095    0.358    0.022    0.004    1.000    0.096   -0.262   -0.002   -0.112   -0.082    0.055   -0.042    0.037   -0.251   -0.013    0.073   -0.170    0.044    0.005   -0.001    0.078   -0.052    0.133 |\n",
      "|  bplus_1 |   -0.061    0.063   -0.308   -0.393    0.096    1.000   -0.014    0.065   -0.801   -0.560    0.181   -0.046   -0.071   -0.021   -0.494    0.345   -0.007   -0.453   -0.250    0.362    0.002   -0.276   -0.504 |\n",
      "|  omega_p |    0.009   -0.046    0.005    0.009   -0.262   -0.014    1.000   -0.001    0.026    0.017   -0.005    0.005   -0.001    0.034    0.012   -0.012    0.035   -0.019    0.005   -0.007    0.146    0.012    0.004 |\n",
      "|   Dbar_s |   -0.015    0.014    0.014   -0.012   -0.002    0.065   -0.001    1.000   -0.108   -0.068    0.046   -0.052    0.027    0.001   -0.042    0.051    0.004    0.006   -0.039    0.008   -0.002   -0.018   -0.096 |\n",
      "| DDstar_p |    0.126   -0.206    0.343    0.510   -0.112   -0.801    0.026   -0.108    1.000    0.627   -0.192    0.130    0.118    0.016    0.628   -0.427    0.010   -0.121    0.363   -0.343    0.016    0.417    0.641 |\n",
      "| DDstar_s |   -0.091   -0.144    0.088    0.265   -0.082   -0.560    0.017   -0.068    0.627    1.000   -0.035    0.111    0.018    0.008    0.322   -0.357    0.008   -0.088    0.224   -0.219    0.011    0.203    0.442 |\n",
      "|   Dbar_p |    0.590    0.048    0.273    0.085    0.055    0.181   -0.005    0.046   -0.192   -0.035    1.000   -0.154    0.180   -0.001    0.045    0.628   -0.018    0.059   -0.100    0.062   -0.002    0.293   -0.178 |\n",
      "|  p4040_s |   -0.136   -0.021   -0.358   -0.102   -0.042   -0.046    0.005   -0.052    0.130    0.111   -0.154    1.000    0.167    0.006   -0.119   -0.196    0.015   -0.016   -0.191    0.079    0.000    0.058   -0.143 |\n",
      "|  p3770_s |    0.170   -0.011    0.037    0.066    0.037   -0.071   -0.001    0.027    0.118    0.018    0.180    0.167    1.000   -0.012    0.106   -0.163   -0.029    0.024    0.076    0.014    0.003   -0.148    0.082 |\n",
      "|    phi_p |    0.024   -0.015   -0.007   -0.010   -0.251   -0.021    0.034    0.001    0.016    0.008   -0.001    0.006   -0.012    1.000   -0.006   -0.007    0.598   -0.001   -0.010    0.005   -0.038    0.008   -0.059 |\n",
      "|  p4415_p |    0.203   -0.117    0.493    0.409   -0.013   -0.494    0.012   -0.042    0.628    0.322    0.045   -0.119    0.106   -0.006    1.000   -0.112   -0.026   -0.048    0.189   -0.359    0.012    0.258    0.482 |\n",
      "|  p3770_p |    0.335    0.095    0.153   -0.038    0.073    0.345   -0.012    0.051   -0.427   -0.357    0.628   -0.196   -0.163   -0.007   -0.112    1.000   -0.019    0.090   -0.155    0.098   -0.007   -0.002   -0.246 |\n",
      "|    phi_s |    0.034   -0.054   -0.029   -0.030   -0.170   -0.007    0.035    0.004    0.010    0.008   -0.018    0.015   -0.029    0.598   -0.026   -0.019    1.000   -0.022   -0.023    0.017   -0.013    0.004   -0.104 |\n",
      "|  bplus_0 |   -0.060    0.231   -0.019   -0.031    0.044   -0.453   -0.019    0.006   -0.121   -0.088    0.059   -0.016    0.024   -0.001   -0.048    0.090   -0.022    1.000   -0.007    0.047   -0.027   -0.053   -0.267 |\n",
      "|  p4160_s |   -0.042   -0.058    0.060    0.475    0.005   -0.250    0.005   -0.039    0.363    0.224   -0.100   -0.191    0.076   -0.010    0.189   -0.155   -0.023   -0.007    1.000    0.159    0.007    0.028    0.184 |\n",
      "|  p4415_s |   -0.104    0.079   -0.207   -0.079   -0.001    0.362   -0.007    0.008   -0.343   -0.219    0.062    0.079    0.014    0.005   -0.359    0.098    0.017    0.047    0.159    1.000   -0.009   -0.112   -0.504 |\n",
      "|  omega_s |   -0.006   -0.129    0.008    0.010    0.078    0.002    0.146   -0.002    0.016    0.011   -0.002    0.000    0.003   -0.038    0.012   -0.007   -0.013   -0.027    0.007   -0.009    1.000    0.006    0.029 |\n",
      "|  psi2s_p |    0.272   -0.079    0.217    0.127   -0.052   -0.276    0.012   -0.018    0.417    0.203    0.293    0.058   -0.148    0.008    0.258   -0.002    0.004   -0.053    0.028   -0.112    0.006    1.000    0.106 |\n",
      "|  bplus_2 |   -0.003   -0.163    0.430    0.394    0.133   -0.504    0.004   -0.096    0.641    0.442   -0.178   -0.143    0.082   -0.059    0.482   -0.246   -0.104   -0.267    0.184   -0.504    0.029    0.106    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.03218246635163302}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.30017928673980154}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.12742905529215776}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.282882515529185}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.23879146769675952}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.062512573978321}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3608638699207658}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.041037261478300835}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.9666318453282807}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.4380211186444397}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.4308457961214267}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17579451231073312}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25522361859000897}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.1942569539577219}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.18283445188238545}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12615505276649053}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.0225689805388392}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.02173630915670466}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.18007208254332596}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.21589178265474607}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 0.9235283862285737}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03807044351582167}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08163885055347309})])\n",
      "\n",
      "Time taken: 33 min, 40 s\n",
      "Estimated time left: 16 min, 50 s\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.966E+05               |    Ncalls=1697 (1697 total)    |\n",
      "| EDM = 0.000164 (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: 296616.3749755793\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.44   |    0.05   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.46    |   0.29    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.06   |    0.14   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.25   |    0.19   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.43   |    0.25   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -1.17   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.15    |   0.32    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.30    |   0.47    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -0.4    |    0.9    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.19   |    0.31   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |    1.5    |    0.9    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   1.13    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   3.06    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.78    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.20   |    0.22   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.77   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.4    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.627   |   0.018   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   1.37    |   0.25    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.67    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.58    |   0.19    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    5.1    |    1.1    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.08    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.25   |    0.11   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000   -0.064    0.697    0.407   -0.005   -0.345    0.018   -0.519   -0.752   -0.834   -0.724    0.278    0.103    0.021    0.675    0.472   -0.013   -0.272   -0.522    0.190    0.044    0.020    0.531    0.270 |\n",
      "|    rho_s |   -0.064    1.000   -0.072   -0.048    0.152    0.038   -0.059    0.029    0.043    0.105    0.067   -0.042   -0.013    0.069   -0.084   -0.021   -0.006    0.135    0.037   -0.030    0.010   -0.395   -0.055   -0.104 |\n",
      "|  p4160_p |    0.697   -0.072    1.000    0.545    0.028   -0.331    0.022   -0.321   -0.733   -0.678   -0.473   -0.034    0.132    0.009    0.721    0.498   -0.028   -0.249   -0.530    0.078   -0.014    0.031    0.447    0.208 |\n",
      "|  p4040_p |    0.407   -0.048    0.545    1.000    0.018   -0.221    0.014   -0.141   -0.485   -0.385   -0.169   -0.017    0.088    0.003    0.483    0.357   -0.021   -0.168   -0.306    0.340   -0.006    0.021    0.214    0.108 |\n",
      "|    rho_p |   -0.005    0.152    0.028    0.018    1.000    0.020   -0.079   -0.061   -0.031   -0.040   -0.073    0.048    0.015   -0.245    0.051    0.025   -0.148    0.034    0.009    0.062    0.011    0.165    0.012    0.255 |\n",
      "|  bplus_1 |   -0.345    0.038   -0.331   -0.221    0.020    1.000   -0.009    0.071    0.169    0.493    0.263   -0.161   -0.038   -0.016   -0.381   -0.060    0.007   -0.225    0.166   -0.086    0.090   -0.008   -0.270   -0.372 |\n",
      "|  omega_p |    0.018   -0.059    0.022    0.014   -0.079   -0.009    1.000   -0.012   -0.018   -0.030   -0.021    0.011    0.004   -0.025    0.024    0.009    0.008   -0.025   -0.015    0.008   -0.001    0.553    0.016    0.024 |\n",
      "|   Dbar_s |   -0.519    0.029   -0.321   -0.141   -0.061    0.071   -0.012    1.000    0.150    0.444    0.554   -0.113    0.025    0.000   -0.282   -0.459    0.031    0.037    0.445   -0.068   -0.091   -0.018   -0.283   -0.143 |\n",
      "| DDstar_p |   -0.752    0.043   -0.733   -0.485   -0.031    0.169   -0.018    0.150    1.000    0.646    0.508   -0.205   -0.196   -0.016   -0.645   -0.483    0.018    0.121    0.420   -0.169   -0.006   -0.021   -0.511   -0.121 |\n",
      "| DDstar_s |   -0.834    0.105   -0.678   -0.385   -0.040    0.493   -0.030    0.444    0.646    1.000    0.861   -0.383   -0.052   -0.009   -0.727   -0.384    0.038    0.372    0.659   -0.262   -0.096   -0.045   -0.560   -0.362 |\n",
      "|   Dbar_p |   -0.724    0.067   -0.473   -0.169   -0.073    0.263   -0.021    0.554    0.508    0.861    1.000   -0.301    0.107   -0.000   -0.515   -0.391    0.044    0.183    0.735   -0.195   -0.149   -0.034   -0.365   -0.308 |\n",
      "|  p4040_s |    0.278   -0.042   -0.034   -0.017    0.048   -0.161    0.011   -0.113   -0.205   -0.383   -0.301    1.000    0.131   -0.007    0.165    0.039   -0.030   -0.112   -0.020    0.197    0.204    0.021    0.211    0.185 |\n",
      "|  p3770_s |    0.103   -0.013    0.132    0.088    0.015   -0.038    0.004    0.025   -0.196   -0.052    0.107    0.131    1.000   -0.004    0.128   -0.151   -0.014   -0.021    0.019    0.064   -0.001    0.006   -0.105   -0.020 |\n",
      "|    phi_p |    0.021    0.069    0.009    0.003   -0.245   -0.016   -0.025    0.000   -0.016   -0.009   -0.000   -0.007   -0.004    1.000    0.001    0.008    0.554   -0.009   -0.013   -0.012    0.000   -0.115    0.009   -0.068 |\n",
      "|  p4415_p |    0.675   -0.084    0.721    0.483    0.051   -0.381    0.024   -0.282   -0.645   -0.727   -0.515    0.165    0.128    0.001    1.000    0.388   -0.040   -0.284   -0.428    0.108   -0.062    0.038    0.454    0.317 |\n",
      "|  p3770_p |    0.472   -0.021    0.498    0.357    0.025   -0.060    0.009   -0.459   -0.483   -0.384   -0.391    0.039   -0.151    0.008    0.388    1.000   -0.016   -0.028   -0.447    0.044   -0.033    0.010    0.221    0.038 |\n",
      "|    phi_s |   -0.013   -0.006   -0.028   -0.021   -0.148    0.007    0.008    0.031    0.018    0.038    0.044   -0.030   -0.014    0.554   -0.040   -0.016    1.000   -0.002    0.010   -0.035   -0.004   -0.030   -0.018   -0.130 |\n",
      "|  bplus_0 |   -0.272    0.135   -0.249   -0.168    0.034   -0.225   -0.025    0.037    0.121    0.372    0.183   -0.112   -0.021   -0.009   -0.284   -0.028   -0.002    1.000    0.135   -0.043    0.077   -0.046   -0.212   -0.277 |\n",
      "|      Ctt |   -0.522    0.037   -0.530   -0.306    0.009    0.166   -0.015    0.445    0.420    0.659    0.735   -0.020    0.019   -0.013   -0.428   -0.447    0.010    0.135    1.000    0.034    0.037   -0.016   -0.198    0.157 |\n",
      "|  p4160_s |    0.190   -0.030    0.078    0.340    0.062   -0.086    0.008   -0.068   -0.169   -0.262   -0.195    0.197    0.064   -0.012    0.108    0.044   -0.035   -0.043    0.034    1.000    0.327    0.018    0.117    0.169 |\n",
      "|  p4415_s |    0.044    0.010   -0.014   -0.006    0.011    0.090   -0.001   -0.091   -0.006   -0.096   -0.149    0.204   -0.001    0.000   -0.062   -0.033   -0.004    0.077    0.037    0.327    1.000   -0.003    0.043   -0.083 |\n",
      "|  omega_s |    0.020   -0.395    0.031    0.021    0.165   -0.008    0.553   -0.018   -0.021   -0.045   -0.034    0.021    0.006   -0.115    0.038    0.010   -0.030   -0.046   -0.016    0.018   -0.003    1.000    0.022    0.067 |\n",
      "|  psi2s_p |    0.531   -0.055    0.447    0.214    0.012   -0.270    0.016   -0.283   -0.511   -0.560   -0.365    0.211   -0.105    0.009    0.454    0.221   -0.018   -0.212   -0.198    0.117    0.043    0.022    1.000    0.160 |\n",
      "|  bplus_2 |    0.270   -0.104    0.208    0.108    0.255   -0.372    0.024   -0.143   -0.121   -0.362   -0.308    0.185   -0.020   -0.068    0.317    0.038   -0.130   -0.277    0.157    0.169   -0.083    0.067    0.160    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.052621776337020254}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.29160255805726243}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.14121975052151514}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.19268323886528393}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.25239900461905185}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.03724613430862411}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.3203959996645702}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.4661221784350037}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.9153374062448205}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.31337595477044095}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.9362317625603307}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.1800871325857647}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25275503894527374}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.1782806351545987}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.21879916696574098}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.11387191336805325}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9612243284998723}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.017627789429814023}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.24765433294899575}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.17206888683218757}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.19433258485349625}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1245748917732912}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03934187937466138}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.10689222222461536})])\n",
      "Step: 8/11\n",
      "Current Ctt: 1.3801311186847085\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.966E+05               |    Ncalls=1091 (1091 total)    |\n",
      "| EDM = 3.46E-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: 296633.0094294798\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |  -1.463   |   0.029   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.49    |   0.30    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.88   |    0.11   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.04   |    0.26   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.62   |    0.27   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -1.00   |    0.06   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.16    |   0.33    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.300   |   0.029   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |    1.7    |    0.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.30    |   0.07    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |    0.6    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.73    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   3.16    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.80    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.28   |    0.16   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.58   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.7    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.583   |   0.027   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   2.32    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   1.43    |   0.21    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    5.1    |    1.2    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.03    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.77   |    0.09   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.047    0.340    0.213   -0.112    0.062   -0.008   -0.024   -0.159   -0.146    0.584   -0.196    0.184    0.033    0.098    0.336    0.048   -0.052   -0.140   -0.109   -0.030    0.177   -0.166 |\n",
      "|    rho_s |    0.047    1.000   -0.031   -0.028    0.118   -0.088   -0.039    0.002   -0.081   -0.013    0.003   -0.010   -0.010    0.129   -0.045    0.024    0.024    0.187   -0.011    0.040   -0.430   -0.001   -0.177 |\n",
      "|  p4160_p |    0.340   -0.031    1.000    0.324    0.039   -0.115    0.004    0.024    0.031   -0.085    0.485   -0.459    0.063   -0.011    0.392    0.336   -0.028   -0.002   -0.103   -0.131    0.010    0.131    0.243 |\n",
      "|  p4040_p |    0.213   -0.028    0.324    1.000    0.046   -0.087    0.003    0.028    0.052   -0.036    0.343   -0.181   -0.008   -0.015    0.263    0.263   -0.031    0.007    0.360   -0.028    0.010   -0.011    0.200 |\n",
      "|    rho_p |   -0.112    0.118    0.039    0.046    1.000    0.023   -0.111   -0.009   -0.073   -0.018    0.000   -0.003    0.041   -0.249    0.037    0.024   -0.169    0.064    0.033   -0.025    0.070   -0.035    0.183 |\n",
      "|  bplus_1 |    0.062   -0.088   -0.115   -0.087    0.023    1.000    0.016   -0.000   -0.553   -0.098    0.054   -0.044    0.019   -0.016   -0.191    0.157   -0.001   -0.718   -0.010    0.211    0.043   -0.025   -0.152 |\n",
      "|  omega_p |   -0.008   -0.039    0.004    0.003   -0.111    0.016    1.000    0.000    0.015    0.002    0.004    0.002    0.001   -0.023    0.006   -0.004    0.011   -0.033    0.001   -0.005    0.576    0.003    0.024 |\n",
      "|   Dbar_s |   -0.024    0.002    0.024    0.028   -0.009   -0.000    0.000    1.000   -0.037   -0.006    0.021   -0.014    0.022    0.002    0.006   -0.009    0.004   -0.004   -0.009   -0.017   -0.001    0.001   -0.031 |\n",
      "| DDstar_p |   -0.159   -0.081    0.031    0.052   -0.073   -0.553    0.015   -0.037    1.000    0.153   -0.157    0.261   -0.024    0.003    0.301   -0.393    0.001   -0.107    0.146   -0.142    0.027    0.124    0.451 |\n",
      "| DDstar_s |   -0.146   -0.013   -0.085   -0.036   -0.018   -0.098    0.002   -0.006    0.153    1.000    0.018    0.037   -0.037   -0.000   -0.016   -0.108    0.002   -0.022    0.012   -0.018    0.004   -0.035    0.074 |\n",
      "|   Dbar_p |    0.584    0.003    0.485    0.343    0.000    0.054    0.004    0.021   -0.157    0.018    1.000   -0.157    0.313    0.008    0.196    0.538   -0.001    0.017   -0.081   -0.069    0.001    0.409   -0.192 |\n",
      "|  p4040_s |   -0.196   -0.010   -0.459   -0.181   -0.003   -0.044    0.002   -0.014    0.261    0.037   -0.157    1.000    0.112   -0.007   -0.133   -0.200   -0.008   -0.008    0.065    0.168    0.005   -0.083   -0.078 |\n",
      "|  p3770_s |    0.184   -0.010    0.063   -0.008    0.041    0.019    0.001    0.022   -0.024   -0.037    0.313    0.112    1.000   -0.013    0.054   -0.102   -0.026    0.029    0.036    0.034    0.004   -0.208   -0.025 |\n",
      "|    phi_p |    0.033    0.129   -0.011   -0.015   -0.249   -0.016   -0.023    0.002    0.003   -0.000    0.008   -0.007   -0.013    1.000   -0.018    0.003    0.571    0.003   -0.015    0.010   -0.119    0.006   -0.083 |\n",
      "|  p4415_p |    0.098   -0.045    0.392    0.263    0.037   -0.191    0.006    0.006    0.301   -0.016    0.196   -0.133    0.054   -0.018    1.000    0.075   -0.034   -0.016   -0.069   -0.252    0.017    0.045    0.265 |\n",
      "|  p3770_p |    0.336    0.024    0.336    0.263    0.024    0.157   -0.004   -0.009   -0.393   -0.108    0.538   -0.200   -0.102    0.003    0.075    1.000   -0.004    0.055   -0.077   -0.051   -0.010    0.122   -0.144 |\n",
      "|    phi_s |    0.048    0.024   -0.028   -0.031   -0.169   -0.001    0.011    0.004    0.001    0.002   -0.001   -0.008   -0.026    0.571   -0.034   -0.004    1.000   -0.014   -0.023    0.020   -0.031    0.007   -0.121 |\n",
      "|  bplus_0 |   -0.052    0.187   -0.002    0.007    0.064   -0.718   -0.033   -0.004   -0.107   -0.022    0.017   -0.008    0.029    0.003   -0.016    0.055   -0.014    1.000    0.023    0.028   -0.073   -0.032   -0.355 |\n",
      "|  p4160_s |   -0.140   -0.011   -0.103    0.360    0.033   -0.010    0.001   -0.009    0.146    0.012   -0.081    0.065    0.036   -0.015   -0.069   -0.077   -0.023    0.023    1.000    0.302    0.006   -0.120   -0.028 |\n",
      "|  p4415_s |   -0.109    0.040   -0.131   -0.028   -0.025    0.211   -0.005   -0.017   -0.142   -0.018   -0.069    0.168    0.034    0.010   -0.252   -0.051    0.020    0.028    0.302    1.000   -0.014   -0.030   -0.398 |\n",
      "|  omega_s |   -0.030   -0.430    0.010    0.010    0.070    0.043    0.576   -0.001    0.027    0.004    0.001    0.005    0.004   -0.119    0.017   -0.010   -0.031   -0.073    0.006   -0.014    1.000   -0.000    0.076 |\n",
      "|  psi2s_p |    0.177   -0.001    0.131   -0.011   -0.035   -0.025    0.003    0.001    0.124   -0.035    0.409   -0.083   -0.208    0.006    0.045    0.122    0.007   -0.032   -0.120   -0.030   -0.000    1.000   -0.153 |\n",
      "|  bplus_2 |   -0.166   -0.177    0.243    0.200    0.183   -0.152    0.024   -0.031    0.451    0.074   -0.192   -0.078   -0.025   -0.083    0.265   -0.144   -0.121   -0.355   -0.028   -0.398    0.076   -0.153    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.028614065186489235}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3035616393179362}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.10716630463606114}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2617075393316264}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.2698076366104343}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.055055962423088634}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.33403199594184674}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.028818315473875367}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.5272990411889729}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.06908408692506124}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.3943874916977719}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17173101140460323}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.2496531025382671}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.1847491942115118}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.1644765743284895}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.11696221740908941}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.0079687028868793}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.02685341560235699}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.16742979074392905}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.20732651264413715}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.195700074064074}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03465965035551033}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.08835553908093952})])\n",
      "\n",
      "Time taken: 39 min, 51 s\n",
      "Estimated time left: 13 min, 17 s\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.967E+05               |    Ncalls=1645 (1645 total)    |\n",
      "| EDM = 0.000153 (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: 296735.8097108633\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.54   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   1.13    |   0.32    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.39   |    0.18   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.56   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.4    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -1.00   |    0.05   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.21    |   0.32    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.25    |   0.12    |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -1.7    |    1.1    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.30    |   0.56    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |    0.8    |    1.5    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   1.08    |   0.20    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |    2.0    |    0.4    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.83    |   0.17    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.67   |    0.20   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.72   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.3    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.540   |   0.022   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   1.46    |   0.25    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.27    |   0.18    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   1.37    |   0.22    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    6.3    |    1.3    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.08    |   0.05    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.19   |    0.12   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.066    0.692    0.619   -0.130    0.197   -0.021   -0.265    0.613    0.483    0.758   -0.354    0.574    0.062    0.465    0.614    0.077    0.042    0.522   -0.160   -0.253   -0.049    0.591   -0.285 |\n",
      "|    rho_s |    0.066    1.000    0.056    0.041    0.146    0.033   -0.045   -0.037    0.154    0.118    0.050   -0.046    0.049    0.074    0.002    0.087   -0.016    0.222    0.013   -0.015    0.027   -0.379    0.032   -0.130 |\n",
      "|  p4160_p |    0.692    0.056    1.000    0.729   -0.069    0.202   -0.008   -0.448    0.688    0.483    0.822   -0.624    0.601    0.045    0.595    0.701    0.050    0.077    0.400   -0.262   -0.295   -0.029    0.567   -0.327 |\n",
      "|  p4040_p |    0.619    0.041    0.729    1.000   -0.060    0.155   -0.005   -0.454    0.609    0.379    0.787   -0.464    0.559    0.039    0.523    0.647    0.042    0.056    0.417    0.044   -0.241   -0.022    0.502   -0.290 |\n",
      "|    rho_p |   -0.130    0.146   -0.069   -0.060    1.000    0.009   -0.021    0.080   -0.059   -0.023   -0.102    0.075   -0.052   -0.280   -0.010   -0.071   -0.168    0.022    0.022    0.076    0.020    0.181   -0.069    0.268 |\n",
      "|  bplus_1 |    0.197    0.033    0.202    0.155    0.009    1.000   -0.002   -0.136    0.567    0.424    0.189   -0.165    0.188    0.007    0.007    0.314    0.026   -0.386    0.032   -0.049    0.109   -0.005    0.117   -0.474 |\n",
      "|  omega_p |   -0.021   -0.045   -0.008   -0.005   -0.021   -0.002    1.000    0.009   -0.027   -0.019   -0.008    0.010   -0.006   -0.054    0.004   -0.016   -0.002   -0.039    0.002    0.006   -0.006    0.646   -0.005    0.040 |\n",
      "|   Dbar_s |   -0.265   -0.037   -0.448   -0.454    0.080   -0.136    0.009    1.000   -0.578   -0.322   -0.576    0.271   -0.452   -0.036   -0.282   -0.303   -0.051   -0.033   -0.519    0.111    0.221    0.023   -0.366    0.274 |\n",
      "| DDstar_p |    0.613    0.154    0.688    0.609   -0.059    0.567   -0.027   -0.578    1.000    0.604    0.759   -0.461    0.596    0.051    0.326    0.706    0.065    0.252    0.468   -0.202   -0.174   -0.068    0.510   -0.565 |\n",
      "| DDstar_s |    0.483    0.118    0.483    0.379   -0.023    0.424   -0.019   -0.322    0.604    1.000    0.313   -0.263    0.337    0.034    0.271    0.456    0.039    0.197    0.140   -0.103   -0.073   -0.049    0.297   -0.356 |\n",
      "|   Dbar_p |    0.758    0.050    0.822    0.787   -0.102    0.189   -0.008   -0.576    0.759    0.313    1.000   -0.439    0.737    0.057    0.550    0.709    0.069    0.052    0.647   -0.182   -0.326   -0.029    0.731   -0.383 |\n",
      "|  p4040_s |   -0.354   -0.046   -0.624   -0.464    0.075   -0.165    0.010    0.271   -0.461   -0.263   -0.439    1.000   -0.242   -0.037   -0.341   -0.424   -0.050   -0.049   -0.039    0.213    0.299    0.027   -0.266    0.280 |\n",
      "|  p3770_s |    0.574    0.049    0.601    0.559   -0.052    0.188   -0.006   -0.452    0.596    0.337    0.737   -0.242    1.000    0.036    0.408    0.442    0.038    0.079    0.447   -0.098   -0.202   -0.024    0.382   -0.314 |\n",
      "|    phi_p |    0.062    0.074    0.045    0.039   -0.280    0.007   -0.054   -0.036    0.051    0.034    0.057   -0.037    0.036    1.000    0.016    0.047    0.516    0.010    0.014   -0.028   -0.011   -0.140    0.040   -0.100 |\n",
      "|  p4415_p |    0.465    0.002    0.595    0.523   -0.010    0.007    0.004   -0.282    0.326    0.271    0.550   -0.341    0.408    0.016    1.000    0.417    0.009    0.003    0.367   -0.186   -0.329   -0.000    0.396   -0.055 |\n",
      "|  p3770_p |    0.614    0.087    0.701    0.647   -0.071    0.314   -0.016   -0.303    0.706    0.456    0.709   -0.424    0.442    0.047    0.417    1.000    0.056    0.138    0.305   -0.185   -0.243   -0.043    0.468   -0.409 |\n",
      "|    phi_s |    0.077   -0.016    0.050    0.042   -0.168    0.026   -0.002   -0.051    0.065    0.039    0.069   -0.050    0.038    0.516    0.009    0.056    1.000   -0.004    0.006   -0.043   -0.010   -0.034    0.046   -0.152 |\n",
      "|  bplus_0 |    0.042    0.222    0.077    0.056    0.022   -0.386   -0.039   -0.033    0.252    0.197    0.052   -0.049    0.079    0.010    0.003    0.138   -0.004    1.000    0.019    0.017    0.068   -0.091    0.027   -0.179 |\n",
      "|      Ctt |    0.522    0.013    0.400    0.417    0.022    0.032    0.002   -0.519    0.468    0.140    0.647   -0.039    0.447    0.014    0.367    0.305    0.006    0.019    1.000    0.105   -0.110   -0.002    0.591    0.177 |\n",
      "|  p4160_s |   -0.160   -0.015   -0.262    0.044    0.076   -0.049    0.006    0.111   -0.202   -0.103   -0.182    0.213   -0.098   -0.028   -0.186   -0.185   -0.043    0.017    0.105    1.000    0.366    0.015   -0.126    0.168 |\n",
      "|  p4415_s |   -0.253    0.027   -0.295   -0.241    0.020    0.109   -0.006    0.221   -0.174   -0.073   -0.326    0.299   -0.202   -0.011   -0.329   -0.243   -0.010    0.068   -0.110    0.366    1.000   -0.010   -0.202   -0.068 |\n",
      "|  omega_s |   -0.049   -0.379   -0.029   -0.022    0.181   -0.005    0.646    0.023   -0.068   -0.049   -0.029    0.027   -0.024   -0.140   -0.000   -0.043   -0.034   -0.091   -0.002    0.015   -0.010    1.000   -0.020    0.089 |\n",
      "|  psi2s_p |    0.591    0.032    0.567    0.502   -0.069    0.117   -0.005   -0.366    0.510    0.297    0.731   -0.266    0.382    0.040    0.396    0.468    0.046    0.027    0.591   -0.126   -0.202   -0.020    1.000   -0.236 |\n",
      "|  bplus_2 |   -0.285   -0.130   -0.327   -0.290    0.268   -0.474    0.040    0.274   -0.565   -0.356   -0.383    0.280   -0.314   -0.100   -0.055   -0.409   -0.152   -0.179    0.177    0.168   -0.068    0.089   -0.236    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.04227422962966543}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.3157061548917383}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.1840343904935311}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2765714933767296}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.339587562441082}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.05178797330828211}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.32176789443535725}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.11956945590705723}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 1.1023769066039053}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.5605087083550434}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.5270236627880989}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.20036202458206614}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.3667886159687115}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.17171194857249628}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.19876127316227765}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.21055526903610056}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9530557761707303}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.021550827567701658}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.2456467744279387}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1828712718438139}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.21620283622547998}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.2716622299458673}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.0474103648173152}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.1154994597697756})])\n",
      "Step: 9/11\n",
      "Current Ctt: 1.4638501094227998\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.968E+05               |    Ncalls=1018 (1018 total)    |\n",
      "| EDM = 3.99E-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: 296757.9703599365\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.52   |    0.04   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |    1.2    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -2.04   |    0.15   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -2.1    |    0.3    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.7    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.86   |    0.05   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.22    |   0.32    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.300   |   0.021   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |    0.9    |    0.9    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   0.30    |   0.37    |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   0.19    |   0.35    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.62    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.38    |   0.25    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.86    |   0.17    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.66   |    0.23   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.38   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.7    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.511   |   0.023   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   1.88    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   1.24    |   0.22    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    6.3    |    1.3    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.05    |   0.04    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.70   |    0.08   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000   -0.038    0.516    0.358   -0.137   -0.366    0.005   -0.030    0.585    0.092    0.321    0.056    0.286    0.038    0.419    0.140    0.037   -0.095    0.047   -0.255    0.007    0.431    0.222 |\n",
      "|    rho_s |   -0.038    1.000   -0.098   -0.077    0.095   -0.068    0.002    0.004   -0.127   -0.064    0.026   -0.027   -0.045    0.156   -0.092    0.016    0.025    0.237   -0.027    0.074   -0.401   -0.058   -0.227 |\n",
      "|  p4160_p |    0.516   -0.098    1.000    0.439   -0.008   -0.456    0.018   -0.005    0.618    0.163    0.093   -0.196    0.177   -0.002    0.599    0.128   -0.027   -0.040    0.051   -0.314    0.036    0.344    0.521 |\n",
      "|  p4040_p |    0.358   -0.077    0.439    1.000    0.015   -0.328    0.014    0.005    0.451    0.133    0.063   -0.037    0.088   -0.009    0.434    0.144   -0.032   -0.019    0.436   -0.177    0.028    0.160    0.410 |\n",
      "|    rho_p |   -0.137    0.095   -0.008    0.015    1.000    0.039   -0.069   -0.004   -0.093   -0.054    0.044   -0.017    0.026   -0.250   -0.012    0.021   -0.170    0.084    0.016   -0.014    0.042   -0.060    0.156 |\n",
      "|  bplus_1 |   -0.366   -0.068   -0.456   -0.328    0.039    1.000    0.009    0.016   -0.662   -0.344    0.182   -0.116   -0.166   -0.029   -0.418    0.070    0.000   -0.632   -0.090    0.338    0.035   -0.303   -0.251 |\n",
      "|  omega_p |    0.005    0.002    0.018    0.014   -0.069    0.009    1.000   -0.001    0.026    0.012   -0.002    0.007    0.009   -0.041    0.018   -0.004    0.003   -0.038    0.006   -0.013    0.639    0.013    0.040 |\n",
      "|   Dbar_s |   -0.030    0.004   -0.005    0.005   -0.004    0.016   -0.001    1.000   -0.044   -0.020    0.020   -0.020    0.010    0.001   -0.019    0.002    0.003   -0.001   -0.015   -0.000   -0.001   -0.014   -0.036 |\n",
      "| DDstar_p |    0.585   -0.127    0.618    0.451   -0.093   -0.662    0.026   -0.044    1.000    0.369   -0.235    0.292    0.281    0.019    0.651   -0.136    0.001   -0.088    0.228   -0.352    0.050    0.541    0.489 |\n",
      "| DDstar_s |    0.092   -0.064    0.163    0.133   -0.054   -0.344    0.012   -0.020    0.369    1.000   -0.057    0.147    0.054    0.006    0.228   -0.150    0.003   -0.051    0.099   -0.154    0.025    0.163    0.246 |\n",
      "|   Dbar_p |    0.321    0.026    0.093    0.063    0.044    0.182   -0.002    0.020   -0.235   -0.057    1.000   -0.150    0.181   -0.002   -0.045    0.447   -0.012    0.043   -0.089    0.075   -0.010    0.184   -0.166 |\n",
      "|  p4040_s |    0.056   -0.027   -0.196   -0.037   -0.017   -0.116    0.007   -0.020    0.292    0.147   -0.150    1.000    0.224   -0.000    0.059   -0.138   -0.006   -0.009    0.110    0.106    0.013    0.081   -0.057 |\n",
      "|  p3770_s |    0.286   -0.045    0.177    0.088    0.026   -0.166    0.009    0.010    0.281    0.054    0.181    0.224    1.000   -0.010    0.219   -0.146   -0.031    0.013    0.124   -0.056    0.016   -0.098    0.168 |\n",
      "|    phi_p |    0.038    0.156   -0.002   -0.009   -0.250   -0.029   -0.041    0.001    0.019    0.006   -0.002   -0.000   -0.010    1.000   -0.003    0.000    0.508    0.005   -0.009    0.009   -0.128    0.014   -0.076 |\n",
      "|  p4415_p |    0.419   -0.092    0.599    0.434   -0.012   -0.418    0.018   -0.019    0.651    0.228   -0.045    0.059    0.219   -0.003    1.000    0.011   -0.026   -0.035    0.099   -0.375    0.036    0.319    0.380 |\n",
      "|  p3770_p |    0.140    0.016    0.128    0.144    0.021    0.070   -0.004    0.002   -0.136   -0.150    0.447   -0.138   -0.146    0.000    0.011    1.000   -0.006    0.034   -0.046   -0.030   -0.009    0.063   -0.002 |\n",
      "|    phi_s |    0.037    0.025   -0.027   -0.032   -0.170    0.000    0.003    0.003    0.001    0.003   -0.012   -0.006   -0.031    0.508   -0.026   -0.006    1.000   -0.020   -0.020    0.026   -0.027    0.004   -0.119 |\n",
      "|  bplus_0 |   -0.095    0.237   -0.040   -0.019    0.084   -0.632   -0.038   -0.001   -0.088   -0.051    0.043   -0.009    0.013    0.005   -0.035    0.034   -0.020    1.000    0.015    0.032   -0.099   -0.053   -0.340 |\n",
      "|  p4160_s |    0.047   -0.027    0.051    0.436    0.016   -0.090    0.006   -0.015    0.228    0.099   -0.089    0.110    0.124   -0.009    0.099   -0.046   -0.020    0.015    1.000    0.216    0.011    0.025    0.005 |\n",
      "|  p4415_s |   -0.255    0.074   -0.314   -0.177   -0.014    0.338   -0.013   -0.000   -0.352   -0.154    0.075    0.106   -0.056    0.009   -0.375   -0.030    0.026    0.032    0.216    1.000   -0.028   -0.148   -0.496 |\n",
      "|  omega_s |    0.007   -0.401    0.036    0.028    0.042    0.035    0.639   -0.001    0.050    0.025   -0.010    0.013    0.016   -0.128    0.036   -0.009   -0.027   -0.099    0.011   -0.028    1.000    0.023    0.094 |\n",
      "|  psi2s_p |    0.431   -0.058    0.344    0.160   -0.060   -0.303    0.013   -0.014    0.541    0.163    0.184    0.081   -0.098    0.014    0.319    0.063    0.004   -0.053    0.025   -0.148    0.023    1.000    0.112 |\n",
      "|  bplus_2 |    0.222   -0.227    0.521    0.410    0.156   -0.251    0.040   -0.036    0.489    0.246   -0.166   -0.057    0.168   -0.076    0.380   -0.002   -0.119   -0.340    0.005   -0.496    0.094    0.112    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.0351818695676025}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.31684373885950096}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.14930464153767709}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.33058409842502967}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.35267914800794964}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.05190658010104654}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.318247537604889}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.02125893290468228}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.8758525079316364}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.3713101081882841}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.35263902335729247}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17425715530131072}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.25435002911091464}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.17080765716538737}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.2283444771522012}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.13083190096849173}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.9684310266858294}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.023139887763337308}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1747580479074663}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.2244782809778958}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.2918068561999663}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.0395308061583135}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.07723032407153285})])\n",
      "\n",
      "Time taken: 46 min, 2 s\n",
      "Estimated time left: 9 min, 12 s\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.967E+05               |    Ncalls=1163 (1163 total)    |\n",
      "| EDM = 0.00085 (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: 296656.4602062418\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |  -1.529   |   0.027   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |   0.99    |   0.31    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.94   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -3.01   |    0.21   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.4    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |  -0.931   |   0.031   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.25    |   0.29    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   -0.12   |    0.13   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |    0.7    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.32   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   -1.0    |    1.7    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.79    |   0.17    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.39    |   0.22    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.79    |   0.16    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.50   |    0.24   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.82   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   19.9    |    0.9    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.451   |   0.013   |            |            |   -2    |    2    |       |\n",
      "| 18| Ctt      |   1.53    |   0.15    |            |            |  -2.5   |   2.5   |       |\n",
      "| 19| p4160_s  |   2.10    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 20| p4415_s  |   0.87    |   0.21    |            |            |0.126447 | 2.35355 |       |\n",
      "| 21| omega_s  |    7.0    |    1.2    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 22| psi2s_p  |   2.08    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 23| bplus_2  |   -0.09   |    0.05   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0      Ctt  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.034    0.276    0.131   -0.071    0.042   -0.018   -0.393   -0.005    0.070   -0.165   -0.062    0.166    0.023    0.078    0.296    0.031    0.029    0.107   -0.045   -0.063   -0.029    0.193   -0.015 |\n",
      "|    rho_s |    0.034    1.000    0.192   -0.108    0.162    0.336   -0.005    0.147    0.351    0.372    0.315   -0.177    0.010    0.063   -0.146    0.158   -0.021    0.381    0.207   -0.196   -0.174   -0.332   -0.147   -0.123 |\n",
      "|  p4160_p |    0.276    0.192    1.000   -0.127    0.006    0.465   -0.031   -0.068    0.453    0.552    0.388   -0.498    0.095    0.028    0.022    0.461    0.008    0.454    0.119   -0.326   -0.331   -0.080   -0.113   -0.119 |\n",
      "|  p4040_p |    0.131   -0.108   -0.127    1.000    0.031   -0.253    0.023   -0.337   -0.298   -0.264   -0.271    0.003    0.065   -0.019    0.194    0.072   -0.023   -0.242   -0.179    0.361    0.211    0.048    0.107    0.106 |\n",
      "|    rho_p |   -0.071    0.162    0.006    0.031    1.000    0.017    0.019   -0.011   -0.005   -0.008   -0.022    0.008    0.024   -0.230    0.034    0.002   -0.109    0.012    0.020    0.034   -0.005    0.148    0.005    0.225 |\n",
      "|  bplus_1 |    0.042    0.336    0.465   -0.253    0.017    1.000   -0.055    0.342    0.851    0.901    0.757   -0.426    0.039    0.038   -0.354    0.390    0.013    0.708    0.478   -0.466   -0.409   -0.137   -0.354   -0.349 |\n",
      "|  omega_p |   -0.018   -0.005   -0.031    0.023    0.019   -0.055    1.000   -0.031   -0.062   -0.065   -0.059    0.032    0.002   -0.054    0.030   -0.026   -0.000   -0.062   -0.035    0.038    0.030    0.669    0.027    0.047 |\n",
      "|   Dbar_s |   -0.393    0.147   -0.068   -0.337   -0.011    0.342   -0.031    1.000    0.183    0.419    0.519   -0.089   -0.245    0.013   -0.243   -0.220    0.008    0.332    0.135   -0.200   -0.150   -0.067   -0.458   -0.053 |\n",
      "| DDstar_p |   -0.005    0.351    0.453   -0.298   -0.005    0.851   -0.062    0.183    1.000    0.870    0.781   -0.489    0.020    0.045   -0.402    0.406    0.020    0.828    0.541   -0.525   -0.474   -0.148   -0.394   -0.283 |\n",
      "| DDstar_s |    0.070    0.372    0.552   -0.264   -0.008    0.901   -0.065    0.419    0.870    1.000    0.891   -0.494    0.039    0.051   -0.363    0.404    0.025    0.875    0.546   -0.524   -0.504   -0.157   -0.391   -0.286 |\n",
      "|   Dbar_p |   -0.165    0.315    0.388   -0.271   -0.022    0.757   -0.059    0.519    0.781    0.891    1.000   -0.430   -0.003    0.041   -0.339    0.182    0.026    0.734    0.562   -0.440   -0.445   -0.135   -0.438   -0.279 |\n",
      "|  p4040_s |   -0.062   -0.177   -0.498    0.003    0.008   -0.426    0.032   -0.089   -0.489   -0.494   -0.430    1.000    0.068   -0.025    0.062   -0.292   -0.014   -0.413   -0.096    0.086    0.316    0.075    0.235    0.128 |\n",
      "|  p3770_s |    0.166    0.010    0.095    0.065    0.024    0.039    0.002   -0.245    0.020    0.039   -0.003    0.068    1.000   -0.002    0.037   -0.052   -0.014    0.043   -0.009    0.008   -0.006   -0.002   -0.134   -0.026 |\n",
      "|    phi_p |    0.023    0.063    0.028   -0.019   -0.230    0.038   -0.054    0.013    0.045    0.051    0.041   -0.025   -0.002    1.000   -0.025    0.026    0.456    0.042    0.028   -0.034   -0.023   -0.115   -0.017   -0.066 |\n",
      "|  p4415_p |    0.078   -0.146    0.022    0.194    0.034   -0.354    0.030   -0.243   -0.402   -0.363   -0.339    0.062    0.037   -0.025    1.000   -0.062   -0.025   -0.340   -0.201    0.166    0.071    0.065    0.174    0.205 |\n",
      "|  p3770_p |    0.296    0.158    0.461    0.072    0.002    0.390   -0.026   -0.220    0.406    0.404    0.182   -0.292   -0.052    0.026   -0.062    1.000    0.008    0.384    0.111   -0.219   -0.261   -0.067   -0.059   -0.125 |\n",
      "|    phi_s |    0.031   -0.021    0.008   -0.023   -0.109    0.013   -0.000    0.008    0.020    0.025    0.026   -0.014   -0.014    0.456   -0.025    0.008    1.000    0.010    0.006   -0.030   -0.009   -0.014   -0.011   -0.112 |\n",
      "|  bplus_0 |    0.029    0.381    0.454   -0.242    0.012    0.708   -0.062    0.332    0.828    0.875    0.734   -0.413    0.043    0.042   -0.340    0.384    0.010    1.000    0.462   -0.448   -0.397   -0.155   -0.344   -0.323 |\n",
      "|      Ctt |    0.107    0.207    0.119   -0.179    0.020    0.478   -0.035    0.135    0.541    0.546    0.562   -0.096   -0.009    0.028   -0.201    0.111    0.006    0.462    1.000   -0.173   -0.154   -0.088   -0.080    0.202 |\n",
      "|  p4160_s |   -0.045   -0.196   -0.326    0.361    0.034   -0.466    0.038   -0.200   -0.525   -0.524   -0.440    0.086    0.008   -0.034    0.166   -0.219   -0.030   -0.448   -0.173    1.000    0.479    0.085    0.167    0.205 |\n",
      "|  p4415_s |   -0.063   -0.174   -0.331    0.211   -0.005   -0.409    0.030   -0.150   -0.474   -0.504   -0.445    0.316   -0.006   -0.023    0.071   -0.261   -0.009   -0.397   -0.154    0.479    1.000    0.073    0.208    0.037 |\n",
      "|  omega_s |   -0.029   -0.332   -0.080    0.048    0.148   -0.137    0.669   -0.067   -0.148   -0.157   -0.135    0.075   -0.002   -0.115    0.065   -0.067   -0.014   -0.155   -0.088    0.085    0.073    1.000    0.062    0.074 |\n",
      "|  psi2s_p |    0.193   -0.147   -0.113    0.107    0.005   -0.354    0.027   -0.458   -0.394   -0.391   -0.438    0.235   -0.134   -0.017    0.174   -0.059   -0.011   -0.344   -0.080    0.167    0.208    0.062    1.000    0.079 |\n",
      "|  bplus_2 |   -0.015   -0.123   -0.119    0.106    0.225   -0.349    0.047   -0.053   -0.283   -0.286   -0.279    0.128   -0.026   -0.066    0.205   -0.125   -0.112   -0.323    0.202    0.205    0.037    0.074    0.079    1.000 |\n",
      "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.02748572924355086}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.31395261617035836}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.11961458297923233}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.2099792006080199}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.35852456850289727}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.030701461411192454}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.29311959403106513}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.12511651606965246}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.6488852751508802}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.318074006333513}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 1.7207799359133757}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17275594794777677}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.22237724088196575}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.15610700119230447}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.24363936781465045}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.12632442663559473}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 0.8754066195568893}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.013354150958214017}), (<zfit.Parameter 'Ctt' floating=True>, {'error': 0.1541196212031246}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1687912634973262}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.2056894948575974}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.1971433638572728}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.033408042704575536}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.05462456022029005})])\n",
      "Step: 10/11\n",
      "Current Ctt: 1.5430334996209192\n",
      "Ctt floating: False\n",
      "Toy 0/1 - Fit 0/1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "------------------------------------------------------------------\n",
      "| FCN = 2.967E+05               |    Ncalls=1039 (1039 total)    |\n",
      "| EDM = 2.89E-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: 296675.6949483203\n",
      "----------------------------------------------------------------------------------------------\n",
      "|   | Name     |   Value   | Hesse Err | Minos Err- | Minos Err+ | Limit-  | Limit+  | Fixed |\n",
      "----------------------------------------------------------------------------------------------\n",
      "| 0 | jpsi_p   |   -1.50   |    0.03   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 1 | rho_s    |    1.0    |    0.3    |            |            |0.0253049| 2.0747  |       |\n",
      "| 2 | p4160_p  |   -1.52   |    0.12   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 3 | p4040_p  |   -3.1    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 4 | rho_p    |   -0.8    |    0.4    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 5 | bplus_1  |   -0.81   |    0.04   |            |            |   -2    |    2    |       |\n",
      "| 6 | omega_p  |   0.25    |   0.37    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 7 | Dbar_s   |   0.300   |   0.028   |            |            |  -0.3   |   0.3   |       |\n",
      "| 8 | DDstar_p |   -1.2    |    0.6    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 9 | DDstar_s |   -0.30   |    0.39   |            |            |  -0.3   |   0.3   |       |\n",
      "| 10| Dbar_p   |   0.16    |   0.37    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 11| p4040_s  |   0.44    |   0.18    |            |            |0.00501244| 2.01499 |       |\n",
      "| 12| p3770_s  |   2.65    |   0.24    |            |            |0.918861 | 4.08114 |       |\n",
      "| 13| phi_p    |   0.82    |   0.18    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 14| p4415_p  |   -2.62   |    0.28   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 15| p3770_p  |   -2.47   |    0.13   |            |            |-6.28319 | 6.28319 |       |\n",
      "| 16| phi_s    |   20.3    |    1.0    |            |            | 14.8182 | 23.5818 |       |\n",
      "| 17| bplus_0  |   0.433   |   0.017   |            |            |   -2    |    2    |       |\n",
      "| 18| p4160_s  |   1.82    |   0.17    |            |            | 0.71676 | 3.68324 |       |\n",
      "| 19| p4415_s  |   0.76    |   0.21    |            |            |0.126447 | 2.35355 |       |\n",
      "| 20| omega_s  |    7.0    |    1.6    |            |            | 4.19232 | 9.40768 |       |\n",
      "| 21| psi2s_p  |   2.05    |   0.03    |            |            |-6.28319 | 6.28319 |       |\n",
      "| 22| bplus_2  |   -0.52   |    0.06   |            |            |   -2    |    2    |       |\n",
      "----------------------------------------------------------------------------------------------\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|          |   jpsi_p    rho_s  p4160_p  p4040_p    rho_p  bplus_1  omega_p   Dbar_s DDstar_p DDstar_s   Dbar_p  p4040_s  p3770_s    phi_p  p4415_p  p3770_p    phi_s  bplus_0  p4160_s  p4415_s  omega_s  psi2s_p  bplus_2 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "|   jpsi_p |    1.000    0.079    0.354   -0.041   -0.059    0.249   -0.029    0.006   -0.343   -0.310    0.504   -0.095    0.219    0.034   -0.025    0.424    0.036   -0.047   -0.132   -0.005   -0.047    0.207   -0.239 |\n",
      "|    rho_s |    0.079    1.000    0.004   -0.034    0.084   -0.103   -0.072    0.001   -0.134   -0.034   -0.014    0.023    0.010    0.173   -0.040    0.054    0.025    0.290   -0.035    0.049   -0.405    0.009   -0.215 |\n",
      "|  p4160_p |    0.354    0.004    1.000   -0.286    0.065    0.046    0.002    0.039   -0.188   -0.240    0.283   -0.159    0.055   -0.011    0.243    0.334   -0.032    0.012   -0.077   -0.198   -0.004    0.106    0.184 |\n",
      "|  p4040_p |   -0.041   -0.034   -0.286    1.000    0.044   -0.109    0.010    0.020    0.221   -0.049    0.121   -0.244    0.058   -0.023    0.090    0.031   -0.036    0.028    0.250    0.129    0.015   -0.142    0.124 |\n",
      "|    rho_p |   -0.059    0.084    0.065    0.044    1.000    0.042    0.007   -0.007   -0.090   -0.030    0.026   -0.061    0.066   -0.266    0.043    0.055   -0.183    0.069    0.047   -0.042    0.049   -0.018    0.194 |\n",
      "|  bplus_1 |    0.249   -0.103    0.046   -0.109    0.042    1.000    0.030    0.001   -0.673   -0.181   -0.023    0.074    0.092   -0.024   -0.145    0.253   -0.002   -0.683   -0.122    0.221    0.055    0.056   -0.344 |\n",
      "|  omega_p |   -0.029   -0.072    0.002    0.010    0.007    0.030    1.000   -0.000    0.023    0.004    0.008   -0.007    0.001   -0.090    0.011   -0.009   -0.012   -0.061    0.010   -0.012    0.768   -0.002    0.061 |\n",
      "|   Dbar_s |    0.006    0.001    0.039    0.020   -0.007    0.001   -0.000    1.000   -0.032   -0.003    0.014   -0.036    0.037    0.002    0.008    0.012    0.004   -0.001    0.004   -0.014    0.000    0.016   -0.035 |\n",
      "| DDstar_p |   -0.343   -0.134   -0.188    0.221   -0.090   -0.673    0.023   -0.032    1.000    0.337    0.129   -0.021   -0.110   -0.009    0.237   -0.397    0.008   -0.002    0.232   -0.153    0.056    0.024    0.486 |\n",
      "| DDstar_s |   -0.310   -0.034   -0.240   -0.049   -0.030   -0.181    0.004   -0.003    0.337    1.000    0.165    0.056   -0.122   -0.005   -0.047   -0.169    0.005   -0.005    0.004   -0.007    0.014   -0.116    0.125 |\n",
      "|   Dbar_p |    0.504   -0.014    0.283    0.121    0.026   -0.023    0.008    0.014    0.129    0.165    1.000   -0.106    0.247   -0.002    0.107    0.428   -0.018    0.030    0.006   -0.006    0.007    0.387   -0.006 |\n",
      "|  p4040_s |   -0.095    0.023   -0.159   -0.244   -0.061    0.074   -0.007   -0.036   -0.021    0.056   -0.106    1.000    0.107    0.020   -0.220   -0.169    0.036   -0.016   -0.459    0.071   -0.008    0.121   -0.279 |\n",
      "|  p3770_s |    0.219    0.010    0.055    0.058    0.066    0.092    0.001    0.037   -0.110   -0.122    0.247    0.107    1.000   -0.015    0.023   -0.046   -0.036    0.035    0.008    0.050   -0.005   -0.254   -0.009 |\n",
      "|    phi_p |    0.034    0.173   -0.011   -0.023   -0.266   -0.024   -0.090    0.002   -0.009   -0.005   -0.002    0.020   -0.015    1.000   -0.023    0.003    0.518    0.027   -0.025    0.021   -0.158    0.006   -0.105 |\n",
      "|  p4415_p |   -0.025   -0.040    0.243    0.090    0.043   -0.145    0.011    0.008    0.237   -0.047    0.107   -0.220    0.023   -0.023    1.000    0.011   -0.035    0.025    0.130   -0.242    0.017   -0.051    0.199 |\n",
      "|  p3770_p |    0.424    0.054    0.334    0.031    0.055    0.253   -0.009    0.012   -0.397   -0.169    0.428   -0.169   -0.046    0.003    0.011    1.000   -0.017    0.030   -0.048   -0.005   -0.025    0.165   -0.132 |\n",
      "|    phi_s |    0.036    0.025   -0.032   -0.036   -0.183   -0.002   -0.012    0.004    0.008    0.005   -0.018    0.036   -0.036    0.518   -0.035   -0.017    1.000   -0.023   -0.037    0.031   -0.031    0.006   -0.135 |\n",
      "|  bplus_0 |   -0.047    0.290    0.012    0.028    0.069   -0.683   -0.061   -0.001   -0.002   -0.005    0.030   -0.016    0.035    0.027    0.025    0.030   -0.023    1.000    0.035   -0.010   -0.131   -0.008   -0.185 |\n",
      "|  p4160_s |   -0.132   -0.035   -0.077    0.250    0.047   -0.122    0.010    0.004    0.232    0.004    0.006   -0.459    0.008   -0.025    0.130   -0.048   -0.037    0.035    1.000    0.237    0.015   -0.164    0.143 |\n",
      "|  p4415_s |   -0.005    0.049   -0.198    0.129   -0.042    0.221   -0.012   -0.014   -0.153   -0.007   -0.006    0.071    0.050    0.021   -0.242   -0.005    0.031   -0.010    0.237    1.000   -0.020    0.044   -0.421 |\n",
      "|  omega_s |   -0.047   -0.405   -0.004    0.015    0.049    0.055    0.768    0.000    0.056    0.014    0.007   -0.008   -0.005   -0.158    0.017   -0.025   -0.031   -0.131    0.015   -0.020    1.000   -0.004    0.100 |\n",
      "|  psi2s_p |    0.207    0.009    0.106   -0.142   -0.018    0.056   -0.002    0.016    0.024   -0.116    0.387    0.121   -0.254    0.006   -0.051    0.165    0.006   -0.008   -0.164    0.044   -0.004    1.000   -0.189 |\n",
      "|  bplus_2 |   -0.239   -0.215    0.184    0.124    0.194   -0.344    0.061   -0.035    0.486    0.125   -0.006   -0.279   -0.009   -0.105    0.199   -0.132   -0.135   -0.185    0.143   -0.421    0.100   -0.189    1.000 |\n",
      "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
      "Hesse errors: OrderedDict([(<zfit.Parameter 'jpsi_p' floating=True>, {'error': 0.0328045830556265}), (<zfit.Parameter 'rho_s' floating=True>, {'error': 0.33881283869361595}), (<zfit.Parameter 'p4160_p' floating=True>, {'error': 0.12391959427555443}), (<zfit.Parameter 'p4040_p' floating=True>, {'error': 0.3920926816641892}), (<zfit.Parameter 'rho_p' floating=True>, {'error': 0.437668448283667}), (<zfit.Parameter 'bplus_1' floating=True>, {'error': 0.04271834777685013}), (<zfit.Parameter 'omega_p' floating=True>, {'error': 0.36721450787305754}), (<zfit.Parameter 'Dbar_s' floating=True>, {'error': 0.02796029722800525}), (<zfit.Parameter 'DDstar_p' floating=True>, {'error': 0.5945052377488778}), (<zfit.Parameter 'DDstar_s' floating=True>, {'error': 0.3889456764491279}), (<zfit.Parameter 'Dbar_p' floating=True>, {'error': 0.3707340402668837}), (<zfit.Parameter 'p4040_s' floating=True>, {'error': 0.17790671835094876}), (<zfit.Parameter 'p3770_s' floating=True>, {'error': 0.24042655355296105}), (<zfit.Parameter 'phi_p' floating=True>, {'error': 0.1762512338857709}), (<zfit.Parameter 'p4415_p' floating=True>, {'error': 0.28198450062741864}), (<zfit.Parameter 'p3770_p' floating=True>, {'error': 0.13435331553395025}), (<zfit.Parameter 'phi_s' floating=True>, {'error': 1.0000236603294077}), (<zfit.Parameter 'bplus_0' floating=True>, {'error': 0.016920359851551492}), (<zfit.Parameter 'p4160_s' floating=True>, {'error': 0.1693305369936764}), (<zfit.Parameter 'p4415_s' floating=True>, {'error': 0.2148383070439105}), (<zfit.Parameter 'omega_s' floating=True>, {'error': 1.5520132639651485}), (<zfit.Parameter 'psi2s_p' floating=True>, {'error': 0.03448157125199547}), (<zfit.Parameter 'bplus_2' floating=True>, {'error': 0.06343640604654643})])\n",
      "\n",
      "Time taken: 52 min, 10 s\n",
      "Estimated time left: 4 min, 44 s\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEICAYAAAC9E5gJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAVkElEQVR4nO3df9ClZX3f8fcngJAEKou7UArURbvpBGfiyuwQMiSWBquATSEdbdfYyFjazTTQxOq0rtgx1imtSapRG6OziSQ48Rcq1E1AkVIdayaiC+GnFFl1Iysru6Ai5gcJ+O0f53rc4/I8e85zfjzn1/s1c+bc5zr3uZ/rvnbP9bnv6/5xUlVIkhbbD026ApKkyTMMJEmGgSTJMJAkYRhIkjAMJEkYBhJJ3pjkDyddD2mSDANNRJJfSLIryXeT7Evy8SQ/3d57Suec5NNJ/s1kajsaSZ6W5CNJ9iSpJOf2mP/TSf66tdF3k9y3wny/35b3D8ZScS0Ew0BrLsmrgbcB/w04Cfj7wO8AF02yXmvks8C/Ar7R5/yXV9Wx7fEPD32zBeizR1lBLSbDQGsqydOBNwGXVdW1VfUXVfW3VfVHVfUfk5wPXAH8y7Y1fEeSK4GfAX67lf32Msv9RJLLDym7I8k/b9NvT/JAku8kuTXJz6xQv3OT7D2kbE+SF7TpH0qyPcmXkzyS5JokJ/Sz7lX1N1X1tqr6LPBkP585nCRHAv8TuLzXvFIvhoHW2k8BxwDXLfdmVX2Czh7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WHgBXSOn3wKeEmb7dB2WGqflwD/pzpHCncCW9sZNqcDm4DPr81ajEZVva6qTq3OTde20lm3l7OAbZHkR5MctzRN5//13azF92PSR867joh/ic6Y6esnXZ8xrN8HgH3A39JJ7EvpjHHeDNzfnk9o84bODwN9GbgL2NK1nH9N56DYbuCVk16vAdvip+nsrt4J3N4eFy5aewA/AfxZa4e7gTe08mfR6cB2Ax8Gjm7lx7TXu9v7z+pa1utb+9wHXDDpdRuyXc7l4NlEC9cWbZ3vaI97lvrDtfh+eDsKSdJUDBNJkibMMJAkGQaSJMNAkoRhIEnCMJAkYRhIkoD/D0GkClf2Jx6bAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# zfit.run.numeric_checks = False   \n",
    "\n",
    "load = False\n",
    "\n",
    "bo = True\n",
    "\n",
    "D_contribs = True\n",
    "\n",
    "if not D_contribs:\n",
    "    Dbar_s.floating = False\n",
    "    Dbar_p.floating = False\n",
    "    DDstar_s.floating = False\n",
    "    DDstar_p.floating = False\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-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, fixed_params = False)\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",
    "        \n",
    "        __ += 1\n",
    "        \n",
    "        for i in range(2):\n",
    "            Ctt_list.append([])\n",
    "            Ctt_error_list.append([])\n",
    "            Nll_list.append([])\n",
    "\n",
    "            for param in total_f_fit.get_dependents():\n",
    "                if param.floating:\n",
    "                    pull_dic[param.name].append([])\n",
    "        \n",
    "        for toy in range(nr_of_toys):        \n",
    "        \n",
    "            newset = True\n",
    "            \n",
    "            while newset:\n",
    "                \n",
    "                for floaty in [True, False]:\n",
    "                    Ctt.floating = floaty\n",
    "                    \n",
    "                    for bo_step in range(bo_set):\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",
    "                            print('Toy {0}/{1} - Fit {2}/{3}'.format(toy, nr_of_toys, bo_step, bo_set))\n",
    "                            Ctt.set_value(Ctt_step)\n",
    "\n",
    "                        else:\n",
    "                            Ctt.set_value(0.0)\n",
    "                            print('Toy {0}/{1} - Fit {2}/{3}'.format(toy, nr_of_toys, bo_step, bo_set))\n",
    "\n",
    "                        if newset:\n",
    "                            sampler.resample(n=nevents)\n",
    "                            data = sampler\n",
    "                            newset = False\n",
    "\n",
    "                        ### Fit data\n",
    "                        \n",
    "                        if floaty:\n",
    "                            plt.clf()\n",
    "                            plt.title('Ctt value: {:.2f}'.format(Ctt_step))\n",
    "                            plt.hist(zfit.run(data), bins = int((x_max-x_min)/7), range = (x_min, x_max))\n",
    "                            plt.savefig('data/CLs/plots/set_histo{}.png'.format(__))\n",
    "                            _step = 2*__\n",
    "                        else:\n",
    "                            _step = 2*__+1\n",
    "                                \n",
    "                            save_pulls(step = _step)\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",
    "\n",
    "                            if floaty:\n",
    "                                Nll_list[-2].append(result.fmin)\n",
    "                                Ctt_list[-2].append(params[Ctt]['value'])\n",
    "                                Ctt_error_list[-2].append(params[Ctt]['minuit_hesse']['error'])\n",
    "\n",
    "                            else:\n",
    "                                Nll_list[-1].append(result.fmin)\n",
    "                                Ctt_list[-1].append(0.0)\n",
    "                                Ctt_error_list[-1].append(0.0)\n",
    "                                \n",
    "\n",
    "                        else:\n",
    "                            for _ in [1,2]:\n",
    "                                del Nll_list[-_][toy*bo_set:]\n",
    "#                                 print(np.shape(Nll_list[-_]))\n",
    "                                del Ctt_list[-_][toy*bo_set:]\n",
    "                                del Ctt_error_list[-_][toy*bo_set:]\n",
    "                                for param in total_f_fit.get_dependents():\n",
    "                                    if param.floating:\n",
    "                                        del pull_dic[param.name][_step][toy*bo_set:]\n",
    "                            newset = True\n",
    "                            break\n",
    "                            \n",
    "                    if not result.converged:\n",
    "                        break\n",
    "            \n",
    "            print()\n",
    "            print('Time taken: {}'.format(display_time(int(time.time()-start))))\n",
    "            print('Estimated time left: {}'.format(display_time(int((time.time()-start)/(__+(toy+1)/nr_of_toys)*(ste-__-(nr_of_toys-toy-1)/nr_of_toys)))))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "if load:\n",
    "    \n",
    "    phase_combi = '-+'\n",
    "\n",
    "    _dir = 'data/CLs/finished/f1d1/{}/'.format(phase_combi)\n",
    "    \n",
    "    jobs = os.listdir(_dir)\n",
    "    \n",
    "    First = True\n",
    "    \n",
    "#     print(jobs)\n",
    "    \n",
    "    for job in jobs:\n",
    "        \n",
    "        dirName = _dir + str(job) + '/data/CLs'\n",
    "        \n",
    "        if not os.path.exists(\"{}/{}-{}_{}s{}b{}t--CLs_Nll_list.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys)):\n",
    "#             print(job)\n",
    "            continue\n",
    "        \n",
    "        with open(r\"{}/variab.pkl\".format(dirName), \"rb\") as input_file:\n",
    "            variab = pkl.load(input_file)\n",
    "#             print(variab)\n",
    "        \n",
    "        ### sanity check:\n",
    "        if variab['mi'] != mi or variab['ma'] != ma or variab['ste'] != ste or bo_set != bo_set:\n",
    "            print('Fitting parameters of data dont equal the ones given -- Job {} skipped!'.format(job))\n",
    "        \n",
    "        with open(r\"{}/{}-{}_{}s{}b{}t--CLs_Nll_list.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys), \"rb\") as input_file:\n",
    "            _Nll_list = pkl.load(input_file)\n",
    "        \n",
    "        with open(r\"{}/{}-{}_{}s{}b{}t--Ctt_list.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys), \"rb\") as input_file:\n",
    "            _Ctt_list = pkl.load(input_file)\n",
    "            \n",
    "        with open(r\"{}/{}-{}_{}s{}b{}t--Ctt_error_list.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys), \"rb\") as input_file:\n",
    "            _Ctt_error_list = pkl.load(input_file)\n",
    "            \n",
    "        with open(r\"{}/{}-{}_{}s{}b{}t--pull_dic.pkl\".format(dirName, mi,ma,ste,bo_set,nr_of_toys), \"rb\") as input_file:\n",
    "            _pull_dic = pkl.load(input_file)\n",
    "        \n",
    "        with open(r\"{}/{}-{}_{}s--CLs_list.pkl\".format(dirName, mi,ma,ste), \"rb\") as input_file:\n",
    "            _CLs_list = pkl.load(input_file)\n",
    "            \n",
    "        \n",
    "        if First:\n",
    "            Nll_list = _Nll_list\n",
    "            Ctt_list = _Ctt_list\n",
    "            Ctt_error_list = _Ctt_error_list\n",
    "            pull_dic = _pull_dic\n",
    "#             print(_pull_dic)\n",
    "            CLs_list = _CLs_list\n",
    "            First = False\n",
    "        else:\n",
    "            for step in range(2*ste):\n",
    "#                 print(Nll_list[step], step)\n",
    "                Nll_list[step].extend(_Nll_list[step])\n",
    "                Ctt_list[step].extend(_Ctt_list[step])\n",
    "                Ctt_error_list[step].extend(_Ctt_error_list[step])\n",
    "                for key in pull_dic.keys():\n",
    "#                     print(key, np.shape(pull_dic[key]))\n",
    "                    pull_dic[key][step].extend(_pull_dic[key][step])\n",
    "            for step in range(ste):\n",
    "                CLs_list[step].extend(_CLs_list[step])\n",
    "\n",
    "#         print('----------------------')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(22, 1)\n",
      "[[297523.5053385047]]\n",
      "(11, 1)\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",
    "\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(np.shape(Nll_list))\n",
    "    print(Nll_list[0:1])\n",
    "    \n",
    "    for step in range(ste):\n",
    "        CLs_values.append([])\n",
    "        for toy in range(nr_of_toys):\n",
    "            float_min = np.min(Nll_list[2*step][toy*bo_set:(toy+1)*bo_set])\n",
    "            fix_min = np.min(Nll_list[2*step+1][toy*bo_set:(toy+1)*bo_set])\n",
    "            CLs_values[step].append(float_min-fix_min)\n",
    "        \n",
    "    \n",
    "    print(np.shape(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(variab['mi'] != mi)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(11, 1)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEWCAYAAAB2X2wCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAWr0lEQVR4nO3dfbRldX3f8fdHRkTLU+OMD2EYhuiYglRBp0jLSiAFEzA4k1iWATTRBkPSSqrVJAsfS6kxqa5oaiRVlvgYFQZ8mlAoatVAuoQwKFIBSUZEGR5klAd5Uhj99o+9Lx4u59575t5z73F+836tddc6e+/f3fu7z8Pn/PZvn7NPqgpJ0o7vMZMuQJI0Hga6JDXCQJekRhjoktQIA12SGmGgS1IjDPQxSbI6SSVZ1k9/KckrZmh7epK/med2jkyyZSG17sxme1xaleTwJP+U5N4kv7GY90GSa5IcuRjrno8kT0+y03w220CfJsmNSR7on/zfTfKBJLtPuq6lkORxSc5O8u0k9yT5apJjF7jOXfs3sH9Kcl9//74/yep++aPCpX9jfPpCtrvUkhyU5OIk3xslQPp9vK9/nt2b5H1D2uya5BtjeAM/A3h3Ve1eVZ9e4LoeluSDSd4yOK+qnllVXxrXNga29fIkPx64v+5N8u5xb2dHZ6AP98Kq2h14DvCvgDdOuJ6lsgy4CTgC2At4E7BhKnzn6XxgHXBSv85nA1cCRy2k0J9BDwEbgJO343+e3Yfs7lU1rMf8x8DtY6htP+CaMaxn0r48cH/tXlWnTrqgnzUG+iyq6mbgIuAgeLj3fvTU8oUMnQC7JTm37wl/JcmzB9Z7Y5LXJbk2yZ39UcJuw1YyvTc72GtKsjzJBUnuSnJHkkuTzPiYV9V9VXV6Vd1YVT+pqguAbwHPnc8O9v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ryQ5tKpuW8ISx2qm/Z2S5GXAccBRDX8LeJTLXDQnyWPpwvyjVfXJSdezBA4H1iV5AbAbsGeSv6mql064rgXzi0ULlORGYG1V7YhXbRtJkmOAdwBHVNXWSdezWPrrEP0jcBRwM91lL06qqmsmWtgi6i9z/SHgjqp69aTrWWp9D/2Pquq4SdcyDo6haxTvBvYAPpfkqiTvmXRBi6E/8Tt1mYvrgA0th3nvcOC3gX/bP7ZX9T1X7YDsoUtSI+yhS1IjDHRJaoSBLkmNMNAlqREGuiQ1wkDXTifJj/uP5309yXlJnjBH+w8mOb6//aUkTf2wsNphoGtn9EBVHVxVBwEPAn8w6YKkcTDQtbO7FHh6ktVJvj41s7/W/emTK0vafga6dlr9V/2PBf7fpGuRxsFA187o8UmuAjbR/UDJ2ROuRxoLr7aondEDVXXw4Iwk23hkB2e3pS1JWjh76FLnu8CTkjwxyePoLhUs7VDsoUtAVT2U5Ay6X+v5FvCNCZckbTevtihJjXDIRZIaYaBLUiMMdElqhIEuSY0w0CWpEQa6JDXCQJekRvx/tRCArSG3NhkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "l = []\n",
    "\n",
    "\n",
    "if load:\n",
    "    CLs_values = -1*np.array(CLs_list)\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",
    "print(np.shape(CLs_values))\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",
    "    \n",
    "for step in range(2*ste):\n",
    "    if step%2 == 0:\n",
    "        floaty = True\n",
    "    else:\n",
    "        floaty = False\n",
    "    for key in pull_dic.keys():\n",
    "        if not os.path.exists('data/CLs/plots/{}'.format(key)):\n",
    "            os.mkdir('data/CLs/plots/{}'.format(key))\n",
    "        plt.clf()\n",
    "        plt.title('Pull {} - Ctt value {:.2f} - floating {}'.format(key, Ctt_steps[int(step/2)], floaty))\n",
    "        plt.hist(pull_dic[key][step], bins = 50, range = (-5,5))\n",
    "        plt.xlabel('Pull')\n",
    "        plt.savefig('data/CLs/plots/{}/{:.2f}Ctt{}s{}f.png'.format(key, Ctt_steps[int(step/2)], step, floaty))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "BR: 0.0000\n",
      "2.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 step in range(2*ste):\n",
    "#     for key in pull_dic.keys():\n",
    "#         print(pull_dic[key][step])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [],
   "source": [
    "# for param in total_f_fit.get_dependents():\n",
    "#     if param.floating:\n",
    "#         print(params[param]['value'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "53 min, 12 s\n"
     ]
    }
   ],
   "source": [
    "print(display_time(int(time.time()-start)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [],
   "source": [
    "# variab['mi'] =! mi"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "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
}