{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import math\n",
    "\n",
    "import uproot\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from matplotlib import colors"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "root_file = uproot.open('/data1/users/hanyuwei/nueCCvtx/files4/nue_6789_138_6946.root')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "tblob = root_file['T_rec_charge_blob']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = tblob.array('x')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 13.78116455,  19.69808655,  68.48054199,  33.5179718 ,\n",
       "        60.92702026,  47.29710388,  25.4149231 ,  44.44338074,\n",
       "        74.67368164,  71.3632019 ,  97.99031372,  90.19208374,\n",
       "        68.43918457,  14.75339966,  14.31299896,  19.95236969,\n",
       "       108.78773193,  87.74008179, 195.95374756,  55.65200195,\n",
       "        79.89985962,  32.90888977,  68.83207397,  79.83071899,\n",
       "        87.99938354,  17.36853638,  90.91619263, 100.36169434,\n",
       "       109.07094727, 138.06539307, 137.84519043, 129.64171143,\n",
       "        15.49473419,  43.29111328, 146.5479126 ,  90.26522217,\n",
       "       129.60672607,  60.31418457,  59.24352417, 146.52988281,\n",
       "       195.63518066, 175.03609619, 174.7427002 ,  20.28584137,\n",
       "        20.10867615,  19.93150635,  19.71406403,  19.49659271,\n",
       "        19.30842743,  19.13569946,  18.97220154,  18.80869904,\n",
       "        18.58520966,  18.37810669,  18.17099609,  17.9973877 ,\n",
       "        17.82378845,  17.62734833,  17.41145477,  17.195578  ,\n",
       "        17.00102539,  16.78134918,  16.56165161,  16.36957397,\n",
       "        16.16597137,  15.96183624,  15.75771484,  15.55237579,\n",
       "        15.37066498,  15.16146393,  14.95778046,  14.75408325,\n",
       "        14.54719543,  14.36411438,  14.18103333,  13.96770782,\n",
       "        13.87443542,  13.78116455,  13.78116455,  13.23633728,\n",
       "        12.69151077,  12.14668884,  11.51432571,  10.88196259,\n",
       "        13.78116455,  14.05317535,  14.32519531,  14.68716431,\n",
       "        15.0515274 ,  15.37641754,  15.70130768,  17.59100189,\n",
       "        17.81116333,  18.33096924,  18.82649231,  19.32201996,\n",
       "        19.88329926,  20.44375916,  21.00422211,  21.46056366,\n",
       "        21.91690521,  22.4648819 ,  23.01284332,  23.52794342,\n",
       "        24.04303589,  24.63360138,  25.02426147,  69.38810425,\n",
       "        69.95470581,  70.52456055,  71.06225586,  71.59572144,\n",
       "        72.12918701,  72.71088867,  73.29240723,  73.87393188,\n",
       "        69.38657227,  69.96293945,  70.53690796,  71.11087036,\n",
       "        70.86846924,  70.88514404,  70.90181885,  70.87294312,\n",
       "        70.84406128,  71.01867676,  71.19329834,  47.83357239,\n",
       "        48.37003784,  48.78576965,  49.23517456,  49.79100647,\n",
       "        50.33759155,  50.88416443,  51.32594604,  51.86757813,\n",
       "        52.11782227,  52.6100647 ,  53.10232544,  53.58858643,\n",
       "        54.07349854,  54.52433472,  55.0145813 ,  55.33657227,\n",
       "        55.65855713,  56.09911499,  56.53969116,  56.85898437,\n",
       "        57.17828369,  57.52745972,  57.86929321,  58.27096558,\n",
       "        58.67263794,  58.90159912,  59.1305542 ,  59.38311768,\n",
       "        59.63567505,  60.04105835,  60.53218384,  60.75018921,\n",
       "        60.9007019 ,  60.94144287,  33.21343079,  90.69726562,\n",
       "        90.44467773,  98.50057373,  98.96682739,  99.43307495,\n",
       "        99.77816772, 100.06993408,  87.78187256,  87.85152588,\n",
       "        88.24069214,  88.48199463,  88.66502686,  88.85194092,\n",
       "        88.89572754,  89.05338135,  89.1730896 ,  89.36793213,\n",
       "        89.5402771 ,  89.77872314,  89.98908081,  90.14024658,\n",
       "        89.86357422,  89.57037964,  89.14187012,  88.7133667 ,\n",
       "        88.27774048,  87.89604492,  87.49663086,  87.0753479 ,\n",
       "        86.65406494,  86.1506958 ,  85.64733276,  85.44593506,\n",
       "        85.11552124,  84.7364624 ,  84.37516479,  84.00753784,\n",
       "        83.63991089,  83.17924194,  82.84303589,  82.50683594,\n",
       "        81.9744751 ,  81.61437988,  81.25428467,  80.93198853,\n",
       "        80.57804565,  80.22409668,  79.93657227,  79.70310669,\n",
       "        79.26362915,  78.92781982,  78.59202271,  78.23623657,\n",
       "        78.0173645 ,  77.55872192,  77.24230347,  76.881427  ,\n",
       "        76.5147522 ,  76.22358398,  75.95682373,  75.56566772,\n",
       "        75.23341675,  74.89840698,  74.59086304,  74.28331299,\n",
       "        73.97852783,  73.60239258,  73.23646851,  72.91712036,\n",
       "        72.59777832,  72.24489136,  71.92731323,  71.5960144 ,\n",
       "        71.28251953,  71.07454224,  70.76154175,  70.44853516,\n",
       "        70.13121338,  69.8138855 ,  69.49229126,  69.17070923,\n",
       "        68.943927  ,  68.65859375,  68.3732605 ,  68.0885376 ,\n",
       "        67.79155273,  67.49456787,  67.18065186,  66.88634644,\n",
       "        66.59208374,  66.2833313 ,  65.99711914,  65.71090698,\n",
       "        65.43442383,  65.15794067,  64.82593994,  64.54223022,\n",
       "        64.25372925,  63.96522217,  63.66550293,  63.34276733,\n",
       "        63.02003174,  62.7307251 ,  62.44142456,  62.12537842,\n",
       "        61.80706787,  61.48875732,  61.18414307,  60.87277832,\n",
       "        60.63955688,  60.39437256,  60.14918823,  59.84730225,\n",
       "        59.54541016,  59.1149231 ,  58.86501465,  58.6151062 ,\n",
       "        58.29977417,  58.02704468,  57.7355835 ,  57.44260864,\n",
       "        57.1496521 ,  56.90621338,  56.58486328,  56.3838562 ,\n",
       "        56.14241943,  55.90098267,  43.86724854,  14.3006897 ])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x"
   ]
  },
  {
   "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.6.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
