after stack

This commit is contained in:
cetin 2023-09-27 13:00:51 +02:00
parent c8add4280b
commit 8ec39d3f92

View File

@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 60, "execution_count": 1,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -21,128 +21,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 86, "execution_count": 2,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/html": [
"<pre>{all_endvtx_types_length: 5,\n",
" all_endvtx_types: [101, 101, 101, 101, 0],\n",
" all_endvtx_x_length: 5,\n",
" all_endvtx_x: [-3.52e+03, -3.52e+03, -3.52e+03, -3.53e+03, -3.54e+03],\n",
" all_endvtx_y_length: 5,\n",
" all_endvtx_y: [-302, -302, -302, -302, -297],\n",
" all_endvtx_z_length: 5,\n",
" all_endvtx_z: [9.84e+03, 9.84e+03, 9.85e+03, 9.85e+03, 9.87e+03],\n",
" brem_photons_pe_length: 4,\n",
" brem_photons_pe: [519, 484, 173, 466],\n",
" brem_photons_px_length: 4,\n",
" brem_photons_px: [-327, -306, -109, -283],\n",
" brem_photons_py_length: 4,\n",
" brem_photons_py: [-8.03, -7.15, -4.38, -13.6],\n",
" brem_photons_pz_length: 4,\n",
" brem_photons_pz: [403, 374, 135, 370],\n",
" brem_vtx_x_length: 4,\n",
" brem_vtx_x: [-3.52e+03, -3.52e+03, -3.52e+03, -3.53e+03],\n",
" brem_vtx_y_length: 4,\n",
" ...}\n",
"-----------------------------------------------------------------------\n",
"type: {\n",
" all_endvtx_types_length: int32,\n",
" all_endvtx_types: var * float32,\n",
" all_endvtx_x_length: int32,\n",
" all_endvtx_x: var * float32,\n",
" all_endvtx_y_length: int32,\n",
" all_endvtx_y: var * float32,\n",
" all_endvtx_z_length: int32,\n",
" all_endvtx_z: var * float32,\n",
" brem_photons_pe_length: int32,\n",
" brem_photons_pe: var * float32,\n",
" brem_photons_px_length: int32,\n",
" brem_photons_px: var * float32,\n",
" brem_photons_py_length: int32,\n",
" brem_photons_py: var * float32,\n",
" brem_photons_pz_length: int32,\n",
" brem_photons_pz: var * float32,\n",
" brem_vtx_x_length: int32,\n",
" brem_vtx_x: var * float32,\n",
" brem_vtx_y_length: int32,\n",
" brem_vtx_y: var * float32,\n",
" brem_vtx_z_length: int32,\n",
" brem_vtx_z: var * float32,\n",
" endvtx_type: int32,\n",
" endvtx_x: float64,\n",
" endvtx_y: float64,\n",
" endvtx_z: float64,\n",
" energy: float64,\n",
" eta: float64,\n",
" event_count: int32,\n",
" fromB: bool,\n",
" fromD: bool,\n",
" fromDecay: bool,\n",
" fromHadInt: bool,\n",
" fromPV: bool,\n",
" fromPairProd: bool,\n",
" fromSignal: bool,\n",
" fromStrange: bool,\n",
" isElectron: bool,\n",
" isKaon: bool,\n",
" isMuon: bool,\n",
" isPion: bool,\n",
" isProton: bool,\n",
" lost: bool,\n",
" lost_in_track_fit: bool,\n",
" match_fraction: float32,\n",
" mcp_idx: int32,\n",
" mother_id: int32,\n",
" mother_key: int32,\n",
" originvtx_type: int32,\n",
" originvtx_x: float64,\n",
" originvtx_y: float64,\n",
" originvtx_z: float64,\n",
" p: float64,\n",
" phi: float64,\n",
" pid: int32,\n",
" pt: float64,\n",
" px: float64,\n",
" py: float64,\n",
" pz: float64,\n",
" scifi_hit_pos_x_length: int32,\n",
" scifi_hit_pos_x: var * float32,\n",
" scifi_hit_pos_y_length: int32,\n",
" scifi_hit_pos_y: var * float32,\n",
" scifi_hit_pos_z_length: int32,\n",
" scifi_hit_pos_z: var * float32,\n",
" track_p: float64,\n",
" track_pt: float64,\n",
" tx: float64,\n",
" ty: float64,\n",
" ut_hit_pos_x_length: int32,\n",
" ut_hit_pos_x: var * float32,\n",
" ut_hit_pos_y_length: int32,\n",
" ut_hit_pos_y: var * float32,\n",
" ut_hit_pos_z_length: int32,\n",
" ut_hit_pos_z: var * float32,\n",
" velo_hit_pos_x_length: int32,\n",
" velo_hit_pos_x: var * float32,\n",
" velo_hit_pos_y_length: int32,\n",
" velo_hit_pos_y: var * float32,\n",
" velo_hit_pos_z_length: int32,\n",
" velo_hit_pos_z: var * float32,\n",
" velo_track_idx: int32,\n",
" velo_track_tx: float64,\n",
" velo_track_ty: float64,\n",
" velo_track_x: float64,\n",
" velo_track_y: float64,\n",
" velo_track_z: float64\n",
"}</pre>"
],
"text/plain": [ "text/plain": [
"<Record {all_endvtx_types_length: 5, ...} type='{all_endvtx_types_length: i...'>" "51"
] ]
}, },
"execution_count": 86, "execution_count": 2,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -158,12 +46,12 @@
"\n", "\n",
"#ak.num(lost, axis=0)\n", "#ak.num(lost, axis=0)\n",
"ak.num(allcolumns[(allcolumns.fromPairProd) & (allcolumns.isElectron) & (~allcolumns.lost) & (allcolumns.fromSignal)],axis=0)\n", "ak.num(allcolumns[(allcolumns.fromPairProd) & (allcolumns.isElectron) & (~allcolumns.lost) & (allcolumns.fromSignal)],axis=0)\n",
"found[0]" "#found[0]"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 62, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -172,7 +60,7 @@
"0.5759057568348522" "0.5759057568348522"
] ]
}, },
"execution_count": 62, "execution_count": 3,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -188,7 +76,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 63, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -197,7 +85,7 @@
"0.7960893854748603" "0.7960893854748603"
] ]
}, },
"execution_count": 63, "execution_count": 4,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -219,7 +107,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -228,7 +116,7 @@
"0.5568703211784594" "0.5568703211784594"
] ]
}, },
"execution_count": 64, "execution_count": 5,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -251,7 +139,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 65, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -272,7 +160,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 66, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -309,7 +197,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 67, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -338,7 +226,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 68, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -369,7 +257,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 69, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -407,7 +295,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 70, "execution_count": 11,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -465,7 +353,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 71, "execution_count": 12,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -501,7 +389,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 72, "execution_count": 13,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -510,7 +398,7 @@
"-1.5438992626615335e-08" "-1.5438992626615335e-08"
] ]
}, },
"execution_count": 72, "execution_count": 13,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -521,7 +409,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 73, "execution_count": 14,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -569,7 +457,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 74, "execution_count": 15,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -596,7 +484,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 75, "execution_count": 16,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -630,7 +518,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 76, "execution_count": 17,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -652,7 +540,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 81, "execution_count": 19,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -668,7 +556,8 @@
"velo y: [5.88, 5.88]\n", "velo y: [5.88, 5.88]\n",
"\n", "\n",
"velo tx: [-0.0908, -0.0908]\n", "velo tx: [-0.0908, -0.0908]\n",
"velo ty: [0.00703, 0.00703]\n" "velo ty: [0.00703, 0.00703]\n",
"percentage of e with shared tracks: 0.0445\n"
] ]
} }
], ],
@ -710,7 +599,11 @@
"print(\"velo y: \" ,shared[idx,:,\"velo_track_y\"])\n", "print(\"velo y: \" ,shared[idx,:,\"velo_track_y\"])\n",
"\n", "\n",
"print(\"\\nvelo tx: \" ,shared[idx,:,\"velo_track_tx\"])\n", "print(\"\\nvelo tx: \" ,shared[idx,:,\"velo_track_tx\"])\n",
"print(\"velo ty: \" ,shared[idx,:,\"velo_track_ty\"])" "print(\"velo ty: \" ,shared[idx,:,\"velo_track_ty\"])\n",
"\n",
"\n",
"\n",
"print(\"percentage of e with shared tracks: \", np.round((ak.num(shared,axis=0)*2)/(ak.num(both,axis=0))*100,4))"
] ]
}, },
{ {
@ -759,7 +652,8 @@
"print(\"velo y: \" ,psb[idx,:,\"velo_track_y\"])\n", "print(\"velo y: \" ,psb[idx,:,\"velo_track_y\"])\n",
"\n", "\n",
"print(\"\\nvelo tx: \" ,psb[idx,:,\"velo_track_tx\"])\n", "print(\"\\nvelo tx: \" ,psb[idx,:,\"velo_track_tx\"])\n",
"print(\"velo ty: \" ,psb[idx,:,\"velo_track_ty\"])" "print(\"velo ty: \" ,psb[idx,:,\"velo_track_ty\"])\n",
"\n"
] ]
}, },
{ {
@ -771,7 +665,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 83, "execution_count": 28,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -788,7 +682,8 @@
"velo y: [-24.4, -24.4]\n", "velo y: [-24.4, -24.4]\n",
"\n", "\n",
"velo tx: [-0.0234, -0.0234]\n", "velo tx: [-0.0234, -0.0234]\n",
"velo ty: [-0.028, -0.028]\n" "velo ty: [-0.028, -0.028]\n",
"percentage of e with shared tracks: 5.59\n"
] ]
} }
], ],
@ -832,15 +727,30 @@
"print(\"velo y: \" ,cshared[idx,:,\"velo_track_y\"])\n", "print(\"velo y: \" ,cshared[idx,:,\"velo_track_y\"])\n",
"\n", "\n",
"print(\"\\nvelo tx: \" ,cshared[idx,:,\"velo_track_tx\"])\n", "print(\"\\nvelo tx: \" ,cshared[idx,:,\"velo_track_tx\"])\n",
"print(\"velo ty: \" ,cshared[idx,:,\"velo_track_ty\"])" "print(\"velo ty: \" ,cshared[idx,:,\"velo_track_ty\"])\n",
"\n",
"print(\"percentage of e with shared tracks: \", np.round((ak.num(cshared,axis=0)*2)/(ak.num(conv,axis=0))*100,4))\n"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 29,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
"source": [] {
"data": {
"text/plain": [
"34025"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ak.num(conv,axis=0)"
]
}, },
{ {
"cell_type": "code", "cell_type": "code",