up and downstream
This commit is contained in:
parent
1557e828de
commit
d78cc9cdb3
142
B_rework.ipynb
142
B_rework.ipynb
@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"execution_count": 58,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -22,7 +22,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 23,
|
||||
"execution_count": 59,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -31,7 +31,7 @@
|
||||
"10522"
|
||||
]
|
||||
},
|
||||
"execution_count": 23,
|
||||
"execution_count": 59,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -50,7 +50,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 24,
|
||||
"execution_count": 60,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -78,7 +78,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"execution_count": 61,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -100,7 +100,7 @@
|
||||
"<Record {energy: 4.62e+04, ...} type='{energy: float64, photon_length: int6...'>"
|
||||
]
|
||||
},
|
||||
"execution_count": 25,
|
||||
"execution_count": 61,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -163,7 +163,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 26,
|
||||
"execution_count": 62,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -234,7 +234,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 27,
|
||||
"execution_count": 63,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -243,7 +243,7 @@
|
||||
"9056"
|
||||
]
|
||||
},
|
||||
"execution_count": 27,
|
||||
"execution_count": 63,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -254,21 +254,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 28,
|
||||
"execution_count": 64,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -277,7 +263,7 @@
|
||||
"'\\nph_e = found[\"brem_photons_pe\"]\\nevent_cut = ak.all(ph_e<cutoff_energy,axis=1)\\nph_e = ph_e[event_cut]\\n'"
|
||||
]
|
||||
},
|
||||
"execution_count": 28,
|
||||
"execution_count": 64,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -294,14 +280,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 29,
|
||||
"execution_count": 65,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -444,14 +423,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 30,
|
||||
"execution_count": 66,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -495,7 +467,7 @@
|
||||
"<Array [{energy: 2.58e+04, ...}, ..., {...}] type='1418 * {energy: float64,...'>"
|
||||
]
|
||||
},
|
||||
"execution_count": 30,
|
||||
"execution_count": 66,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -523,7 +495,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 31,
|
||||
"execution_count": 67,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -544,7 +516,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 32,
|
||||
"execution_count": 68,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -579,7 +551,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 33,
|
||||
"execution_count": 69,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -622,7 +594,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 34,
|
||||
"execution_count": 70,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -662,75 +634,6 @@
|
||||
"plt.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#try to find a split between energy lost before and after the magnet (z~5000mm)\n",
|
||||
"\n",
|
||||
"upstream_found = ak.ArrayBuilder()\n",
|
||||
"downstream_found = ak.ArrayBuilder()\n",
|
||||
"\n",
|
||||
"for itr in range(ak.num(brem_f, axis=0)):\n",
|
||||
" upstream_found.begin_record()\n",
|
||||
" upstream_found.field(\"energy\").real(brem_f[itr,\"energy\"])\n",
|
||||
" \n",
|
||||
" downstream_found.begin_record()\n",
|
||||
" downstream_found.field(\"energy\").real(brem_f[itr,\"energy\"])\n",
|
||||
" \n",
|
||||
" upstream_found.field(\"brem_photons_pe\")\n",
|
||||
" downstream_found.field(\"brem_photons_pe\")\n",
|
||||
" upstream_found.begin_list()\n",
|
||||
" downstream_found.begin_list()\n",
|
||||
" for jentry in range(brem_f[itr, \"photon_length\"]):\n",
|
||||
" if (brem_f[itr, \"brem_vtx_z\", jentry]>5000):\n",
|
||||
" if brem_f[itr, \"brem_vtx_z\", jentry]<9500:\n",
|
||||
" downstream_found.real(brem_f[itr,\"brem_photons_pe\",jentry])\n",
|
||||
" else:\n",
|
||||
" continue\n",
|
||||
" else:\n",
|
||||
" upstream_found.real(brem_f[itr,\"brem_photons_pe\", jentry]) \n",
|
||||
" upstream_found.end_list()\n",
|
||||
" downstream_found.end_list()\n",
|
||||
" \n",
|
||||
" upstream_found.field(\"brem_vtx_z\")\n",
|
||||
" downstream_found.field(\"brem_vtx_z\")\n",
|
||||
" upstream_found.begin_list()\n",
|
||||
" downstream_found.begin_list()\n",
|
||||
" for jentry in range(brem_f[itr, \"photon_length\"]):\n",
|
||||
" if brem_f[itr, \"brem_vtx_z\", jentry]>5000:\n",
|
||||
" if brem_f[itr,\"brem_vtx_z\",jentry]<9500:\n",
|
||||
" downstream_found.real(brem_f[itr,\"brem_vtx_z\",jentry])\n",
|
||||
" else:\n",
|
||||
" continue\n",
|
||||
" else:\n",
|
||||
" upstream_found.real(brem_f[itr, \"brem_vtx_z\",jentry])\n",
|
||||
" upstream_found.end_list()\n",
|
||||
" downstream_found.end_list()\n",
|
||||
" upstream_found.end_record()\n",
|
||||
" downstream_found.end_record()\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"upstream_found = ak.Array(upstream_found)\n",
|
||||
"downstream_found = ak.Array(downstream_found)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@ -767,15 +670,6 @@
|
||||
" return (xv-tx*zv-a+b*z_ref)/(b-tx)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"###"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
|
717
B_updown.ipynb
Normal file
717
B_updown.ipynb
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user