Hello everyone,
I want to pass values from a tree variable to the histogram. For that, I wrote the following code,
// Histogram "h"
TH1F *h = new TH1F("h", "h", 100, -150, 150);
// "X_tree" is the tree.
// "X_trck[0]" is the variable of interest.
// -9999. is junk data which I want to exclude.
// This line pass variable information to histogram "h".
// But this also plots it, which I don't want.
X_tree -> Draw("X_trck[0] >> h", "-9999. < X_trck[0]");
As I am using the Draw()
command, it is showing the plot of a histogram, which I don’t want.
So, is there any way to do the same thing without plotting a histogram?