I have created tree (tr_inv) with some branches. One of these branches (ph_m) is branch which contain 2-dim arrays. When I try to display this branch by using method Draw(): tr_inv->Draw(“ph_m”); it gives me wrong picture. But If instead I type tr_inv->Draw(“ph_m[1][2]”) it works correctly.
I want ROOT to display me Histogram of all entries of ph_m. By the way in case of 1-dim array this problem does not appear.
Show here how you define the “ph_m” array in your c++ source code and how you define the tree branch (which “encapsulates” it).
Also, which ROOT version exactly and on what operating system and compiler are you using.
It seems you have huge values somewhere, of the order of 4e26, which you need to get rid of.
Try:
TH1D *h = new TH1D(“h”, “h”, 100, 0, 1e7);
tr_inv->Draw(“ph_m >> h”);
or add a cut.
[quote=“Pepe Le Pew”]It seems you have huge values somewhere, of the order of 4e26, which you need to get rid of.
Try:
TH1D *h = new TH1D(“h”, “h”, 100, 0, 1e7);
tr_inv->Draw(“ph_m >> h”);
or add a cut.[/quote]
Do not sure you right. You can see that if I draw just sum of array it works without any “singularities”.
OK. I think I have an idea what is this problem caused by. I have declared ph_m as 2-dim array but do not initialized every ph_m[i][j], and etc. In other words, I do not differentiate [i][j] and [j][i] and do not fill ph_m[k][k].