Way to scale up two histograms into a TProfile

Is there a way to scale up branches in a tree simultaneously and plot into a profile ?
something like

tree->Draw(“hprof”, '“x:y”, “10”, “20”)
10 for scaling up x, and 20 for y ?

How about this (TTree::Draw)?

tree->Draw("10*x:20*y","","prof")

Doesn’t work unfortunately, stretches the x and y axis

Then your issue is not clear to me. Could you explain what you mean by scaling?

I have two branches x, y. I want to scale x by 10, y by 20 and do a TProfile on them. By scaling I was referring to raising/lowering the bin contents.

You want to have the contents weighted then? You description of weighting is not quite clear, it seems to me you want every been scaled by 200? Maybe a small example is needed.

Because with the methods I know I can only weight one branch or one histogram, but when there are two I was wondering how to do it.

I guess that makes sense, yes, weighting is the word I was looking for.

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