This Notebook will show you how to use MathROOT, but you won't be able to evaluate it becuase it depends on my ROOT data files installed on my personal computer which you won't have. However, there are enough examples that you should be able to modify the Notebook to work with your own ROOT data files.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![{{Name -> h10, Title -> Raw WAB Events in CWN format, AbsolutePath -> C:\\Documents and Settings\\Matthew D. Langston\\My Documents\\Physics\\analysis\\WABRecon\\data\\1997_cwn2cwn.root\\h10;3, RelativePath -> h10;3, Rows -> 176242, Columns -> 8, ColumnNames -> {run, event, epol, etot, n_clus, E, cthtot, phitot}, ColumnTypes -> {Int_t, Int_t, Float_t, Float_t, Int_t, Float_t[n_clus][5], Float_t[n_clus], Float_t[n_clus]}}, {Name -> h10, Title -> Raw WAB Events in CWN format, AbsolutePath -> C:\\Documents and Settings\\Matthew D. Langston\\My Documents\\Physics\\analysis\\WABRecon\\data\\1997_cwn2cwn.root\\h10;2, RelativePath -> h10;2, Rows -> 156633, Columns -> 8, ColumnNames -> {run, event, epol, etot, n_clus, E, cthtot, phitot}, ColumnTypes -> {Int_t, Int_t, Float_t, Float_t, Int_t, Float_t[n_clus][5], Float_t[n_clus], Float_t[n_clus]}}}](HTMLFiles/index_25.gif)
![]()
![]()
![{Name -> h10, Title -> Raw WAB Events in CWN format, AbsolutePath -> C:\\Documents and Settings\\Matthew D. Langston\\My Documents\\Physics\\analysis\\WABRecon\\data\\1997_cwn2cwn.root\\h10;3, RelativePath -> h10;3, Rows -> 176242, Columns -> 8, ColumnNames -> {run, event, epol, etot, n_clus, E, cthtot, phitot}, ColumnTypes -> {Int_t, Int_t, Float_t, Float_t, Int_t, Float_t[n_clus][5], Float_t[n_clus], Float_t[n_clus]}}](HTMLFiles/index_28.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()

![]()
![]()
![{Name -> 1997_wab_recon, Title -> 1997 Reconstructed WAB Events, AbsolutePath -> C:\\Documents and Settings\\Matthew D. Langston\\My Documents\\Physics\\analysis\\WABRecon\\data_cwn2cwn\\100 MeV Cluster Quality Cut\\wab_recon.root\\1997_wab_recon;1, RelativePath -> 1997_wab_recon;1, Rows -> 175564, Columns -> 30, ColumnNames -> {run, event, epol, etot, etot_imb, thrust, thrust2, thrust3, imb, rapidity, cthcms, beta, e_isr_photon_imb, e_isr_photon, s_prime, s_prime_imb, x, n_clus_tot, n_clus_mag, n_clus_em, n_clus, E, cthtot, phitot, clus_index, cuts, clus_test, mcid, gamma_sep, gamma_sep_cth}, ColumnTypes -> {Int_t, Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Int_t, Int_t, Int_t, Int_t, Float_t[n_clus][5], Float_t[n_clus], Float_t[n_clus], Int_t[n_clus], UInt_t, UInt_t, Int_t[n_clus], Float_t, Float_t}}](HTMLFiles/index_39.gif)
![]()
![]()
![]()
| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
![]()
![cutMask[cuts_List] := Module[{cutNames, hexPatterns, cutMasks}, cutNames = {"etot", "etotImb", "imb", "nClusTotLow", "nClusTotHigh", "nClusMagLow", "nClusMagHigh", "nClusEmLow", "nClusEmHigh", "rapidity", "clus1EM", "clus1HAD1", "clus1HAD2", "clus2EM", "clus2HAD1", "clus2HAD2", "eAngle", "pass", "passImb", "fail"} ; hexPatterns = {1, 2, 4, 8, 10, 20, 40, 80, 100, 200, 400, 800, 1000, 2000, 4000, 8000, 10000, 20000, 40000, 80000} ; cutMasks = Flatten[Extract[hexPatterns, Position[cutNames, #, {1}] & /@ cuts]] ; cutMasks = ToExpression["16^^" <> ToString[#]] & /@ cutMasks ; BitOr[Sequence @@ cutMasks]] ;](HTMLFiles/index_44.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
![]()

![]()
![]()
![]()
![]()
![]()
![]()
Swap the etot and imb columns.
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_69.gif]](HTMLFiles/index_69.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_77.gif]](HTMLFiles/index_77.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_85.gif]](HTMLFiles/index_85.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_92.gif]](HTMLFiles/index_92.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_99.gif]](HTMLFiles/index_99.gif)
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_105.gif]](HTMLFiles/index_105.gif)
![makeClusCut[clusIndex_, cutIndex_] := Module[{clusCuts, cutList}, clusCuts = {"E[n][0]+E[n][1]>10", "E[n][2]<3", "E[n][3]<0.6"} ; cutList = {StringReplace[clusCuts, {"n" -> "0"}]} ; AppendTo[cutList, StringReplace[clusCuts, {"n" -> "1"}]] ; cutList = Complement[Flatten[cutList], {Extract[cutList, {clusIndex, cutIndex}]}] ; StringJoin[StringJoin[#, "&&"] & /@ Drop[cutList, -1], Last[cutList]]]](HTMLFiles/index_106.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
| 16.04975128173828` | 10.11223030090332` | 0.` | 0.` | 26.1619815826416` |
| 10.579289436340332` | 8.640105247497559` | 0.2834550738334656` | 0.16381382942199707` | 19.666664123535156` |
| 10.349469184875488` | 16.95244598388672` | 0.206232950091362` | 0.` | 27.508148193359375` |
| 10.459217071533203` | 15.173312187194824` | 0.1465078592300415` | 0.` | 25.779037475585938` |
| 11.994686126708984` | 10.176566123962402` | 0.2627420723438263` | 0.2429988980293274` | 22.67699432373047` |
| 10.939254760742188` | 16.58409309387207` | 0.25368329882621765` | 0.` | 27.77703094482422` |
| 13.439058303833008` | 5.594483375549316` | 0.` | 0.` | 19.03354263305664` |
| 1.5562491416931152` | 28.790822982788086` | 1.8693290948867798` | 0.` | 32.216400146484375` |
| 10.143742561340332` | 21.25777244567871` | 0.14396964013576508` | 0.` | 31.545486450195312` |
| 8.284002304077148` | 9.130632400512695` | 1.2216001749038696` | 0.25322532653808594` | 18.88945960998535` |
![]()
![]()
![[Graphics:HTMLFiles/index_117.gif]](HTMLFiles/index_117.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_125.gif]](HTMLFiles/index_125.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_133.gif]](HTMLFiles/index_133.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_141.gif]](HTMLFiles/index_141.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_149.gif]](HTMLFiles/index_149.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_157.gif]](HTMLFiles/index_157.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_164.gif]](HTMLFiles/index_164.gif)
![]()
![]()
![]()
![]()
![]()

![]()
![]()
![]()
![[Graphics:HTMLFiles/index_174.gif]](HTMLFiles/index_174.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_182.gif]](HTMLFiles/index_182.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_190.gif]](HTMLFiles/index_190.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_197.gif]](HTMLFiles/index_197.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_204.gif]](HTMLFiles/index_204.gif)
![]()
![]()
![]()
![]()
![]()
![]()
![[Graphics:HTMLFiles/index_211.gif]](HTMLFiles/index_211.gif)
![]()
![[Graphics:HTMLFiles/index_213.gif]](HTMLFiles/index_213.gif)
![]()
![[Graphics:HTMLFiles/index_215.gif]](HTMLFiles/index_215.gif)
Converted by Mathematica (January 2, 2003)