How convert TH1I to TH1D?

Hi rooters.
someone knows if is there any method to convert different type of histograms?
I´m trying to scale a THI1 but I´m interested in the decimals so I have to convert it first to TH1D.

I tried something like this

TH1I * h1= new TH1I ("", "", Nbin, Xlow, XUp);
TH1D * h2 = (TH1D* ) h1;

It does the scaling but I dont get the decimals that I´m specting, so that I think this is not the way to perform the conversion.

I was also thinking in to redefining the histogramas with GetBinContent, but I think shouldn’t be necessary
Thanks in advance


I may have misunderstood your question, but please keep in mind that different “types” of histograms have nothing to do with what numerical types you possibly can put in these histograms, it’s all about numerical type per channel, e.g., TH1I means you’ll have one integer per channel, i.e. maximum bin content is 2147483647, and for TH1F you’ll have one float per channel, i.e. 7-digit precision tops.