|
@ -565,52 +565,47 @@ |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
"cell_type": "code", |
|
|
"cell_type": "code", |
|
|
"execution_count": null, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"outputs": [], |
|
|
|
|
|
"source": [ |
|
|
|
|
|
"eff()" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"cell_type": "code", |
|
|
|
|
|
"execution_count": 17, |
|
|
|
|
|
|
|
|
"execution_count": 21, |
|
|
"metadata": {}, |
|
|
"metadata": {}, |
|
|
"outputs": [ |
|
|
"outputs": [ |
|
|
{ |
|
|
{ |
|
|
"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" |
|
|
|
|
|
|
|
|
"name": "stdout", |
|
|
|
|
|
"output_type": "stream", |
|
|
|
|
|
"text": [ |
|
|
|
|
|
"VELO energy emission, eff: 0.9318135969336292\n", |
|
|
|
|
|
"RICH1+UT energy emission, eff: 0.9119065010956903\n" |
|
|
|
|
|
] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
"source": [ |
|
|
"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]" |
|
|
|
|
|
|
|
|
"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", |
|
|
|
|
|
"execution_count": null, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"outputs": [], |
|
|
|
|
|
"source": [] |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
"cell_type": "markdown", |
|
|
"cell_type": "markdown", |
|
|
"metadata": {}, |
|
|
"metadata": {}, |
|
|