This TH2 with 2 variables it works well, but if I try to do the same using 3 variables and so to use a TH3 It doesn’t works and I get error: Break segmentation…
If I don’t assigne the tree draw to the histogram, in this way:
imported_tree.Draw("z_TOT:x_TOT:y_TOT","","")
this it work, i can save the canvas, but then i can not modify the hisogram…
$ root
-------------------------------------------------------------------
| Welcome to ROOT 6.13/03 http://root.cern.ch |
| (c) 1995-2017, The ROOT Team |
| Built for macosx64 |
| From heads/master@v6-13-02-474-g5fe7001274, Apr 13 2018, 16:35:35 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
-------------------------------------------------------------------
root [0] auto h3 = new TH3F("h3","h3",10,0.,1.,10,0.,1.,10,0.,1.);
root [1] ntuple->Draw("px:py:pz>>h3");
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2]
ntuple is the ntuple created by $ROOTSYS/tutorials/hsimple.C