How do people determine the difference between two TProfiles?
Subtracting the two via Add() behaves differently for TProfiles than for histograms, and thus it’s not giving me the numbers I’m interested in.
Here’s a minimal example of subtracting one TProfile from another:
from ROOT import TProfile, TCanvas, gROOT
profile1 = TProfile(“p1”,“p1”,5,0,5)
profile2 = TProfile(“p2”,“p2”,5,0,5)
for i in range(5):
canvas = TCanvas(“canvas”,“canvas”,500,310)
The difference between the two profiles is 0.5 in each bin. But what results is 0.25 in each bin! I’m guessing the number of “BinEntries” was added between these two profiles and thus a result of 0.5 gets divided by 2?
So what does one do to get the actual difference between two TProfiles?