Browse Source

photon and rework done thur

master
cetin 1 year ago
parent
commit
e74a2434bd
  1. 26
      B_rework.ipynb

26
B_rework.ipynb

@ -78,7 +78,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 69,
"execution_count": 74,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -86,20 +86,20 @@
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"sample size: 32\n", "sample size: 32\n",
"eff (cutoff = 0 ) = 0.96875 +/- 0.030757843257858637\n",
"eff (cutoff = 0 ) = 0.9688 +/- 0.0308\n",
"sample size: 32\n", "sample size: 32\n",
"eff (cutoff = 100 ) = 0.96875 +/- 0.030757843257858637\n",
"eff (cutoff = 100 ) = 0.9688 +/- 0.0308\n",
"sample size: 65\n", "sample size: 65\n",
"eff (cutoff = 200 ) = 0.9692307692307692 +/- 0.021419791425796485\n",
"eff (cutoff = 200 ) = 0.9692 +/- 0.0214\n",
"sample size: 129\n", "sample size: 129\n",
"eff (cutoff = 300 ) = 0.9457364341085271 +/- 0.019945474377053428\n",
"eff (cutoff = 300 ) = 0.9457 +/- 0.0199\n",
"sample size: 169\n", "sample size: 169\n",
"eff (cutoff = 400 ) = 0.9408284023668639 +/- 0.018149660480088193\n",
"eff (cutoff = 400 ) = 0.9408 +/- 0.0181\n",
"sample size: 227\n", "sample size: 227\n",
"eff (cutoff = 500 ) = 0.920704845814978 +/- 0.017933729291194522\n",
"eff (cutoff = 500 ) = 0.9207 +/- 0.0179\n",
"\n", "\n",
"cutoff energy = 350MeV, sample size: 150\n", "cutoff energy = 350MeV, sample size: 150\n",
"eff = 0.9533333333333334 +/- 0.017221863795553384\n"
"eff = 0.9533 +/- 0.0172\n"
] ]
} }
], ],
@ -126,7 +126,7 @@
"\tnobrem_f = found[ak.all(found[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n", "\tnobrem_f = found[ak.all(found[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n",
"\tnobrem_l = lost[ak.all(lost[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n", "\tnobrem_l = lost[ak.all(lost[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n",
"\tprint(\"sample size: \",ak.num(nobrem_f,axis=0)+ak.num(nobrem_l,axis=0))\n", "\tprint(\"sample size: \",ak.num(nobrem_f,axis=0)+ak.num(nobrem_l,axis=0))\n",
"\tprint(\"eff (cutoff = \",str(cutoff_energy),\") = \",str(t_eff(nobrem_f,nobrem_l)), \"+/-\", eff_err(nobrem_f, nobrem_l))\n",
"\tprint(\"eff (cutoff = \",str(cutoff_energy),\") = \",str(np.round(t_eff(nobrem_f,nobrem_l),4)), \"+/-\", np.round(eff_err(nobrem_f, nobrem_l),4))\n",
"\n", "\n",
"\"\"\"\n", "\"\"\"\n",
"we see that a cutoff energy of 350MeV is ideal because the efficiency drops significantly for higher values\n", "we see that a cutoff energy of 350MeV is ideal because the efficiency drops significantly for higher values\n",
@ -140,7 +140,7 @@
"nobrem_lost = lost[ak.all(lost[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n", "nobrem_lost = lost[ak.all(lost[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n",
"\n", "\n",
"print(\"\\ncutoff energy = 350MeV, sample size:\",ak.num(nobrem_found,axis=0)+ak.num(nobrem_lost,axis=0))\n", "print(\"\\ncutoff energy = 350MeV, sample size:\",ak.num(nobrem_found,axis=0)+ak.num(nobrem_lost,axis=0))\n",
"print(\"eff = \",t_eff(nobrem_found, nobrem_lost), \"+/-\", eff_err(nobrem_found, nobrem_lost))"
"print(\"eff = \",np.round(t_eff(nobrem_found, nobrem_lost),4), \"+/-\", np.round(eff_err(nobrem_found, nobrem_lost),4))"
] ]
}, },
{ {
@ -152,14 +152,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 70,
"execution_count": 75,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"eff = 0.8593328191284226 +/- 0.003413861022128076\n"
"eff = 0.8593 +/- 0.0034\n"
] ]
} }
], ],
@ -178,7 +178,7 @@
"eph_lost = ak.to_numpy(ak.sum(brem_lost[\"brem_photons_pe\"], axis=-1, keepdims=False))\n", "eph_lost = ak.to_numpy(ak.sum(brem_lost[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"energyloss_lost = eph_lost/energy_lost\n", "energyloss_lost = eph_lost/energy_lost\n",
"\n", "\n",
"print(\"eff = \", t_eff(brem_found,brem_lost), \"+/-\", eff_err(brem_found, brem_lost))"
"print(\"eff = \", np.round(t_eff(brem_found,brem_lost),4), \"+/-\", np.round(eff_err(brem_found, brem_lost),4))"
] ]
}, },
{ {

Loading…
Cancel
Save