hello rooters, I'm getting this error message *** Break *** segmentation violation Root > Function combi1() busy flag cleared when running my macro combi1.C, anyway the execution is going right but at the end root becomes blocked. What's happening? (I apologize for the low level of my question, but I'm just a beginner student.) Thanks Mercedes root [0] .L combi1.C root [1] .x combi1.C 1 track_type=icb, trid= 1, a0=0.000600, z=-1.847290, phi=3.355610, cotth=2.445270, ptinv=-0.035360 track_type=iid=, trid= 3, a0=0.000070, z=-1.846100, phi=3.355700, cotth=2.445100, ptinv=-0.034680 track_type=imu=, trid= 1, a0=0.973190, z=-4.641370, phi=-2.935090, cotth=2.461830, ptinv=-0.035990 track_type=icb, trid= 2, a0=-0.019570, z=-1.750080, phi=4.157750, cotth=-4.506170, ptinv=1.093180 track_type=icb, trid= 2, a0=-0.019570, z=-1.750080, phi=4.157750, cotth=-4.506170, ptinv=1.093180 ***************************************************** 2 track_type=icb, trid= 1, a0=0.003140, z=-5.839110, phi=2.525630, cotth=-1.488380, ptinv=-0.023370 track_type=iid=, trid= 94, a0=0.003350, z=-5.839640, phi=2.525590, cotth=-1.488310, ptinv=-0.023610 track_type=imu=, trid= 2, a0=-5.470900, z=-6.437540, phi=2.527320, cotth=-1.490440, ptinv=-0.023260 track_type=icb, trid= 2, a0=-0.002440, z=-5.828400, phi=6.250600, cotth=-0.261410, ptinv=0.024050 track_type=iid=, trid= 66, a0=-0.002110, z=-5.826750, phi=6.250560, cotth=-0.261570, ptinv=0.023790 track_type=imu=, trid= 1, a0=0.237710, z=-7.337100, phi=-0.030080, cotth=-0.253880, ptinv=0.025310 ***************************************************** 3 track_type=icb, trid= 1, a0=0.017090, z=-3.778550, phi=5.105960, cotth=-1.130590, ptinv=-2.011260 track_type=icb, trid= 1, a0=0.017090, z=-3.778550, phi=5.105960, cotth=-1.130590, ptinv=-2.011260 track_type=icb, trid= 3, a0=-0.003920, z=-3.747630, phi=4.213540, cotth=-1.672370, ptinv=1.201060 track_type=icb, trid= 3, a0=-0.003920, z=-3.747630, phi=4.213540, cotth=-1.672370, ptinv=1.201060 ***************************************************** 4 track_type=icb, trid= 1, a0=-0.000660, z=-0.978800, phi=1.937360, cotth=0.848620, ptinv=-0.030380 track_type=iid=, trid= 15, a0=-0.000350, z=-0.979820, phi=1.937320, cotth=0.848740, ptinv=-0.030700 track_type=imu=, trid= 1, a0=-1.102670, z=2.752020, phi=1.938430, cotth=0.837700, ptinv=-0.028810 track_type=icb, trid= 2, a0=0.001690, z=-0.985490, phi=1.059080, cotth=-3.400910, ptinv=0.049810 track_type=iid=, trid= 12, a0=0.000570, z=-0.987720, phi=1.059210, cotth=-3.400680, ptinv=0.051040 track_type=imu=, trid= 2, a0=1.928710, z=15.006950, phi=1.067320, cotth=-3.496630, ptinv=0.048970 ***************************************************** ************************************************************************************************************ * Row * Event * IDTrack_i * IDA0 * IDZ * IDPhi * IDCotth * IDPtinv * MSTrack_i * ************************************************************************************************************ * 0 * 2 * 94 * 0.0033499 * -5.839640 * 2.5255899 * -1.488309 * -0.023609 * 2 * * 1 * 4 * 15 * -0.000349 * -0.979820 * 1.9373199 * 0.8487399 * -0.0307 * 1 * ************************************************************************************************************ ======> EVENT:1 Event = 4 IDTrack_id = 15, 12 IDA0 = -0.00035, 0.00057 IDZ = -0.97982, -0.98772 IDPhi = 1.93732, 1.05921 IDCotth = 0.84874, -3.40068 IDPtinv = -0.0307, 0.05104 MSTrack_id = 1, 2 MSA0 = -1.10267, 1.92871 MSZ = 2.75202, 15.007 MSPhi = 1.93843, 1.06732 MSCotth = 0.8377, -3.49663 MSPtinv = -0.02881, 0.04897 CombTrack_id = 1, 2 CombA0 = -0.00066, 0.00169 CombZ = -0.9788, -0.98549 CombPhi = 1.93736, 1.05908 CombCotth = 0.84862, -3.40091 CombPtinv = -0.03038, 0.04981 *** Break *** segmentation violation Root > Function combi1() busy flag cleared ***************************** EVENT= 1 icb = 1 0.00060 -1.84729 3.35561 2.44527 -0.03536 iid= 3 0.00007 -1.84610 3.35570 2.44510 -0.03468 imu= 1 0.97319 -4.64137 -2.93509 2.46183 -0.03599 icb = 2 -0.01957 -1.75008 4.15775 -4.50617 1.09318 icb = 3 -0.02101 -2.07111 4.01851 4.48028 -1.40541 icb = 4 0.02537 -1.70893 0.73775 4.47398 -1.64920 icb = 5 -0.01160 -1.77008 4.37427 2.58337 0.52061 icb = 6 -0.01988 -1.79721 1.38313 -2.42484 0.97268 icb = 7 0.00100 -1.85812 4.76694 0.09035 -1.42239 icb = 8 0.00691 -1.83028 5.41446 -1.60871 -1.38684 icb = 9 0.00403 -1.86086 5.90866 0.03687 -0.99054 icb = 10 0.00578 -1.83830 2.55014 2.00721 -1.34795 icb = 11 -0.03791 -1.69817 4.80478 -4.42307 1.52508 icb = 12 -0.00010 -1.87042 5.96395 -0.53910 -1.19681 icb = 13 0.02652 -1.87339 6.24188 -1.92943 1.81104 icb = 14 -0.02836 -1.78503 0.52907 -2.47907 -1.24847 icb = 15 0.05764 -1.82811 3.74662 3.08740 1.77107 icb = 16 -0.00850 -1.82677 5.68819 1.07161 -0.50749 icb = 17 0.00053 -1.56646 5.59221 -3.54422 -1.20034 icb = 18 -0.01717 -1.75556 2.55327 -5.36561 -1.06088 icb = 19 0.03210 -1.77430 4.34560 -1.12286 -1.71021 icb = 20 0.00514 -1.82336 4.54142 -0.40594 -0.64074 icb = 21 0.00402 -1.85985 2.88143 1.28377 1.75623 icb = 22 -0.00498 -1.82823 5.57777 0.93062 0.52191 icb = 23 -0.06369 -2.55707 3.59127 -6.03323 -1.19288 icb = 24 0.00037 -1.82202 5.76552 -1.99720 0.93470 icb = 25 -0.00337 -1.81269 5.23029 0.75178 0.41336 icb = 26 0.00267 -1.90493 0.14472 -2.03164 -1.40663 icb = 27 0.06041 -1.85700 1.78458 -1.34876 1.41633 icb = 28 -0.00658 -1.81945 1.69080 -1.34065 -0.96314 icb = 29 -0.00305 -1.85280 6.26080 -0.09429 1.33070 icb = 30 -0.00182 -1.85396 1.77215 -0.14890 -1.28342 icb = 31 -0.00040 -1.82504 1.68727 -1.17773 1.86052 icb = 32 -0.00052 -1.84987 3.70138 -0.41933 1.76946 icb = 33 0.00011 -1.82387 4.37607 -0.35423 1.38055 icb = 34 -0.00287 -1.85558 3.37769 0.30696 1.18656 icb = 35 -0.00179 -1.84942 4.47285 -0.74972 1.57579 icb = 36 -0.00796 -1.94248 5.23169 3.00044 1.25794 icb = 37 0.01480 -1.80660 5.99089 0.13010 1.83334 icb = 38 0.19158 -2.10969 5.46665 0.08764 -0.59474 icb = 39 0.00501 -1.86141 3.65734 -1.72217 -1.30103 icb = 40 -0.03388 -1.93380 5.08127 2.72812 1.75654 icb = 41 0.00516 -1.89420 0.89782 2.62962 -0.92754 icb = 42 -0.02357 -1.82831 4.46707 -1.75507 -1.80251 icb = 43 -0.01598 -2.14280 0.88007 -5.93919 -1.70571 icb = 44 -0.01970 -1.79371 2.10367 -3.07340 -1.86177 icb = 45 -2.89871 9.52636 4.91601 2.90936 0.79789 icb = 46 0.37467 -1.91326 5.44495 1.70972 -0.98573 icb = 47 -0.00321 -1.83097 0.17461 0.47705 1.06624 icb = 48 -3.87660 2.56109 0.05491 -0.02735 0.87699 icb = 49 -0.00095 -1.81436 5.24601 -0.54516 1.87130 icb = 50 -0.38897 28.89822 4.56743 0.56851 -1.77025 icb = 51 5.52680 -29.37738 3.88696 -0.68972 -1.84165 icb = 52 0.02336 -2.05998 3.65927 -5.83148 1.98626 icb = 53 0.13457 4.50040 0.94250 1.91778 1.19372 ***************************** EVENT= 2 icb = 1 0.00314 -5.83911 2.52563 -1.48838 -0.02337 iid= 94 0.00335 -5.83964 2.52559 -1.48831 -0.02361 imu= 2 -5.47090 -6.43754 2.52732 -1.49044 -0.02326 icb = 2 -0.00244 -5.82840 6.25060 -0.26141 0.02405 iid= 66 -0.00211 -5.82675 6.25056 -0.26157 0.02379 imu= 1 0.23771 -7.33710 -0.03008 -0.25388 0.02531 icb = 3 0.01846 -5.86060 5.81549 5.06888 -0.81309 icb = 4 -0.00619 -5.82683 3.69253 2.60849 -1.85404 icb = 5 -0.00904 -5.82510 6.25119 0.00329 -0.81935 icb = 6 -0.00868 -5.87905 3.85124 5.07146 0.48402 icb = 7 -0.09195 -5.70203 4.87051 6.03411 -1.53472 icb = 8 0.01053 -5.72387 6.02378 5.01689 -1.56988 icb = 9 -0.00109 -5.78850 0.65132 2.48472 0.21203 icb = 10 -0.13428 -6.15637 5.94737 3.77013 -1.25899 icb = 11 -0.00399 -5.76567 2.86832 2.00491 -1.72053 icb = 12 0.00131 -5.81804 0.57109 -5.29049 0.21463 icb = 13 0.03597 -5.74962 4.05372 1.59951 -1.43362 icb = 14 -0.00692 -5.83699 0.34491 0.21383 -0.43055 icb = 15 0.00515 -5.77711 2.47654 0.98148 -1.27434 icb = 16 0.00780 -5.83666 3.77335 -2.13518 -0.39296 icb = 17 -0.02024 -5.82806 5.48072 4.51711 1.22220 icb = 18 -4.53515 10.02806 4.26932 -5.95454 1.44666 icb = 19 -0.01229 -5.81145 4.46107 -0.36979 0.83455 icb = 20 -0.02607 -5.80236 0.36447 2.30183 1.45871 icb = 21 0.17499 -5.58182 5.52986 5.59529 1.93420 icb = 22 0.00444 -5.79854 4.41643 2.11223 -0.50952 icb = 23 -0.24310 -6.03599 5.12982 5.51806 1.51258 icb = 24 0.02118 -5.84100 3.81520 -0.37593 -0.87185 icb = 25 0.00406 -5.85387 0.57040 -3.95811 1.58281 icb = 26 0.00071 -5.79506 3.21103 0.71769 0.57615 icb = 27 0.00229 -5.83320 3.65019 0.61173 -0.54517 icb = 28 0.00997 -5.82246 4.37009 -0.63190 0.50946 icb = 29 0.00258 -5.83816 2.95844 -0.73113 -1.47649 icb = 30 -0.31001 -15.52804 3.77389 -3.95228 0.82341 icb = 31 0.01697 -5.88717 3.34700 2.18503 1.60112 icb = 32 -0.00606 -5.84414 4.02086 -0.25819 1.22188 icb = 33 -0.00183 -5.85847 2.56020 0.55635 -0.85192 icb = 34 0.00138 -5.83706 6.11165 -1.23877 -0.27958 icb = 35 -0.00194 -5.83190 5.77849 -0.61647 -0.34367 icb = 36 -0.00540 -5.82142 3.96288 0.20293 -0.69233 icb = 37 -0.00919 -5.81727 5.14947 -2.69414 -0.73026 icb = 38 0.00745 -5.80864 6.24581 -2.35872 0.57440 icb = 39 0.00810 -5.83436 6.22824 0.57993 1.77356 icb = 40 -6.34444 -24.45098 3.73381 -0.86428 0.90042 icb = 41 0.01063 -5.72332 6.15200 -2.35186 -1.32168 icb = 42 0.00693 -5.83508 0.71129 0.70415 1.86449 icb = 43 0.00520 -5.83139 5.82317 -1.29533 0.70679 icb = 44 0.03896 -5.96426 0.56275 -3.22979 1.39720 icb = 45 0.00039 -5.84505 0.93923 -3.03566 0.35793 icb = 46 -3.72784 -2.09794 4.39000 0.32064 1.78233 icb = 47 0.01469 -5.86246 5.58053 -0.01804 0.82764 icb = 48 0.00128 -5.78781 5.33262 2.73566 1.31372 icb = 49 0.00932 -5.86240 2.48632 0.74194 0.81931 icb = 50 0.00612 -5.77189 3.91262 -0.95006 -0.80512 icb = 51 -0.00363 -5.84317 3.98419 -0.55350 0.90284 icb = 52 -0.00224 -5.82117 3.95014 1.48383 -0.41169 icb = 53 0.20362 -6.51631 1.35561 5.86060 -1.28127 icb = 54 0.02448 -5.81204 5.17262 1.37008 0.82802 icb = 55 -0.00152 -5.85408 4.01779 1.61467 0.28704 icb = 56 -0.00423 -5.83966 2.61363 0.88141 -0.70075 icb = 57 -0.02117 -5.96898 4.07865 2.43138 -1.78893 icb = 58 0.00027 -5.82588 1.31435 -1.18865 0.26953 icb = 59 0.00043 -5.84077 3.52344 -4.10832 -0.43924 icb = 60 0.00041 -5.81544 0.49631 -1.01708 0.21993 icb = 61 0.02092 -5.88928 0.51464 1.12856 -1.70999 icb = 62 0.00174 -5.80755 3.94432 -0.47241 -0.38275 icb = 63 0.00913 -5.83522 4.19737 -1.02053 0.69828 icb = 64 0.03452 -5.90439 4.37801 -5.77864 0.82398 icb = 65 0.01397 -5.83886 2.70761 0.79075 1.16391 icb = 66 0.01440 -5.84916 0.47843 0.52056 0.86098 icb = 67 0.24177 -5.62971 4.08315 -1.66755 -1.19882 icb = 68 -0.00026 -5.81848 4.36441 2.00112 -0.31773 icb = 69 -0.00642 -5.74237 2.93355 -5.58294 0.63966 icb = 70 -0.06732 -6.04467 4.74570 -3.83902 -1.54026 icb = 71 0.03644 -5.87048 3.49157 -0.04072 -1.46475 icb = 72 0.00584 -5.91379 3.81044 -0.08490 0.55540 icb = 73 0.00171 -5.82698 3.06475 0.72372 0.37014 icb = 74 -0.00113 -5.83867 0.57048 0.09717 0.26888 icb = 75 -0.00064 -5.84451 4.21780 -1.13319 -1.69323 icb = 76 -0.00949 -5.83493 0.25586 0.16492 0.45880 icb = 77 -0.01636 -5.83301 5.60422 -0.44685 0.96623 icb = 78 0.00452 -5.83032 2.86472 -0.94751 -1.07503 icb = 79 -0.00291 -5.81098 3.17377 -0.19205 -0.25588 icb = 80 0.00712 -5.85363 3.92458 -0.42826 -0.35730 icb = 81 0.00672 -5.83249 0.57230 -0.43002 -0.20999 icb = 82 0.00373 -5.86980 0.06341 -0.21398 0.90732 icb = 83 0.04366 -5.88324 4.31744 1.93780 -1.54938 icb = 84 -0.00590 -5.84850 3.16767 1.68370 0.49639 icb = 85 0.01508 -5.80839 2.65066 -1.98444 1.70781 icb = 86 -0.25437 -13.05436 6.21091 -0.23564 1.70439 icb = 87 -0.00756 -5.83463 0.53087 1.52888 1.63106 icb = 88 -0.00330 -5.82742 1.62443 0.39392 1.60503 icb = 89 -0.04704 -5.84743 0.96237 -1.12572 -1.91735 icb = 90 -0.17326 -5.81061 3.92817 -0.81618 0.94482 icb = 91 0.00158 -5.81296 3.53174 -2.42230 0.39877 icb = 92 -0.00066 -5.81864 4.44842 0.05497 0.59233 icb = 93 -0.00135 -5.82879 0.30894 0.29543 -0.34825 icb = 94 -0.00465 -5.81732 4.33449 -1.31070 1.70525 icb = 95 -0.03740 -5.79647 3.72766 1.53514 -1.38154 icb = 96 -0.01353 -5.93893 1.57238 1.92907 -1.43688 icb = 97 -0.00077 -5.86764 4.33209 0.39427 -0.36284 icb = 98 0.01944 -6.12288 2.88360 -5.84442 0.86668 icb = 99 0.02711 -5.82416 6.15996 1.46891 1.32815 icb = 100 -0.00201 -5.83043 4.52561 -0.47547 -0.65836 icb = 101 -2.92972 -8.04244 6.09995 -2.17611 1.26605 icb = 102 0.09971 -7.52227 3.87579 -1.38437 1.15592 icb = 103 -0.00534 -5.84301 4.51307 0.22943 0.74460 icb = 104 1.10101 -21.77080 6.17153 -0.01599 1.48078 icb = 105 0.01558 -5.84788 0.50608 -1.13687 0.94311 icb = 106 9.05569 31.08122 5.58476 1.56207 -1.20715 icb = 107 0.01164 -5.84471 3.75277 -1.39650 -0.38123 icb = 108 -1.49498 -7.49761 5.55934 -0.28498 1.76117 icb = 109 8.91790 -32.28984 1.09902 -1.13741 -1.37418 icb = 110 0.77997 9.58047 0.25918 -0.49603 1.38139 icb = 111 -0.01671 -5.85901 3.82752 0.54868 -1.34564 icb = 112 -2.58328 17.60746 0.73320 0.39519 1.13274 icb = 113 0.01337 -5.84333 0.71546 -2.91181 -0.51861 icb = 114 -0.00166 -5.82923 0.43058 0.11805 -0.38818 icb = 115 0.01379 -5.89113 4.18607 1.47717 -1.38658 icb = 116 0.06278 -6.08479 5.15424 -5.64125 1.83680 icb = 117 -0.01950 -6.02772 1.59463 5.66414 1.82818 icb = 118 -3.10831 -1.88352 3.42833 0.87668 0.14278 icb = 119 -6.32090 -7.18690 0.73257 -0.15199 -0.72350 icb = 120 -0.73346 -9.48463 5.06029 0.05387 -1.73176 icb = 121 -4.77711 -3.50216 4.92807 0.14707 0.10802 icb = 122 0.41498 -28.90103 4.73531 -0.64928 1.79817 icb = 123 1.28176 3.99537 3.74274 1.44468 -1.18974 icb = 124 -0.05768 2.28739 1.20822 1.20711 -1.49878 icb = 125 -0.80542 19.36539 4.04083 -2.14759 1.35631 icb = 126 -0.78405 -28.44543 0.73657 4.35549 1.50176 icb = 127 0.39619 -28.97798 5.95971 0.25077 -1.07701 icb = 128 -0.00990 -5.93775 1.21693 -1.38330 0.39663 icb = 129 4.66204 22.03837 6.12990 -0.85405 0.37564 icb = 130 -2.03690 18.99500 5.90519 -0.58102 1.51508 icb = 131 0.95592 -6.17543 4.01892 1.56129 -0.29055 icb = 132 -2.48163 15.51182 5.00622 0.37067 1.22575 icb = 133 1.91484 19.76054 4.75900 -0.02351 -0.62792 icb = 134 0.17192 -1.78831 4.93833 -0.09386 -0.85039 icb = 135 -0.36626 -5.79813 1.37248 0.40655 -1.55204 icb = 136 -1.22254 29.65847 5.46461 2.55790 1.88430 icb = 137 -0.18370 -29.49735 3.26757 -1.36814 1.78790 icb = 138 3.98459 1.63531 4.53359 0.02491 -1.09213 icb = 139 0.00663 -6.21178 3.30397 0.96361 -0.23767 icb = 140 0.10270 -15.93756 5.14876 0.63674 1.56019 icb = 141 3.35363 -21.60445 1.97985 -1.01546 -1.69191 icb = 142 5.97462 -0.67108 3.63539 1.32195 1.32867 icb = 143 -0.20101 -19.69872 6.18294 0.37209 -0.82545 icb = 144 -0.22792 -24.06468 1.12028 0.68471 1.87193 ***************************** EVENT= 3 icb = 1 0.01709 -3.77855 5.10596 -1.13059 -2.01126 icb = 2 -0.10826 -3.73417 2.09333 -2.38302 1.45130 icb = 3 -0.00392 -3.74763 4.21354 -1.67237 1.20106 icb = 4 -0.00570 -3.74112 5.18655 -0.30056 -1.07265 icb = 5 0.02263 -3.91439 4.35312 -4.29815 -1.12808 icb = 6 0.03499 -3.72586 6.27037 -2.80955 1.47674 icb = 7 0.00327 -3.91272 5.51475 2.17401 1.45317 ***************************** EVENT= 4 icb = 1 -0.00066 -0.97880 1.93736 0.84862 -0.03038 iid= 15 -0.00035 -0.97982 1.93732 0.84874 -0.03070 imu= 1 -1.10267 2.75202 1.93843 0.83770 -0.02881 icb = 2 0.00169 -0.98549 1.05908 -3.40091 0.04981 iid= 12 0.00057 -0.98772 1.05921 -3.40068 0.05104 imu= 2 1.92871 15.00695 1.06732 -3.49663 0.04897 icb = 3 -0.01645 -0.85280 4.78335 4.65914 -0.94987 icb = 4 -0.00789 -0.96731 2.73274 -2.42427 0.89087 icb = 5 0.01109 -1.18381 5.07132 4.86795 -1.44177 icb = 6 0.00613 -0.95830 5.68678 2.34391 0.67649 icb = 7 0.00256 -0.96988 0.05352 -4.49837 -1.52618 icb = 8 0.00365 -0.97678 4.04963 -2.38002 -1.66490 icb = 9 -0.02178 -0.66990 5.47568 4.75728 -1.96410 icb = 10 -0.01643 -0.92640 1.54559 4.79215 -0.81814 icb = 11 -0.00726 -0.98399 2.23956 0.28635 1.62740 icb = 12 -0.01435 -0.93310 1.10969 -0.85293 0.67102 icb = 13 -0.01862 -0.93972 5.08509 1.63716 0.83447 icb = 14 -0.02529 -1.02776 3.47371 -3.57913 -0.87835 icb = 15 0.00542 -0.98816 0.84535 1.18563 1.51594 icb = 16 0.00819 -0.95127 5.94298 2.07466 -0.95346 icb = 17 0.00161 -1.01436 5.47003 -6.04582 -0.20904 icb = 18 -0.00870 -0.97236 0.37514 0.45911 1.56878 icb = 19 0.02735 -0.95781 4.88763 -1.37015 1.78145 icb = 20 -0.02190 -1.00323 3.35092 -5.95559 -1.07358 icb = 21 -0.00719 -1.02085 2.56255 0.97672 -0.90328 icb = 22 -0.09382 0.17581 0.22804 -2.87811 -1.66898 icb = 23 0.00414 -1.00925 5.34601 -1.06874 0.44080 icb = 24 -0.45797 -7.29271 4.92140 3.30221 1.37228 #include "TFile.h" #include "TTree.h" #include "TString.h" int combi1() { gROOT->Reset(); char line[80],first,intro1[20],intro2[20]; Int_t Event,ev_num; Int_t IDTrack_id[2]; Float_t IDA0[2],IDZ[2],IDPhi[2],IDCotth[2],IDPtinv[2]; Int_t MSTrack_id[2]; Float_t MSA0[2],MSZ[2],MSPhi[2],MSCotth[2],MSPtinv[2]; Int_t CombTrack_id[2]; Float_t CombA0[2],CombZ[2],CombPhi[2],CombCotth[2],CombPtinv[2]; FILE *fp = fopen("/afs/cern.ch/user/p/paniccia/public/rec/staco/clean.out","r"); Int_t trid; Float_t a0,z,phi,cotth,ptinv; char track_type[7],eq[3]; TFile *f = new TFile("staco_comb.root","RECREATE"); TTree *tree = new TTree("hcomb","data from combi ascii file"); tree->Branch("Event",&Event,"Event/I"); tree->Branch("IDTrack_id",IDTrack_id,"IDTrack_id[2]/I"); tree->Branch("IDTrack_A0",IDA0,"IDA0[2]/F"); tree->Branch("IDTrack_Z",IDZ,"IDZ[2]/F"); tree->Branch("IDTrack_Phi",IDPhi,"IDPhi[2]/F"); tree->Branch("IDTrack_Cotth",IDCotth,"IDCotth[2]/F"); tree->Branch("IDTrack_Ptinv",IDPtinv,"IDPtinv[2]/F"); tree->Branch("MSTrack_id",MSTrack_id,"MSTrack_id[2]/I"); tree->Branch("MSTrack_A0",MSA0,"MSA0[2]/F"); tree->Branch("MSTrack_Z",MSZ,"MSZ[2]/F"); tree->Branch("MSTrack_Phi",MSPhi,"MSPhi[2]/F"); tree->Branch("MSTrack_Cotth",MSCotth,"MSCotth[2]/F"); tree->Branch("MSTrack_Ptinv",MSPtinv,"MSPtinv[2]/F"); tree->Branch("CombTrack_id",CombTrack_id,"CombTrack_id[2]/I"); tree->Branch("CombTrack_A0",CombA0,"CombA0[2]/F"); tree->Branch("CombTrack_Z",CombZ,"CombZ[2]/F"); tree->Branch("CombTrack_Phi",CombPhi,"CombPhi[2]/F"); tree->Branch("CombTrack_Cotth",CombCotth,"CombCotth[2]/F"); tree->Branch("CombTrack_Ptinv",CombPtinv,"CombPtinv[2]/F"); Int_t ncols; Int_t num_comb,num_isol; while (1) { ncols = fscanf(fp,"%c",&first); fgets(line,80,fp); TString event_line = line; TString checker("EVENT"); if (event_line(29,5)==checker) { sscanf(line,"%s %s %d",&intro1,&intro2,&ev_num); Event = (Int_t)ev_num; printf("%d\n",ev_num); num_comb =0; num_isol =0; for (Int_t j=0;j<2;j++) { fgets(line,80,fp); sscanf(line,"%s %s %d %f %f %f %f %f",&track_type,&eq,&trid,&a0,&z,&phi,&cotth,&ptinv); printf("track_type=%s, trid=%8d, a0=%8f, z=%8f, phi=%8f, cotth=%8f, ptinv=%8f\n",track_type,trid,a0,z,phi,cotth,ptinv); CombTrack_id[j]=trid; CombA0[j]=a0; CombZ[j]=z; CombPhi[j]=phi; CombCotth[j]=cotth; CombPtinv[j]=ptinv; num_isol++; fgets(line,80,fp); sscanf(line,"%s %d %f %f %f %f %f",&track_type,&trid,&a0,&z,&phi,&cotth,&ptinv); printf("track_type=%s, trid=%8d, a0=%8f, z=%8f, phi=%8f, cotth=%8f, ptinv=%8f\n",track_type,trid,a0,z,phi,cotth,ptinv); TString track_ck = track_type; if (track_ck(0,3)=="iid") { num_comb++; IDTrack_id[j]=trid; IDA0[j]=a0; IDZ[j]=z; IDPhi[j]=phi; IDCotth[j]=cotth; IDPtinv[j]=ptinv; fgets(line,80,fp); sscanf(line,"%s %d %f %f %f %f %f",&track_type,&trid,&a0,&z,&phi,&cotth,&ptinv); printf("track_type=%s, trid=%8d, a0=%8f, z=%8f, phi=%8f, cotth=%8f, ptinv=%8f\n",track_type,trid,a0,z,phi,cotth,ptinv); MSTrack_id[j]=trid; MSA0[j]=a0; MSZ[j]=z; MSPhi[j]=phi; MSCotth[j]=cotth; MSPtinv[j]=ptinv; } if ((num_isol==2)&&(num_comb==2)) { tree->Fill(); num_comb=0; num_isol=0; } } printf("*****************************************************\n"); } if (ncols < 0) break; } tree->Scan(); tree->Show(1); f->Write(); fclose(fp); return 0; }
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:12 MET