And I try to stuck them, the histo are not colored. I found similar problem, and you solved using:
hist_stack->Draw("hist");
And I see that it works. What if I want to save it in a file? I tried to use Write(“hist”), but it doesn’t work and I cannot find another way… Can you help me?
I wrote several long routine in which i Fill this histograms with the method above:
back1->Fill(x1,weight)
And the same for the others, and the signal.
Now I want to write a function that creates a vector of stack, and write that vector on a file. I’m using something like:
The results is a non-colored stack in which I can’t recognize signal from background. If I don’t use method Fill(x,weight), but only Fill(x) I obtain the usual colored stack.
I found that if I want to see the stack with color (using Fill(x,w)) I have to use Draw(“hist”), but I want to Write on file, because this is a long vector.
Until now I create a canvas with Draw and save it in a file, but it’s not a very usefull solution. There is a way to save on file colored THStack filled with Fill(x,w)?
Thank you