Browse Source

2d hists regarding the b parameter

master
cetin 1 year ago
parent
commit
b36b6ac5c4
  1. 340
      B_rework.ipynb
  2. 396
      B_tasks.ipynb

340
B_rework.ipynb
File diff suppressed because one or more lines are too long
View File

396
B_tasks.ipynb

@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14,
"execution_count": 1,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -21,7 +21,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 23,
"execution_count": 2,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -30,7 +30,7 @@
"9056" "9056"
] ]
}, },
"execution_count": 23,
"execution_count": 2,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -51,7 +51,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 38,
"execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -60,7 +60,7 @@
"0.8606728758791105" "0.8606728758791105"
] ]
}, },
"execution_count": 38,
"execution_count": 3,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -76,7 +76,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 104,
"execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -135,7 +135,7 @@
"0.9533333333333334" "0.9533333333333334"
] ]
}, },
"execution_count": 104,
"execution_count": 4,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -188,7 +188,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 75,
"execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -204,7 +204,7 @@
"0.96875" "0.96875"
] ]
}, },
"execution_count": 75,
"execution_count": 5,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -225,7 +225,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -234,7 +234,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -243,7 +243,7 @@
"0.8603431839847474" "0.8603431839847474"
] ]
}, },
"execution_count": 5,
"execution_count": 7,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -266,7 +266,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -287,7 +287,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -328,7 +328,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -357,7 +357,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9,
"execution_count": 11,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -389,7 +389,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10,
"execution_count": 12,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -398,7 +398,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10,
"execution_count": 13,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -443,7 +443,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11,
"execution_count": 14,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -504,7 +504,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12,
"execution_count": 15,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -540,7 +540,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14,
"execution_count": 16,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -549,7 +549,7 @@
"-4.6785491318157854e-07" "-4.6785491318157854e-07"
] ]
}, },
"execution_count": 14,
"execution_count": 16,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -560,7 +560,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15,
"execution_count": 17,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -608,7 +608,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13,
"execution_count": 18,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -635,7 +635,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 17,
"execution_count": 19,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -669,262 +669,108 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 18,
"execution_count": 24,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": {
"text/plain": [
"{'all_endvtx_types_length': 9,\n",
" 'all_endvtx_types': [101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 0.0],\n",
" 'all_endvtx_x_length': 9,\n",
" 'all_endvtx_x': [4.337699890136719,\n",
" 14.665200233459473,\n",
" 76.01349639892578,\n",
" 407.2786865234375,\n",
" 407.5032958984375,\n",
" 410.0320129394531,\n",
" 415.61248779296875,\n",
" 416.95660400390625,\n",
" 434.4844970703125],\n",
" 'all_endvtx_y_length': 9,\n",
" 'all_endvtx_y': [11.121000289916992,\n",
" 44.36029815673828,\n",
" 229.05709838867188,\n",
" 701.25048828125,\n",
" 701.5361938476562,\n",
" 704.75341796875,\n",
" 711.8519287109375,\n",
" 713.556396484375,\n",
" 735.4926147460938],\n",
" 'all_endvtx_z_length': 9,\n",
" 'all_endvtx_z': [225.14419555664062,\n",
" 794.5338134765625,\n",
" 3962.47607421875,\n",
" 12063.0546875,\n",
" 12067.9521484375,\n",
" 12123.0634765625,\n",
" 12244.5712890625,\n",
" 12273.71875,\n",
" 12650.5009765625],\n",
" 'brem_photons_pe_length': 8,\n",
" 'brem_photons_pe': [8379.3701171875,\n",
" 1664.8931884765625,\n",
" 1533.9306640625,\n",
" 636.8262939453125,\n",
" 1398.7904052734375,\n",
" 190.91404724121094,\n",
" 12675.98828125,\n",
" 17840.21875],\n",
" 'brem_photons_px_length': 8,\n",
" 'brem_photons_px': [151.9600067138672,\n",
" 30.200000762939453,\n",
" 36.0,\n",
" 29.139999389648438,\n",
" 63.97999954223633,\n",
" 8.739999771118164,\n",
" 582.6599731445312,\n",
" 821.239990234375],\n",
" 'brem_photons_py_length': 8,\n",
" 'brem_photons_py': [488.9800109863281,\n",
" 96.83999633789062,\n",
" 89.2300033569336,\n",
" 37.040000915527344,\n",
" 81.45999908447266,\n",
" 11.109999656677246,\n",
" 739.2999877929688,\n",
" 1038.8900146484375],\n",
" 'brem_photons_pz_length': 8,\n",
" 'brem_photons_pz': [8363.7099609375,\n",
" 1661.800048828125,\n",
" 1530.9100341796875,\n",
" 635.0800170898438,\n",
" 1394.949951171875,\n",
" 190.38999938964844,\n",
" 12640.990234375,\n",
" 17791.0],\n",
" 'brem_vtx_x_length': 8,\n",
" 'brem_vtx_x': [4.337699890136719,\n",
" 14.665200233459473,\n",
" 76.01349639892578,\n",
" 407.2786865234375,\n",
" 407.5032958984375,\n",
" 410.0320129394531,\n",
" 415.61248779296875,\n",
" 416.95660400390625],\n",
" 'brem_vtx_y_length': 8,\n",
" 'brem_vtx_y': [11.121000289916992,\n",
" 44.36029815673828,\n",
" 229.05709838867188,\n",
" 701.25048828125,\n",
" 701.5361938476562,\n",
" 704.75341796875,\n",
" 711.8519287109375,\n",
" 713.556396484375],\n",
" 'brem_vtx_z_length': 8,\n",
" 'brem_vtx_z': [225.14419555664062,\n",
" 794.5338134765625,\n",
" 3962.47607421875,\n",
" 12063.0546875,\n",
" 12067.9521484375,\n",
" 12123.0634765625,\n",
" 12244.5712890625,\n",
" 12273.71875],\n",
" 'endvtx_type': 0,\n",
" 'endvtx_x': nan,\n",
" 'endvtx_y': nan,\n",
" 'endvtx_z': nan,\n",
" 'energy': 56441.954665682184,\n",
" 'eta': 3.488542459471178,\n",
" 'event_count': 4,\n",
" 'fromB': True,\n",
" 'fromD': False,\n",
" 'fromDecay': True,\n",
" 'fromHadInt': False,\n",
" 'fromPV': False,\n",
" 'fromPairProd': False,\n",
" 'fromSignal': True,\n",
" 'fromStrange': False,\n",
" 'isElectron': True,\n",
" 'isKaon': False,\n",
" 'isMuon': False,\n",
" 'isPion': False,\n",
" 'isProton': False,\n",
" 'lost': False,\n",
" 'lost_in_track_fit': False,\n",
" 'match_fraction': 1.0,\n",
" 'mcp_idx': 742,\n",
" 'mother_id': -511,\n",
" 'mother_key': 698,\n",
" 'originvtx_type': 3,\n",
" 'originvtx_x': 1.1207,\n",
" 'originvtx_y': 0.8300000000000001,\n",
" 'originvtx_z': 48.8842,\n",
" 'p': 56441.95466336899,\n",
" 'phi': 1.2677798486443645,\n",
" 'pid': 11,\n",
" 'pt': 3444.8656184095194,\n",
" 'px': 1027.95,\n",
" 'py': 3287.92,\n",
" 'pz': 56336.73,\n",
" 'scifi_hit_pos_x_length': 12,\n",
" 'scifi_hit_pos_x': [213.45494079589844,\n",
" 216.5443115234375,\n",
" 219.6619110107422,\n",
" 222.7693634033203,\n",
" 243.98696899414062,\n",
" 247.14352416992188,\n",
" 250.3206329345703,\n",
" 253.48336791992188,\n",
" 275.1091003417969,\n",
" 278.3012390136719,\n",
" 281.5145568847656,\n",
" 284.71240234375],\n",
" 'scifi_hit_pos_y_length': 12,\n",
" 'scifi_hit_pos_y': [454.385986328125,\n",
" 458.4554138183594,\n",
" 462.55010986328125,\n",
" 466.6192932128906,\n",
" 494.1504821777344,\n",
" 498.219482421875,\n",
" 502.31170654296875,\n",
" 506.38079833984375,\n",
" 534.1050415039062,\n",
" 538.1732788085938,\n",
" 542.2637939453125,\n",
" 546.33056640625],\n",
" 'scifi_hit_pos_z_length': 12,\n",
" 'scifi_hit_pos_z': [7827.7353515625,\n",
" 7897.55078125,\n",
" 7967.765625,\n",
" 8037.5810546875,\n",
" 8509.87890625,\n",
" 8579.693359375,\n",
" 8649.9091796875,\n",
" 8719.724609375,\n",
" 9195.0224609375,\n",
" 9264.837890625,\n",
" 9335.052734375,\n",
" 9404.8681640625],\n",
" 'track_p': 45119.27933089411,\n",
" 'track_pt': 2751.5483539471675,\n",
" 'tx': 0.018246532945735403,\n",
" 'ty': 0.05836192480465231,\n",
" 'ut_hit_pos_x_length': 4,\n",
" 'ut_hit_pos_x': [42.633201599121094,\n",
" 43.659507751464844,\n",
" 47.88643264770508,\n",
" 48.9288444519043],\n",
" 'ut_hit_pos_y_length': 4,\n",
" 'ut_hit_pos_y': [133.4278106689453,\n",
" 136.63731384277344,\n",
" 149.7635040283203,\n",
" 152.9698028564453],\n",
" 'ut_hit_pos_z_length': 4,\n",
" 'ut_hit_pos_z': [2321.846435546875,\n",
" 2376.846435546875,\n",
" 2601.846435546875,\n",
" 2656.846435546875],\n",
" 'velo_hit_pos_x_length': 11,\n",
" 'velo_hit_pos_x': [2.4984264373779297,\n",
" 2.954725503921509,\n",
" 3.4115281105041504,\n",
" 3.8682260513305664,\n",
" 4.323416709899902,\n",
" 4.777114391326904,\n",
" 5.2308149337768555,\n",
" 6.138315677642822,\n",
" 7.523914337158203,\n",
" 9.338811874389648,\n",
" 11.151512145996094],\n",
" 'velo_hit_pos_y_length': 11,\n",
" 'velo_hit_pos_y': [5.234837055206299,\n",
" 6.694038391113281,\n",
" 8.154040336608887,\n",
" 9.614141464233398,\n",
" 11.075146675109863,\n",
" 12.537148475646973,\n",
" 13.99904727935791,\n",
" 16.921545028686523,\n",
" 21.37623405456543,\n",
" 27.210132598876953,\n",
" 33.04653549194336],\n",
" 'velo_hit_pos_z_length': 11,\n",
" 'velo_hit_pos_z': [124.35900115966797,\n",
" 149.35899353027344,\n",
" 174.35899353027344,\n",
" 199.35899353027344,\n",
" 224.35899353027344,\n",
" 249.35899353027344,\n",
" 274.3590087890625,\n",
" 324.3590087890625,\n",
" 400.6409912109375,\n",
" 500.6409912109375,\n",
" 600.6409912109375],\n",
" 'velo_track_idx': 44,\n",
" 'velo_track_tx': 0.018183697015047073,\n",
" 'velo_track_ty': 0.05834294483065605,\n",
" 'velo_track_x': 14.221809387207031,\n",
" 'velo_track_y': 42.918701171875,\n",
" 'velo_track_z': 770.0}"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
"name": "stdout",
"output_type": "stream",
"text": [
"name | typename | interpretation \n",
"---------------------+--------------------------+-------------------------------\n",
"all_endvtx_types_... | int32_t | AsDtype('>i4')\n",
"all_endvtx_types | float[] | AsJagged(AsDtype('>f4'))\n",
"all_endvtx_x_length | int32_t | AsDtype('>i4')\n",
"all_endvtx_x | float[] | AsJagged(AsDtype('>f4'))\n",
"all_endvtx_y_length | int32_t | AsDtype('>i4')\n",
"all_endvtx_y | float[] | AsJagged(AsDtype('>f4'))\n",
"all_endvtx_z_length | int32_t | AsDtype('>i4')\n",
"all_endvtx_z | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_photons_pe_l... | int32_t | AsDtype('>i4')\n",
"brem_photons_pe | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_photons_px_l... | int32_t | AsDtype('>i4')\n",
"brem_photons_px | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_photons_py_l... | int32_t | AsDtype('>i4')\n",
"brem_photons_py | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_photons_pz_l... | int32_t | AsDtype('>i4')\n",
"brem_photons_pz | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_vtx_x_length | int32_t | AsDtype('>i4')\n",
"brem_vtx_x | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_vtx_y_length | int32_t | AsDtype('>i4')\n",
"brem_vtx_y | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_vtx_z_length | int32_t | AsDtype('>i4')\n",
"brem_vtx_z | float[] | AsJagged(AsDtype('>f4'))\n",
"endvtx_type | int32_t | AsDtype('>i4')\n",
"endvtx_x | double | AsDtype('>f8')\n",
"endvtx_y | double | AsDtype('>f8')\n",
"endvtx_z | double | AsDtype('>f8')\n",
"energy | double | AsDtype('>f8')\n",
"eta | double | AsDtype('>f8')\n",
"event_count | int32_t | AsDtype('>i4')\n",
"fromB | bool | AsDtype('bool')\n",
"fromD | bool | AsDtype('bool')\n",
"fromDecay | bool | AsDtype('bool')\n",
"fromHadInt | bool | AsDtype('bool')\n",
"fromPV | bool | AsDtype('bool')\n",
"fromPairProd | bool | AsDtype('bool')\n",
"fromSignal | bool | AsDtype('bool')\n",
"fromStrange | bool | AsDtype('bool')\n",
"isElectron | bool | AsDtype('bool')\n",
"isKaon | bool | AsDtype('bool')\n",
"isMuon | bool | AsDtype('bool')\n",
"isPion | bool | AsDtype('bool')\n",
"isProton | bool | AsDtype('bool')\n",
"lost | bool | AsDtype('bool')\n",
"lost_in_track_fit | bool | AsDtype('bool')\n",
"match_fraction | float | AsDtype('>f4')\n",
"mcp_idx | int32_t | AsDtype('>i4')\n",
"mother_id | int32_t | AsDtype('>i4')\n",
"mother_key | int32_t | AsDtype('>i4')\n",
"originvtx_type | int32_t | AsDtype('>i4')\n",
"originvtx_x | double | AsDtype('>f8')\n",
"originvtx_y | double | AsDtype('>f8')\n",
"originvtx_z | double | AsDtype('>f8')\n",
"p | double | AsDtype('>f8')\n",
"phi | double | AsDtype('>f8')\n",
"pid | int32_t | AsDtype('>i4')\n",
"pt | double | AsDtype('>f8')\n",
"px | double | AsDtype('>f8')\n",
"py | double | AsDtype('>f8')\n",
"pz | double | AsDtype('>f8')\n",
"scifi_hit_pos_x_l... | int32_t | AsDtype('>i4')\n",
"scifi_hit_pos_x | float[] | AsJagged(AsDtype('>f4'))\n",
"scifi_hit_pos_y_l... | int32_t | AsDtype('>i4')\n",
"scifi_hit_pos_y | float[] | AsJagged(AsDtype('>f4'))\n",
"scifi_hit_pos_z_l... | int32_t | AsDtype('>i4')\n",
"scifi_hit_pos_z | float[] | AsJagged(AsDtype('>f4'))\n",
"track_p | double | AsDtype('>f8')\n",
"track_pt | double | AsDtype('>f8')\n",
"tx | double | AsDtype('>f8')\n",
"ty | double | AsDtype('>f8')\n",
"ut_hit_pos_x_length | int32_t | AsDtype('>i4')\n",
"ut_hit_pos_x | float[] | AsJagged(AsDtype('>f4'))\n",
"ut_hit_pos_y_length | int32_t | AsDtype('>i4')\n",
"ut_hit_pos_y | float[] | AsJagged(AsDtype('>f4'))\n",
"ut_hit_pos_z_length | int32_t | AsDtype('>i4')\n",
"ut_hit_pos_z | float[] | AsJagged(AsDtype('>f4'))\n",
"velo_hit_pos_x_le... | int32_t | AsDtype('>i4')\n",
"velo_hit_pos_x | float[] | AsJagged(AsDtype('>f4'))\n",
"velo_hit_pos_y_le... | int32_t | AsDtype('>i4')\n",
"velo_hit_pos_y | float[] | AsJagged(AsDtype('>f4'))\n",
"velo_hit_pos_z_le... | int32_t | AsDtype('>i4')\n",
"velo_hit_pos_z | float[] | AsJagged(AsDtype('>f4'))\n",
"velo_track_idx | int32_t | AsDtype('>i4')\n",
"velo_track_tx | double | AsDtype('>f8')\n",
"velo_track_ty | double | AsDtype('>f8')\n",
"velo_track_x | double | AsDtype('>f8')\n",
"velo_track_y | double | AsDtype('>f8')\n",
"velo_track_z | double | AsDtype('>f8')\n"
]
} }
], ],
"source": [ "source": [
"same = found[found[\"event_count\"]==4]\n",
"same[1].tolist()\n"
"\n",
"file.show()"
] ]
}, },
{ {

Loading…
Cancel
Save