Dividing TProfile histograms

Is there a way to divide the TProfile histograms like the way its done with TH1D ?

TH1D *hNum, *hDenom
hNum->Divide(hDenom)

You can divide two TProfile histograms like two TH1D histograms.

Not sure what this line means

Warning in TProfile::Divide: Cannot preserve during the division of profiles the sum of bin weight square

and I also get the following Warning trying to load a lot of TProfiles

Warning in : Sum of squares of profile bin weights structure already created
Warning in : Sum of squares of profile bin weights structure already created
Warning in : Sum of squares of profile bin weights structure already created

Is something overwritten by any chance ?

// maintaining the correct sum of weights square is not supported when dividing
// bin error resulting from division of profile needs to be checked

So for today 2017.09.20, if you don’t want to see these warnings, for your “hNum” call (no need to care about “hDenom”):
hNum->Sumw2(kFALSE);

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.