- #1
lavster
- 217
- 0
can anyone tell me how to subtract histograms?
ive got to histograms already defined (pointers) called h1 and h2. and i want to make a third histogram object that is one subtract the other.
so far I've got TH1F h3 = (*h2)-(*h1);
and then after defining a new canvas I've got
h3.Draw();
but its not doing anything :(
thanks!
ive got to histograms already defined (pointers) called h1 and h2. and i want to make a third histogram object that is one subtract the other.
so far I've got TH1F h3 = (*h2)-(*h1);
and then after defining a new canvas I've got
h3.Draw();
but its not doing anything :(
thanks!