Slicing of tracks
The slicing of tracks is suboptimal
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Tamas Gal created merge request !6 (closed) to address this issue
created merge request !6 (closed) to address this issue
- Tamas Gal mentioned in merge request !6 (closed)
mentioned in merge request !6 (closed)
- Developer
Not sure if this is the best place but I have some strange behavior when slicing in the tracks: Problem: I want to select the best reco track, so the track with
id=1
, highest rec stage, highest likelihood. I do that bybest_tracks = tracks[:,0]
;select the first column for each track/event there is. But afterwards some of the track info looks strange... Here is what I get before, with all tracks of the first event:In [39]: tracks[0] Out[39]: offline track: fUniqueID : [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] fBits : [33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432 33554432] any : [<TObject at 0x7fc31d393c50>, <TObject at 0x7fc31d393cd0>, <TObject at 0x7fc31d393e10>, <TObject at 0x7fc31d104110>, <TObject at 0x7fc31d104f10>, <TObject at 0x7fc31d104fd0>, <TObject at 0x7fc31d104150>, <TObject at 0x7fc31d104a90>, <TObject at 0x7fc31d104b50>, <TObject at 0x7fc31d104890>, <TObject at 0x7fc31d104450>, <TObject at 0x7fc31d104d50>, <TObject at 0x7fc31d104090>, <TObject at 0x7fc31d104850>, <TObject at 0x7fc31d471b90>, <TObject at 0x7fc31d471cd0>, <TObject at 0x7fc31d471410>, <TObject at 0x7fc31d471790>, <TObject at 0x7fc31d471290>, <TObject at 0x7fc31d471990>, <TObject at 0x7fc31d471090>, <TObject at 0x7fc31d471d50>, <TObject at 0x7fc31d4715d0>, <TObject at 0x7fc31d471d90>, <TObject at 0x7fc31d471850>, <TObject at 0x7fc31d4711d0>, <TObject at 0x7fc31d471a10>, <TObject at 0x7fc31d471c10>, <TObject at 0x7fc31d471f50>, <TObject at 0x7fc31d471390>, <TObject at 0x7fc31d471e50>, <TObject at 0x7fc31d471690>, <TObject at 0x7fc31d471a50>, <TObject at 0x7fc31d471ad0>, <TObject at 0x7fc31d471450>, <TObject at 0x7fc31d471e90>] id : [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90] pos_x : [452.74679433 452.37862358 454.41841553 449.44446846 451.69666374 452.25220846 451.55093616 452.38071172 455.71227976 443.36936458 442.79371209 452.18939727 442.66890993 451.37820347 451.18876092 454.19821513 446.71185354 445.17204357 436.94827522 444.71555647 448.27163259 448.46865355 447.87828848 452.3761221 443.31394428 452.50295065 444.71456075 450.91926484 451.10074798 447.53569155 454.33081263 442.63158771 455.53759024 452.24598725 451.38632111 443.21232211 442.51732797 451.23203786 451.59995559 452.15932913 452.59945183 451.47337981 451.54983875 452.00289156 445.89327751 443.84268378 451.02437601 454.07310113 452.07237027 452.24582514 449.32798957 437.9485886 450.40499028 449.59485794 449.94957401 444.9862311 450.01175843 450.36452859 453.18011623 444.84317946 449.67859094 448.81595288 447.12979092 450.85488361 450.38141816 454.54896249 443.43756291 451.05086801 442.36417389 451.93564582 440.88546554 448.40214724 447.31969791 436.58335399 437.82383353 443.48744722 457.37472372 449.14934973 449.08504494 445.09239128 456.84083945 448.26984209 449.67441086 451.77442984 444.8572455 447.80364658 447.25779379 452.3786021 448.54605885 448.03703006] pos_y : [571.59071283 571.78191434 571.02904378 572.82220217 571.99975626 571.78866622 572.10981801 571.80454485 570.70773033 574.91789221 575.14198853 571.88297808 575.19049535 572.17276102 572.25298003 571.20765509 569.70509005 576.29358268 563.07854453 562.43448435 570.42242094 570.27207944 570.96471013 564.44911215 561.74830696 567.19149158 581.07614521 563.10412325 563.57069327 571.61440452 571.61583669 575.20187259 571.07286331 572.13499517 572.35362422 574.99554026 575.23000336 572.51175647 572.23415284 572.01929682 571.7906749 563.33760461 563.74993369 567.26849658 569.43654752 561.54957521 572.63295734 571.77419428 572.26618842 571.95281991 572.93001422 563.37490106 568.94737694 571.95422704 569.58398291 575.97804646 571.22580202 568.99778143 566.80280048 579.92568002 567.75555151 566.9070848 566.14901244 573.15151617 567.89970629 570.75004598 570.71798155 574.6482685 572.70716477 573.08812659 570.87787722 575.67555124 567.50933465 566.70486923 570.16628646 562.53811776 574.03831741 576.11901227 573.51634851 578.24680585 576.32794921 570.42798715 569.45665207 574.44557941 568.01139529 564.64930563 564.33510151 576.71347575 568.34570129 567.72849 ] pos_z : [126.81068237 127.25776083 124.94058875 130.60745548 128.02049131 127.37212501 128.24283957 127.29852744 123.53500004 137.55606929 138.22924627 127.53582987 138.35068274 128.46422778 128.69589158 125.23906575 140.06468228 140.52596484 129.43054664 159.29455965 140.74791121 140.52760151 139.84908167 161.60664654 136.04282502 134.72495302 160.15221045 138.77935113 138.3100896 145.99366277 124.70338016 138.07067942 123.28007185 127.08798627 128.03014439 137.39687248 138.20671814 128.24222875 127.86859371 127.22427225 126.624156 139.04792633 138.52127369 134.74293044 138.89477477 136.35605175 128.44784739 124.97686945 127.32743814 127.092274 130.47442609 129.21102801 138.66278851 150.380412 137.84821087 140.24620762 159.18386747 138.68761523 163.08027203 159.91628821 129.06570433 128.07702269 128.77508256 127.76896405 128.98315005 129.37507275 129.9786271 126.63098975 139.70882329 126.71541939 140.10542634 148.96323452 139.21150381 126.94069427 139.26469051 136.6613668 125.58376421 151.70103538 147.91505108 159.96692747 129.05087385 152.15824564 139.45488418 129.1437956 139.63224952 138.45250903 138.8043675 124.4638339 135.00364117 140.3311601 ] dir_x : [ 6.41024843e-01 6.42337737e-01 6.41756984e-01 6.43170747e-01 6.42638504e-01 6.42572567e-01 6.44141822e-01 6.41654472e-01 6.43543395e-01 6.44425166e-01 6.44383062e-01 6.41131368e-01 6.45227519e-01 6.41430315e-01 6.40743820e-01 6.39891473e-01 7.75185752e-01 8.92504227e-01 -5.65439704e-03 7.34094423e-01 -3.68563996e-01 -3.89882112e-01 -3.86755136e-01 8.32448871e-01 6.58654557e-01 2.67790992e-01 9.88968438e-01 2.66043206e-01 2.65963170e-01 7.20140318e-01 6.45676907e-01 6.43531835e-01 6.43867955e-01 6.44195325e-01 6.43176816e-01 6.43417996e-01 6.44394645e-01 6.44903336e-01 6.44021448e-01 6.43579693e-01 6.40195090e-01 6.94581607e-02 7.30734737e-02 7.82683163e-02 7.32838524e-01 5.67559381e-01 6.45338941e-01 6.46487971e-01 6.45303540e-01 6.41472961e-01 6.41781400e-01 1.80469191e-02 -3.77423729e-01 8.68907323e-01 -3.81162761e-01 8.88746296e-01 8.54629683e-01 -3.81378536e-01 8.62467364e-01 9.91248031e-01 5.31780475e-01 3.98327443e-01 2.81660051e-01 6.63119375e-01 6.12814464e-01 7.29036151e-01 2.16941881e-01 5.63320027e-01 6.64726541e-01 5.44125376e-01 5.77780465e-01 9.19413151e-01 -6.12814450e-01 3.92156982e-08 2.95115926e-01 3.98327406e-01 7.81831462e-01 9.64038767e-01 8.85313560e-01 9.86065856e-01 8.66025388e-01 9.64038780e-01 -4.24080767e-01 6.80172712e-01 5.56670442e-01 1.45797941e-01 2.13958321e-01 6.63119361e-01 1.51352654e-01 -6.64726522e-01] dir_y : [-0.22282079 -0.22132285 -0.22163263 -0.21941304 -0.22049941 -0.22057215 -0.21918782 -0.22309992 -0.22080127 -0.21707549 -0.21741366 -0.22378577 -0.21522153 -0.22357402 -0.22465609 -0.22524327 -0.55212794 -0.1305266 -0.63781119 -0.65772819 0.66918039 0.64102721 0.63804302 -0.50741578 0.11378963 0.6849389 0.12024853 0.68671926 0.68667566 -0.36114526 -0.2013664 -0.2081409 -0.2063623 -0.20657144 -0.20850106 -0.20871702 -0.20851926 -0.20423038 -0.21084024 -0.21224449 -0.21596597 0.67747708 0.67832735 0.67873408 -0.56182306 0.30413449 -0.20176758 -0.19819206 -0.20336914 -0.21469649 -0.21495729 -0.63374243 0.52878348 -0.31275992 0.52797918 -0.13495468 -0.51392654 0.52811461 -0.44525719 0.09125712 -0.42408071 -0.39832738 -0.48784943 -0.15135261 -0.29511583 -0.28243004 -0.37575429 0. -0.41158117 -0.1457979 -0.5267164 -0.14562065 0.29511586 -0.56332003 -0.61281442 0.39832742 0. 0.14530547 -0.28765573 0.14862552 0. -0.14530538 0.53178043 0. -0.66341389 0.54412537 0.75198555 0.15135267 0.66311936 0.4115812 ] dir_z : [-0.73446446 -0.73377001 -0.73418455 -0.73361387 -0.73375457 -0.73379045 -0.73282877 -0.73382966 -0.73287018 -0.73320832 -0.73314512 -0.73407799 -0.73304921 -0.73388133 -0.73415053 -0.7347138 -0.30698826 -0.43173952 -0.770172 0.16881647 -0.64525823 -0.66111728 -0.66582397 0.22261649 -0.7437917 -0.67760363 0.08649693 -0.67648922 -0.67656495 -0.59242892 -0.73658191 -0.73657596 -0.73678264 -0.73643779 -0.73678415 -0.73651238 -0.73571411 -0.73647107 -0.73537934 -0.73536213 -0.73723059 -0.73225704 -0.73111714 -0.73020142 -0.38380014 -0.76510036 -0.73676828 -0.73673144 -0.73635884 -0.73649023 -0.73614537 -0.77333359 -0.76022323 -0.38364215 -0.75891563 -0.43808362 0.07407843 -0.75871297 0.24061605 0.09539119 -0.7330519 -0.8262388 -0.8262388 -0.7330519 -0.7330519 -0.62348983 -0.90096889 -0.8262388 -0.62348983 -0.8262388 -0.62348983 -0.36534105 -0.7330519 -0.8262388 -0.7330519 -0.8262388 -0.62348983 -0.22252096 -0.36534105 0.07473007 -0.50000003 -0.22252096 -0.7330519 -0.7330519 -0.50000003 -0.8262388 -0.62348983 -0.7330519 -0.7330519 -0.62348983] t : [34644732.85782351 34644730.82356182 34644741.43537139 34644715.58397081 34644727.38956708 34644730.35333054 34644726.37058532 34644730.61628867 34644747.75932128 34644683.97158145 34644680.88175607 34644729.52956528 34644680.30525776 34644725.30409127 34644724.23511526 34644739.91449746 34644691.78500783 34644679.33443449 34644722.59290133 34644682.94124045 34644672.09336755 34644672.20175704 34644675.38285982 34644701.27156815 34644693.32308853 34644690.52359927 34644655.77013377 34644670.57020867 34644672.84523623 34644686.64424307 34644741.5810775 34644681.09178367 34644748.03232577 34644730.83376851 34644726.55607272 34644684.11259504 34644680.44090455 34644725.59026162 34644727.36959406 34644730.28961422 34644732.95039762 34644670.80859453 34644672.98494057 34644690.36685853 34644691.68696073 34644690.245508 34644724.57251 34644740.28053609 34644729.81488751 34644730.84703992 34644715.60316833 34644722.95450294 34644676.90443194 34644681.14742197 34644680.57125428 34644679.8642792 34644671.56663857 34644676.87610549 34644699.04040547 34644657.53807605 34644725.1811175 34644730.56744625 34644729.94176648 34644726.76408974 34644727.74943209 34644731.0758859 34644718.70766052 34644728.63764141 34644678.61766236 34644732.09426656 34644676.62352195 34644680.05080263 34644682.71163514 34644724.48184669 34644678.42167707 34644681.66201191 34644746.63535312 34644680.39700337 34644678.47701181 34644667.66502918 34644735.97180693 34644679.8378788 34644679.56263506 34644722.37133812 34644699.59272245 34644685.20954995 34644679.07617266 34644745.55836812 34644689.0709601 34644670.99573439] E : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] len : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] lik : [123.36326186 123.34563602 123.34016465 123.33130968 123.31956942 123.30083508 123.29466473 123.26651611 123.25461747 123.25303703 123.22572067 123.22126494 123.21498038 123.21147258 123.11509654 123.04057597 74.5746964 69.49953708 64.63195171 64.49204315 61.03012735 60.5935568 59.8833623 57.06438921 54.0130612 45.33795259 45.20056531 45.05878431 45.04988723 36.33599267 34.82673551 33.86102491 33.86102043 33.86101666 33.86100965 33.86100668 33.86099284 33.86097712 33.86090733 33.86086455 33.86065054 33.66012168 33.66000883 33.65986112 33.62003014 33.58585286 32.88891474 32.88880977 32.88565035 32.87923756 32.87923128 31.63992188 30.77875255 30.38298337 29.81080638 28.71276535 28.59455333 27.89087873 27.69717467 27.5488425 30.83969255 29.64939763 29.55937619 28.90105235 28.7467832 28.74115461 28.52445805 27.75882808 27.720389 27.69374347 27.62020077 27.01870835 26.62949026 26.58505737 26.51413968 26.49963877 26.47648893 26.23905042 26.17956537 26.16277984 25.94654459 25.94137717 25.8723022 25.78074156 25.68948286 25.67768892 25.6532576 25.5995685 25.50051999 25.49207839] type : [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] rec_type : [4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000] rec_stages : [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]] status : [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] mother_id : [-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1] hit_ids : [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []] error_matrix : [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []] comment : b'\x00\x00\\\x00\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' JGANDALF_BETA0_RAD : [0.013393813780666003, 0.009064552140519511, -123.36326186107235, 46.0, 0.0, 0.0, 0.8099999999999999, 4.0] JGANDALF_BETA1_RAD : [0.013510752771481472, 0.009104194912501253, -123.34563602437967, 46.0, 0.0, 0.0, 0.09, 3.0] JGANDALF_CHI2 : [0.012106652602578954, 0.008277898596454598, -123.34016464983486, 46.0, 0.0, 0.0, 0.07363636363636362, 5.0] JGANDALF_NUMBER_OF_HITS : [0.015615418602909773, 0.01029838757626582, -123.33130967745525, 46.0, 0.0, 0.0, 0.09, 3.0] JENERGY_ENERGY : [0.013877435524115479, 0.009346221362104402, -123.31956942116723, 46.0, 0.0, 0.0, 0.09, 3.0] JENERGY_CHI2 : [0.013524842150546022, 0.00913403286326465, -123.30083508155246, 46.0, 0.0, 0.0, 0.09, 3.0] JGANDALF_LAMBDA : [0.014186163779875005, 0.009576628802967429, -123.29466473060904, 46.0, 0.0, 0.0, 0.01, 2.0] JGANDALF_NUMBER_OF_ITERATIONS : [0.01352145527734563, 0.009166787784814213, -123.26651611365494, 46.0, 0.0, 0.0, 0.09, 3.0] JSTART_NPE_MIP : [0.011730240254368321, 0.008060651859962452, -123.25461747038678, 46.0, 0.0, 0.0, 0.01, 2.0] JSTART_NPE_MIP_TOTAL : [0.021943344253603603, 0.013242787156988267, -123.25303702715809, 46.0, 0.0, 0.0, 0.09, 3.0] JSTART_LENGTH_METRES : [0.022727128303538974, 0.013536763809906953, -123.22572067166371, 46.0, 0.0, 0.0, 0.09, 3.0] JVETO_NPE : [0.013540533182457222, 0.009173103950200254, -123.22126493892654, 46.0, 0.0, 0.0, 0.09, 3.0] JVETO_NUMBER_OF_HITS : [0.022846017862250084, 0.013561236931380581, -123.2149803758581, 46.0, 0.0, 0.0, 0.09, 3.0] JENERGY_MUON_RANGE_METRES : [0.01420221489347307, 0.009589855494943265, -123.21147258260419, 46.0, 0.0, 0.0, 0.09, 3.0] JENERGY_NOISE_LIKELIHOOD : [0.014332439407230092, 0.009689495497536156, -123.11509654237724, 46.0, 0.0, 0.0, 0.09, 3.0] JENERGY_NDF : [0.012357678159800007, 0.008496168241991836, -123.04057597244868, 46.0, 0.0, 0.0, 0.09, 3.0] JENERGY_NUMBER_OF_HITS : [0.030582351145523677, 0.02083119623788255, -74.57469639955148, 44.0, 0.0, 0.0, 43.920743801652876, 12.0] JCOPY_Z_M : [0.028638079015788607, 0.02023541631665989, -69.49953707951704, 45.0, 0.0, 0.0, 0.01, 2.0]
This looks as expected. When I look at the first entry of best_tracks I get however:
In [40]: bt[0] Out[40]: offline track: fUniqueID : 0 fBits : 33554432 any : [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] id : 1 pos_x : 452.7467943270828 pos_y : 571.5907128298714 pos_z : 126.81068237156461 dir_x : 0.6410248426688133 dir_y : -0.22282078578535372 dir_z : -0.7344644637444487 t : 34644732.857823506 E : 0.0 len : 0.0 lik : 123.36326186107235 type : 0 rec_type : 4000 rec_stages : [0 0 0 ... 0 0 1] status : 0 mother_id : -1 hit_ids : [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] error_matrix : [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] comment : 0 JGANDALF_BETA0_RAD : 0 JGANDALF_BETA1_RAD : 0 JGANDALF_CHI2 : 0 JGANDALF_NUMBER_OF_HITS : 8 JENERGY_ENERGY : 63 JENERGY_CHI2 : 139 JGANDALF_LAMBDA : 110 JGANDALF_NUMBER_OF_ITERATIONS : 55 JSTART_NPE_MIP : 65 JSTART_NPE_MIP_TOTAL : 64 JSTART_LENGTH_METRES : 222 JVETO_NPE : 157 JVETO_NUMBER_OF_HITS : 63 JENERGY_MUON_RANGE_METRES : 130 JENERGY_NOISE_LIKELIHOOD : 144 JENERGY_NDF : 111 JENERGY_NUMBER_OF_HITS : 151 JCOPY_Z_M : 248
Some are correct (up to
rec_type
), others are wrong (likerec_stages
and thefitinf
)The
best_reco
is also correct:In [14]: f.best_reco[0] Out[14]: (0.01339381, 0.00906455, -123.36326186, 46., 0., 0., 0.81, 4.)
Am I doing something wrong?
A file to test it with would be:
/sps/km3net/users/guderian/track_quality_output/reconstructed/string/ORCA_49/DU1/offset_y/real/iteration1/time_development/txyz_0.0_0.0_0.0_0.0_run7291.root.aanet.root
@dguderian Thank you for reporting this.
- In fact, when you type
r.tracks[0]
this selects ALL the possible tracks for the event 0. That's why you get all these arrays with lots of data!
The slicing of tracks is really tricky, and it is still a work in progress for us in km3io. Therefore, so far, there is no straight forward method to slice all the tracks at once, like you want to do... (I realised that )
To bypass this so far we have some methods in
OfflineReader
class to help you select the tracks, hits and events information based on the reconstruction stages of interest.So I guess you were asking to select the first columns because you think these are the best-reconstructed tracks?
If this is the case, please note that the best-reconstructed track is NOT ALWAYS the first one, please refer to this git issue in aanet for more details: #30
In your file, the reconstructed stages are
[1, 2, 3]
, so to get the hits, tracks and fit information corresponding to the reconstructed track that has these reconstruction stages + the highest likelihood, you would use the methods:get_reco_tracks
get_reco_hits
get_reco_events
andget_reco_fit
as follows:km3pipe ❯ ipython Python 3.7.4 (default, Aug 13 2019, 20:35:49) Type 'copyright', 'credits' or 'license' for more information IPython 7.9.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import km3io as ki In [2]: r = ki.OfflineReader("/home/zineb/km3net/temp/txyz_0.0_0.0_0.0_0.0_run7291.root.aanet.root" ...: ) In [3]: r.events Out[3]: <OfflineEvents: 8000 parsed events> In [4]: r.tracks.rec_stages Out[4]: <ChunkedArray [[[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]] [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]] [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]] ... [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]] [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]] [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]]] at 0x7f106b7a6ad0> In [5]: r.get_reco_tracks([1,2,3], ["pos_x", "pos_y", "pos_z"]) Out[5]: {'pos_x': array([452.74679433, 434.16829767, 454.47569848, ..., 455.50330729, 431.95854463, 450.33755286]), 'pos_y': array([571.59071283, 581.65580763, 577.08870832, ..., 566.91469048, 590.99587658, 561.36637287]), 'pos_z': array([126.81068237, 154.86220467, 103.16702502, ..., 129.48548852, 178.81863947, 77.16619714])} In [6]: r.get_reco_hits([1,2,3], ["dom_id", "channel_id"]) Out[6]: {'dom_id': <ChunkedArray [[806451572 806487219 806487219 ... 809544058 809544058 809544058] [806469630 806487219 806487219 ... 809544058 809544058 809544058] [806451572 806451572 806451572 ... 808997793 809006037 809537130] [806465101 806487226 808432835 ... 809537130 809544058 809544058] [806451572 806451572 806451572 ... 809544061 809544061 809544061] [806451572 806451572 806455814 ... 809526097 809537130 809544061] [806451572 806451572 806451572 ... 809537130 809544061 809544061] ...] at 0x7f106b066050>, 'channel_id': <ChunkedArray [[2 26 29 ... 7 11 8] [6 2 3 ... 9 14 19] [28 1 4 ... 14 13 9] [16 9 13 ... 16 4 4] [6 26 4 ... 7 6 13] [13 6 7 ... 2 6 2] [10 14 21 ... 9 13 16] ...] at 0x7f106b07ba90>} In [7]: r.get_reco_events([1,2,3], ["det_id", "hits", "id"]) Out[7]: {'det_id': <ChunkedArray [49 49 49 49 49 49 49 ...] at 0x7f10944573d0>, 'hits': <ChunkedArray [68 269 183 100 118 200 155 ...] at 0x7f106b075e50>, 'id': <ChunkedArray [1 2 3 4 5 6 7 ...] at 0x7f1038e4d890>} In [8]: r.get_reco_fit([1,2,3]) Out[8]: rec.array([(0.01339381, 0.00906455, -123.36326186, 46., 0., 0., 0.81 , 4.), (0.00381439, 0.00267574, -248.44111831, 139., 0., 0., 0.01 , 8.), (0.00547035, 0.00381486, -210.968144 , 120., 0., 0., 0.01 , 13.), ..., (0.00369441, 0.00261222, -324.1562581 , 143., 0., 0., 0.81 , 20.), (0.01296783, 0.00812648, -91.83443436, 39., 0., 0., 0.81 , 5.), (0.00834166, 0.00586108, -24.11700936, 76., 0., 0., 3.26683218, 27.)], dtype=[('JGANDALF_BETA0_RAD', '<f8'), ('JGANDALF_BETA1_RAD', '<f8'), ('JGANDALF_CHI2', '<f8'), ('JGANDALF_NUMBER_OF_HITS', '<f8'), ('JENERGY_ENERGY', '<f8'), ('JENERGY_CHI2', '<f8'), ('JGANDALF_LAMBDA', '<f8'), ('JGANDALF_NUMBER_OF_ITERATIONS', '<f8')])
Please also note that this is a transitional solution until
numba
is integreated toawkward
package.I hope this helps! Please let me know, Thanks
@dguderian Please do not use
tracks[:,0]
anymore, @tgal and I are aware that it does not provide the right answer.Somehow it managed to sneak out to the master branch... but it is now completely removed.
Let us know if we can help further.
- Developer
Okay, thank you so far.
- Tamas Gal changed due date to March 05, 2020
changed due date to March 05, 2020
The API is finished, slicing is now fully transparent and works like a charm!
I'll work on this
besttrack
thing tomorrow. In the end I wantbesttrack()
(or whatever we call it) return the same object asf.tracks
would, so it's a completely uniform interface. In fact it will be just a masked one.- Zineb Aly mentioned in issue #37 (closed)
mentioned in issue #37 (closed)
- Zineb Aly mentioned in issue #22 (closed)
mentioned in issue #22 (closed)
Hmm, any progress with
besttrack
? It's been 1 weekBtw.
best_track()
needs a massive refactoring as there is no agreement on what's a "best track".We decided to implement a required
strategy
parameter for thebest_track
function and the very first strategy we will implement is"first"
, which will take the first track.Feel free to provide more "best_track" strategies
Solved in !27 (merged) and is currently being merged to
master
Slicing now works just like with numpy arrays and recarrays. Best track algorithm is still missing and is the next step!
- Tamas Gal closed
closed