{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Welcome to JupyROOT 6.28/04\n"
     ]
    }
   ],
   "source": [
    "import uproot\n",
    "import ROOT\n",
    "from ROOT import TMultiGraph, TLatex, TCanvas, TFile, TGaxis, TGraphAsymmErrors\n",
    "from ROOT import gROOT, gStyle, gPad\n",
    "from ROOT import TEfficiency\n",
    "\n",
    "ROOT.gROOT.SetBatch(True)\n",
    "\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import awkward as ak\n",
    "import numpy as np\n",
    "from array import array\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "ename": "",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31mThe kernel failed to start due to an error with the 'pyzmq' module. Consider re-installing this module.\n",
      "\u001b[1;31mClick <a href='https://aka.ms/kernelFailuresPyzmq'>here</a> for more info."
     ]
    }
   ],
   "source": [
    "from collections import defaultdict\n",
    "\n",
    "basedict = defaultdict(lambda: defaultdict(dict))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def getEfficiencyHistoNames():\n",
    "    return [\"p\", \"pt\", \"phi\", \"eta\", \"nPV\"]\n",
    "\n",
    "\n",
    "def getTrackers(trackers):\n",
    "    return trackers\n",
    "\n",
    "#data/resolutions_and_effs_Bd2KstEE_MDmaster.root:Track/...\n",
    "def getOriginFolders():\n",
    "    basedict = {\n",
    "        \"Velo\": {},\n",
    "        \"Upstream\": {},\n",
    "        \"Forward\": {},\n",
    "        \"Match\": {},\n",
    "        \"BestLong\": {},\n",
    "        \"Seed\": {},\n",
    "    }\n",
    "\n",
    "    basedict[\"Velo\"][\"folder\"] = \"VeloTrackChecker/\" #evtl anpassen wenn die folders anders heissen\n",
    "    basedict[\"Upstream\"][\"folder\"] = \"UpstreamTrackChecker/\"\n",
    "    basedict[\"Forward\"][\"folder\"] = \"ForwardTrackChecker_7a0dbfa7/\"\n",
    "    basedict[\"Match\"][\"folder\"] = \"MatchTrackChecker_29e3152a/\"\n",
    "    basedict[\"BestLong\"][\"folder\"] = \"BestLongTrackChecker_4ddacce1/\"\n",
    "    basedict[\"Seed\"][\"folder\"] = \"SeedTrackChecker_1b1d5575/\"\n",
    "\n",
    "    return basedict\n",
    "\n",
    "\n",
    "def getTrackNames():\n",
    "    basedict = {\n",
    "        \"Velo\": {},\n",
    "        \"Upstream\": {},\n",
    "        \"Forward\": {},\n",
    "        \"Match\": {},\n",
    "        \"BestLong\": {},\n",
    "        \"Seed\": {},\n",
    "    }\n",
    "\n",
    "    basedict[\"Velo\"] = \"Velo\"\n",
    "    basedict[\"Upstream\"] = \"VeloUT\"\n",
    "    basedict[\"Forward\"] = \"Forward\"\n",
    "    basedict[\"Match\"] = \"Match\"\n",
    "    basedict[\"BestLong\"] = \"BestLong\"\n",
    "    basedict[\"Seed\"] = \"Seed\"\n",
    "    return basedict\n",
    "\n",
    "trackers = [\"Forward\", \"Match\", \"BestLong\", \"Seed\"]\n",
    "label = [\"EffChecker\"]\n",
    "filename = [\"/work/cetin/LHCb/stack/data/resolutions_and_effs_Bd2KstEE_MDmaster.root\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_files(tf, filename, label):\n",
    "    for i, f in enumerate(filename):\n",
    "        tf[label[i]] = TFile(f, \"read\")\n",
    "    return tf\n",
    "\n",
    "\n",
    "def get_nicer_var_string(var: str):\n",
    "    nice_vars = dict(pt=\"p_{T}\", eta=\"#eta\", phi=\"#phi\")\n",
    "    try:\n",
    "        return nice_vars[var]\n",
    "    except KeyError:\n",
    "        return var\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def Efficiency(numerator, denominator):\n",
    "    return (numerator.GetEntries()+1.)/(denominator.GetEntries()+2.)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_eff(eff, hist, tf, histoName, label, var):\n",
    "    eff = {}\n",
    "    hist = {}\n",
    "    var = get_nicer_var_string(var)\n",
    "    for i, lab in enumerate(label):\n",
    "        numeratorName = histoName + \"_reconstructed\"\n",
    "        numerator = tf[lab].Get(numeratorName)\n",
    "        denominatorName = histoName + \"_reconstructible\"\n",
    "        denominator = tf[lab].Get(denominatorName)\n",
    "        if numerator.GetEntries() == 0 or denominator.GetEntries() == 0:\n",
    "            continue\n",
    "\n",
    "        teff = Efficiency(numerator, denominator)\n",
    "        #print(\"TBetaAlpha: \"+ str(teff.GetBetaAlpha()))\n",
    "        #print(\"TBetaBeta: \"+ str(teff.GetBetaBeta()))\n",
    "        eff[lab] = teff\n",
    "\n",
    "        hist[lab] = denominator.Clone()\n",
    "        hist[lab].SetName(\"h_numerator_notElectrons\")\n",
    "        hist[lab].SetTitle(var + \" distribution, not e^{-}\")\n",
    "        if histoName.find(\"strange\") != -1:\n",
    "            hist[lab].SetTitle(var + \" distribution, stranges\")\n",
    "        if histoName.find(\"electron\") != -1:\n",
    "            hist[lab].SetTitle(var + \" distribution, e^{-}\")\n",
    "\n",
    "    return eff, hist"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "tf = {}\n",
    "tf = get_files(tf, filename, label)\n",
    "\n",
    "latex = TLatex()\n",
    "latex.SetNDC()\n",
    "latex.SetTextSize(0.05)\n",
    "\n",
    "efficiencyHistoDict = efficiencyHistoDict()\n",
    "efficiencyHistos = getEfficiencyHistoNames()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ForwardTrackChecker_7a0dbfa7/\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/01_long_P\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/01_long_Pt\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/01_long_Phi\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/01_long_Eta\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/01_long_nPV\n",
      "ForwardTrackChecker_7a0dbfa7/\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/02_long_P>5GeV_P\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/02_long_P>5GeV_Pt\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/02_long_P>5GeV_Phi\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/02_long_P>5GeV_Eta\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/02_long_P>5GeV_nPV\n",
      "ForwardTrackChecker_7a0dbfa7/\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/03_long_strange_P\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/03_long_strange_Pt\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/03_long_strange_Phi\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/03_long_strange_Eta\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/03_long_strange_nPV\n",
      "ForwardTrackChecker_7a0dbfa7/\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/04_long_strange_P>5GeV_P\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/04_long_strange_P>5GeV_Pt\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/04_long_strange_P>5GeV_Phi\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/04_long_strange_P>5GeV_Eta\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/04_long_strange_P>5GeV_nPV\n",
      "ForwardTrackChecker_7a0dbfa7/\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/05_long_fromB_P\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/05_long_fromB_Pt\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/05_long_fromB_Phi\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/05_long_fromB_Eta\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/05_long_fromB_nPV\n",
      "ForwardTrackChecker_7a0dbfa7/\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/06_long_fromB_P>5GeV_P\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/06_long_fromB_P>5GeV_Pt\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/06_long_fromB_P>5GeV_Phi\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/06_long_fromB_P>5GeV_Eta\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/06_long_fromB_P>5GeV_nPV\n",
      "ForwardTrackChecker_7a0dbfa7/\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/10_long_fromB_P>3GeV_Pt>0.5GeV_P\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/10_long_fromB_P>3GeV_Pt>0.5GeV_Pt\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/10_long_fromB_P>3GeV_Pt>0.5GeV_Phi\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/10_long_fromB_P>3GeV_Pt>0.5GeV_Eta\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/10_long_fromB_P>3GeV_Pt>0.5GeV_nPV\n",
      "ForwardTrackChecker_7a0dbfa7/\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_P\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_Pt\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_Phi\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_Eta\n",
      "not electrons: Track/ForwardTrackChecker_7a0dbfa7/Forward/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV\n",
      "MatchTrackChecker_29e3152a/\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/01_long_P\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/01_long_Pt\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/01_long_Phi\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/01_long_Eta\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/01_long_nPV\n",
      "MatchTrackChecker_29e3152a/\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/02_long_P>5GeV_P\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/02_long_P>5GeV_Pt\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/02_long_P>5GeV_Phi\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/02_long_P>5GeV_Eta\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/02_long_P>5GeV_nPV\n",
      "MatchTrackChecker_29e3152a/\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/03_long_strange_P\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/03_long_strange_Pt\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/03_long_strange_Phi\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/03_long_strange_Eta\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/03_long_strange_nPV\n",
      "MatchTrackChecker_29e3152a/\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/04_long_strange_P>5GeV_P\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/04_long_strange_P>5GeV_Pt\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/04_long_strange_P>5GeV_Phi\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/04_long_strange_P>5GeV_Eta\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/04_long_strange_P>5GeV_nPV\n",
      "MatchTrackChecker_29e3152a/\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/05_long_fromB_P\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/05_long_fromB_Pt\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/05_long_fromB_Phi\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/05_long_fromB_Eta\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/05_long_fromB_nPV\n",
      "MatchTrackChecker_29e3152a/\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/06_long_fromB_P>5GeV_P\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/06_long_fromB_P>5GeV_Pt\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/06_long_fromB_P>5GeV_Phi\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/06_long_fromB_P>5GeV_Eta\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/06_long_fromB_P>5GeV_nPV\n",
      "MatchTrackChecker_29e3152a/\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/10_long_fromB_P>3GeV_Pt>0.5GeV_P\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/10_long_fromB_P>3GeV_Pt>0.5GeV_Pt\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/10_long_fromB_P>3GeV_Pt>0.5GeV_Phi\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/10_long_fromB_P>3GeV_Pt>0.5GeV_Eta\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/10_long_fromB_P>3GeV_Pt>0.5GeV_nPV\n",
      "MatchTrackChecker_29e3152a/\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_P\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_Pt\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_Phi\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_Eta\n",
      "not electrons: Track/MatchTrackChecker_29e3152a/Match/11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV\n",
      "BestLongTrackChecker_4ddacce1/\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/01_long_P\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/01_long_Pt\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/01_long_Phi\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/01_long_Eta\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/01_long_nPV\n",
      "BestLongTrackChecker_4ddacce1/\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/02_long_P>5GeV_P\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/02_long_P>5GeV_Pt\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/02_long_P>5GeV_Phi\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/02_long_P>5GeV_Eta\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/02_long_P>5GeV_nPV\n",
      "BestLongTrackChecker_4ddacce1/\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/03_long_strange_P\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/03_long_strange_Pt\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/03_long_strange_Phi\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/03_long_strange_Eta\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/03_long_strange_nPV\n",
      "BestLongTrackChecker_4ddacce1/\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/04_long_strange_P>5GeV_P\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/04_long_strange_P>5GeV_Pt\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/04_long_strange_P>5GeV_Phi\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/04_long_strange_P>5GeV_Eta\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/04_long_strange_P>5GeV_nPV\n",
      "BestLongTrackChecker_4ddacce1/\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/05_long_fromB_P\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/05_long_fromB_Pt\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/05_long_fromB_Phi\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/05_long_fromB_Eta\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/05_long_fromB_nPV\n",
      "BestLongTrackChecker_4ddacce1/\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/06_long_fromB_P>5GeV_P\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/06_long_fromB_P>5GeV_Pt\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/06_long_fromB_P>5GeV_Phi\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/06_long_fromB_P>5GeV_Eta\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/06_long_fromB_P>5GeV_nPV\n",
      "BestLongTrackChecker_4ddacce1/\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/10_long_fromB_P>3GeV_Pt>0.5GeV_P\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/10_long_fromB_P>3GeV_Pt>0.5GeV_Pt\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/10_long_fromB_P>3GeV_Pt>0.5GeV_Phi\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/10_long_fromB_P>3GeV_Pt>0.5GeV_Eta\n",
      "not electrons: Track/BestLongTrackChecker_4ddacce1/BestLong/10_long_fromB_P>3GeV_Pt>0.5GeV_nPV\n",
      "SeedTrackChecker_1b1d5575/\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/01_hasT_P\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/01_hasT_Pt\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/01_hasT_Phi\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/01_hasT_Eta\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/01_hasT_nPV\n",
      "SeedTrackChecker_1b1d5575/\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/02_long_P\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/02_long_Pt\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/02_long_Phi\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/02_long_Eta\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/02_long_nPV\n",
      "SeedTrackChecker_1b1d5575/\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/03_long_P>5GeV_P\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/03_long_P>5GeV_Pt\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/03_long_P>5GeV_Phi\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/03_long_P>5GeV_Eta\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/03_long_P>5GeV_nPV\n",
      "SeedTrackChecker_1b1d5575/\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/04_long_fromB_P\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/04_long_fromB_Pt\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/04_long_fromB_Phi\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/04_long_fromB_Eta\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/04_long_fromB_nPV\n",
      "SeedTrackChecker_1b1d5575/\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/05_long_fromB_P>5GeV_P\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/05_long_fromB_P>5GeV_Pt\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/05_long_fromB_P>5GeV_Phi\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/05_long_fromB_P>5GeV_Eta\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/05_long_fromB_P>5GeV_nPV\n",
      "SeedTrackChecker_1b1d5575/\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/08_noVelo+UT+T_strange_P\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/08_noVelo+UT+T_strange_Pt\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/08_noVelo+UT+T_strange_Phi\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/08_noVelo+UT+T_strange_Eta\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/08_noVelo+UT+T_strange_nPV\n",
      "SeedTrackChecker_1b1d5575/\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/09_noVelo+UT+T_strange_P>5GeV_P\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/09_noVelo+UT+T_strange_P>5GeV_Pt\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/09_noVelo+UT+T_strange_P>5GeV_Phi\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/09_noVelo+UT+T_strange_P>5GeV_Eta\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/09_noVelo+UT+T_strange_P>5GeV_nPV\n",
      "SeedTrackChecker_1b1d5575/\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/12_noVelo+UT+T_SfromDB_P>5GeV_P\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/12_noVelo+UT+T_SfromDB_P>5GeV_Pt\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/12_noVelo+UT+T_SfromDB_P>5GeV_Phi\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/12_noVelo+UT+T_SfromDB_P>5GeV_Eta\n",
      "not electrons: Track/SeedTrackChecker_1b1d5575/Seed/12_noVelo+UT+T_SfromDB_P>5GeV_nPV\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<pre>[{Forward_01_long_p: [0.872], Forward_01_long_pt: [0.872], ...},\n",
       " {Forward_01_long_p: None, Forward_01_long_pt: None, ...},\n",
       " {Forward_01_long_p: None, Forward_01_long_pt: None, ...},\n",
       " {Forward_01_long_p: None, Forward_01_long_pt: None, ...}]\n",
       "---------------------------------------------------------------------------\n",
       "type: 4 * {\n",
       "    Forward_01_long_p: option[var * float64],\n",
       "    Forward_01_long_pt: option[var * float64],\n",
       "    Forward_01_long_phi: option[var * float64],\n",
       "    Forward_01_long_eta: option[var * float64],\n",
       "    Forward_01_long_nPV: option[var * float64],\n",
       "    &quot;Forward_02_long_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Forward_02_long_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Forward_02_long_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Forward_02_long_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Forward_02_long_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    Forward_03_long_strange_p: option[var * float64],\n",
       "    Forward_03_long_strange_pt: option[var * float64],\n",
       "    Forward_03_long_strange_phi: option[var * float64],\n",
       "    Forward_03_long_strange_eta: option[var * float64],\n",
       "    Forward_03_long_strange_nPV: option[var * float64],\n",
       "    &quot;Forward_04_long_strange_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Forward_04_long_strange_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Forward_04_long_strange_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Forward_04_long_strange_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Forward_04_long_strange_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    Forward_05_long_fromB_p: option[var * float64],\n",
       "    Forward_05_long_fromB_pt: option[var * float64],\n",
       "    Forward_05_long_fromB_phi: option[var * float64],\n",
       "    Forward_05_long_fromB_eta: option[var * float64],\n",
       "    Forward_05_long_fromB_nPV: option[var * float64],\n",
       "    &quot;Forward_06_long_fromB_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Forward_06_long_fromB_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Forward_06_long_fromB_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Forward_06_long_fromB_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Forward_06_long_fromB_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    &quot;Forward_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Forward_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Forward_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Forward_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Forward_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_nPV&quot;: option[var * float64],\n",
       "    &quot;Forward_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Forward_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Forward_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Forward_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Forward_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_nPV&quot;: option[var * float64],\n",
       "    Match_01_long_p: option[var * float64],\n",
       "    Match_01_long_pt: option[var * float64],\n",
       "    Match_01_long_phi: option[var * float64],\n",
       "    Match_01_long_eta: option[var * float64],\n",
       "    Match_01_long_nPV: option[var * float64],\n",
       "    &quot;Match_02_long_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Match_02_long_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Match_02_long_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Match_02_long_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Match_02_long_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    Match_03_long_strange_p: option[var * float64],\n",
       "    Match_03_long_strange_pt: option[var * float64],\n",
       "    Match_03_long_strange_phi: option[var * float64],\n",
       "    Match_03_long_strange_eta: option[var * float64],\n",
       "    Match_03_long_strange_nPV: option[var * float64],\n",
       "    &quot;Match_04_long_strange_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Match_04_long_strange_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Match_04_long_strange_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Match_04_long_strange_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Match_04_long_strange_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    Match_05_long_fromB_p: option[var * float64],\n",
       "    Match_05_long_fromB_pt: option[var * float64],\n",
       "    Match_05_long_fromB_phi: option[var * float64],\n",
       "    Match_05_long_fromB_eta: option[var * float64],\n",
       "    Match_05_long_fromB_nPV: option[var * float64],\n",
       "    &quot;Match_06_long_fromB_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Match_06_long_fromB_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Match_06_long_fromB_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Match_06_long_fromB_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Match_06_long_fromB_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    &quot;Match_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Match_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Match_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Match_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Match_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_nPV&quot;: option[var * float64],\n",
       "    &quot;Match_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Match_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Match_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Match_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Match_11_UT_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_nPV&quot;: option[var * float64],\n",
       "    BestLong_01_long_p: option[var * float64],\n",
       "    BestLong_01_long_pt: option[var * float64],\n",
       "    BestLong_01_long_phi: option[var * float64],\n",
       "    BestLong_01_long_eta: option[var * float64],\n",
       "    BestLong_01_long_nPV: option[var * float64],\n",
       "    &quot;BestLong_02_long_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;BestLong_02_long_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;BestLong_02_long_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;BestLong_02_long_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;BestLong_02_long_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    BestLong_03_long_strange_p: option[var * float64],\n",
       "    BestLong_03_long_strange_pt: option[var * float64],\n",
       "    BestLong_03_long_strange_phi: option[var * float64],\n",
       "    BestLong_03_long_strange_eta: option[var * float64],\n",
       "    BestLong_03_long_strange_nPV: option[var * float64],\n",
       "    &quot;BestLong_04_long_strange_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;BestLong_04_long_strange_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;BestLong_04_long_strange_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;BestLong_04_long_strange_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;BestLong_04_long_strange_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    BestLong_05_long_fromB_p: option[var * float64],\n",
       "    BestLong_05_long_fromB_pt: option[var * float64],\n",
       "    BestLong_05_long_fromB_phi: option[var * float64],\n",
       "    BestLong_05_long_fromB_eta: option[var * float64],\n",
       "    BestLong_05_long_fromB_nPV: option[var * float64],\n",
       "    &quot;BestLong_06_long_fromB_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;BestLong_06_long_fromB_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;BestLong_06_long_fromB_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;BestLong_06_long_fromB_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;BestLong_06_long_fromB_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    &quot;BestLong_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_p&quot;: option[var * float64],\n",
       "    &quot;BestLong_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;BestLong_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;BestLong_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;BestLong_10_long_fromB_P&gt;3GeV_Pt&gt;0.5GeV_nPV&quot;: option[var * float64],\n",
       "    Seed_01_hasT_p: option[var * float64],\n",
       "    Seed_01_hasT_pt: option[var * float64],\n",
       "    Seed_01_hasT_phi: option[var * float64],\n",
       "    Seed_01_hasT_eta: option[var * float64],\n",
       "    Seed_01_hasT_nPV: option[var * float64],\n",
       "    Seed_02_long_p: option[var * float64],\n",
       "    Seed_02_long_pt: option[var * float64],\n",
       "    Seed_02_long_phi: option[var * float64],\n",
       "    Seed_02_long_eta: option[var * float64],\n",
       "    Seed_02_long_nPV: option[var * float64],\n",
       "    &quot;Seed_03_long_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Seed_03_long_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Seed_03_long_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Seed_03_long_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Seed_03_long_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    Seed_04_long_fromB_p: option[var * float64],\n",
       "    Seed_04_long_fromB_pt: option[var * float64],\n",
       "    Seed_04_long_fromB_phi: option[var * float64],\n",
       "    Seed_04_long_fromB_eta: option[var * float64],\n",
       "    Seed_04_long_fromB_nPV: option[var * float64],\n",
       "    &quot;Seed_05_long_fromB_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Seed_05_long_fromB_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Seed_05_long_fromB_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Seed_05_long_fromB_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Seed_05_long_fromB_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    &quot;Seed_08_noVelo+UT+T_strange_p&quot;: option[var * float64],\n",
       "    &quot;Seed_08_noVelo+UT+T_strange_pt&quot;: option[var * float64],\n",
       "    &quot;Seed_08_noVelo+UT+T_strange_phi&quot;: option[var * float64],\n",
       "    &quot;Seed_08_noVelo+UT+T_strange_eta&quot;: option[var * float64],\n",
       "    &quot;Seed_08_noVelo+UT+T_strange_nPV&quot;: option[var * float64],\n",
       "    &quot;Seed_09_noVelo+UT+T_strange_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Seed_09_noVelo+UT+T_strange_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Seed_09_noVelo+UT+T_strange_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Seed_09_noVelo+UT+T_strange_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Seed_09_noVelo+UT+T_strange_P&gt;5GeV_nPV&quot;: option[var * float64],\n",
       "    &quot;Seed_12_noVelo+UT+T_SfromDB_P&gt;5GeV_p&quot;: option[var * float64],\n",
       "    &quot;Seed_12_noVelo+UT+T_SfromDB_P&gt;5GeV_pt&quot;: option[var * float64],\n",
       "    &quot;Seed_12_noVelo+UT+T_SfromDB_P&gt;5GeV_phi&quot;: option[var * float64],\n",
       "    &quot;Seed_12_noVelo+UT+T_SfromDB_P&gt;5GeV_eta&quot;: option[var * float64],\n",
       "    &quot;Seed_12_noVelo+UT+T_SfromDB_P&gt;5GeV_nPV&quot;: option[var * float64]\n",
       "}</pre>"
      ],
      "text/plain": [
       "<Array [{Forward_01_long_p: [0.872], ...}, ...] type='4 * {Forward_01_long_...'>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "\n",
    "plot_electrons = False\n",
    "plot_electrons_only = False\n",
    "\n",
    "categories = categoriesDict()\n",
    "cuts = getCuts()\n",
    "trackers = getTrackers(trackers)\n",
    "folders = getOriginFolders()\n",
    "effdata = ak.ArrayBuilder()\n",
    "#effdata.begin_list()\n",
    "for tracker in trackers:\n",
    "    effdata.begin_record()\n",
    "\n",
    "    for cut in cuts[tracker]:\n",
    "        folder = folders[tracker][\"folder\"]\n",
    "        print(folder)\n",
    "        histoBaseName = \"Track/\" + folder + tracker + \"/\" + cut + \"_\"\n",
    "\n",
    "\n",
    "        # calculate efficiency\n",
    "        for histo in efficiencyHistos:\n",
    "            effdata.field(str(tracker)+\"_\"+str(cut)+\"_\"+str(histo))\n",
    "            effdata.begin_list()\n",
    "            canvastitle = (\n",
    "                \"efficiency_\" + histo + \", \" + categories[tracker][cut][\"title\"]\n",
    "            )\n",
    "            # get efficiency for not electrons category\n",
    "            histoName = histoBaseName + \"\" + efficiencyHistoDict[histo][\"variable\"]\n",
    "            print(\"not electrons: \" + histoName)\n",
    "            eff = {}\n",
    "            hist_den = {}\n",
    "            eff, hist_den = get_eff(eff, hist_den, tf, histoName, label, histo)\n",
    "\n",
    "            if categories[tracker][cut][\"plotElectrons\"] and plot_electrons:\n",
    "                histoNameElec = (\n",
    "                    \"Track/\"\n",
    "                    + folder\n",
    "                    + tracker\n",
    "                    + \"/\"\n",
    "                    + categories[tracker][cut][\"Electrons\"]\n",
    "                )\n",
    "                histoName_e = (\n",
    "                    histoNameElec + \"_\" + efficiencyHistoDict[histo][\"variable\"]\n",
    "                )\n",
    "                print(\"electrons: \" + histoName_e)\n",
    "                eff_elec = {}\n",
    "                hist_elec = {}\n",
    "                eff_elec, hist_elec = get_eff(eff_elec, hist_elec, tf, histoName_e, label, histo,)\n",
    "\n",
    "            #print(type(eff))\n",
    "            if not plot_electrons_only:\n",
    "                effdata.append(eff[label[0]])\n",
    "            if categories[tracker][cut][\"plotElectrons\"] and plot_electrons:\n",
    "                effdata.append(eff_elec[label[0]])\n",
    "\n",
    "            #print(eff[label[0]])\n",
    "            effdata.end_list()\n",
    "    effdata.end_record()\n",
    "\n",
    "#effdata.end_list()\n",
    "\n",
    "effdata = ak.Array(effdata)\n",
    "effdata"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'Forward_01_long_p': [0.8723027753520721],\n",
       "  'Forward_01_long_pt': [0.8723027753520721],\n",
       "  'Forward_01_long_phi': [0.8723027753520721],\n",
       "  'Forward_01_long_eta': [0.8723027753520721],\n",
       "  'Forward_01_long_nPV': [0.8723027753520721],\n",
       "  'Forward_02_long_P>5GeV_p': [0.9274755004618178],\n",
       "  'Forward_02_long_P>5GeV_pt': [0.9274755004618178],\n",
       "  'Forward_02_long_P>5GeV_phi': [0.9274755004618178],\n",
       "  'Forward_02_long_P>5GeV_eta': [0.9274755004618178],\n",
       "  'Forward_02_long_P>5GeV_nPV': [0.9274755004618178],\n",
       "  'Forward_03_long_strange_p': [0.7989988259848683],\n",
       "  'Forward_03_long_strange_pt': [0.7989988259848683],\n",
       "  'Forward_03_long_strange_phi': [0.7989988259848683],\n",
       "  'Forward_03_long_strange_eta': [0.7989988259848683],\n",
       "  'Forward_03_long_strange_nPV': [0.7989988259848683],\n",
       "  'Forward_04_long_strange_P>5GeV_p': [0.8857386703080994],\n",
       "  'Forward_04_long_strange_P>5GeV_pt': [0.8857386703080994],\n",
       "  'Forward_04_long_strange_P>5GeV_phi': [0.8857386703080994],\n",
       "  'Forward_04_long_strange_P>5GeV_eta': [0.8857386703080994],\n",
       "  'Forward_04_long_strange_P>5GeV_nPV': [0.8857386703080994],\n",
       "  'Forward_05_long_fromB_p': [0.9057863426557181],\n",
       "  'Forward_05_long_fromB_pt': [0.9057863426557181],\n",
       "  'Forward_05_long_fromB_phi': [0.9057863426557181],\n",
       "  'Forward_05_long_fromB_eta': [0.9057863426557181],\n",
       "  'Forward_05_long_fromB_nPV': [0.9057863426557181],\n",
       "  'Forward_06_long_fromB_P>5GeV_p': [0.9462021519139234],\n",
       "  'Forward_06_long_fromB_P>5GeV_pt': [0.9462021519139234],\n",
       "  'Forward_06_long_fromB_P>5GeV_phi': [0.9462021519139234],\n",
       "  'Forward_06_long_fromB_P>5GeV_eta': [0.9462021519139234],\n",
       "  'Forward_06_long_fromB_P>5GeV_nPV': [0.9462021519139234],\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_p': [0.9467674812116038],\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': [0.9467674812116038],\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': [0.9467674812116038],\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': [0.9467674812116038],\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': [0.9467674812116038],\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_p': [0.9473434752694748],\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_pt': [0.9473434752694748],\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_phi': [0.9473434752694748],\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_eta': [0.9473434752694748],\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV': [0.9473434752694748],\n",
       "  'Match_01_long_p': None,\n",
       "  'Match_01_long_pt': None,\n",
       "  'Match_01_long_phi': None,\n",
       "  'Match_01_long_eta': None,\n",
       "  'Match_01_long_nPV': None,\n",
       "  'Match_02_long_P>5GeV_p': None,\n",
       "  'Match_02_long_P>5GeV_pt': None,\n",
       "  'Match_02_long_P>5GeV_phi': None,\n",
       "  'Match_02_long_P>5GeV_eta': None,\n",
       "  'Match_02_long_P>5GeV_nPV': None,\n",
       "  'Match_03_long_strange_p': None,\n",
       "  'Match_03_long_strange_pt': None,\n",
       "  'Match_03_long_strange_phi': None,\n",
       "  'Match_03_long_strange_eta': None,\n",
       "  'Match_03_long_strange_nPV': None,\n",
       "  'Match_04_long_strange_P>5GeV_p': None,\n",
       "  'Match_04_long_strange_P>5GeV_pt': None,\n",
       "  'Match_04_long_strange_P>5GeV_phi': None,\n",
       "  'Match_04_long_strange_P>5GeV_eta': None,\n",
       "  'Match_04_long_strange_P>5GeV_nPV': None,\n",
       "  'Match_05_long_fromB_p': None,\n",
       "  'Match_05_long_fromB_pt': None,\n",
       "  'Match_05_long_fromB_phi': None,\n",
       "  'Match_05_long_fromB_eta': None,\n",
       "  'Match_05_long_fromB_nPV': None,\n",
       "  'Match_06_long_fromB_P>5GeV_p': None,\n",
       "  'Match_06_long_fromB_P>5GeV_pt': None,\n",
       "  'Match_06_long_fromB_P>5GeV_phi': None,\n",
       "  'Match_06_long_fromB_P>5GeV_eta': None,\n",
       "  'Match_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'BestLong_01_long_p': None,\n",
       "  'BestLong_01_long_pt': None,\n",
       "  'BestLong_01_long_phi': None,\n",
       "  'BestLong_01_long_eta': None,\n",
       "  'BestLong_01_long_nPV': None,\n",
       "  'BestLong_02_long_P>5GeV_p': None,\n",
       "  'BestLong_02_long_P>5GeV_pt': None,\n",
       "  'BestLong_02_long_P>5GeV_phi': None,\n",
       "  'BestLong_02_long_P>5GeV_eta': None,\n",
       "  'BestLong_02_long_P>5GeV_nPV': None,\n",
       "  'BestLong_03_long_strange_p': None,\n",
       "  'BestLong_03_long_strange_pt': None,\n",
       "  'BestLong_03_long_strange_phi': None,\n",
       "  'BestLong_03_long_strange_eta': None,\n",
       "  'BestLong_03_long_strange_nPV': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_p': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_pt': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_phi': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_eta': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_nPV': None,\n",
       "  'BestLong_05_long_fromB_p': None,\n",
       "  'BestLong_05_long_fromB_pt': None,\n",
       "  'BestLong_05_long_fromB_phi': None,\n",
       "  'BestLong_05_long_fromB_eta': None,\n",
       "  'BestLong_05_long_fromB_nPV': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_p': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_pt': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_phi': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_eta': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Seed_01_hasT_p': None,\n",
       "  'Seed_01_hasT_pt': None,\n",
       "  'Seed_01_hasT_phi': None,\n",
       "  'Seed_01_hasT_eta': None,\n",
       "  'Seed_01_hasT_nPV': None,\n",
       "  'Seed_02_long_p': None,\n",
       "  'Seed_02_long_pt': None,\n",
       "  'Seed_02_long_phi': None,\n",
       "  'Seed_02_long_eta': None,\n",
       "  'Seed_02_long_nPV': None,\n",
       "  'Seed_03_long_P>5GeV_p': None,\n",
       "  'Seed_03_long_P>5GeV_pt': None,\n",
       "  'Seed_03_long_P>5GeV_phi': None,\n",
       "  'Seed_03_long_P>5GeV_eta': None,\n",
       "  'Seed_03_long_P>5GeV_nPV': None,\n",
       "  'Seed_04_long_fromB_p': None,\n",
       "  'Seed_04_long_fromB_pt': None,\n",
       "  'Seed_04_long_fromB_phi': None,\n",
       "  'Seed_04_long_fromB_eta': None,\n",
       "  'Seed_04_long_fromB_nPV': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_p': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_pt': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_phi': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_eta': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_nPV': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_p': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_pt': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_phi': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_eta': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_nPV': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_p': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_pt': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_phi': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_eta': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_nPV': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_p': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_pt': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_phi': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_eta': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_nPV': None},\n",
       " {'Forward_01_long_p': None,\n",
       "  'Forward_01_long_pt': None,\n",
       "  'Forward_01_long_phi': None,\n",
       "  'Forward_01_long_eta': None,\n",
       "  'Forward_01_long_nPV': None,\n",
       "  'Forward_02_long_P>5GeV_p': None,\n",
       "  'Forward_02_long_P>5GeV_pt': None,\n",
       "  'Forward_02_long_P>5GeV_phi': None,\n",
       "  'Forward_02_long_P>5GeV_eta': None,\n",
       "  'Forward_02_long_P>5GeV_nPV': None,\n",
       "  'Forward_03_long_strange_p': None,\n",
       "  'Forward_03_long_strange_pt': None,\n",
       "  'Forward_03_long_strange_phi': None,\n",
       "  'Forward_03_long_strange_eta': None,\n",
       "  'Forward_03_long_strange_nPV': None,\n",
       "  'Forward_04_long_strange_P>5GeV_p': None,\n",
       "  'Forward_04_long_strange_P>5GeV_pt': None,\n",
       "  'Forward_04_long_strange_P>5GeV_phi': None,\n",
       "  'Forward_04_long_strange_P>5GeV_eta': None,\n",
       "  'Forward_04_long_strange_P>5GeV_nPV': None,\n",
       "  'Forward_05_long_fromB_p': None,\n",
       "  'Forward_05_long_fromB_pt': None,\n",
       "  'Forward_05_long_fromB_phi': None,\n",
       "  'Forward_05_long_fromB_eta': None,\n",
       "  'Forward_05_long_fromB_nPV': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_p': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_pt': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_phi': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_eta': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Match_01_long_p': [0.8630041712287172],\n",
       "  'Match_01_long_pt': [0.8630041712287172],\n",
       "  'Match_01_long_phi': [0.8630041712287172],\n",
       "  'Match_01_long_eta': [0.8630041712287172],\n",
       "  'Match_01_long_nPV': [0.8630041712287172],\n",
       "  'Match_02_long_P>5GeV_p': [0.9188646785079396],\n",
       "  'Match_02_long_P>5GeV_pt': [0.9188646785079396],\n",
       "  'Match_02_long_P>5GeV_phi': [0.9188646785079396],\n",
       "  'Match_02_long_P>5GeV_eta': [0.9188646785079396],\n",
       "  'Match_02_long_P>5GeV_nPV': [0.9188646785079396],\n",
       "  'Match_03_long_strange_p': [0.7842013435950952],\n",
       "  'Match_03_long_strange_pt': [0.7842013435950952],\n",
       "  'Match_03_long_strange_phi': [0.7842013435950952],\n",
       "  'Match_03_long_strange_eta': [0.7842013435950952],\n",
       "  'Match_03_long_strange_nPV': [0.7842013435950952],\n",
       "  'Match_04_long_strange_P>5GeV_p': [0.8778356234531023],\n",
       "  'Match_04_long_strange_P>5GeV_pt': [0.8778356234531023],\n",
       "  'Match_04_long_strange_P>5GeV_phi': [0.8778356234531023],\n",
       "  'Match_04_long_strange_P>5GeV_eta': [0.8778356234531023],\n",
       "  'Match_04_long_strange_P>5GeV_nPV': [0.8778356234531023],\n",
       "  'Match_05_long_fromB_p': [0.8985445767556485],\n",
       "  'Match_05_long_fromB_pt': [0.8985445767556485],\n",
       "  'Match_05_long_fromB_phi': [0.8985445767556485],\n",
       "  'Match_05_long_fromB_eta': [0.8985445767556485],\n",
       "  'Match_05_long_fromB_nPV': [0.8985445767556485],\n",
       "  'Match_06_long_fromB_P>5GeV_p': [0.9376291615002067],\n",
       "  'Match_06_long_fromB_P>5GeV_pt': [0.9376291615002067],\n",
       "  'Match_06_long_fromB_P>5GeV_phi': [0.9376291615002067],\n",
       "  'Match_06_long_fromB_P>5GeV_eta': [0.9376291615002067],\n",
       "  'Match_06_long_fromB_P>5GeV_nPV': [0.9376291615002067],\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_p': [0.9395112730376988],\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': [0.9395112730376988],\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': [0.9395112730376988],\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': [0.9395112730376988],\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': [0.9395112730376988],\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_p': [0.9404785566852687],\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_pt': [0.9404785566852687],\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_phi': [0.9404785566852687],\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_eta': [0.9404785566852687],\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV': [0.9404785566852687],\n",
       "  'BestLong_01_long_p': None,\n",
       "  'BestLong_01_long_pt': None,\n",
       "  'BestLong_01_long_phi': None,\n",
       "  'BestLong_01_long_eta': None,\n",
       "  'BestLong_01_long_nPV': None,\n",
       "  'BestLong_02_long_P>5GeV_p': None,\n",
       "  'BestLong_02_long_P>5GeV_pt': None,\n",
       "  'BestLong_02_long_P>5GeV_phi': None,\n",
       "  'BestLong_02_long_P>5GeV_eta': None,\n",
       "  'BestLong_02_long_P>5GeV_nPV': None,\n",
       "  'BestLong_03_long_strange_p': None,\n",
       "  'BestLong_03_long_strange_pt': None,\n",
       "  'BestLong_03_long_strange_phi': None,\n",
       "  'BestLong_03_long_strange_eta': None,\n",
       "  'BestLong_03_long_strange_nPV': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_p': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_pt': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_phi': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_eta': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_nPV': None,\n",
       "  'BestLong_05_long_fromB_p': None,\n",
       "  'BestLong_05_long_fromB_pt': None,\n",
       "  'BestLong_05_long_fromB_phi': None,\n",
       "  'BestLong_05_long_fromB_eta': None,\n",
       "  'BestLong_05_long_fromB_nPV': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_p': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_pt': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_phi': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_eta': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Seed_01_hasT_p': None,\n",
       "  'Seed_01_hasT_pt': None,\n",
       "  'Seed_01_hasT_phi': None,\n",
       "  'Seed_01_hasT_eta': None,\n",
       "  'Seed_01_hasT_nPV': None,\n",
       "  'Seed_02_long_p': None,\n",
       "  'Seed_02_long_pt': None,\n",
       "  'Seed_02_long_phi': None,\n",
       "  'Seed_02_long_eta': None,\n",
       "  'Seed_02_long_nPV': None,\n",
       "  'Seed_03_long_P>5GeV_p': None,\n",
       "  'Seed_03_long_P>5GeV_pt': None,\n",
       "  'Seed_03_long_P>5GeV_phi': None,\n",
       "  'Seed_03_long_P>5GeV_eta': None,\n",
       "  'Seed_03_long_P>5GeV_nPV': None,\n",
       "  'Seed_04_long_fromB_p': None,\n",
       "  'Seed_04_long_fromB_pt': None,\n",
       "  'Seed_04_long_fromB_phi': None,\n",
       "  'Seed_04_long_fromB_eta': None,\n",
       "  'Seed_04_long_fromB_nPV': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_p': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_pt': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_phi': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_eta': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_nPV': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_p': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_pt': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_phi': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_eta': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_nPV': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_p': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_pt': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_phi': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_eta': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_nPV': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_p': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_pt': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_phi': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_eta': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_nPV': None},\n",
       " {'Forward_01_long_p': None,\n",
       "  'Forward_01_long_pt': None,\n",
       "  'Forward_01_long_phi': None,\n",
       "  'Forward_01_long_eta': None,\n",
       "  'Forward_01_long_nPV': None,\n",
       "  'Forward_02_long_P>5GeV_p': None,\n",
       "  'Forward_02_long_P>5GeV_pt': None,\n",
       "  'Forward_02_long_P>5GeV_phi': None,\n",
       "  'Forward_02_long_P>5GeV_eta': None,\n",
       "  'Forward_02_long_P>5GeV_nPV': None,\n",
       "  'Forward_03_long_strange_p': None,\n",
       "  'Forward_03_long_strange_pt': None,\n",
       "  'Forward_03_long_strange_phi': None,\n",
       "  'Forward_03_long_strange_eta': None,\n",
       "  'Forward_03_long_strange_nPV': None,\n",
       "  'Forward_04_long_strange_P>5GeV_p': None,\n",
       "  'Forward_04_long_strange_P>5GeV_pt': None,\n",
       "  'Forward_04_long_strange_P>5GeV_phi': None,\n",
       "  'Forward_04_long_strange_P>5GeV_eta': None,\n",
       "  'Forward_04_long_strange_P>5GeV_nPV': None,\n",
       "  'Forward_05_long_fromB_p': None,\n",
       "  'Forward_05_long_fromB_pt': None,\n",
       "  'Forward_05_long_fromB_phi': None,\n",
       "  'Forward_05_long_fromB_eta': None,\n",
       "  'Forward_05_long_fromB_nPV': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_p': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_pt': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_phi': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_eta': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Match_01_long_p': None,\n",
       "  'Match_01_long_pt': None,\n",
       "  'Match_01_long_phi': None,\n",
       "  'Match_01_long_eta': None,\n",
       "  'Match_01_long_nPV': None,\n",
       "  'Match_02_long_P>5GeV_p': None,\n",
       "  'Match_02_long_P>5GeV_pt': None,\n",
       "  'Match_02_long_P>5GeV_phi': None,\n",
       "  'Match_02_long_P>5GeV_eta': None,\n",
       "  'Match_02_long_P>5GeV_nPV': None,\n",
       "  'Match_03_long_strange_p': None,\n",
       "  'Match_03_long_strange_pt': None,\n",
       "  'Match_03_long_strange_phi': None,\n",
       "  'Match_03_long_strange_eta': None,\n",
       "  'Match_03_long_strange_nPV': None,\n",
       "  'Match_04_long_strange_P>5GeV_p': None,\n",
       "  'Match_04_long_strange_P>5GeV_pt': None,\n",
       "  'Match_04_long_strange_P>5GeV_phi': None,\n",
       "  'Match_04_long_strange_P>5GeV_eta': None,\n",
       "  'Match_04_long_strange_P>5GeV_nPV': None,\n",
       "  'Match_05_long_fromB_p': None,\n",
       "  'Match_05_long_fromB_pt': None,\n",
       "  'Match_05_long_fromB_phi': None,\n",
       "  'Match_05_long_fromB_eta': None,\n",
       "  'Match_05_long_fromB_nPV': None,\n",
       "  'Match_06_long_fromB_P>5GeV_p': None,\n",
       "  'Match_06_long_fromB_P>5GeV_pt': None,\n",
       "  'Match_06_long_fromB_P>5GeV_phi': None,\n",
       "  'Match_06_long_fromB_P>5GeV_eta': None,\n",
       "  'Match_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'BestLong_01_long_p': [0.8798947662383141],\n",
       "  'BestLong_01_long_pt': [0.8798947662383141],\n",
       "  'BestLong_01_long_phi': [0.8798947662383141],\n",
       "  'BestLong_01_long_eta': [0.8798947662383141],\n",
       "  'BestLong_01_long_nPV': [0.8798947662383141],\n",
       "  'BestLong_02_long_P>5GeV_p': [0.9180836129025216],\n",
       "  'BestLong_02_long_P>5GeV_pt': [0.9180836129025216],\n",
       "  'BestLong_02_long_P>5GeV_phi': [0.9180836129025216],\n",
       "  'BestLong_02_long_P>5GeV_eta': [0.9180836129025216],\n",
       "  'BestLong_02_long_P>5GeV_nPV': [0.9180836129025216],\n",
       "  'BestLong_03_long_strange_p': [0.8013060918340725],\n",
       "  'BestLong_03_long_strange_pt': [0.8013060918340725],\n",
       "  'BestLong_03_long_strange_phi': [0.8013060918340725],\n",
       "  'BestLong_03_long_strange_eta': [0.8013060918340725],\n",
       "  'BestLong_03_long_strange_nPV': [0.8013060918340725],\n",
       "  'BestLong_04_long_strange_P>5GeV_p': [0.8679354783647691],\n",
       "  'BestLong_04_long_strange_P>5GeV_pt': [0.8679354783647691],\n",
       "  'BestLong_04_long_strange_P>5GeV_phi': [0.8679354783647691],\n",
       "  'BestLong_04_long_strange_P>5GeV_eta': [0.8679354783647691],\n",
       "  'BestLong_04_long_strange_P>5GeV_nPV': [0.8679354783647691],\n",
       "  'BestLong_05_long_fromB_p': [0.9091900736296701],\n",
       "  'BestLong_05_long_fromB_pt': [0.9091900736296701],\n",
       "  'BestLong_05_long_fromB_phi': [0.9091900736296701],\n",
       "  'BestLong_05_long_fromB_eta': [0.9091900736296701],\n",
       "  'BestLong_05_long_fromB_nPV': [0.9091900736296701],\n",
       "  'BestLong_06_long_fromB_P>5GeV_p': [0.9379224831006759],\n",
       "  'BestLong_06_long_fromB_P>5GeV_pt': [0.9379224831006759],\n",
       "  'BestLong_06_long_fromB_P>5GeV_phi': [0.9379224831006759],\n",
       "  'BestLong_06_long_fromB_P>5GeV_eta': [0.9379224831006759],\n",
       "  'BestLong_06_long_fromB_P>5GeV_nPV': [0.9379224831006759],\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_p': [0.9435662128995869],\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': [0.9435662128995869],\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': [0.9435662128995869],\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': [0.9435662128995869],\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': [0.9435662128995869],\n",
       "  'Seed_01_hasT_p': None,\n",
       "  'Seed_01_hasT_pt': None,\n",
       "  'Seed_01_hasT_phi': None,\n",
       "  'Seed_01_hasT_eta': None,\n",
       "  'Seed_01_hasT_nPV': None,\n",
       "  'Seed_02_long_p': None,\n",
       "  'Seed_02_long_pt': None,\n",
       "  'Seed_02_long_phi': None,\n",
       "  'Seed_02_long_eta': None,\n",
       "  'Seed_02_long_nPV': None,\n",
       "  'Seed_03_long_P>5GeV_p': None,\n",
       "  'Seed_03_long_P>5GeV_pt': None,\n",
       "  'Seed_03_long_P>5GeV_phi': None,\n",
       "  'Seed_03_long_P>5GeV_eta': None,\n",
       "  'Seed_03_long_P>5GeV_nPV': None,\n",
       "  'Seed_04_long_fromB_p': None,\n",
       "  'Seed_04_long_fromB_pt': None,\n",
       "  'Seed_04_long_fromB_phi': None,\n",
       "  'Seed_04_long_fromB_eta': None,\n",
       "  'Seed_04_long_fromB_nPV': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_p': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_pt': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_phi': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_eta': None,\n",
       "  'Seed_05_long_fromB_P>5GeV_nPV': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_p': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_pt': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_phi': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_eta': None,\n",
       "  'Seed_08_noVelo+UT+T_strange_nPV': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_p': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_pt': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_phi': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_eta': None,\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_nPV': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_p': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_pt': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_phi': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_eta': None,\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_nPV': None},\n",
       " {'Forward_01_long_p': None,\n",
       "  'Forward_01_long_pt': None,\n",
       "  'Forward_01_long_phi': None,\n",
       "  'Forward_01_long_eta': None,\n",
       "  'Forward_01_long_nPV': None,\n",
       "  'Forward_02_long_P>5GeV_p': None,\n",
       "  'Forward_02_long_P>5GeV_pt': None,\n",
       "  'Forward_02_long_P>5GeV_phi': None,\n",
       "  'Forward_02_long_P>5GeV_eta': None,\n",
       "  'Forward_02_long_P>5GeV_nPV': None,\n",
       "  'Forward_03_long_strange_p': None,\n",
       "  'Forward_03_long_strange_pt': None,\n",
       "  'Forward_03_long_strange_phi': None,\n",
       "  'Forward_03_long_strange_eta': None,\n",
       "  'Forward_03_long_strange_nPV': None,\n",
       "  'Forward_04_long_strange_P>5GeV_p': None,\n",
       "  'Forward_04_long_strange_P>5GeV_pt': None,\n",
       "  'Forward_04_long_strange_P>5GeV_phi': None,\n",
       "  'Forward_04_long_strange_P>5GeV_eta': None,\n",
       "  'Forward_04_long_strange_P>5GeV_nPV': None,\n",
       "  'Forward_05_long_fromB_p': None,\n",
       "  'Forward_05_long_fromB_pt': None,\n",
       "  'Forward_05_long_fromB_phi': None,\n",
       "  'Forward_05_long_fromB_eta': None,\n",
       "  'Forward_05_long_fromB_nPV': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_p': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_pt': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_phi': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_eta': None,\n",
       "  'Forward_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Forward_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Forward_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Match_01_long_p': None,\n",
       "  'Match_01_long_pt': None,\n",
       "  'Match_01_long_phi': None,\n",
       "  'Match_01_long_eta': None,\n",
       "  'Match_01_long_nPV': None,\n",
       "  'Match_02_long_P>5GeV_p': None,\n",
       "  'Match_02_long_P>5GeV_pt': None,\n",
       "  'Match_02_long_P>5GeV_phi': None,\n",
       "  'Match_02_long_P>5GeV_eta': None,\n",
       "  'Match_02_long_P>5GeV_nPV': None,\n",
       "  'Match_03_long_strange_p': None,\n",
       "  'Match_03_long_strange_pt': None,\n",
       "  'Match_03_long_strange_phi': None,\n",
       "  'Match_03_long_strange_eta': None,\n",
       "  'Match_03_long_strange_nPV': None,\n",
       "  'Match_04_long_strange_P>5GeV_p': None,\n",
       "  'Match_04_long_strange_P>5GeV_pt': None,\n",
       "  'Match_04_long_strange_P>5GeV_phi': None,\n",
       "  'Match_04_long_strange_P>5GeV_eta': None,\n",
       "  'Match_04_long_strange_P>5GeV_nPV': None,\n",
       "  'Match_05_long_fromB_p': None,\n",
       "  'Match_05_long_fromB_pt': None,\n",
       "  'Match_05_long_fromB_phi': None,\n",
       "  'Match_05_long_fromB_eta': None,\n",
       "  'Match_05_long_fromB_nPV': None,\n",
       "  'Match_06_long_fromB_P>5GeV_p': None,\n",
       "  'Match_06_long_fromB_P>5GeV_pt': None,\n",
       "  'Match_06_long_fromB_P>5GeV_phi': None,\n",
       "  'Match_06_long_fromB_P>5GeV_eta': None,\n",
       "  'Match_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Match_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'Match_11_UT_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'BestLong_01_long_p': None,\n",
       "  'BestLong_01_long_pt': None,\n",
       "  'BestLong_01_long_phi': None,\n",
       "  'BestLong_01_long_eta': None,\n",
       "  'BestLong_01_long_nPV': None,\n",
       "  'BestLong_02_long_P>5GeV_p': None,\n",
       "  'BestLong_02_long_P>5GeV_pt': None,\n",
       "  'BestLong_02_long_P>5GeV_phi': None,\n",
       "  'BestLong_02_long_P>5GeV_eta': None,\n",
       "  'BestLong_02_long_P>5GeV_nPV': None,\n",
       "  'BestLong_03_long_strange_p': None,\n",
       "  'BestLong_03_long_strange_pt': None,\n",
       "  'BestLong_03_long_strange_phi': None,\n",
       "  'BestLong_03_long_strange_eta': None,\n",
       "  'BestLong_03_long_strange_nPV': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_p': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_pt': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_phi': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_eta': None,\n",
       "  'BestLong_04_long_strange_P>5GeV_nPV': None,\n",
       "  'BestLong_05_long_fromB_p': None,\n",
       "  'BestLong_05_long_fromB_pt': None,\n",
       "  'BestLong_05_long_fromB_phi': None,\n",
       "  'BestLong_05_long_fromB_eta': None,\n",
       "  'BestLong_05_long_fromB_nPV': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_p': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_pt': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_phi': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_eta': None,\n",
       "  'BestLong_06_long_fromB_P>5GeV_nPV': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_p': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_pt': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_phi': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_eta': None,\n",
       "  'BestLong_10_long_fromB_P>3GeV_Pt>0.5GeV_nPV': None,\n",
       "  'Seed_01_hasT_p': [0.8301846485044814],\n",
       "  'Seed_01_hasT_pt': [0.8301846485044814],\n",
       "  'Seed_01_hasT_phi': [0.8301846485044814],\n",
       "  'Seed_01_hasT_eta': [0.8301846485044814],\n",
       "  'Seed_01_hasT_nPV': [0.8301846485044814],\n",
       "  'Seed_02_long_p': [0.9333472226531851],\n",
       "  'Seed_02_long_pt': [0.9333472226531851],\n",
       "  'Seed_02_long_phi': [0.9333472226531851],\n",
       "  'Seed_02_long_eta': [0.9333472226531851],\n",
       "  'Seed_02_long_nPV': [0.9333472226531851],\n",
       "  'Seed_03_long_P>5GeV_p': [0.9665492453337299],\n",
       "  'Seed_03_long_P>5GeV_pt': [0.9665492453337299],\n",
       "  'Seed_03_long_P>5GeV_phi': [0.9665492453337299],\n",
       "  'Seed_03_long_P>5GeV_eta': [0.9665492453337299],\n",
       "  'Seed_03_long_P>5GeV_nPV': [0.9665492453337299],\n",
       "  'Seed_04_long_fromB_p': [0.9503378480744175],\n",
       "  'Seed_04_long_fromB_pt': [0.9503378480744175],\n",
       "  'Seed_04_long_fromB_phi': [0.9503378480744175],\n",
       "  'Seed_04_long_fromB_eta': [0.9503378480744175],\n",
       "  'Seed_04_long_fromB_nPV': [0.9503378480744175],\n",
       "  'Seed_05_long_fromB_P>5GeV_p': [0.9703078543524926],\n",
       "  'Seed_05_long_fromB_P>5GeV_pt': [0.9703078543524926],\n",
       "  'Seed_05_long_fromB_P>5GeV_phi': [0.9703078543524926],\n",
       "  'Seed_05_long_fromB_P>5GeV_eta': [0.9703078543524926],\n",
       "  'Seed_05_long_fromB_P>5GeV_nPV': [0.9703078543524926],\n",
       "  'Seed_08_noVelo+UT+T_strange_p': [0.9160309601840876],\n",
       "  'Seed_08_noVelo+UT+T_strange_pt': [0.9160309601840876],\n",
       "  'Seed_08_noVelo+UT+T_strange_phi': [0.9160309601840876],\n",
       "  'Seed_08_noVelo+UT+T_strange_eta': [0.9160309601840876],\n",
       "  'Seed_08_noVelo+UT+T_strange_nPV': [0.9160309601840876],\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_p': [0.9642032180145458],\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_pt': [0.9642032180145458],\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_phi': [0.9642032180145458],\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_eta': [0.9642032180145458],\n",
       "  'Seed_09_noVelo+UT+T_strange_P>5GeV_nPV': [0.9642032180145458],\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_p': [0.9665521605496293],\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_pt': [0.9665521605496293],\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_phi': [0.9665521605496293],\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_eta': [0.9665521605496293],\n",
       "  'Seed_12_noVelo+UT+T_SfromDB_P>5GeV_nPV': [0.9665521605496293]}]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "effdata.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[{'8': [8], '9': [9]}, {'8': [8], '9': [9]}],\n",
      " [{'8': [8], '9': [9]}, {'8': [8], '9': [9]}],\n",
      " [{'8': [8], '9': [9]}, {'8': [8], '9': [9]}],\n",
      " [{'8': [8], '9': [9]}, {'8': [8], '9': [9]}]]\n"
     ]
    }
   ],
   "source": [
    "arr = ak.ArrayBuilder()\n",
    "\n",
    "for i in range(4):\n",
    "    arr.begin_list()\n",
    "    for j in range(5,7):\n",
    "        arr.begin_record()\n",
    "        for k in range(8,10):\n",
    "            arr.field(str(k))\n",
    "            arr.begin_list()\n",
    "            arr.append(k)\n",
    "            arr.end_list()\n",
    "        arr.end_record()\n",
    "    arr.end_list()\n",
    "\n",
    "arr = ak.Array(arr)\n",
    "arr.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### try reading data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "upFile = uproot.open(\"/work/cetin/LHCb/stack/data/efficiency_plots.root\")\n",
    "inFile = TFile.Open(\"/work/cetin/LHCb/stack/data/efficiency_plots.root\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'efficiency_p;1': 'TCanvas',\n",
       " 'efficiency_pt;1': 'TCanvas',\n",
       " 'efficiency_phi;1': 'TCanvas',\n",
       " 'efficiency_eta;1': 'TCanvas',\n",
       " 'efficiency_nPV;1': 'TCanvas'}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "upFile[\"BestLong/01_long;1\"].classnames()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "'bool' object has no attribute 'Get'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32m/work/cetin/LHCb/stack/Moore/Hlt/RecoConf/scripts/Task.ipynb Cell 14\u001b[0m line \u001b[0;36m3\n\u001b[1;32m      <a href='vscode-notebook-cell://ssh-remote%2Blhcba2/work/cetin/LHCb/stack/Moore/Hlt/RecoConf/scripts/Task.ipynb#X16sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0'>1</a>\u001b[0m tree1 \u001b[39m=\u001b[39m inFile\u001b[39m.\u001b[39mCd(\u001b[39m\"\u001b[39m\u001b[39mBestLong\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[1;32m      <a href='vscode-notebook-cell://ssh-remote%2Blhcba2/work/cetin/LHCb/stack/Moore/Hlt/RecoConf/scripts/Task.ipynb#X16sdnNjb2RlLXJlbW90ZQ%3D%3D?line=1'>2</a>\u001b[0m tree2 \u001b[39m=\u001b[39m inFile\u001b[39m.\u001b[39mGet(\u001b[39m\"\u001b[39m\u001b[39mSeed/02_long\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[0;32m----> <a href='vscode-notebook-cell://ssh-remote%2Blhcba2/work/cetin/LHCb/stack/Moore/Hlt/RecoConf/scripts/Task.ipynb#X16sdnNjb2RlLXJlbW90ZQ%3D%3D?line=2'>3</a>\u001b[0m c1 \u001b[39m=\u001b[39m tree1\u001b[39m.\u001b[39;49mGet(\u001b[39m\"\u001b[39m\u001b[39mefficiency_p;1\u001b[39m\u001b[39m\"\u001b[39m)\u001b[39m.\u001b[39mClone()\n\u001b[1;32m      <a href='vscode-notebook-cell://ssh-remote%2Blhcba2/work/cetin/LHCb/stack/Moore/Hlt/RecoConf/scripts/Task.ipynb#X16sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3'>4</a>\u001b[0m c2 \u001b[39m=\u001b[39m tree2\u001b[39m.\u001b[39mGet(\u001b[39m\"\u001b[39m\u001b[39mefficiency_p;1\u001b[39m\u001b[39m\"\u001b[39m)\u001b[39m.\u001b[39mClone()\n\u001b[1;32m      <a href='vscode-notebook-cell://ssh-remote%2Blhcba2/work/cetin/LHCb/stack/Moore/Hlt/RecoConf/scripts/Task.ipynb#X16sdnNjb2RlLXJlbW90ZQ%3D%3D?line=5'>6</a>\u001b[0m c \u001b[39m=\u001b[39m tree1\u001b[39m.\u001b[39mCd(\u001b[39m\"\u001b[39m\u001b[39m01_long\u001b[39m\u001b[39m\"\u001b[39m)\n",
      "\u001b[0;31mAttributeError\u001b[0m: 'bool' object has no attribute 'Get'"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Error in <TDirectoryFile::Cd>: Unknown directory BestLong\n"
     ]
    }
   ],
   "source": [
    "tree1 = inFile.Get(\"BestLong/01_long\")\n",
    "tree2 = inFile.Get(\"Seed/02_long\")\n",
    "c1 = tree1.Get(\"efficiency_p;1\").Clone()\n",
    "c2 = tree2.Get(\"efficiency_p;1\").Clone()\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Canvas Name=efficiency_p Title=efficiency_p, Long, 2 <#eta < 5 Option=\n",
      " TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= efficiency_p Title= efficiency_p, Long, 2 <#eta < 5 Option=\n",
      "  OBJ: TList\tTList\tDoubly linked list : 0\n",
      "   TFrame  X1= -600.000000 Y1=0.000000 X2=51100.000000 Y2=1.050000\n",
      "   OBJ: TMultiGraph\t\t : 1 at: 0x563287220c50\n",
      "   OBJ: TH1D\th_numerator_notElectrons\tp distribution, not e^{-} : 1 at: 0x5632879f5320\n",
      "   OBJ: TH1D\th_numerator_notElectrons\tp distribution, e^{-} : 1 at: 0x563287d3a6b0\n",
      "   OBJ: TLegend\tTPave  \tX1= 25930.263182 Y1=0.318987 X2=58582.894927 Y2=0.731013\n",
      "   OBJ: TLegend\tTPave  \tX1= 25930.263182 Y1=0.318987 X2=58582.894927 Y2=0.731013\n",
      "   OBJ: TGraphAsymmErrors\tEffChecker\tEffChecker not e^{-} : 1 at: 0x563287d374e0\n",
      "   OBJ: TGraphAsymmErrors\tEffChecker\tEffChecker e^{-} : 1 at: 0x563287cd4630\n",
      "   Text  X=0.540000 Y=0.350000 Text=Long, 2 <#eta < 5\n",
      "   TGaxis  X1=51100.000000 Y1=0.000000 X2=51100.000000 Y2=1.050000\n",
      "   OBJ: TH1F\t_copy\t : 1 at: 0x563287d3b260\n"
     ]
    }
   ],
   "source": [
    "ep = inFile.Get(\"BestLong/01_long/efficiency_p;1/EffChecker;2:p\")\n",
    "ep.Get"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#c1.Draw()\n",
    "c2.Draw()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 203,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Canvas Name=efficiency_p Title=efficiency_p, Long, 2 <#eta < 5 Option=\n",
      " TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= efficiency_p Title= efficiency_p, Long, 2 <#eta < 5 Option=\n",
      "  OBJ: TList\tTList\tDoubly linked list : 0\n",
      "   TFrame  X1= -600.000000 Y1=0.000000 X2=51100.000000 Y2=1.050000\n",
      "   OBJ: TMultiGraph\t\t : 1 at: 0x56328666c520\n",
      "   OBJ: TH1D\th_numerator_notElectrons\tp distribution, not e^{-} : 1 at: 0x563286cadc10\n",
      "   OBJ: TH1D\th_numerator_notElectrons\tp distribution, e^{-} : 1 at: 0x563286cae7c0\n",
      "   OBJ: TLegend\tTPave  \tX1= 25930.263182 Y1=0.318987 X2=58582.894927 Y2=0.731013\n",
      "   OBJ: TLegend\tTPave  \tX1= 25930.263182 Y1=0.318987 X2=58582.894927 Y2=0.731013\n",
      "   OBJ: TGraphAsymmErrors\tEffChecker\tEffChecker not e^{-} : 1 at: 0x563287222b00\n",
      "   OBJ: TGraphAsymmErrors\tEffChecker\tEffChecker e^{-} : 1 at: 0x563287b37170\n",
      "   Text  X=0.540000 Y=0.350000 Text=Long, 2 <#eta < 5\n",
      "   TGaxis  X1=51100.000000 Y1=0.000000 X2=51100.000000 Y2=1.050000\n",
      "   OBJ: TH1F\t_copy\t : 1 at: 0x563286caf970\n"
     ]
    }
   ],
   "source": [
    "data = c1.getf\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<cppyy.gbl.TH1F object at 0x563287230640>"
      ]
     },
     "execution_count": 215,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "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.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
