trlosses energy
This commit is contained in:
parent
9b076cef49
commit
e8abd5f360
@ -565,51 +565,46 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": 21,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"VELO energy emission, eff: 0.9318135969336292\n",
|
||||||
|
"RICH1+UT energy emission, eff: 0.9119065010956903\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"eff()"
|
"num_velo_found = 0\n",
|
||||||
|
"num_rich_found = 0\n",
|
||||||
|
"for itr in range(ak.num(electrons_found, axis=0)):\n",
|
||||||
|
" if electrons_found[itr, \"velo\"] >= electrons_found[itr, \"rich\"]:\n",
|
||||||
|
" num_velo_found += 1\n",
|
||||||
|
" else:\n",
|
||||||
|
" num_rich_found += 1\n",
|
||||||
|
"\n",
|
||||||
|
"num_velo_lost = 0\n",
|
||||||
|
"num_rich_lost = 0\n",
|
||||||
|
"for itr in range(ak.num(electrons_lost, axis=0)):\n",
|
||||||
|
" if electrons_lost[itr, \"velo\"] >= electrons_lost[itr, \"rich\"]:\n",
|
||||||
|
" num_velo_lost += 1\n",
|
||||||
|
" else:\n",
|
||||||
|
" num_rich_lost += 1\n",
|
||||||
|
"\n",
|
||||||
|
"print(\"VELO energy emission, eff: \", eff(num_velo_found, num_velo_lost))\n",
|
||||||
|
"\n",
|
||||||
|
"print(\"RICH1+UT energy emission, eff: \", eff(num_rich_found, num_rich_lost))"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 17,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
"source": []
|
||||||
"data": {
|
|
||||||
"text/html": [
|
|
||||||
"<pre>{new: 15}\n",
|
|
||||||
"----------------\n",
|
|
||||||
"type: {\n",
|
|
||||||
" new: float64\n",
|
|
||||||
"}</pre>"
|
|
||||||
],
|
|
||||||
"text/plain": [
|
|
||||||
"<Record {new: 15} type='{new: float64}'>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"execution_count": 17,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
|
||||||
"test = ak.ArrayBuilder()\n",
|
|
||||||
"\n",
|
|
||||||
"for i in range(4):\n",
|
|
||||||
" test.begin_record()\n",
|
|
||||||
" test.field(\"new\")\n",
|
|
||||||
" tmp = 0\n",
|
|
||||||
" for j in range(5):\n",
|
|
||||||
" tmp += j + i\n",
|
|
||||||
" test.real(tmp)\n",
|
|
||||||
" test.end_record()\n",
|
|
||||||
"\n",
|
|
||||||
"test = ak.Array(test)\n",
|
|
||||||
"test[1]"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
Loading…
Reference in New Issue
Block a user